!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){"use strict";(function(e){var n;function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
/*!
 * jQuery JavaScript Library v3.4.1
 * https://jquery.com/
 *
 * Includes Sizzle.js
 * https://sizzlejs.com/
 *
 * Copyright JS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2019-05-01T21:04Z
 */
/*!
 * jQuery JavaScript Library v3.4.1
 * https://jquery.com/
 *
 * Includes Sizzle.js
 * https://sizzlejs.com/
 *
 * Copyright JS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2019-05-01T21:04Z
 */
!function(t,n){"object"===r(e)&&"object"===r(e.exports)?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:void 0,function(o,i){var a=[],s=o.document,u=Object.getPrototypeOf,l=a.slice,c=a.concat,d=a.push,f=a.indexOf,p={},h=p.toString,v=p.hasOwnProperty,m=v.toString,y=m.call(Object),g={},b=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},w={type:!0,src:!0,nonce:!0,noModule:!0};function k(e,t,n){var r,o,i=(n=n||s).createElement("script");if(i.text=e,t)for(r in w)(o=t[r]||t.getAttribute&&t.getAttribute(r))&&i.setAttribute(r,o);n.head.appendChild(i).parentNode.removeChild(i)}function C(e){return null==e?e+"":"object"===r(e)||"function"==typeof e?p[h.call(e)]||"object":r(e)}var T=function e(t,n){return new e.fn.init(t,n)},j=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function S(e){var t=!!e&&"length"in e&&e.length,n=C(e);return!b(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}T.fn=T.prototype={jquery:"3.4.1",constructor:T,length:0,toArray:function(){return l.call(this)},get:function(e){return null==e?l.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=T.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return T.each(this,e)},map:function(e){return this.pushStack(T.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(l.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:d,sort:a.sort,splice:a.splice},T.extend=T.fn.extend=function(){var e,t,n,o,i,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[u]||{},u++),"object"===r(s)||b(s)||(s={}),u===l&&(s=this,u--);u<l;u++)if(null!=(e=arguments[u]))for(t in e)o=e[t],"__proto__"!==t&&s!==o&&(c&&o&&(T.isPlainObject(o)||(i=Array.isArray(o)))?(n=s[t],a=i&&!Array.isArray(n)?[]:i||T.isPlainObject(n)?n:{},i=!1,s[t]=T.extend(c,a,o)):void 0!==o&&(s[t]=o));return s},T.extend({expando:"jQuery"+("3.4.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==h.call(e))&&(!(t=u(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&m.call(n)===y)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t){k(e,{nonce:t&&t.nonce})},each:function(e,t){var n,r=0;if(S(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(j,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(S(Object(e))?T.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:f.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,o=e.length;r<n;r++)e[o++]=t[r];return e.length=o,e},grep:function(e,t,n){for(var r=[],o=0,i=e.length,a=!n;o<i;o++)!t(e[o],o)!==a&&r.push(e[o]);return r},map:function(e,t,n){var r,o,i=0,a=[];if(S(e))for(r=e.length;i<r;i++)null!=(o=t(e[i],i,n))&&a.push(o);else for(i in e)null!=(o=t(e[i],i,n))&&a.push(o);return c.apply([],a)},guid:1,support:g}),"function"==typeof Symbol&&(T.fn[Symbol.iterator]=a[Symbol.iterator]),T.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){p["[object "+t+"]"]=t.toLowerCase()});var _=
/*!
   * Sizzle CSS Selector Engine v2.3.4
   * https://sizzlejs.com/
   *
   * Copyright JS Foundation and other contributors
   * Released under the MIT license
   * https://js.foundation/
   *
   * Date: 2019-04-08
   */
function(e){var t,n,r,o,i,a,s,u,l,c,d,f,p,h,v,m,y,g,b,x="sizzle"+1*new Date,w=e.document,k=0,C=0,T=ue(),j=ue(),S=ue(),_=ue(),A=function(e,t){return e===t&&(d=!0),0},E={}.hasOwnProperty,N=[],D=N.pop,q=N.push,L=N.push,O=N.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},M="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",H="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",I="\\["+H+"*("+R+")(?:"+H+"*([*^$|!~]?=)"+H+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+H+"*\\]",W=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+I+")*)|.*)\\)|)",$=new RegExp(H+"+","g"),Q=new RegExp("^"+H+"+|((?:^|[^\\\\])(?:\\\\.)*)"+H+"+$","g"),F=new RegExp("^"+H+"*,"+H+"*"),B=new RegExp("^"+H+"*([>+~]|"+H+")"+H+"*"),z=new RegExp(H+"|>"),U=new RegExp(W),X=new RegExp("^"+R+"$"),V={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+H+"*(even|odd|(([+-]|)(\\d*)n|)"+H+"*(?:([+-]|)"+H+"*(\\d+)|))"+H+"*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),needsContext:new RegExp("^"+H+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+H+"*((?:-\\d)?\\d*)"+H+"*\\)|)(?=[^-]|$)","i")},G=/HTML$/i,J=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+H+"?|("+H+")|.)","ig"),ne=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)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,oe=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ie=function(){f()},ae=xe(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{L.apply(N=O.call(w.childNodes),w.childNodes),N[w.childNodes.length].nodeType}catch(e){L={apply:N.length?function(e,t){q.apply(e,O.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,o){var i,s,l,c,d,h,y,g=t&&t.ownerDocument,k=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==k&&9!==k&&11!==k)return r;if(!o&&((t?t.ownerDocument||t:w)!==p&&f(t),t=t||p,v)){if(11!==k&&(d=Z.exec(e)))if(i=d[1]){if(9===k){if(!(l=t.getElementById(i)))return r;if(l.id===i)return r.push(l),r}else if(g&&(l=g.getElementById(i))&&b(t,l)&&l.id===i)return r.push(l),r}else{if(d[2])return L.apply(r,t.getElementsByTagName(e)),r;if((i=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(i)),r}if(n.qsa&&!_[e+" "]&&(!m||!m.test(e))&&(1!==k||"object"!==t.nodeName.toLowerCase())){if(y=e,g=t,1===k&&z.test(e)){for((c=t.getAttribute("id"))?c=c.replace(re,oe):t.setAttribute("id",c=x),s=(h=a(e)).length;s--;)h[s]="#"+c+" "+be(h[s]);y=h.join(","),g=ee.test(e)&&ye(t.parentNode)||t}try{return L.apply(r,g.querySelectorAll(y)),r}catch(t){_(e,!0)}finally{c===x&&t.removeAttribute("id")}}}return u(e.replace(Q,"$1"),t,r,o)}function ue(){var e=[];return function t(n,o){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=o}}function le(e){return e[x]=!0,e}function ce(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),o=n.length;o--;)r.attrHandle[n[o]]=t}function fe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function he(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ve(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function me(e){return le(function(t){return t=+t,le(function(n,r){for(var o,i=e([],n.length,t),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))})})}function ye(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!G.test(t||n&&n.nodeName||"HTML")},f=se.setDocument=function(e){var t,o,a=e?e.ownerDocument||e:w;return a!==p&&9===a.nodeType&&a.documentElement?(h=(p=a).documentElement,v=!i(p),w!==p&&(o=p.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",ie,!1):o.attachEvent&&o.attachEvent("onunload",ie)),n.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ce(function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=K.test(p.getElementsByClassName),n.getById=ce(function(e){return h.appendChild(e).id=x,!p.getElementsByName||!p.getElementsByName(x).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&v){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&v){var n,r,o,i=t.getElementById(e);if(i){if((n=i.getAttributeNode("id"))&&n.value===e)return[i];for(o=t.getElementsByName(e),r=0;i=o[r++];)if((n=i.getAttributeNode("id"))&&n.value===e)return[i]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&v)return t.getElementsByClassName(e)},y=[],m=[],(n.qsa=K.test(p.querySelectorAll))&&(ce(function(e){h.appendChild(e).innerHTML="<a id='"+x+"'></a><select id='"+x+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+H+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+H+"*(?:value|"+M+")"),e.querySelectorAll("[id~="+x+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+x+"+*").length||m.push(".#.+[+~]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+H+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=K.test(g=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ce(function(e){n.disconnectedMatch=g.call(e,"*"),g.call(e,"[s!='']:x"),y.push("!=",W)}),m=m.length&&new RegExp(m.join("|")),y=y.length&&new RegExp(y.join("|")),t=K.test(h.compareDocumentPosition),b=t||K.test(h.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},A=t?function(e,t){if(e===t)return d=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===p||e.ownerDocument===w&&b(w,e)?-1:t===p||t.ownerDocument===w&&b(w,t)?1:c?P(c,e)-P(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],s=[t];if(!o||!i)return e===p?-1:t===p?1:o?-1:i?1:c?P(c,e)-P(c,t):0;if(o===i)return fe(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?fe(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},p):p},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&f(e),n.matchesSelector&&v&&!_[t+" "]&&(!y||!y.test(t))&&(!m||!m.test(t)))try{var r=g.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){_(t,!0)}return se(t,p,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!==p&&f(e),b(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!==p&&f(e);var o=r.attrHandle[t.toLowerCase()],i=o&&E.call(r.attrHandle,t.toLowerCase())?o(e,t,!v):void 0;return void 0!==i?i:n.attributes||!v?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},se.escape=function(e){return(e+"").replace(re,oe)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],o=0,i=0;if(d=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(A),d){for(;t=e[i++];)t===e[i]&&(o=r.push(i));for(;o--;)e.splice(r[o],1)}return c=null,e},o=se.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+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=o(t);return n},(r=se.selectors={cacheLength:50,createPseudo:le,match:V,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(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===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]||se.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]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&U.test(n)&&(t=a(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(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=T[e+" "];return t||(t=new RegExp("(^|"+H+")"+e+"("+H+"|$)"))&&T(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var o=se.attr(r,e);return null==o?"!="===t:!t||(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&o.indexOf(n)>-1:"$="===t?n&&o.slice(-n.length)===n:"~="===t?(" "+o.replace($," ")+" ").indexOf(n)>-1:"|="===t&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,u){var l,c,d,f,p,h,v=i!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),g=!u&&!s,b=!1;if(m){if(i){for(;v;){for(f=t;f=f[v];)if(s?f.nodeName.toLowerCase()===y:1===f.nodeType)return!1;h=v="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&g){for(b=(p=(l=(c=(d=(f=m)[x]||(f[x]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===k&&l[1])&&l[2],f=p&&m.childNodes[p];f=++p&&f&&f[v]||(b=p=0)||h.pop();)if(1===f.nodeType&&++b&&f===t){c[e]=[k,p,b];break}}else if(g&&(b=p=(l=(c=(d=(f=t)[x]||(f[x]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===k&&l[1]),!1===b)for(;(f=++p&&f&&f[v]||(b=p=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==y:1!==f.nodeType)||!++b||(g&&((c=(d=f[x]||(f[x]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]=[k,b]),f!==t)););return(b-=o)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var n,o=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return o[x]?o(t):o.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,n){for(var r,i=o(e,t),a=i.length;a--;)e[r=P(e,i[a])]=!(n[r]=i[a])}):function(e){return o(e,0,n)}):o}},pseudos:{not:le(function(e){var t=[],n=[],r=s(e.replace(Q,"$1"));return r[x]?le(function(e,t,n,o){for(var i,a=r(e,null,o,[]),s=e.length;s--;)(i=a[s])&&(e[s]=!(t[s]=i))}):function(e,o,i){return t[0]=e,r(t,null,i,n),t[0]=null,!n.pop()}}),has:le(function(e){return function(t){return se(e,t).length>0}}),contains:le(function(e){return e=e.replace(te,ne),function(t){return(t.textContent||o(t)).indexOf(e)>-1}}),lang:le(function(e){return X.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=v?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===h},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ve(!1),disabled:ve(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return J.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:me(function(){return[0]}),last:me(function(e,t){return[t-1]}),eq:me(function(e,t,n){return[n<0?n+t:n]}),even:me(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:me(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:me(function(e,t,n){for(var r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e}),gt:me(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=pe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=he(t);function ge(){}function be(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function xe(e,t,n){var r=t.dir,o=t.next,i=o||r,a=n&&"parentNode"===i,s=C++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,o);return!1}:function(t,n,u){var l,c,d,f=[k,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(c=(d=t[x]||(t[x]={}))[t.uniqueID]||(d[t.uniqueID]={}),o&&o===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[i])&&l[0]===k&&l[1]===s)return f[2]=l[2];if(c[i]=f,f[2]=e(t,n,u))return!0}return!1}}function we(e){return e.length>1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function ke(e,t,n,r,o){for(var i,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(i=e[s])&&(n&&!n(i,r,o)||(a.push(i),l&&t.push(s)));return a}function Ce(e,t,n,r,o,i){return r&&!r[x]&&(r=Ce(r)),o&&!o[x]&&(o=Ce(o,i)),le(function(i,a,s,u){var l,c,d,f=[],p=[],h=a.length,v=i||function(e,t,n){for(var r=0,o=t.length;r<o;r++)se(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),m=!e||!i&&t?v:ke(v,f,e,s,u),y=n?o||(i?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r)for(l=ke(y,p),r(l,[],s,u),c=l.length;c--;)(d=l[c])&&(y[p[c]]=!(m[p[c]]=d));if(i){if(o||e){if(o){for(l=[],c=y.length;c--;)(d=y[c])&&l.push(m[c]=d);o(null,y=[],l,u)}for(c=y.length;c--;)(d=y[c])&&(l=o?P(i,d):f[c])>-1&&(i[l]=!(a[l]=d))}}else y=ke(y===a?y.splice(h,y.length):y),o?o(null,a,y,u):L.apply(a,y)})}function Te(e){for(var t,n,o,i=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=xe(function(e){return e===t},s,!0),d=xe(function(e){return P(t,e)>-1},s,!0),f=[function(e,n,r){var o=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):d(e,n,r));return t=null,o}];u<i;u++)if(n=r.relative[e[u].type])f=[xe(we(f),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[x]){for(o=++u;o<i&&!r.relative[e[o].type];o++);return Ce(u>1&&we(f),u>1&&be(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(Q,"$1"),n,u<o&&Te(e.slice(u,o)),o<i&&Te(e=e.slice(o)),o<i&&be(e))}f.push(n)}return we(f)}return ge.prototype=r.filters=r.pseudos,r.setFilters=new ge,a=se.tokenize=function(e,t){var n,o,i,a,s,u,l,c=j[e+" "];if(c)return t?0:c.slice(0);for(s=e,u=[],l=r.preFilter;s;){for(a in n&&!(o=F.exec(s))||(o&&(s=s.slice(o[0].length)||s),u.push(i=[])),n=!1,(o=B.exec(s))&&(n=o.shift(),i.push({value:n,type:o[0].replace(Q," ")}),s=s.slice(n.length)),r.filter)!(o=V[a].exec(s))||l[a]&&!(o=l[a](o))||(n=o.shift(),i.push({value:n,type:a,matches:o}),s=s.slice(n.length));if(!n)break}return t?s.length:s?se.error(e):j(e,u).slice(0)},s=se.compile=function(e,t){var n,o=[],i=[],s=S[e+" "];if(!s){for(t||(t=a(e)),n=t.length;n--;)(s=Te(t[n]))[x]?o.push(s):i.push(s);(s=S(e,function(e,t){var n=t.length>0,o=e.length>0,i=function(i,a,s,u,c){var d,h,m,y=0,g="0",b=i&&[],x=[],w=l,C=i||o&&r.find.TAG("*",c),T=k+=null==w?1:Math.random()||.1,j=C.length;for(c&&(l=a===p||a||c);g!==j&&null!=(d=C[g]);g++){if(o&&d){for(h=0,a||d.ownerDocument===p||(f(d),s=!v);m=e[h++];)if(m(d,a||p,s)){u.push(d);break}c&&(k=T)}n&&((d=!m&&d)&&y--,i&&b.push(d))}if(y+=g,n&&g!==y){for(h=0;m=t[h++];)m(b,x,a,s);if(i){if(y>0)for(;g--;)b[g]||x[g]||(x[g]=D.call(u));x=ke(x)}L.apply(u,x),c&&!i&&x.length>0&&y+t.length>1&&se.uniqueSort(u)}return c&&(k=T,l=w),b};return n?le(i):i}(i,o))).selector=e}return s},u=se.select=function(e,t,n,o){var i,u,l,c,d,f="function"==typeof e&&e,p=!o&&a(e=f.selector||e);if(n=n||[],1===p.length){if((u=p[0]=p[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&v&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(te,ne),t)||[])[0]))return n;f&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(i=V.needsContext.test(e)?0:u.length;i--&&(l=u[i],!r.relative[c=l.type]);)if((d=r.find[c])&&(o=d(l.matches[0].replace(te,ne),ee.test(u[0].type)&&ye(t.parentNode)||t))){if(u.splice(i,1),!(e=o.length&&be(u)))return L.apply(n,o),n;break}}return(f||s(e,p))(o,t,!v,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},n.sortStable=x.split("").sort(A).join("")===x,n.detectDuplicates=!!d,f(),n.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||de("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||de("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||de(M,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(o);T.find=_,T.expr=_.selectors,T.expr[":"]=T.expr.pseudos,T.uniqueSort=T.unique=_.uniqueSort,T.text=_.getText,T.isXMLDoc=_.isXML,T.contains=_.contains,T.escapeSelector=_.escape;var A=function(e,t,n){for(var r=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&T(e).is(n))break;r.push(e)}return r},E=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},N=T.expr.match.needsContext;function D(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var q=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function L(e,t,n){return b(t)?T.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?T.grep(e,function(e){return e===t!==n}):"string"!=typeof t?T.grep(e,function(e){return f.call(t,e)>-1!==n}):T.filter(t,e,n)}T.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?T.find.matchesSelector(r,e)?[r]:[]:T.find.matches(e,T.grep(t,function(e){return 1===e.nodeType}))},T.fn.extend({find:function(e){var t,n,r=this.length,o=this;if("string"!=typeof e)return this.pushStack(T(e).filter(function(){for(t=0;t<r;t++)if(T.contains(o[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)T.find(e,o[t],n);return r>1?T.uniqueSort(n):n},filter:function(e){return this.pushStack(L(this,e||[],!1))},not:function(e){return this.pushStack(L(this,e||[],!0))},is:function(e){return!!L(this,"string"==typeof e&&N.test(e)?T(e):e||[],!1).length}});var O,P=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(T.fn.init=function(e,t,n){var r,o;if(!e)return this;if(n=n||O,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:P.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 T?t[0]:t,T.merge(this,T.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:s,!0)),q.test(r[1])&&T.isPlainObject(t))for(r in t)b(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(o=s.getElementById(r[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):b(e)?void 0!==n.ready?n.ready(e):e(T):T.makeArray(e,this)}).prototype=T.fn,O=T(s);var M=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function R(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}T.fn.extend({has:function(e){var t=T(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(T.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,o=this.length,i=[],a="string"!=typeof e&&T(e);if(!N.test(e))for(;r<o;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&T.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?T.uniqueSort(i):i)},index:function(e){return e?"string"==typeof e?f.call(T(e),this[0]):f.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(T.uniqueSort(T.merge(this.get(),T(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),T.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return A(e,"parentNode")},parentsUntil:function(e,t,n){return A(e,"parentNode",n)},next:function(e){return R(e,"nextSibling")},prev:function(e){return R(e,"previousSibling")},nextAll:function(e){return A(e,"nextSibling")},prevAll:function(e){return A(e,"previousSibling")},nextUntil:function(e,t,n){return A(e,"nextSibling",n)},prevUntil:function(e,t,n){return A(e,"previousSibling",n)},siblings:function(e){return E((e.parentNode||{}).firstChild,e)},children:function(e){return E(e.firstChild)},contents:function(e){return void 0!==e.contentDocument?e.contentDocument:(D(e,"template")&&(e=e.content||e),T.merge([],e.childNodes))}},function(e,t){T.fn[e]=function(n,r){var o=T.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(o=T.filter(r,o)),this.length>1&&(H[e]||T.uniqueSort(o),M.test(e)&&o.reverse()),this.pushStack(o)}});var I=/[^\x20\t\r\n\f]+/g;function W(e){return e}function $(e){throw e}function Q(e,t,n,r){var o;try{e&&b(o=e.promise)?o.call(e).done(t).fail(n):e&&b(o=e.then)?o.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}T.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return T.each(e.match(I)||[],function(e,n){t[n]=!0}),t}(e):T.extend({},e);var t,n,r,o,i=[],a=[],s=-1,u=function(){for(o=o||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<i.length;)!1===i[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=i.length,n=!1);e.memory||(n=!1),t=!1,o&&(i=n?[]:"")},l={add:function(){return i&&(n&&!t&&(s=i.length-1,a.push(n)),function t(n){T.each(n,function(n,r){b(r)?e.unique&&l.has(r)||i.push(r):r&&r.length&&"string"!==C(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return T.each(arguments,function(e,t){for(var n;(n=T.inArray(t,i,n))>-1;)i.splice(n,1),n<=s&&s--}),this},has:function(e){return e?T.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return o=a=[],i=n="",this},disabled:function(){return!i},lock:function(){return o=a=[],n||t||(i=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},T.extend({Deferred:function(e){var t=[["notify","progress",T.Callbacks("memory"),T.Callbacks("memory"),2],["resolve","done",T.Callbacks("once memory"),T.Callbacks("once memory"),0,"resolved"],["reject","fail",T.Callbacks("once memory"),T.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return T.Deferred(function(n){T.each(t,function(t,r){var o=b(e[r[4]])&&e[r[4]];a[r[1]](function(){var e=o&&o.apply(this,arguments);e&&b(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,o?[e]:arguments)})}),e=null}).promise()},then:function(e,n,i){var a=0;function s(e,t,n,i){return function(){var u=this,l=arguments,c=function(){var o,c;if(!(e<a)){if((o=n.apply(u,l))===t.promise())throw new TypeError("Thenable self-resolution");c=o&&("object"===r(o)||"function"==typeof o)&&o.then,b(c)?i?c.call(o,s(a,t,W,i),s(a,t,$,i)):(a++,c.call(o,s(a,t,W,i),s(a,t,$,i),s(a,t,W,t.notifyWith))):(n!==W&&(u=void 0,l=[o]),(i||t.resolveWith)(u,l))}},d=i?c:function(){try{c()}catch(r){T.Deferred.exceptionHook&&T.Deferred.exceptionHook(r,d.stackTrace),e+1>=a&&(n!==$&&(u=void 0,l=[r]),t.rejectWith(u,l))}};e?d():(T.Deferred.getStackHook&&(d.stackTrace=T.Deferred.getStackHook()),o.setTimeout(d))}}return T.Deferred(function(r){t[0][3].add(s(0,r,b(i)?i:W,r.notifyWith)),t[1][3].add(s(0,r,b(e)?e:W)),t[2][3].add(s(0,r,b(n)?n:$))}).promise()},promise:function(e){return null!=e?T.extend(e,i):i}},a={};return T.each(t,function(e,r){var o=r[2],s=r[5];i[r[1]]=o.add,s&&o.add(function(){n=s},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),o.add(r[3].fire),a[r[0]]=function(){return a[r[0]+"With"](this===a?void 0:this,arguments),this},a[r[0]+"With"]=o.fireWith}),i.promise(a),e&&e.call(a,a),a},when:function(e){var t=arguments.length,n=t,r=Array(n),o=l.call(arguments),i=T.Deferred(),a=function(e){return function(n){r[e]=this,o[e]=arguments.length>1?l.call(arguments):n,--t||i.resolveWith(r,o)}};if(t<=1&&(Q(e,i.done(a(n)).resolve,i.reject,!t),"pending"===i.state()||b(o[n]&&o[n].then)))return i.then();for(;n--;)Q(o[n],a(n),i.reject);return i.promise()}});var F=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;T.Deferred.exceptionHook=function(e,t){o.console&&o.console.warn&&e&&F.test(e.name)&&o.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},T.readyException=function(e){o.setTimeout(function(){throw e})};var B=T.Deferred();function z(){s.removeEventListener("DOMContentLoaded",z),o.removeEventListener("load",z),T.ready()}T.fn.ready=function(e){return B.then(e).catch(function(e){T.readyException(e)}),this},T.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--T.readyWait:T.isReady)||(T.isReady=!0,!0!==e&&--T.readyWait>0||B.resolveWith(s,[T]))}}),T.ready.then=B.then,"complete"===s.readyState||"loading"!==s.readyState&&!s.documentElement.doScroll?o.setTimeout(T.ready):(s.addEventListener("DOMContentLoaded",z),o.addEventListener("load",z));var U=function e(t,n,r,o,i,a,s){var u=0,l=t.length,c=null==r;if("object"===C(r))for(u in i=!0,r)e(t,n,u,r[u],!0,a,s);else if(void 0!==o&&(i=!0,b(o)||(s=!0),c&&(s?(n.call(t,o),n=null):(c=n,n=function(e,t,n){return c.call(T(e),n)})),n))for(;u<l;u++)n(t[u],r,s?o:o.call(t[u],u,n(t[u],r)));return i?t:c?n.call(t):l?n(t[0],r):a},X=/^-ms-/,V=/-([a-z])/g;function G(e,t){return t.toUpperCase()}function J(e){return e.replace(X,"ms-").replace(V,G)}var Y=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function K(){this.expando=T.expando+K.uid++}K.uid=1,K.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Y(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,o=this.cache(e);if("string"==typeof t)o[J(t)]=n;else for(r in t)o[J(r)]=t[r];return o},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][J(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(J):(t=J(t))in r?[t]:t.match(I)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||T.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!T.isEmptyObject(t)}};var Z=new K,ee=new K,te=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ne=/[A-Z]/g;function re(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(ne,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:te.test(e)?JSON.parse(e):e)}(n)}catch(e){}ee.set(e,t,n)}else n=void 0;return n}T.extend({hasData:function(e){return ee.hasData(e)||Z.hasData(e)},data:function(e,t,n){return ee.access(e,t,n)},removeData:function(e,t){ee.remove(e,t)},_data:function(e,t,n){return Z.access(e,t,n)},_removeData:function(e,t){Z.remove(e,t)}}),T.fn.extend({data:function(e,t){var n,o,i,a=this[0],s=a&&a.attributes;if(void 0===e){if(this.length&&(i=ee.get(a),1===a.nodeType&&!Z.get(a,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(o=s[n].name).indexOf("data-")&&(o=J(o.slice(5)),re(a,o,i[o]));Z.set(a,"hasDataAttrs",!0)}return i}return"object"===r(e)?this.each(function(){ee.set(this,e)}):U(this,function(t){var n;if(a&&void 0===t)return void 0!==(n=ee.get(a,e))?n:void 0!==(n=re(a,e))?n:void 0;this.each(function(){ee.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){ee.remove(this,e)})}}),T.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Z.get(e,t),n&&(!r||Array.isArray(n)?r=Z.access(e,t,T.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=T.queue(e,t),r=n.length,o=n.shift(),i=T._queueHooks(e,t);"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===t&&n.unshift("inprogress"),delete i.stop,o.call(e,function(){T.dequeue(e,t)},i)),!r&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Z.get(e,n)||Z.access(e,n,{empty:T.Callbacks("once memory").add(function(){Z.remove(e,[t+"queue",n])})})}}),T.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?T.queue(this[0],e):void 0===t?this:this.each(function(){var n=T.queue(this,e,t);T._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&T.dequeue(this,e)})},dequeue:function(e){return this.each(function(){T.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,o=T.Deferred(),i=this,a=this.length,s=function(){--r||o.resolveWith(i,[i])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=Z.get(i[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),o.promise(t)}});var oe=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=new RegExp("^(?:([+-])=|)("+oe+")([a-z%]*)$","i"),ae=["Top","Right","Bottom","Left"],se=s.documentElement,ue=function(e){return T.contains(e.ownerDocument,e)},le={composed:!0};se.getRootNode&&(ue=function(e){return T.contains(e.ownerDocument,e)||e.getRootNode(le)===e.ownerDocument});var ce=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ue(e)&&"none"===T.css(e,"display")},de=function(e,t,n,r){var o,i,a={};for(i in t)a[i]=e.style[i],e.style[i]=t[i];for(i in o=n.apply(e,r||[]),t)e.style[i]=a[i];return o};function fe(e,t,n,r){var o,i,a=20,s=r?function(){return r.cur()}:function(){return T.css(e,t,"")},u=s(),l=n&&n[3]||(T.cssNumber[t]?"":"px"),c=e.nodeType&&(T.cssNumber[t]||"px"!==l&&+u)&&ie.exec(T.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;a--;)T.style(e,t,c+l),(1-i)*(1-(i=s()/u||.5))<=0&&(a=0),c/=i;c*=2,T.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,o=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=o)),o}var pe={};function he(e){var t,n=e.ownerDocument,r=e.nodeName,o=pe[r];return o||(t=n.body.appendChild(n.createElement(r)),o=T.css(t,"display"),t.parentNode.removeChild(t),"none"===o&&(o="block"),pe[r]=o,o)}function ve(e,t){for(var n,r,o=[],i=0,a=e.length;i<a;i++)(r=e[i]).style&&(n=r.style.display,t?("none"===n&&(o[i]=Z.get(r,"display")||null,o[i]||(r.style.display="")),""===r.style.display&&ce(r)&&(o[i]=he(r))):"none"!==n&&(o[i]="none",Z.set(r,"display",n)));for(i=0;i<a;i++)null!=o[i]&&(e[i].style.display=o[i]);return e}T.fn.extend({show:function(){return ve(this,!0)},hide:function(){return ve(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ce(this)?T(this).show():T(this).hide()})}});var me=/^(?:checkbox|radio)$/i,ye=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ge=/^$|^module$|\/(?:java|ecma)script/i,be={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function xe(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&D(e,t)?T.merge([e],n):n}function we(e,t){for(var n=0,r=e.length;n<r;n++)Z.set(e[n],"globalEval",!t||Z.get(t[n],"globalEval"))}be.optgroup=be.option,be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td;var ke=/<|&#?\w+;/;function Ce(e,t,n,r,o){for(var i,a,s,u,l,c,d=t.createDocumentFragment(),f=[],p=0,h=e.length;p<h;p++)if((i=e[p])||0===i)if("object"===C(i))T.merge(f,i.nodeType?[i]:i);else if(ke.test(i)){for(a=a||d.appendChild(t.createElement("div")),s=(ye.exec(i)||["",""])[1].toLowerCase(),u=be[s]||be._default,a.innerHTML=u[1]+T.htmlPrefilter(i)+u[2],c=u[0];c--;)a=a.lastChild;T.merge(f,a.childNodes),(a=d.firstChild).textContent=""}else f.push(t.createTextNode(i));for(d.textContent="",p=0;i=f[p++];)if(r&&T.inArray(i,r)>-1)o&&o.push(i);else if(l=ue(i),a=xe(d.appendChild(i),"script"),l&&we(a),n)for(c=0;i=a[c++];)ge.test(i.type||"")&&n.push(i);return d}!function(){var e=s.createDocumentFragment().appendChild(s.createElement("div")),t=s.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),g.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var Te=/^key/,je=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Se=/^([^.]*)(?:\.(.+)|)/;function _e(){return!0}function Ae(){return!1}function Ee(e,t){return e===function(){try{return s.activeElement}catch(e){}}()==("focus"===t)}function Ne(e,t,n,o,i,a){var s,u;if("object"===r(t)){for(u in"string"!=typeof n&&(o=o||n,n=void 0),t)Ne(e,u,n,o,t[u],a);return e}if(null==o&&null==i?(i=n,o=n=void 0):null==i&&("string"==typeof n?(i=o,o=void 0):(i=o,o=n,n=void 0)),!1===i)i=Ae;else if(!i)return e;return 1===a&&(s=i,(i=function(e){return T().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=T.guid++)),e.each(function(){T.event.add(this,t,i,o,n)})}function De(e,t,n){n?(Z.set(e,t,!1),T.event.add(e,t,{namespace:!1,handler:function(e){var r,o,i=Z.get(this,t);if(1&e.isTrigger&&this[t]){if(i.length)(T.event.special[t]||{}).delegateType&&e.stopPropagation();else if(i=l.call(arguments),Z.set(this,t,i),r=n(this,t),this[t](),i!==(o=Z.get(this,t))||r?Z.set(this,t,!1):o={},i!==o)return e.stopImmediatePropagation(),e.preventDefault(),o.value}else i.length&&(Z.set(this,t,{value:T.event.trigger(T.extend(i[0],T.Event.prototype),i.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Z.get(e,t)&&T.event.add(e,t,_e)}T.event={global:{},add:function(e,t,n,r,o){var i,a,s,u,l,c,d,f,p,h,v,m=Z.get(e);if(m)for(n.handler&&(n=(i=n).handler,o=i.selector),o&&T.find.matchesSelector(se,o),n.guid||(n.guid=T.guid++),(u=m.events)||(u=m.events={}),(a=m.handle)||(a=m.handle=function(t){return void 0!==T&&T.event.triggered!==t.type?T.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(I)||[""]).length;l--;)p=v=(s=Se.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),p&&(d=T.event.special[p]||{},p=(o?d.delegateType:d.bindType)||p,d=T.event.special[p]||{},c=T.extend({type:p,origType:v,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&T.expr.match.needsContext.test(o),namespace:h.join(".")},i),(f=u[p])||((f=u[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),o?f.splice(f.delegateCount++,0,c):f.push(c),T.event.global[p]=!0)},remove:function(e,t,n,r,o){var i,a,s,u,l,c,d,f,p,h,v,m=Z.hasData(e)&&Z.get(e);if(m&&(u=m.events)){for(l=(t=(t||"").match(I)||[""]).length;l--;)if(p=v=(s=Se.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),p){for(d=T.event.special[p]||{},f=u[p=(r?d.delegateType:d.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=i=f.length;i--;)c=f[i],!o&&v!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(i,1),c.selector&&f.delegateCount--,d.remove&&d.remove.call(e,c));a&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,h,m.handle)||T.removeEvent(e,p,m.handle),delete u[p])}else for(p in u)T.event.remove(e,p+t[l],n,r,!0);T.isEmptyObject(u)&&Z.remove(e,"handle events")}},dispatch:function(e){var t,n,r,o,i,a,s=T.event.fix(e),u=new Array(arguments.length),l=(Z.get(this,"events")||{})[s.type]||[],c=T.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=T.event.handlers.call(this,s,l),t=0;(o=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=o.elem,n=0;(i=o.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!1!==i.namespace&&!s.rnamespace.test(i.namespace)||(s.handleObj=i,s.data=i.data,void 0!==(r=((T.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,o,i,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(i=[],a={},n=0;n<u;n++)void 0===a[o=(r=t[n]).selector+" "]&&(a[o]=r.needsContext?T(o,this).index(l)>-1:T.find(o,this,null,[l]).length),a[o]&&i.push(r);i.length&&s.push({elem:l,handlers:i})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(T.Event.prototype,e,{enumerable:!0,configurable:!0,get:b(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[T.expando]?e:new T.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return me.test(t.type)&&t.click&&D(t,"input")&&De(t,"click",_e),!1},trigger:function(e){var t=this||e;return me.test(t.type)&&t.click&&D(t,"input")&&De(t,"click"),!0},_default:function(e){var t=e.target;return me.test(t.type)&&t.click&&D(t,"input")&&Z.get(t,"click")||D(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},T.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},T.Event=function(e,t){if(!(this instanceof T.Event))return new T.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?_e:Ae,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&T.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[T.expando]=!0},T.Event.prototype={constructor:T.Event,isDefaultPrevented:Ae,isPropagationStopped:Ae,isImmediatePropagationStopped:Ae,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=_e,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=_e,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=_e,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},T.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Te.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&je.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},T.event.addProp),T.each({focus:"focusin",blur:"focusout"},function(e,t){T.event.special[e]={setup:function(){return De(this,e,Ee),!1},trigger:function(){return De(this,e),!0},delegateType:t}}),T.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){T.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,o=e.handleObj;return r&&(r===this||T.contains(this,r))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),T.fn.extend({on:function(e,t,n,r){return Ne(this,e,t,n,r)},one:function(e,t,n,r){return Ne(this,e,t,n,r,1)},off:function(e,t,n){var o,i;if(e&&e.preventDefault&&e.handleObj)return o=e.handleObj,T(e.delegateTarget).off(o.namespace?o.origType+"."+o.namespace:o.origType,o.selector,o.handler),this;if("object"===r(e)){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ae),this.each(function(){T.event.remove(this,e,n,t)})}});var qe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Le=/<script|<style|<link/i,Oe=/checked\s*(?:[^=]|=\s*.checked.)/i,Pe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Me(e,t){return D(e,"table")&&D(11!==t.nodeType?t:t.firstChild,"tr")&&T(e).children("tbody")[0]||e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ie(e,t){var n,r,o,i,a,s,u,l;if(1===t.nodeType){if(Z.hasData(e)&&(i=Z.access(e),a=Z.set(t,i),l=i.events))for(o in delete a.handle,a.events={},l)for(n=0,r=l[o].length;n<r;n++)T.event.add(t,o,l[o][n]);ee.hasData(e)&&(s=ee.access(e),u=T.extend({},s),ee.set(t,u))}}function We(e,t){var n=t.nodeName.toLowerCase();"input"===n&&me.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function $e(e,t,n,r){t=c.apply([],t);var o,i,a,s,u,l,d=0,f=e.length,p=f-1,h=t[0],v=b(h);if(v||f>1&&"string"==typeof h&&!g.checkClone&&Oe.test(h))return e.each(function(o){var i=e.eq(o);v&&(t[0]=h.call(this,o,i.html())),$e(i,t,n,r)});if(f&&(i=(o=Ce(t,e[0].ownerDocument,!1,e,r)).firstChild,1===o.childNodes.length&&(o=i),i||r)){for(s=(a=T.map(xe(o,"script"),He)).length;d<f;d++)u=o,d!==p&&(u=T.clone(u,!0,!0),s&&T.merge(a,xe(u,"script"))),n.call(e[d],u,d);if(s)for(l=a[a.length-1].ownerDocument,T.map(a,Re),d=0;d<s;d++)u=a[d],ge.test(u.type||"")&&!Z.access(u,"globalEval")&&T.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?T._evalUrl&&!u.noModule&&T._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")}):k(u.textContent.replace(Pe,""),u,l))}return e}function Qe(e,t,n){for(var r,o=t?T.filter(t,e):e,i=0;null!=(r=o[i]);i++)n||1!==r.nodeType||T.cleanData(xe(r)),r.parentNode&&(n&&ue(r)&&we(xe(r,"script")),r.parentNode.removeChild(r));return e}T.extend({htmlPrefilter:function(e){return e.replace(qe,"<$1></$2>")},clone:function(e,t,n){var r,o,i,a,s=e.cloneNode(!0),u=ue(e);if(!(g.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||T.isXMLDoc(e)))for(a=xe(s),r=0,o=(i=xe(e)).length;r<o;r++)We(i[r],a[r]);if(t)if(n)for(i=i||xe(e),a=a||xe(s),r=0,o=i.length;r<o;r++)Ie(i[r],a[r]);else Ie(e,s);return(a=xe(s,"script")).length>0&&we(a,!u&&xe(e,"script")),s},cleanData:function(e){for(var t,n,r,o=T.event.special,i=0;void 0!==(n=e[i]);i++)if(Y(n)){if(t=n[Z.expando]){if(t.events)for(r in t.events)o[r]?T.event.remove(n,r):T.removeEvent(n,r,t.handle);n[Z.expando]=void 0}n[ee.expando]&&(n[ee.expando]=void 0)}}}),T.fn.extend({detach:function(e){return Qe(this,e,!0)},remove:function(e){return Qe(this,e)},text:function(e){return U(this,function(e){return void 0===e?T.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return $e(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Me(this,e).appendChild(e)})},prepend:function(){return $e(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Me(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(T.cleanData(xe(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return T.clone(this,e,t)})},html:function(e){return U(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Le.test(e)&&!be[(ye.exec(e)||["",""])[1].toLowerCase()]){e=T.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(T.cleanData(xe(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return $e(this,arguments,function(t){var n=this.parentNode;T.inArray(this,e)<0&&(T.cleanData(xe(this)),n&&n.replaceChild(t,this))},e)}}),T.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){T.fn[e]=function(e){for(var n,r=[],o=T(e),i=o.length-1,a=0;a<=i;a++)n=a===i?this:this.clone(!0),T(o[a])[t](n),d.apply(r,n.get());return this.pushStack(r)}});var Fe=new RegExp("^("+oe+")(?!px)[a-z%]+$","i"),Be=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=o),t.getComputedStyle(e)},ze=new RegExp(ae.join("|"),"i");function Ue(e,t,n){var r,o,i,a,s=e.style;return(n=n||Be(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ue(e)||(a=T.style(e,t)),!g.pixelBoxStyles()&&Fe.test(a)&&ze.test(t)&&(r=s.width,o=s.minWidth,i=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=o,s.maxWidth=i)),void 0!==a?a+"":a}function Xe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",se.appendChild(l).appendChild(c);var e=o.getComputedStyle(c);n="1%"!==e.top,u=12===t(e.marginLeft),c.style.right="60%",a=36===t(e.right),r=36===t(e.width),c.style.position="absolute",i=12===t(c.offsetWidth/3),se.removeChild(l),c=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,a,u,l=s.createElement("div"),c=s.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===c.style.backgroundClip,T.extend(g,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),u},scrollboxSize:function(){return e(),i}}))}();var Ve=["Webkit","Moz","ms"],Ge=s.createElement("div").style,Je={};function Ye(e){var t=T.cssProps[e]||Je[e];return t||(e in Ge?e:Je[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Ve.length;n--;)if((e=Ve[n]+t)in Ge)return e}(e)||e)}var Ke=/^(none|table(?!-c[ea]).+)/,Ze=/^--/,et={position:"absolute",visibility:"hidden",display:"block"},tt={letterSpacing:"0",fontWeight:"400"};function nt(e,t,n){var r=ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function rt(e,t,n,r,o,i){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=T.css(e,n+ae[a],!0,o)),r?("content"===n&&(u-=T.css(e,"padding"+ae[a],!0,o)),"margin"!==n&&(u-=T.css(e,"border"+ae[a]+"Width",!0,o))):(u+=T.css(e,"padding"+ae[a],!0,o),"padding"!==n?u+=T.css(e,"border"+ae[a]+"Width",!0,o):s+=T.css(e,"border"+ae[a]+"Width",!0,o));return!r&&i>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-i-u-s-.5))||0),u}function ot(e,t,n){var r=Be(e),o=(!g.boxSizingReliable()||n)&&"border-box"===T.css(e,"boxSizing",!1,r),i=o,a=Ue(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Fe.test(a)){if(!n)return a;a="auto"}return(!g.boxSizingReliable()&&o||"auto"===a||!parseFloat(a)&&"inline"===T.css(e,"display",!1,r))&&e.getClientRects().length&&(o="border-box"===T.css(e,"boxSizing",!1,r),(i=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+rt(e,t,n||(o?"border":"content"),i,r,a)+"px"}function it(e,t,n,r,o){return new it.prototype.init(e,t,n,r,o)}T.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ue(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,o){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,a,s,u=J(t),l=Ze.test(t),c=e.style;if(l||(t=Ye(u)),s=T.cssHooks[t]||T.cssHooks[u],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(e,!1,o))?i:c[t];"string"===(a=r(n))&&(i=ie.exec(n))&&i[1]&&(n=fe(e,t,i),a="number"),null!=n&&n==n&&("number"!==a||l||(n+=i&&i[3]||(T.cssNumber[u]?"":"px")),g.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,o))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var o,i,a,s=J(t);return Ze.test(t)||(t=Ye(s)),(a=T.cssHooks[t]||T.cssHooks[s])&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=Ue(e,t,r)),"normal"===o&&t in tt&&(o=tt[t]),""===n||n?(i=parseFloat(o),!0===n||isFinite(i)?i||0:o):o}}),T.each(["height","width"],function(e,t){T.cssHooks[t]={get:function(e,n,r){if(n)return!Ke.test(T.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ot(e,t,r):de(e,et,function(){return ot(e,t,r)})},set:function(e,n,r){var o,i=Be(e),a=!g.scrollboxSize()&&"absolute"===i.position,s=(a||r)&&"border-box"===T.css(e,"boxSizing",!1,i),u=r?rt(e,t,r,s,i):0;return s&&a&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(i[t])-rt(e,t,"border",!1,i)-.5)),u&&(o=ie.exec(n))&&"px"!==(o[3]||"px")&&(e.style[t]=n,n=T.css(e,t)),nt(0,n,u)}}}),T.cssHooks.marginLeft=Xe(g.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ue(e,"marginLeft"))||e.getBoundingClientRect().left-de(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),T.each({margin:"",padding:"",border:"Width"},function(e,t){T.cssHooks[e+t]={expand:function(n){for(var r=0,o={},i="string"==typeof n?n.split(" "):[n];r<4;r++)o[e+ae[r]+t]=i[r]||i[r-2]||i[0];return o}},"margin"!==e&&(T.cssHooks[e+t].set=nt)}),T.fn.extend({css:function(e,t){return U(this,function(e,t,n){var r,o,i={},a=0;if(Array.isArray(t)){for(r=Be(e),o=t.length;a<o;a++)i[t[a]]=T.css(e,t[a],!1,r);return i}return void 0!==n?T.style(e,t,n):T.css(e,t)},e,t,arguments.length>1)}}),T.Tween=it,it.prototype={constructor:it,init:function(e,t,n,r,o,i){this.elem=e,this.prop=n,this.easing=o||T.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=i||(T.cssNumber[n]?"":"px")},cur:function(){var e=it.propHooks[this.prop];return e&&e.get?e.get(this):it.propHooks._default.get(this)},run:function(e){var t,n=it.propHooks[this.prop];return this.options.duration?this.pos=t=T.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):it.propHooks._default.set(this),this}},it.prototype.init.prototype=it.prototype,it.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=T.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){T.fx.step[e.prop]?T.fx.step[e.prop](e):1!==e.elem.nodeType||!T.cssHooks[e.prop]&&null==e.elem.style[Ye(e.prop)]?e.elem[e.prop]=e.now:T.style(e.elem,e.prop,e.now+e.unit)}}},it.propHooks.scrollTop=it.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},T.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},T.fx=it.prototype.init,T.fx.step={};var at,st,ut=/^(?:toggle|show|hide)$/,lt=/queueHooks$/;function ct(){st&&(!1===s.hidden&&o.requestAnimationFrame?o.requestAnimationFrame(ct):o.setTimeout(ct,T.fx.interval),T.fx.tick())}function dt(){return o.setTimeout(function(){at=void 0}),at=Date.now()}function ft(e,t){var n,r=0,o={height:e};for(t=t?1:0;r<4;r+=2-t)o["margin"+(n=ae[r])]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function pt(e,t,n){for(var r,o=(ht.tweeners[t]||[]).concat(ht.tweeners["*"]),i=0,a=o.length;i<a;i++)if(r=o[i].call(n,t,e))return r}function ht(e,t,n){var r,o,i=0,a=ht.prefilters.length,s=T.Deferred().always(function(){delete u.elem}),u=function(){if(o)return!1;for(var t=at||dt(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),i=0,a=l.tweens.length;i<a;i++)l.tweens[i].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:T.extend({},t),opts:T.extend(!0,{specialEasing:{},easing:T.easing._default},n),originalProperties:t,originalOptions:n,startTime:at||dt(),duration:n.duration,tweens:[],createTween:function(t,n){var r=T.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(o)return this;for(o=!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(!function(e,t){var n,r,o,i,a;for(n in e)if(o=t[r=J(n)],i=e[n],Array.isArray(i)&&(o=i[1],i=e[n]=i[0]),n!==r&&(e[r]=i,delete e[n]),(a=T.cssHooks[r])&&"expand"in a)for(n in i=a.expand(i),delete e[r],i)n in e||(e[n]=i[n],t[n]=o);else t[r]=o}(c,l.opts.specialEasing);i<a;i++)if(r=ht.prefilters[i].call(l,e,c,l.opts))return b(r.stop)&&(T._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return T.map(c,pt,l),b(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),T.fx.timer(T.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}T.Animation=T.extend(ht,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return fe(n.elem,e,ie.exec(t),n),n}]},tweener:function(e,t){b(e)?(t=e,e=["*"]):e=e.match(I);for(var n,r=0,o=e.length;r<o;r++)n=e[r],ht.tweeners[n]=ht.tweeners[n]||[],ht.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,o,i,a,s,u,l,c,d="width"in t||"height"in t,f=this,p={},h=e.style,v=e.nodeType&&ce(e),m=Z.get(e,"fxshow");for(r in n.queue||(null==(a=T._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,f.always(function(){f.always(function(){a.unqueued--,T.queue(e,"fx").length||a.empty.fire()})})),t)if(o=t[r],ut.test(o)){if(delete t[r],i=i||"toggle"===o,o===(v?"hide":"show")){if("show"!==o||!m||void 0===m[r])continue;v=!0}p[r]=m&&m[r]||T.style(e,r)}if((u=!T.isEmptyObject(t))||!T.isEmptyObject(p))for(r in d&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=m&&m.display)&&(l=Z.get(e,"display")),"none"===(c=T.css(e,"display"))&&(l?c=l:(ve([e],!0),l=e.style.display||l,c=T.css(e,"display"),ve([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===T.css(e,"float")&&(u||(f.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",f.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,p)u||(m?"hidden"in m&&(v=m.hidden):m=Z.access(e,"fxshow",{display:l}),i&&(m.hidden=!v),v&&ve([e],!0),f.done(function(){for(r in v||ve([e]),Z.remove(e,"fxshow"),p)T.style(e,r,p[r])})),u=pt(v?m[r]:0,r,f),r in m||(m[r]=u.start,v&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?ht.prefilters.unshift(e):ht.prefilters.push(e)}}),T.speed=function(e,t,n){var o=e&&"object"===r(e)?T.extend({},e):{complete:n||!n&&t||b(e)&&e,duration:e,easing:n&&t||t&&!b(t)&&t};return T.fx.off?o.duration=0:"number"!=typeof o.duration&&(o.duration in T.fx.speeds?o.duration=T.fx.speeds[o.duration]:o.duration=T.fx.speeds._default),null!=o.queue&&!0!==o.queue||(o.queue="fx"),o.old=o.complete,o.complete=function(){b(o.old)&&o.old.call(this),o.queue&&T.dequeue(this,o.queue)},o},T.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ce).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var o=T.isEmptyObject(e),i=T.speed(t,n,r),a=function(){var t=ht(this,T.extend({},e),i);(o||Z.get(this,"finish"))&&t.stop(!0)};return a.finish=a,o||!1===i.queue?this.each(a):this.queue(i.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=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,o=null!=e&&e+"queueHooks",i=T.timers,a=Z.get(this);if(o)a[o]&&a[o].stop&&r(a[o]);else for(o in a)a[o]&&a[o].stop&&lt.test(o)&&r(a[o]);for(o=i.length;o--;)i[o].elem!==this||null!=e&&i[o].queue!==e||(i[o].anim.stop(n),t=!1,i.splice(o,1));!t&&n||T.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=Z.get(this),r=n[e+"queue"],o=n[e+"queueHooks"],i=T.timers,a=r?r.length:0;for(n.finish=!0,T.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=i.length;t--;)i[t].elem===this&&i[t].queue===e&&(i[t].anim.stop(!0),i.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),T.each(["toggle","show","hide"],function(e,t){var n=T.fn[t];T.fn[t]=function(e,r,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ft(t,!0),e,r,o)}}),T.each({slideDown:ft("show"),slideUp:ft("hide"),slideToggle:ft("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){T.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),T.timers=[],T.fx.tick=function(){var e,t=0,n=T.timers;for(at=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||T.fx.stop(),at=void 0},T.fx.timer=function(e){T.timers.push(e),T.fx.start()},T.fx.interval=13,T.fx.start=function(){st||(st=!0,ct())},T.fx.stop=function(){st=null},T.fx.speeds={slow:600,fast:200,_default:400},T.fn.delay=function(e,t){return e=T.fx&&T.fx.speeds[e]||e,t=t||"fx",this.queue(t,function(t,n){var r=o.setTimeout(t,e);n.stop=function(){o.clearTimeout(r)}})},function(){var e=s.createElement("input"),t=s.createElement("select").appendChild(s.createElement("option"));e.type="checkbox",g.checkOn=""!==e.value,g.optSelected=t.selected,(e=s.createElement("input")).value="t",e.type="radio",g.radioValue="t"===e.value}();var vt,mt=T.expr.attrHandle;T.fn.extend({attr:function(e,t){return U(this,T.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){T.removeAttr(this,e)})}}),T.extend({attr:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return void 0===e.getAttribute?T.prop(e,t,n):(1===i&&T.isXMLDoc(e)||(o=T.attrHooks[t.toLowerCase()]||(T.expr.match.bool.test(t)?vt:void 0)),void 0!==n?null===n?void T.removeAttr(e,t):o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(r=o.get(e,t))?r:null==(r=T.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&D(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,o=t&&t.match(I);if(o&&1===e.nodeType)for(;n=o[r++];)e.removeAttribute(n)}}),vt={set:function(e,t,n){return!1===t?T.removeAttr(e,n):e.setAttribute(n,n),n}},T.each(T.expr.match.bool.source.match(/\w+/g),function(e,t){var n=mt[t]||T.find.attr;mt[t]=function(e,t,r){var o,i,a=t.toLowerCase();return r||(i=mt[a],mt[a]=o,o=null!=n(e,t,r)?a:null,mt[a]=i),o}});var yt=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function bt(e){return(e.match(I)||[]).join(" ")}function xt(e){return e.getAttribute&&e.getAttribute("class")||""}function wt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(I)||[]}T.fn.extend({prop:function(e,t){return U(this,T.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[T.propFix[e]||e]})}}),T.extend({prop:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&T.isXMLDoc(e)||(t=T.propFix[t]||t,o=T.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:e[t]=n:o&&"get"in o&&null!==(r=o.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=T.find.attr(e,"tabindex");return t?parseInt(t,10):yt.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(T.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),T.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){T.propFix[this.toLowerCase()]=this}),T.fn.extend({addClass:function(e){var t,n,r,o,i,a,s,u=0;if(b(e))return this.each(function(t){T(this).addClass(e.call(this,t,xt(this)))});if((t=wt(e)).length)for(;n=this[u++];)if(o=xt(n),r=1===n.nodeType&&" "+bt(o)+" "){for(a=0;i=t[a++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");o!==(s=bt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,o,i,a,s,u=0;if(b(e))return this.each(function(t){T(this).removeClass(e.call(this,t,xt(this)))});if(!arguments.length)return this.attr("class","");if((t=wt(e)).length)for(;n=this[u++];)if(o=xt(n),r=1===n.nodeType&&" "+bt(o)+" "){for(a=0;i=t[a++];)for(;r.indexOf(" "+i+" ")>-1;)r=r.replace(" "+i+" "," ");o!==(s=bt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=r(e),o="string"===n||Array.isArray(e);return"boolean"==typeof t&&o?t?this.addClass(e):this.removeClass(e):b(e)?this.each(function(n){T(this).toggleClass(e.call(this,n,xt(this),t),t)}):this.each(function(){var t,r,i,a;if(o)for(r=0,i=T(this),a=wt(e);t=a[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||((t=xt(this))&&Z.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Z.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+bt(xt(n))+" ").indexOf(t)>-1)return!0;return!1}});var kt=/\r/g;T.fn.extend({val:function(e){var t,n,r,o=this[0];return arguments.length?(r=b(e),this.each(function(n){var o;1===this.nodeType&&(null==(o=r?e.call(this,n,T(this).val()):e)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=T.map(o,function(e){return null==e?"":e+""})),(t=T.valHooks[this.type]||T.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))})):o?(t=T.valHooks[o.type]||T.valHooks[o.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(kt,""):null==n?"":n:void 0}}),T.extend({valHooks:{option:{get:function(e){var t=T.find.attr(e,"value");return null!=t?t:bt(T.text(e))}},select:{get:function(e){var t,n,r,o=e.options,i=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?i+1:o.length;for(r=i<0?u:a?i:0;r<u;r++)if(((n=o[r]).selected||r===i)&&!n.disabled&&(!n.parentNode.disabled||!D(n.parentNode,"optgroup"))){if(t=T(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,o=e.options,i=T.makeArray(t),a=o.length;a--;)((r=o[a]).selected=T.inArray(T.valHooks.option.get(r),i)>-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),T.each(["radio","checkbox"],function(){T.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=T.inArray(T(e).val(),t)>-1}},g.checkOn||(T.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),g.focusin="onfocusin"in o;var Ct=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};T.extend(T.event,{trigger:function(e,t,n,i){var a,u,l,c,d,f,p,h,m=[n||s],y=v.call(e,"type")?e.type:e,g=v.call(e,"namespace")?e.namespace.split("."):[];if(u=h=l=n=n||s,3!==n.nodeType&&8!==n.nodeType&&!Ct.test(y+T.event.triggered)&&(y.indexOf(".")>-1&&(y=(g=y.split(".")).shift(),g.sort()),d=y.indexOf(":")<0&&"on"+y,(e=e[T.expando]?e:new T.Event(y,"object"===r(e)&&e)).isTrigger=i?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:T.makeArray(t,[e]),p=T.event.special[y]||{},i||!p.trigger||!1!==p.trigger.apply(n,t))){if(!i&&!p.noBubble&&!x(n)){for(c=p.delegateType||y,Ct.test(c+y)||(u=u.parentNode);u;u=u.parentNode)m.push(u),l=u;l===(n.ownerDocument||s)&&m.push(l.defaultView||l.parentWindow||o)}for(a=0;(u=m[a++])&&!e.isPropagationStopped();)h=u,e.type=a>1?c:p.bindType||y,(f=(Z.get(u,"events")||{})[e.type]&&Z.get(u,"handle"))&&f.apply(u,t),(f=d&&u[d])&&f.apply&&Y(u)&&(e.result=f.apply(u,t),!1===e.result&&e.preventDefault());return e.type=y,i||e.isDefaultPrevented()||p._default&&!1!==p._default.apply(m.pop(),t)||!Y(n)||d&&b(n[y])&&!x(n)&&((l=n[d])&&(n[d]=null),T.event.triggered=y,e.isPropagationStopped()&&h.addEventListener(y,Tt),n[y](),e.isPropagationStopped()&&h.removeEventListener(y,Tt),T.event.triggered=void 0,l&&(n[d]=l)),e.result}},simulate:function(e,t,n){var r=T.extend(new T.Event,n,{type:e,isSimulated:!0});T.event.trigger(r,null,t)}}),T.fn.extend({trigger:function(e,t){return this.each(function(){T.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return T.event.trigger(e,t,n,!0)}}),g.focusin||T.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){T.event.simulate(t,e.target,T.event.fix(e))};T.event.special[t]={setup:function(){var r=this.ownerDocument||this,o=Z.access(r,t);o||r.addEventListener(e,n,!0),Z.access(r,t,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this,o=Z.access(r,t)-1;o?Z.access(r,t,o):(r.removeEventListener(e,n,!0),Z.remove(r,t))}}});var jt=o.location,St=Date.now(),_t=/\?/;T.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new o.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||T.error("Invalid XML: "+e),t};var At=/\[\]$/,Et=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,Dt=/^(?:input|select|textarea|keygen)/i;function qt(e,t,n,o){var i;if(Array.isArray(t))T.each(t,function(t,i){n||At.test(e)?o(e,i):qt(e+"["+("object"===r(i)&&null!=i?t:"")+"]",i,n,o)});else if(n||"object"!==C(t))o(e,t);else for(i in t)qt(e+"["+i+"]",t[i],n,o)}T.param=function(e,t){var n,r=[],o=function(e,t){var n=b(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!T.isPlainObject(e))T.each(e,function(){o(this.name,this.value)});else for(n in e)qt(n,e[n],t,o);return r.join("&")},T.fn.extend({serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=T.prop(this,"elements");return e?T.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!T(this).is(":disabled")&&Dt.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!me.test(e))}).map(function(e,t){var n=T(this).val();return null==n?null:Array.isArray(n)?T.map(n,function(e){return{name:t.name,value:e.replace(Et,"\r\n")}}):{name:t.name,value:n.replace(Et,"\r\n")}}).get()}});var Lt=/%20/g,Ot=/#.*$/,Pt=/([?&])_=[^&]*/,Mt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ht=/^(?:GET|HEAD)$/,Rt=/^\/\//,It={},Wt={},$t="*/".concat("*"),Qt=s.createElement("a");function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,o=0,i=t.toLowerCase().match(I)||[];if(b(n))for(;r=i[o++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Bt(e,t,n,r){var o={},i=e===Wt;function a(s){var u;return o[s]=!0,T.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||i||o[l]?i?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!o["*"]&&a("*")}function zt(e,t){var n,r,o=T.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:r||(r={}))[n]=t[n]);return r&&T.extend(!0,e,r),e}Qt.href=jt.href,T.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:jt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(jt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":T.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,T.ajaxSettings),t):zt(T.ajaxSettings,e)},ajaxPrefilter:Ft(It),ajaxTransport:Ft(Wt),ajax:function(e,t){"object"===r(e)&&(t=e,e=void 0),t=t||{};var n,i,a,u,l,c,d,f,p,h,v=T.ajaxSetup({},t),m=v.context||v,y=v.context&&(m.nodeType||m.jquery)?T(m):T.event,g=T.Deferred(),b=T.Callbacks("once memory"),x=v.statusCode||{},w={},k={},C="canceled",j={readyState:0,getResponseHeader:function(e){var t;if(d){if(!u)for(u={};t=Mt.exec(a);)u[t[1].toLowerCase()+" "]=(u[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=u[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return d?a:null},setRequestHeader:function(e,t){return null==d&&(e=k[e.toLowerCase()]=k[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==d&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(d)j.always(e[j.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return n&&n.abort(t),S(0,t),this}};if(g.promise(j),v.url=((e||v.url||jt.href)+"").replace(Rt,jt.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(I)||[""],null==v.crossDomain){c=s.createElement("a");try{c.href=v.url,c.href=c.href,v.crossDomain=Qt.protocol+"//"+Qt.host!=c.protocol+"//"+c.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=T.param(v.data,v.traditional)),Bt(It,v,t,j),d)return j;for(p in(f=T.event&&v.global)&&0==T.active++&&T.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ht.test(v.type),i=v.url.replace(Ot,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Lt,"+")):(h=v.url.slice(i.length),v.data&&(v.processData||"string"==typeof v.data)&&(i+=(_t.test(i)?"&":"?")+v.data,delete v.data),!1===v.cache&&(i=i.replace(Pt,"$1"),h=(_t.test(i)?"&":"?")+"_="+St+++h),v.url=i+h),v.ifModified&&(T.lastModified[i]&&j.setRequestHeader("If-Modified-Since",T.lastModified[i]),T.etag[i]&&j.setRequestHeader("If-None-Match",T.etag[i])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&j.setRequestHeader("Content-Type",v.contentType),j.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+$t+"; q=0.01":""):v.accepts["*"]),v.headers)j.setRequestHeader(p,v.headers[p]);if(v.beforeSend&&(!1===v.beforeSend.call(m,j,v)||d))return j.abort();if(C="abort",b.add(v.complete),j.done(v.success),j.fail(v.error),n=Bt(Wt,v,t,j)){if(j.readyState=1,f&&y.trigger("ajaxSend",[j,v]),d)return j;v.async&&v.timeout>0&&(l=o.setTimeout(function(){j.abort("timeout")},v.timeout));try{d=!1,n.send(w,S)}catch(e){if(d)throw e;S(-1,e)}}else S(-1,"No Transport");function S(e,t,r,s){var u,c,p,h,w,k=t;d||(d=!0,l&&o.clearTimeout(l),n=void 0,a=s||"",j.readyState=e>0?4:0,u=e>=200&&e<300||304===e,r&&(h=function(e,t,n){for(var r,o,i,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(o in s)if(s[o]&&s[o].test(r)){u.unshift(o);break}if(u[0]in n)i=u[0];else{for(o in n){if(!u[0]||e.converters[o+" "+u[0]]){i=o;break}a||(a=o)}i=i||a}if(i)return i!==u[0]&&u.unshift(i),n[i]}(v,j,r)),h=function(e,t,n,r){var o,i,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(i=c.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=i,i=c.shift())if("*"===i)i=u;else if("*"!==u&&u!==i){if(!(a=l[u+" "+i]||l["* "+i]))for(o in l)if((s=o.split(" "))[1]===i&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[o]:!0!==l[o]&&(i=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+i}}}return{state:"success",data:t}}(v,h,j,u),u?(v.ifModified&&((w=j.getResponseHeader("Last-Modified"))&&(T.lastModified[i]=w),(w=j.getResponseHeader("etag"))&&(T.etag[i]=w)),204===e||"HEAD"===v.type?k="nocontent":304===e?k="notmodified":(k=h.state,c=h.data,u=!(p=h.error))):(p=k,!e&&k||(k="error",e<0&&(e=0))),j.status=e,j.statusText=(t||k)+"",u?g.resolveWith(m,[c,k,j]):g.rejectWith(m,[j,k,p]),j.statusCode(x),x=void 0,f&&y.trigger(u?"ajaxSuccess":"ajaxError",[j,v,u?c:p]),b.fireWith(m,[j,k]),f&&(y.trigger("ajaxComplete",[j,v]),--T.active||T.event.trigger("ajaxStop")))}return j},getJSON:function(e,t,n){return T.get(e,t,n,"json")},getScript:function(e,t){return T.get(e,void 0,t,"script")}}),T.each(["get","post"],function(e,t){T[t]=function(e,n,r,o){return b(n)&&(o=o||r,r=n,n=void 0),T.ajax(T.extend({url:e,type:t,dataType:o,data:n,success:r},T.isPlainObject(e)&&e))}}),T._evalUrl=function(e,t){return T.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){T.globalEval(e,t)}})},T.fn.extend({wrapAll:function(e){var t;return this[0]&&(b(e)&&(e=e.call(this[0])),t=T(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return b(e)?this.each(function(t){T(this).wrapInner(e.call(this,t))}):this.each(function(){var t=T(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b(e);return this.each(function(n){T(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){T(this).replaceWith(this.childNodes)}),this}}),T.expr.pseudos.hidden=function(e){return!T.expr.pseudos.visible(e)},T.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},T.ajaxSettings.xhr=function(){try{return new o.XMLHttpRequest}catch(e){}};var Ut={0:200,1223:204},Xt=T.ajaxSettings.xhr();g.cors=!!Xt&&"withCredentials"in Xt,g.ajax=Xt=!!Xt,T.ajaxTransport(function(e){var t,n;if(g.cors||Xt&&!e.crossDomain)return{send:function(r,i){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)s.setRequestHeader(a,r[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(Ut[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&o.setTimeout(function(){t&&n()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),T.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),T.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 T.globalEval(e),e}}}),T.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),T.ajaxTransport("script",function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,o){t=T("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),s.head.appendChild(t[0])},abort:function(){n&&n()}}});var Vt=[],Gt=/(=)\?(?=&|$)|\?\?/;T.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Vt.pop()||T.expando+"_"+St++;return this[e]=!0,e}}),T.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,a,s=!1!==e.jsonp&&(Gt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=b(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Gt,"$1"+r):!1!==e.jsonp&&(e.url+=(_t.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return a||T.error(r+" was not called"),a[0]},e.dataTypes[0]="json",i=o[r],o[r]=function(){a=arguments},n.always(function(){void 0===i?T(o).removeProp(r):o[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Vt.push(r)),a&&b(i)&&i(a[0]),a=i=void 0}),"script"}),g.createHTMLDocument=function(){var e=s.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),T.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(g.createHTMLDocument?((r=(t=s.implementation.createHTMLDocument("")).createElement("base")).href=s.location.href,t.head.appendChild(r)):t=s),o=q.exec(e),i=!n&&[],o?[t.createElement(o[1])]:(o=Ce([e],t,i),i&&i.length&&T(i).remove(),T.merge([],o.childNodes)));var r,o,i},T.fn.load=function(e,t,n){var o,i,a,s=this,u=e.indexOf(" ");return u>-1&&(o=bt(e.slice(u)),e=e.slice(0,u)),b(t)?(n=t,t=void 0):t&&"object"===r(t)&&(i="POST"),s.length>0&&T.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){a=arguments,s.html(o?T("<div>").append(T.parseHTML(e)).find(o):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,a||[e.responseText,t,e])})}),this},T.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){T.fn[t]=function(e){return this.on(t,e)}}),T.expr.pseudos.animated=function(e){return T.grep(T.timers,function(t){return e===t.elem}).length},T.offset={setOffset:function(e,t,n){var r,o,i,a,s,u,l=T.css(e,"position"),c=T(e),d={};"static"===l&&(e.style.position="relative"),s=c.offset(),i=T.css(e,"top"),u=T.css(e,"left"),("absolute"===l||"fixed"===l)&&(i+u).indexOf("auto")>-1?(a=(r=c.position()).top,o=r.left):(a=parseFloat(i)||0,o=parseFloat(u)||0),b(t)&&(t=t.call(e,n,T.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+o),"using"in t?t.using.call(e,d):c.css(d)}},T.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){T.offset.setOffset(this,e,t)});var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],o={top:0,left:0};if("fixed"===T.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===T.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((o=T(e).offset()).top+=T.css(e,"borderTopWidth",!0),o.left+=T.css(e,"borderLeftWidth",!0))}return{top:t.top-o.top-T.css(r,"marginTop",!0),left:t.left-o.left-T.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===T.css(e,"position");)e=e.offsetParent;return e||se})}}),T.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;T.fn[e]=function(r){return U(this,function(e,r,o){var i;if(x(e)?i=e:9===e.nodeType&&(i=e.defaultView),void 0===o)return i?i[t]:e[r];i?i.scrollTo(n?i.pageXOffset:o,n?o:i.pageYOffset):e[r]=o},e,r,arguments.length)}}),T.each(["top","left"],function(e,t){T.cssHooks[t]=Xe(g.pixelPosition,function(e,n){if(n)return n=Ue(e,t),Fe.test(n)?T(e).position()[t]+"px":n})}),T.each({Height:"height",Width:"width"},function(e,t){T.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){T.fn[r]=function(o,i){var a=arguments.length&&(n||"boolean"!=typeof o),s=n||(!0===o||!0===i?"margin":"border");return U(this,function(t,n,o){var i;return x(t)?0===r.indexOf("outer")?t["inner"+e]: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])):void 0===o?T.css(t,n,s):T.style(t,n,o,s)},t,a?o:void 0,a)}})}),T.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){T.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),T.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),T.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,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)}}),T.proxy=function(e,t){var n,r,o;if("string"==typeof t&&(n=e[t],t=e,e=n),b(e))return r=l.call(arguments,2),(o=function(){return e.apply(t||this,r.concat(l.call(arguments)))}).guid=e.guid=e.guid||T.guid++,o},T.holdReady=function(e){e?T.readyWait++:T.ready(!0)},T.isArray=Array.isArray,T.parseJSON=JSON.parse,T.nodeName=D,T.isFunction=b,T.isWindow=x,T.camelCase=J,T.type=C,T.now=Date.now,T.isNumeric=function(e){var t=T.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},void 0===(n=function(){return T}.apply(t,[]))||(e.exports=n);var Jt=o.jQuery,Yt=o.$;return T.noConflict=function(e){return o.$===T&&(o.$=Yt),e&&o.jQuery===T&&(o.jQuery=Jt),T},i||(o.jQuery=o.$=T),T})}).call(this,n(3)(e))},function(e,t){e.exports=prestashop},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.psShowHide=
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */
function(){(0,r.default)(".ps-shown-by-js").show(),(0,r.default)(".ps-hidden-by-js").hide()},t.psGetRequestParameter=o,t.refreshCheckoutPage=function(){if(null!==o("updatedTransaction"))window.location.reload();else{var e=o();e.updatedTransaction=1;var t=[];for(var n in e){var r=e[n];t.push(n+"="+r)}window.location.href=window.location.pathname+"?"+t.join("&")}};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));function o(e){var t={};return window.location.href.replace(location.hash,"").replace(/[?&]+([^=&]+)=?([^&]*)?/gi,function(e,n,r){t[n]=void 0!==r?r:""}),void 0!==e?t[e]?t[e]:null:t}},function(e,t,n){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){e.exports=n(6)},function(e,t,n){"use strict";var r=u(n(0));n(7),n(8),n(9),n(10),n(11),n(12),n(17),n(18),n(19),n(20);var o=u(n(1)),i=u(n(21)),a=n(2),s=u(n(22));function u(e){return e&&e.__esModule?e:{default:e}}for(var l in window.$=r.default,window.jQuery=r.default,i.default.prototype)o.default[l]=i.default.prototype[l];(0,r.default)(document).ready(function(){(0,a.psShowHide)(),(0,s.default)('input[type="email"]')})},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */(n(0));void 0===r.default.migrateMute&&(r.default.migrateMute=!window.prestashop.debug)},function(e,t,n){"use strict";var r,o;function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
/*!
 * jQuery Migrate - v3.1.0 - 2019-06-08
 * Copyright OpenJS Foundation and other contributors
 */r=[n(0)],void 0===(o=function(e){return function(e,t){function n(t){return function(e,t){for(var n=/^(\d+)\.(\d+)\.(\d+)/,r=n.exec(e)||[],o=n.exec(t)||[],i=1;i<=3;i++){if(+r[i]>+o[i])return 1;if(+r[i]<+o[i])return-1}return 0}(e.fn.jquery,t)>=0}e.migrateVersion="3.1.0",t.console&&t.console.log&&(e&&n("3.0.0")||t.console.log("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),e.migrateWarnings&&t.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),t.console.log("JQMIGRATE: Migrate is installed"+(e.migrateMute?"":" with logging active")+", version "+e.migrateVersion));var r={};function o(n){var o=t.console;r[n]||(r[n]=!0,e.migrateWarnings.push(n),o&&o.warn&&!e.migrateMute&&(o.warn("JQMIGRATE: "+n),e.migrateTrace&&o.trace&&o.trace()))}function a(e,t,n,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return o(r),n},set:function(e){o(r),n=e}})}function s(e,t,n,r){e[t]=function(){return o(r),n.apply(this,arguments)}}e.migrateWarnings=[],void 0===e.migrateTrace&&(e.migrateTrace=!0),e.migrateReset=function(){r={},e.migrateWarnings.length=0},"BackCompat"===t.document.compatMode&&o("jQuery is not compatible with Quirks Mode");var u,l=e.fn.init,c=e.isNumeric,d=e.find,f=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,p=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g;for(u in e.fn.init=function(e){var t=Array.prototype.slice.call(arguments);return"string"==typeof e&&"#"===e&&(o("jQuery( '#' ) is not a valid selector"),t[0]=[]),l.apply(this,t)},e.fn.init.prototype=e.fn,e.find=function(e){var n=Array.prototype.slice.call(arguments);if("string"==typeof e&&f.test(e))try{t.document.querySelector(e)}catch(r){e=e.replace(p,function(e,t,n,r){return"["+t+n+'"'+r+'"]'});try{t.document.querySelector(e),o("Attribute selector with '#' must be quoted: "+n[0]),n[0]=e}catch(e){o("Attribute selector with '#' was not fixed: "+n[0])}}return d.apply(this,n)},d)Object.prototype.hasOwnProperty.call(d,u)&&(e.find[u]=d[u]);e.fn.size=function(){return o("jQuery.fn.size() is deprecated and removed; use the .length property"),this.length},e.parseJSON=function(){return o("jQuery.parseJSON is deprecated; use JSON.parse"),JSON.parse.apply(null,arguments)},e.isNumeric=function(t){var n=c(t),r=function(t){var n=t&&t.toString();return!e.isArray(t)&&n-parseFloat(n)+1>=0}(t);return n!==r&&o("jQuery.isNumeric() should not be called on constructed objects"),r},n("3.3.0")&&s(e,"isWindow",function(e){return null!=e&&e===e.window},"jQuery.isWindow() is deprecated"),s(e,"holdReady",e.holdReady,"jQuery.holdReady is deprecated"),s(e,"unique",e.uniqueSort,"jQuery.unique is deprecated; use jQuery.uniqueSort"),a(e.expr,"filters",e.expr.pseudos,"jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),a(e.expr,":",e.expr.pseudos,"jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),n("3.2.0")&&s(e,"nodeName",e.nodeName,"jQuery.nodeName is deprecated");var h=e.ajax;e.ajax=function(){var e=h.apply(this,arguments);return e.promise&&(s(e,"success",e.done,"jQXHR.success is deprecated and removed"),s(e,"error",e.fail,"jQXHR.error is deprecated and removed"),s(e,"complete",e.always,"jQXHR.complete is deprecated and removed")),e};var v=e.fn.removeAttr,m=e.fn.toggleClass,y=/\S+/g;e.fn.removeAttr=function(t){var n=this;return e.each(t.match(y),function(t,r){e.expr.match.bool.test(r)&&(o("jQuery.fn.removeAttr no longer sets boolean properties: "+r),n.prop(r,!1))}),v.apply(this,arguments)},e.fn.toggleClass=function(t){return void 0!==t&&"boolean"!=typeof t?m.apply(this,arguments):(o("jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var n=this.getAttribute&&this.getAttribute("class")||"";n&&e.data(this,"__className__",n),this.setAttribute&&this.setAttribute("class",n||!1===t?"":e.data(this,"__className__")||"")}))};var g=!1;e.swap&&e.each(["height","width","reliableMarginRight"],function(t,n){var r=e.cssHooks[n]&&e.cssHooks[n].get;r&&(e.cssHooks[n].get=function(){var e;return g=!0,e=r.apply(this,arguments),g=!1,e})}),e.swap=function(e,t,n,r){var i,a,s={};for(a in g||o("jQuery.swap() is undocumented and deprecated"),t)s[a]=e.style[a],e.style[a]=t[a];for(a in i=n.apply(e,r||[]),t)e.style[a]=s[a];return i};var b=e.data;e.data=function(t,n,r){var a;if(n&&"object"===i(n)&&2===arguments.length){a=e.hasData(t)&&b.call(this,t);var s={};for(var u in n)u!==e.camelCase(u)?(o("jQuery.data() always sets/gets camelCased names: "+u),a[u]=n[u]):s[u]=n[u];return b.call(this,t,s),n}return n&&"string"==typeof n&&n!==e.camelCase(n)&&(a=e.hasData(t)&&b.call(this,t))&&n in a?(o("jQuery.data() always sets/gets camelCased names: "+n),arguments.length>2&&(a[n]=r),a[n]):b.apply(this,arguments)};var x=e.Tween.prototype.run,w=function(e){return e};e.Tween.prototype.run=function(){e.easing[this.easing].length>1&&(o("'jQuery.easing."+this.easing.toString()+"' should use only one argument"),e.easing[this.easing]=w),x.apply(this,arguments)};var k=e.fx.interval||13;t.requestAnimationFrame&&Object.defineProperty(e.fx,"interval",{configurable:!0,enumerable:!0,get:function(){return t.document.hidden||o("jQuery.fx.interval is deprecated"),k},set:function(e){o("jQuery.fx.interval is deprecated"),k=e}});var C=e.fn.load,T=e.event.add,j=e.event.fix;e.event.props=[],e.event.fixHooks={},a(e.event.props,"concat",e.event.props.concat,"jQuery.event.props.concat() is deprecated and removed"),e.event.fix=function(t){var n,r=t.type,i=this.fixHooks[r],a=e.event.props;if(a.length)for(o("jQuery.event.props are deprecated and removed: "+a.join());a.length;)e.event.addProp(a.pop());if(i&&!i._migrated_&&(i._migrated_=!0,o("jQuery.event.fixHooks are deprecated and removed: "+r),(a=i.props)&&a.length))for(;a.length;)e.event.addProp(a.pop());return n=j.call(this,t),i&&i.filter?i.filter(n,t):n},e.event.add=function(e,n){return e===t&&"load"===n&&"complete"===t.document.readyState&&o("jQuery(window).on('load'...) called after load event occurred"),T.apply(this,arguments)},e.each(["load","unload","error"],function(t,n){e.fn[n]=function(){var e=Array.prototype.slice.call(arguments,0);return"load"===n&&"string"==typeof e[0]?C.apply(this,e):(o("jQuery.fn."+n+"() is deprecated"),e.splice(0,0,n),arguments.length?this.on.apply(this,e):(this.triggerHandler.apply(this,e),this))}}),e.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,n){e.fn[n]=function(e,t){return o("jQuery.fn."+n+"() event shorthand is deprecated"),arguments.length>0?this.on(n,null,e,t):this.trigger(n)}}),e(function(){e(t.document).triggerHandler("ready")}),e.event.special.ready={setup:function(){this===t.document&&o("'ready' event is deprecated")}},e.fn.extend({bind:function(e,t,n){return o("jQuery.fn.bind() is deprecated"),this.on(e,null,t,n)},unbind:function(e,t){return o("jQuery.fn.unbind() is deprecated"),this.off(e,null,t)},delegate:function(e,t,n,r){return o("jQuery.fn.delegate() is deprecated"),this.on(t,e,n,r)},undelegate:function(e,t,n){return o("jQuery.fn.undelegate() is deprecated"),1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return o("jQuery.fn.hover() is deprecated"),this.on("mouseenter",e).on("mouseleave",t||e)}});var S=e.fn.offset;e.fn.offset=function(){var n,r=this[0],i={top:0,left:0};return r&&r.nodeType?(n=(r.ownerDocument||t.document).documentElement,e.contains(n,r)?S.apply(this,arguments):(o("jQuery.fn.offset() requires an element connected to a document"),i)):(o("jQuery.fn.offset() requires a valid DOM element"),i)};var _=e.param;e.param=function(t,n){var r=e.ajaxSettings&&e.ajaxSettings.traditional;return void 0===n&&r&&(o("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),n=r),_.call(this,t,n)};var A=e.fn.andSelf||e.fn.addBack;e.fn.andSelf=function(){return o("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),A.apply(this,arguments)};var E=e.Deferred,N=[["resolve","done",e.Callbacks("once memory"),e.Callbacks("once memory"),"resolved"],["reject","fail",e.Callbacks("once memory"),e.Callbacks("once memory"),"rejected"],["notify","progress",e.Callbacks("memory"),e.Callbacks("memory")]];return e.Deferred=function(t){var n=E(),r=n.promise();return n.pipe=r.pipe=function(){var t=arguments;return o("deferred.pipe() is deprecated"),e.Deferred(function(o){e.each(N,function(i,a){var s=e.isFunction(t[i])&&t[i];n[a[1]](function(){var t=s&&s.apply(this,arguments);t&&e.isFunction(t.promise)?t.promise().done(o.resolve).fail(o.reject).progress(o.notify):o[a[0]+"With"](this===r?o.promise():this,s?[t]:arguments)})}),t=null}).promise()},t&&t.call(n,n),n},e.Deferred.exceptionHook=E.exceptionHook,e}(e,window)}.apply(t,r))||(e.exports=o)},function(e,t,n){"use strict";var r,o;r=[n(0)],void 0===(o=function(e){return function(e){function t(e){void 0===e&&(e=window.navigator.userAgent),e=e.toLowerCase();var t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],n=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(silk)/.exec(e)||/(android)/.exec(e)||/(win)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||/(playbook)/.exec(e)||/(bb)/.exec(e)||/(blackberry)/.exec(e)||[],r={},o={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",versionNumber:t[4]||t[2]||"0",platform:n[0]||""};if(o.browser&&(r[o.browser]=!0,r.version=o.version,r.versionNumber=parseInt(o.versionNumber,10)),o.platform&&(r[o.platform]=!0),(r.android||r.bb||r.blackberry||r.ipad||r.iphone||r.ipod||r.kindle||r.playbook||r.silk||r["windows phone"])&&(r.mobile=!0),(r.cros||r.mac||r.linux||r.win)&&(r.desktop=!0),(r.chrome||r.opr||r.safari)&&(r.webkit=!0),(r.rv||r.iemobile)&&(o.browser="msie",r.msie=!0),r.edge&&(delete r.edge,o.browser="msedge",r.msedge=!0),r.safari&&r.blackberry&&(o.browser="blackberry",r.blackberry=!0),r.safari&&r.playbook&&(o.browser="playbook",r.playbook=!0),r.bb){var i="blackberry";o.browser=i,r[i]=!0}return r.opr&&(o.browser="opera",r.opera=!0),r.safari&&r.android&&(o.browser="android",r.android=!0),r.safari&&r.kindle&&(o.browser="kindle",r.kindle=!0),r.safari&&r.silk&&(o.browser="silk",r.silk=!0),r.name=o.browser,r.platform=o.platform,r}return window.jQBrowser=t(window.navigator.userAgent),window.jQBrowser.uaMatch=t,e&&(e.browser=window.jQBrowser),window.jQBrowser}(e)}.apply(t,r))||(e.exports=o)},function(e,t,n){"use strict";var r,o,i;o=[n(0)],void 0===(i="function"==typeof(r=function(e){var t=e.fn.init;e.fn.init=function(e){var n=Array.prototype.slice.call(arguments);"string"==typeof e&&"#"===e&&(console.warn("jQuery('#') is not a valid selector"),n[0]=[]);var r=t.apply(this,arguments);return r.selector="string"==typeof e?e:"",r},e.fn.init.prototype=e.fn,void 0!==e.fn.live&&e.isFunction(e.fn.live)||e.fn.extend({live:function(t,n,r){return this.selector&&e(document).on(t,this.selector,n,r),console.warn("jQuery.live() has been removed since jquery v1.9, please use jQuery.on() instead."),this}})})?r.apply(t,o):r)||(e.exports=i)},function(e,t,n){"use strict";var r=a(n(0)),o=a(n(1)),i=n(2);function a(e){return e&&e.__esModule?e:{default:e}}
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */(0,r.default)(document).ready(function(){o.default.on("updateCart",function(e){o.default.cart=e.reason.cart;var t=(0,r.default)(".js-cart").data("refresh-url");if(t){var n={};e&&e.reason&&(n={id_product_attribute:e.reason.idProductAttribute,id_product:e.reason.idProduct}),r.default.post(t,n).then(function(e){(0,r.default)(".cart-detailed-totals").replaceWith(e.cart_detailed_totals),(0,r.default)(".cart-summary-items-subtotal").replaceWith(e.cart_summary_items_subtotal),(0,r.default)(".cart-summary-subtotals-container").replaceWith(e.cart_summary_subtotals_container),(0,r.default)(".cart-summary-totals").replaceWith(e.cart_summary_totals),(0,r.default)(".cart-detailed-actions").replaceWith(e.cart_detailed_actions),(0,r.default)(".cart-voucher").replaceWith(e.cart_voucher),(0,r.default)(".cart-overview").replaceWith(e.cart_detailed),(0,r.default)("#product_customization_id").val(0),(0,r.default)(".js-cart-line-product-quantity").each(function(e,t){var n=(0,r.default)(t);n.attr("value",n.val())}),(0,r.default)(".js-cart-payment-step-refresh").length&&(0,i.refreshCheckoutPage)(),o.default.emit("updatedCart",{eventType:"updateCart",resp:e})}).fail(function(e){o.default.emit("handleError",{eventType:"updateCart",resp:e})})}});var e=(0,r.default)("body");e.on("click",'[data-button-action="add-to-cart"]',function(e){if(e.preventDefault(),(0,r.default)("#quantity_wanted").val()>(0,r.default)("[data-stock]").data("stock")&&0===(0,r.default)("[data-allow-oosp]").data("allow-oosp").length)(0,r.default)('[data-button-action="add-to-cart"]').attr("disabled","disabled");else{var t=(0,r.default)(e.target).closest("form"),n=t.serialize()+"&add=1&action=update",i=t.attr("action"),a=function(e){e.parents(".product-add-to-cart").first().find(".product-minimal-quantity").addClass("error"),e.parent().find("label").addClass("error")},s=t.find("input[min]");if(!function(e){var t=!0;return e.each(function(e,n){var o=(0,r.default)(n),i=parseInt(o.attr("min"),10);i&&o.val()<i&&(a(o),t=!1)}),t}(s))return void a(s);r.default.post(i,n,null,"json").then(function(e){o.default.emit("updateCart",{reason:{idProduct:e.id_product,idProductAttribute:e.id_product_attribute,idCustomization:e.id_customization,linkAction:"add-to-cart",cart:e.cart},resp:e})}).fail(function(e){o.default.emit("handleError",{eventType:"addProductToCart",resp:e})})}}),e.on("submit",'[data-link-action="add-voucher"]',function(e){e.preventDefault();var t=(0,r.default)(e.currentTarget),n=t.attr("action");0===t.find("[name=action]").length&&t.append((0,r.default)("<input>",{type:"hidden",name:"ajax",value:1})),0===t.find("[name=action]").length&&t.append((0,r.default)("<input>",{type:"hidden",name:"action",value:"update"})),r.default.post(n,t.serialize(),null,"json").then(function(t){t.hasError?(0,r.default)(".js-error").show().find(".js-error-text").text(t.errors[0]):o.default.emit("updateCart",{reason:e.target.dataset,resp:t})}).fail(function(e){o.default.emit("handleError",{eventType:"updateCart",resp:e})})})})},function(e,t,n){"use strict";var r=l(n(0)),o=l(n(1)),i=l(n(13)),a=l(n(14)),s=l(n(15)),u=l(n(16));function l(e){return e&&e.__esModule?e:{default:e}}
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */function c(){(0,i.default)(),(0,a.default)(),(0,s.default)(),function(){var e=new u.default;e.getClickableSteps().on("click",function(t){var n=u.default.getClickedStep(t);n.isUnreachable()||(e.makeCurrent(n),n.hasContinueButton()?n.disableAllAfter():n.enableAllBefore()),o.default.emit("changedCheckoutStep",{event:t})})}(),(0,r.default)(".checkout-step form").submit(function(e){!0===(0,r.default)(this).data("disabled")&&e.preventDefault(),(0,r.default)(this).data("disabled",!0),(0,r.default)('button[type="submit"]',this).addClass("disabled")})}(0,r.default)(document).ready(function(){1===(0,r.default)("#checkout").length&&c()})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){(0,r.default)(".js-edit-addresses").on("click",function(e){e.stopPropagation(),(0,r.default)("#checkout-addresses-step").trigger("click"),o.default.emit("editAddress")}),(0,r.default)("#delivery-addresses input[type=radio], #invoice-addresses input[type=radio]").on("click",function(){(0,r.default)(".address-item").removeClass("selected"),(0,r.default)(".address-item:has(input[type=radio]:checked)").addClass("selected");var e=(0,r.default)(".js-address-error").prop("id").split("-").pop(),t=(0,r.default)("#not-valid-addresses").val(),n=this.name.split("_").pop(),o=(0,r.default)(".js-address-error[name=alert-"+n+"]");l(!1,e,n),""!==t&&null===s&&t.split(",").indexOf(this.value)>=0?(o.show(),l(!0,this.value,n),(0,r.default)(".js-address-error").prop("id","id-failure-address-"+this.value)):o.hide();var i=(0,r.default)(".js-address-error:visible");c(i.length<=0)})};var r=a(n(0)),o=a(n(1)),i=n(2);function a(e){return e&&e.__esModule?e:{default:e}}
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */var s=(0,i.psGetRequestParameter)("editAddress"),u=(0,i.psGetRequestParameter)("use_same_address");(0,r.default)(window).on("load",function(){var e=(0,r.default)(".js-address-error:visible");if(0===parseInt(u)&&(0,r.default)("#invoice-addresses input[type=radio]:checked").trigger("click"),(null!==s||(0,r.default)(".js-address-form:visible").length>1)&&e.hide(),e.length>0){var t=(0,r.default)(".js-address-error").prop("id").split("-").pop();e.each(function(){l(!0,t,(0,r.default)(this).attr("name").split("-").pop())})}e=(0,r.default)(".js-address-error:visible"),c(e.length<=0)});var l=function(e,t,n){var o="#7a7a7a";e&&((0,r.default)("#"+n+"-addresses a.edit-address").prop("style","color: #7a7a7a !important"),o="#2fb5d2"),(0,r.default)("#id-address-"+n+"-address-"+t+" a.edit-address").prop("style","color: "+o+" !important")},c=function(e){(0,r.default)("button[name=confirm-addresses]").prop("disabled",!e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */
function(){var e=(0,r.default)("body");e.on("change","#js-delivery input",function(e){var t=(0,r.default)("#js-delivery"),n=t.serialize(),a=(0,r.default)(e.currentTarget).parents(".delivery-option");r.default.post(t.data("url-update"),n).then(function(e){(0,r.default)("#js-checkout-summary").replaceWith(e.preview),(0,r.default)(".js-cart-payment-step-refresh").length&&(0,i.refreshCheckoutPage)(),o.default.emit("updatedDeliveryForm",{dataForm:t.serializeArray(),deliveryOption:a,resp:e})}).fail(function(e){o.default.trigger("handleError",{eventType:"updateDeliveryOptions",resp:e})})}),e.on("click",".js-edit-delivery",function(e){e.stopPropagation(),(0,r.default)("#checkout-delivery-step").trigger("click"),o.default.emit("editDelivery")})};var r=a(n(0)),o=a(n(1)),i=n(2);function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=new i;return e.init(),e};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));function o(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)}}var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.confirmationSelector="#payment-confirmation",this.paymentSelector="#payment-section",this.conditionsSelector="#conditions-to-approve",this.conditionAlertSelector=".js-alert-payment-conditions",this.additionalInformatonSelector=".js-additional-information",this.optionsForm=".js-payment-option-form"}return function(e,t,n){t&&o(e.prototype,t),n&&o(e,n)}(e,[{key:"init",value:function(){(0,r.default)(this.paymentSelector+' input[type="checkbox"][disabled]').attr("disabled",!1);var e=(0,r.default)("body");e.on("change",this.conditionsSelector+' input[type="checkbox"]',r.default.proxy(this.toggleOrderButton,this)),e.on("change",'input[name="payment-option"]',r.default.proxy(this.toggleOrderButton,this)),e.on("click",this.confirmationSelector+" button",r.default.proxy(this.confirm,this)),this.collapseOptions()}},{key:"collapseOptions",value:function(){(0,r.default)(this.additionalInformatonSelector+", "+this.optionsForm).hide()}},{key:"getSelectedOption",value:function(){return(0,r.default)('input[name="payment-option"]:checked').attr("id")}},{key:"hideConfirmation",value:function(){(0,r.default)(this.confirmationSelector).hide()}},{key:"showConfirmation",value:function(){(0,r.default)(this.confirmationSelector).show()}},{key:"toggleOrderButton",value:function(){var e=!0;(0,r.default)(this.conditionsSelector+' input[type="checkbox"]').each(function(t,n){n.checked||(e=!1)}),this.collapseOptions();var t=this.getSelectedOption();if(t||(e=!1),(0,r.default)("#"+t+"-additional-information").show(),(0,r.default)("#pay-with-"+t+"-form").show(),(0,r.default)(".js-payment-binary").hide(),(0,r.default)("#"+t).hasClass("binary")){var n=this.getPaymentOptionSelector(t);this.hideConfirmation(),(0,r.default)(n).show(),e?(0,r.default)(n).removeClass("disabled"):(0,r.default)(n).addClass("disabled")}else this.showConfirmation(),(0,r.default)(this.confirmationSelector+" button").attr("disabled",!e),e?(0,r.default)(this.conditionAlertSelector).hide():(0,r.default)(this.conditionAlertSelector).show()}},{key:"getPaymentOptionSelector",value:function(e){var t=(0,r.default)("#".concat(e)).data("module-name");return".js-payment-".concat(t)}},{key:"confirm",value:function(){var e=this.getSelectedOption();e&&((0,r.default)(this.confirmationSelector+" button").prop("disabled",!0),(0,r.default)("#pay-with-"+e+"-form form").submit())}}]),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}var s=".".concat("js-current-step"),u=function(){function e(){o(this,e),this.$steps=(0,r.default)(".checkout-step"),this.$steps.off("click"),this.$clickableSteps=(0,r.default)(s).prevAll().andSelf(),this.$clickableSteps.addClass("-clickable")}return a(e,[{key:"getClickableSteps",value:function(){return this.$clickableSteps}},{key:"makeCurrent",value:function(e){this.$steps.removeClass("-current"),this.$steps.removeClass("js-current-step"),e.makeCurrent()}}],[{key:"getClickedStep",value:function(e){return new l((0,r.default)(e.target).closest(".checkout-step"))}}]),e}();t.default=u;var l=function(){function e(t){o(this,e),this.$step=t}return a(e,[{key:"isUnreachable",value:function(){return this.$step.hasClass("-unreachable")}},{key:"makeCurrent",value:function(){this.$step.addClass("-current"),this.$step.addClass("js-current-step")}},{key:"hasContinueButton",value:function(){return(0,r.default)("button.continue",this.$step).length>0}},{key:"disableAllAfter",value:function(){var e=this.$step.nextAll();e.addClass("-unreachable").removeClass("-complete"),(0,r.default)(".step-title",e).addClass("not-allowed")}},{key:"enableAllBefore",value:function(){var e=this.$step.nextAll(".checkout-step.-clickable");e.removeClass("-unreachable").addClass("-complete"),(0,r.default)(".step-title",e).removeClass("not-allowed")}}]),e}()},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */(n(0));var o=!1;function i(e){o=!1,prestashop.emit("updateProductList",e),window.history.pushState(e,document.title,e.current_url)}function a(){o=!1}(0,r.default)(document).ready(function(){prestashop.on("updateFacets",function(e){!function(e){if(o);else{var t=[e,e.indexOf("?")>=0?"&":"?","from-xhr"].join("");r.default.get(t,null,null,"json").then(i).fail(a)}}(e)})})},function(e,t,n){"use strict";var r=i(n(0)),o=i(n(1));function i(e){return e&&e.__esModule?e:{default:e}}
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */(0,r.default)(document).ready(function(){(0,r.default)("body").on("click",".quick-view",function(e){o.default.emit("clickQuickView",{dataset:(0,r.default)(e.target).closest(".js-product-miniature").data()}),e.preventDefault()})})},function(e,t,n){"use strict";var r=a(n(0)),o=a(n(1)),i=n(2);function a(e){return e&&e.__esModule?e:{default:e}}
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */var s=null,u=null;function l(e){void 0===e&&(e="An error occurred while processing your request"),function(e,t){var n=(0,r.default)('<div class="alert alert-danger ajax-error" role="alert">'.concat(t,"</div>"));e.replaceWith(n)}((0,r.default)(".quickview #product-availability, .page-product:not(.modal-open) .row #product-availability, .page-product:not(.modal-open) .product-container #product-availability"),e)}function c(e,t,n){var a=(0,r.default)(".product-actions"),c=a.find("#quantity_wanted"),f=a.find("form:first").serialize(),p=(0,i.psGetRequestParameter)("preview");if(p=null!==p?"&preview="+p:"",null!==n){if(!e||"keyup"!==e.type||c.val()!==c.data("old-value")){c.data("old-value",c.val()),u&&clearTimeout(u);var h=30;"updatedProductQuantity"===t&&(h=750),u=setTimeout(function(){""!==f&&(s=r.default.ajax({url:n+(-1===n.indexOf("?")?"?":"&")+f+p,method:"POST",data:{quickview:(0,r.default)(".modal.quickview.in").length,ajax:1,action:"refresh",quantity_wanted:"updatedProductCombination"===t?c.attr("min"):c.val()},dataType:"json",beforeSend:function(){null!==s&&s.abort()},error:function(e,t,n){"abort"!==t&&0===(0,r.default)("section#main > .ajax-error").length&&l()},success:function(e,n,i){var a=(0,r.default)("<div>").append(e.product_cover_thumbnails);(0,r.default)(".quickview .images-container, .page-product:not(.modal-open) .row .images-container, .page-product:not(.modal-open) .product-container .images-container").html()!==a.find(".quickview .images-container, .page-product:not(.modal-open) .row .images-container, .page-product:not(.modal-open) .product-container .images-container").html()&&(0,r.default)(".quickview .images-container, .page-product:not(.modal-open) .row .images-container, .page-product:not(.modal-open) .product-container .images-container").replaceWith(e.product_cover_thumbnails),(0,r.default)(".quickview .product-prices, .page-product:not(.modal-open) .row .product-prices, .page-product:not(.modal-open) .product-container .product-prices").first().replaceWith(e.product_prices),(0,r.default)(".quickview .product-customization, .page-product:not(.modal-open) .row .product-customization, .page-product:not(.modal-open) .product-container .product-customization").first().replaceWith(e.product_customization),(0,r.default)(".quickview .product-variants, .page-product:not(.modal-open) .row .product-variants, .page-product:not(.modal-open) .product-container .product-variants").first().replaceWith(e.product_variants),(0,r.default)(".quickview .product-discounts, .page-product:not(.modal-open) .row .product-discounts, .page-product:not(.modal-open) .product-container .product-discounts").first().replaceWith(e.product_discounts),(0,r.default)(".quickview .product-additional-info, .page-product:not(.modal-open) .row .product-additional-info, .page-product:not(.modal-open) .product-container .product-additional-info").first().replaceWith(e.product_additional_info),(0,r.default)(".quickview #product-details, #product-details").replaceWith(e.product_details),(0,r.default)(".quickview .product-flags, .page-product:not(.modal-open) .row .product-flags, .page-product:not(.modal-open) .product-container .product-flags").first().replaceWith(e.product_flags),function(e){var t=null;(0,r.default)(e.product_add_to_cart).each(function(e,n){if((0,r.default)(n).hasClass("product-add-to-cart"))return t=(0,r.default)(n),!1}),null===t&&l();var n=(0,r.default)(".product-add-to-cart");d({$addToCartSnippet:t,$targetParent:n,targetSelector:".add"}),d({$addToCartSnippet:t,$targetParent:n,targetSelector:"#product-availability"}),d({$addToCartSnippet:t,$targetParent:n,targetSelector:".product-minimal-quantity"})}(e);var s=parseInt(e.product_minimal_quantity,10);isNaN(s)||"updatedProductQuantity"===t||(c.attr("min",s),c.val(s)),o.default.emit("updatedProduct",e)},complete:function(e,t){s=null,u=null}}))}.bind(s,u),h)}}else l()}function d(e){var t=(0,r.default)(e.$targetParent.find(e.targetSelector));if(!(t.length<=0)){var n=e.$addToCartSnippet.find(e.targetSelector);n.length>0?t.replaceWith(n[0].outerHTML):t.html("")}}(0,r.default)(document).ready(function(){(0,r.default)("body").on("change touchspin.on.startspin",".product-variants *[name]",function(e){o.default.emit("updateProduct",{eventType:"updatedProductCombination",event:e,resp:{},reason:{productUrl:o.default.urls.pages.product||""}})}),(0,r.default)("body").on("click",".product-refresh",function(e,t){e.preventDefault();var n="updatedProductCombination";void 0!==t&&t.eventType&&(n=t.eventType),o.default.emit("updateProduct",{eventType:n,event:e,resp:{},reason:{productUrl:o.default.urls.pages.product||""}})}),o.default.on("updateProduct",function(e){var t=e.eventType,n=e.event;(function(){var e=r.default.Deferred(),t=(0,r.default)(".product-actions"),n=(0,r.default)("#quantity_wanted");if(null!==o.default&&null!==o.default.urls&&null!==o.default.urls.pages&&""!==o.default.urls.pages.product&&null!==o.default.urls.pages.product)return e.resolve(o.default.urls.pages.product),e.promise();var i={};return(0,r.default)(t.find("form:first").serializeArray()).each(function(e,t){i[t.name]=t.value}),r.default.ajax({url:t.find("form:first").attr("action"),method:"POST",data:Object.assign({ajax:1,action:"productrefresh",quantity_wanted:n.val()},i),dataType:"json",success:function(t){var n=t.productUrl;o.default.page.canonical=n,e.resolve(n)},error:function(t,n,r){e.reject({jqXHR:t,textStatus:n,errorThrown:r})}}),e.promise()})().done(function(e){return c(n,t,e)}).fail(function(){0===(0,r.default)("section#main > .ajax-error").length&&l()})}),o.default.on("updatedProduct",function(e){if(e.product_url&&e.id_product_attribute&&!(0,r.default)(".modal.quickview").length){var t=document.title;e.product_title&&(t=e.product_title,(0,r.default)(document).attr("title",t)),window.history.replaceState({id_product_attribute:e.id_product_attribute},t,e.product_url)}}),o.default.on("updateCart",function(e){e&&e.reason&&"add-to-cart"===e.reason.linkAction&&(0,r.default)("#quantity_wanted").val(1)}),o.default.on("showErrorNextToAddtoCartButton",function(e){e&&e.errorMessage&&l(e.errorMessage)})})},function(e,t,n){"use strict";var r=i(n(0)),o=i(n(1));function i(e){return e&&e.__esModule?e:{default:e}}(0,r.default)(document).ready(function(){!function(e){(0,r.default)("body").on("change",e.country,function(){var t={id_country:(0,r.default)(e.country).val(),id_address:(0,r.default)(e.address+" form").data("id-address")},n=(0,r.default)(e.address+" form").data("refresh-url"),i=e.address+" input";r.default.post(n,t).then(function(t){var n=[];(0,r.default)(i).each(function(){n[(0,r.default)(this).prop("name")]=(0,r.default)(this).val()}),(0,r.default)(e.address).replaceWith(t.address_form),(0,r.default)(i).each(function(){(0,r.default)(this).val(n[(0,r.default)(this).prop("name")])}),o.default.emit("updatedAddressForm",{target:(0,r.default)(e.address),resp:t})}).fail(function(e){o.default.emit("handleError",{eventType:"updateAddressForm",resp:e})})})}({country:".js-country",address:".js-address-form"})})},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function a(e){return"object"===r(e)&&null!==e}function s(e){return void 0===e}e.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._maxListeners=void 0,o.defaultMaxListeners=10,o.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},o.prototype.emit=function(e){var t,n,r,o,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(s(n=this._events[e]))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),n.apply(this,o)}else if(a(n))for(o=Array.prototype.slice.call(arguments,1),r=(l=n.slice()).length,u=0;u<r;u++)l[u].apply(this,o);return!0},o.prototype.addListener=function(e,t){var n;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?a(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,a(this._events[e])&&!this._events[e].warned&&(n=s(this._maxListeners)?o.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(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},o.prototype.on=o.prototype.addListener,o.prototype.once=function(e,t){if(!i(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},o.prototype.removeListener=function(e,t){var n,r,o,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(s=o;s-->0;)if(n[s]===t||n[s].listener&&n[s].listener===t){r=s;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},o.prototype.removeAllListeners=function(e){var t,n;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(i(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},o.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},o.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},o.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(0)),o=i(n(23));function i(e){return e&&e.__esModule?e:{default:e}}
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */var a=function(e){var t=(0,r.default)(e);r.default.each(t,function(e,t){if(!t.checkValidity()){var n=t.value.split("@");o.default.toASCII(n[0])===n[0]&&(t.value=o.default.toASCII(t.value))}})};t.default=a},function(e,t,n){"use strict";(function(e,r){var o;function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
/*! https://mths.be/punycode v1.4.1 by @mathias */!function(a){var s="object"==i(t)&&t&&!t.nodeType&&t,u="object"==i(e)&&e&&!e.nodeType&&e,l="object"==(void 0===r?"undefined":i(r))&&r;l.global!==l&&l.window!==l&&l.self!==l||(a=l);var c,d,f=2147483647,p=36,h=1,v=26,m=38,y=700,g=72,b=128,x="-",w=/^xn--/,k=/[^\x20-\x7E]/,C=/[\x2E\u3002\uFF0E\uFF61]/g,T={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},j=p-h,S=Math.floor,_=String.fromCharCode;function A(e){throw new RangeError(T[e])}function E(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function N(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+E((e=e.replace(C,".")).split("."),t).join(".")}function D(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function q(e){return E(e,function(e){var t="";return e>65535&&(t+=_((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=_(e)}).join("")}function L(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:p}function O(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function P(e,t,n){var r=0;for(e=n?S(e/y):e>>1,e+=S(e/t);e>j*v>>1;r+=p)e=S(e/j);return S(r+(j+1)*e/(e+m))}function M(e){var t,n,r,o,i,a,s,u,l,c,d=[],m=e.length,y=0,w=b,k=g;for((n=e.lastIndexOf(x))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&A("not-basic"),d.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<m;){for(i=y,a=1,s=p;o>=m&&A("invalid-input"),((u=L(e.charCodeAt(o++)))>=p||u>S((f-y)/a))&&A("overflow"),y+=u*a,!(u<(l=s<=k?h:s>=k+v?v:s-k));s+=p)a>S(f/(c=p-l))&&A("overflow"),a*=c;k=P(y-i,t=d.length+1,0==i),S(y/t)>f-w&&A("overflow"),w+=S(y/t),y%=t,d.splice(y++,0,w)}return q(d)}function H(e){var t,n,r,o,i,a,s,u,l,c,d,m,y,w,k,C=[];for(m=(e=D(e)).length,t=b,n=0,i=g,a=0;a<m;++a)(d=e[a])<128&&C.push(_(d));for(r=o=C.length,o&&C.push(x);r<m;){for(s=f,a=0;a<m;++a)(d=e[a])>=t&&d<s&&(s=d);for(s-t>S((f-n)/(y=r+1))&&A("overflow"),n+=(s-t)*y,t=s,a=0;a<m;++a)if((d=e[a])<t&&++n>f&&A("overflow"),d==t){for(u=n,l=p;!(u<(c=l<=i?h:l>=i+v?v:l-i));l+=p)k=u-c,w=p-c,C.push(_(O(c+k%w,0))),u=S(k/w);C.push(_(O(u,0))),i=P(n,y,r==o),n=0,++r}++n,++t}return C.join("")}if(c={version:"1.4.1",ucs2:{decode:D,encode:q},decode:M,encode:H,toASCII:function(e){return N(e,function(e){return k.test(e)?"xn--"+H(e):e})},toUnicode:function(e){return N(e,function(e){return w.test(e)?M(e.slice(4).toLowerCase()):e})}},"object"==i(n(4))&&n(4))void 0===(o=function(){return c}.call(t,n,t,e))||(e.exports=o);else if(s&&u)if(e.exports==s)u.exports=c;else for(d in c)c.hasOwnProperty(d)&&(s[d]=c[d]);else a.punycode=c}(void 0)}).call(this,n(3)(e),n(24))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o;o=function(){return this}();try{o=o||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":r(window))&&(o=window)}e.exports=o}]);!function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=28)}([function(t,e){t.exports=jQuery},function(t,e){t.exports=prestashop},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(0),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=function(){function t(e){i(this,t),this.el=e}return r(t,[{key:"init",value:function(){this.el.on("show.bs.dropdown",function(t,e){e?(0,a.default)("#"+e).find(".dropdown-menu").first().stop(!0,!0).slideDown():(0,a.default)(t.target).find(".dropdown-menu").first().stop(!0,!0).slideDown()}),this.el.on("hide.bs.dropdown",function(t,e){e?(0,a.default)("#"+e).find(".dropdown-menu").first().stop(!0,!0).slideUp():(0,a.default)(t.target).find(".dropdown-menu").first().stop(!0,!0).slideUp()}),this.el.find("select.link").each(function(t,e){(0,a.default)(e).on("change",function(t){window.location=(0,a.default)(this).val()})})}}]),t}();e.default=s,t.exports=e.default},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(0),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=function(){function t(){i(this,t)}return r(t,[{key:"init",value:function(){(0,a.default)(".js-product-miniature").each(function(t,e){(0,a.default)(e).find(".color").length>5&&function(){var t=0;(0,a.default)(e).find(".color").each(function(e,n){e>4&&((0,a.default)(n).hide(),t++)}),(0,a.default)(e).find(".js-count").append("+"+t)}()})}}]),t}();e.default=s,t.exports=e.default},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(0),a=function(t){return t&&t.__esModule?t:{default:t}}(o);n(5);var s=function(){function t(){i(this,t)}return r(t,[{key:"init",value:function(){var t=this,e=(0,a.default)(".js-modal-arrows"),n=(0,a.default)(".js-modal-product-images");(0,a.default)("body").on("click",".js-modal-thumb",function(t){(0,a.default)(".js-modal-thumb").hasClass("selected")&&(0,a.default)(".js-modal-thumb").removeClass("selected"),(0,a.default)(t.currentTarget).addClass("selected"),(0,a.default)(".js-modal-product-cover").attr("src",(0,a.default)(t.target).data("image-large-src")),(0,a.default)(".js-modal-product-cover").attr("title",(0,a.default)(t.target).attr("title")),(0,a.default)(".js-modal-product-cover").attr("alt",(0,a.default)(t.target).attr("alt"))}).on("click","aside#thumbnails",function(t){"thumbnails"==t.target.id&&(0,a.default)("#product-modal").modal("hide")}),(0,a.default)(".js-modal-product-images li").length<=5?e.css("opacity",".2"):e.on("click",function(e){(0,a.default)(e.target).hasClass("arrow-up")&&n.position().top<0?(t.move("up"),(0,a.default)(".js-modal-arrow-down").css("opacity","1")):(0,a.default)(e.target).hasClass("arrow-down")&&n.position().top+n.height()>(0,a.default)(".js-modal-mask").height()&&(t.move("down"),(0,a.default)(".js-modal-arrow-up").css("opacity","1"))})}},{key:"move",value:function(t){var e=(0,a.default)(".js-modal-product-images"),n=(0,a.default)(".js-modal-product-images li img").height()+10,i=e.position().top;e.velocity({translateY:"up"===t?i+n:i-n},function(){e.position().top>=0?(0,a.default)(".js-modal-arrow-up").css("opacity",".2"):e.position().top+e.height()<=(0,a.default)(".js-modal-mask").height()&&(0,a.default)(".js-modal-arrow-down").css("opacity",".2")})}}]),t}();e.default=s,t.exports=e.default},function(t,e,n){"use strict";var i,r;!function(t){function e(t){var e=t.length,i=n.type(t);return"function"!==i&&!n.isWindow(t)&&(!(1!==t.nodeType||!e)||("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t))}if(!t.jQuery){var n=function t(e,n){return new t.fn.init(e,n)};n.isWindow=function(t){return t&&t===t.window},n.type=function(t){return t?"object"==typeof t||"function"==typeof t?r[a.call(t)]||"object":typeof t:t+""},n.isArray=Array.isArray||function(t){return"array"===n.type(t)},n.isPlainObject=function(t){var e;if(!t||"object"!==n.type(t)||t.nodeType||n.isWindow(t))return!1;try{if(t.constructor&&!o.call(t,"constructor")&&!o.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}for(e in t);return void 0===e||o.call(t,e)},n.each=function(t,n,i){var r=0,o=t.length,a=e(t);if(i){if(a)for(;r<o&&!1!==n.apply(t[r],i);r++);else for(r in t)if(t.hasOwnProperty(r)&&!1===n.apply(t[r],i))break}else if(a)for(;r<o&&!1!==n.call(t[r],r,t[r]);r++);else for(r in t)if(t.hasOwnProperty(r)&&!1===n.call(t[r],r,t[r]))break;return t},n.data=function(t,e,r){if(void 0===r){var o=t[n.expando],a=o&&i[o];if(void 0===e)return a;if(a&&e in a)return a[e]}else if(void 0!==e){var s=t[n.expando]||(t[n.expando]=++n.uuid);return i[s]=i[s]||{},i[s][e]=r,r}},n.removeData=function(t,e){var r=t[n.expando],o=r&&i[r];o&&(e?n.each(e,function(t,e){delete o[e]}):delete i[r])},n.extend=function(){var t,e,i,r,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[l]||{},l++),"object"!=typeof s&&"function"!==n.type(s)&&(s={}),l===u&&(s=this,l--);l<u;l++)if(o=arguments[l])for(r in o)o.hasOwnProperty(r)&&(t=s[r],i=o[r],s!==i&&(c&&i&&(n.isPlainObject(i)||(e=n.isArray(i)))?(e?(e=!1,a=t&&n.isArray(t)?t:[]):a=t&&n.isPlainObject(t)?t:{},s[r]=n.extend(c,a,i)):void 0!==i&&(s[r]=i)));return s},n.queue=function(t,i,r){if(t){i=(i||"fx")+"queue";var o=n.data(t,i);return r?(!o||n.isArray(r)?o=n.data(t,i,function(t,n){var i=n||[];return t&&(e(Object(t))?function(t,e){for(var n=+e.length,i=0,r=t.length;i<n;)t[r++]=e[i++];if(n!==n)for(;void 0!==e[i];)t[r++]=e[i++];t.length=r}(i,"string"==typeof t?[t]:t):[].push.call(i,t)),i}(r)):o.push(r),o):o||[]}},n.dequeue=function(t,e){n.each(t.nodeType?[t]:t,function(t,i){e=e||"fx";var r=n.queue(i,e),o=r.shift();"inprogress"===o&&(o=r.shift()),o&&("fx"===e&&r.unshift("inprogress"),o.call(i,function(){n.dequeue(i,e)}))})},n.fn=n.prototype={init:function(t){if(t.nodeType)return this[0]=t,this;throw new Error("Not a DOM node.")},offset:function(){var e=this[0].getBoundingClientRect?this[0].getBoundingClientRect():{top:0,left:0};return{top:e.top+(t.pageYOffset||document.scrollTop||0)-(document.clientTop||0),left:e.left+(t.pageXOffset||document.scrollLeft||0)-(document.clientLeft||0)}},position:function(){var t=this[0],e=function(t){for(var e=t.offsetParent;e&&"html"!==e.nodeName.toLowerCase()&&e.style&&"static"===e.style.position;)e=e.offsetParent;return e||document}(t),i=this.offset(),r=/^(?:body|html)$/i.test(e.nodeName)?{top:0,left:0}:n(e).offset();return i.top-=parseFloat(t.style.marginTop)||0,i.left-=parseFloat(t.style.marginLeft)||0,e.style&&(r.top+=parseFloat(e.style.borderTopWidth)||0,r.left+=parseFloat(e.style.borderLeftWidth)||0),{top:i.top-r.top,left:i.left-r.left}}};var i={};n.expando="velocity"+(new Date).getTime(),n.uuid=0;for(var r={},o=r.hasOwnProperty,a=r.toString,s="Boolean Number String Function Array Date RegExp Object Error".split(" "),l=0;l<s.length;l++)r["[object "+s[l]+"]"]=s[l].toLowerCase();n.fn.init.prototype=n.fn,t.Velocity={Utilities:n}}}(window),function(o){"object"==typeof t&&"object"==typeof t.exports?t.exports=o():(i=o,void 0!==(r="function"==typeof i?i.call(e,n,e,t):i)&&(t.exports=r))}(function(){return function(t,e,n,i){function r(t){for(var e=-1,n=t?t.length:0,i=[];++e<n;){var r=t[e];r&&i.push(r)}return i}function o(t){return _.isWrapped(t)?t=y.call(t):_.isNode(t)&&(t=[t]),t}function a(t){var e=h.data(t,"velocity");return null===e?i:e}function s(t,e){var n=a(t);n&&n.delayTimer&&!n.delayPaused&&(n.delayRemaining=n.delay-e+n.delayBegin,n.delayPaused=!0,clearTimeout(n.delayTimer.setTimeout))}function l(t,e){var n=a(t);n&&n.delayTimer&&n.delayPaused&&(n.delayPaused=!1,n.delayTimer.setTimeout=setTimeout(n.delayTimer.next,n.delayRemaining))}function u(t){return function(e){return Math.round(e*t)*(1/t)}}function c(t,n,i,r){function o(t,e){return 1-3*e+3*t}function a(t,e){return 3*e-6*t}function s(t){return 3*t}function l(t,e,n){return((o(e,n)*t+a(e,n))*t+s(e))*t}function u(t,e,n){return 3*o(e,n)*t*t+2*a(e,n)*t+s(e)}function c(e,n){for(var r=0;r<m;++r){var o=u(n,t,i);if(0===o)return n;n-=(l(n,t,i)-e)/o}return n}function f(){for(var e=0;e<b;++e)S[e]=l(e*_,t,i)}function d(e,n,r){var o,a,s=0;do{a=n+(r-n)/2,o=l(a,t,i)-e,o>0?r=a:n=a}while(Math.abs(o)>v&&++s<y);return a}function p(e){for(var n=0,r=1,o=b-1;r!==o&&S[r]<=e;++r)n+=_;--r;var a=(e-S[r])/(S[r+1]-S[r]),s=n+a*_,l=u(s,t,i);return l>=g?c(e,s):0===l?s:d(e,n,n+_)}function h(){E=!0,t===n&&i===r||f()}var m=4,g=.001,v=1e-7,y=10,b=11,_=1/(b-1),w="Float32Array"in e;if(4!==arguments.length)return!1;for(var x=0;x<4;++x)if("number"!=typeof arguments[x]||isNaN(arguments[x])||!isFinite(arguments[x]))return!1;t=Math.min(t,1),i=Math.min(i,1),t=Math.max(t,0),i=Math.max(i,0);var S=w?new Float32Array(b):new Array(b),E=!1,T=function(e){return E||h(),t===n&&i===r?e:0===e?0:1===e?1:l(p(e),n,r)};T.getControlPoints=function(){return[{x:t,y:n},{x:i,y:r}]};var C="generateBezier("+[t,n,i,r]+")";return T.toString=function(){return C},T}function f(t,e){var n=t;return _.isString(t)?E.Easings[t]||(n=!1):n=_.isArray(t)&&1===t.length?u.apply(null,t):_.isArray(t)&&2===t.length?T.apply(null,t.concat([e])):!(!_.isArray(t)||4!==t.length)&&c.apply(null,t),!1===n&&(n=E.Easings[E.defaults.easing]?E.defaults.easing:S),n}function d(t){if(t){var e=E.timestamp&&!0!==t?t:v.now(),n=E.State.calls.length;n>1e4&&(E.State.calls=r(E.State.calls),n=E.State.calls.length);for(var o=0;o<n;o++)if(E.State.calls[o]){var s=E.State.calls[o],l=s[0],u=s[2],c=s[3],f=!!c,g=null,y=s[5],b=s[6];if(c||(c=E.State.calls[o][3]=e-16),y){if(!0!==y.resume)continue;c=s[3]=Math.round(e-b-16),s[5]=null}b=s[6]=e-c;for(var w=Math.min(b/u.duration,1),x=0,S=l.length;x<S;x++){var T=l[x],A=T.element;if(a(A)){var I=!1;if(u.display!==i&&null!==u.display&&"none"!==u.display){if("flex"===u.display){var k=["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"];h.each(k,function(t,e){C.setPropertyValue(A,"display",e)})}C.setPropertyValue(A,"display",u.display)}u.visibility!==i&&"hidden"!==u.visibility&&C.setPropertyValue(A,"visibility",u.visibility);for(var D in T)if(T.hasOwnProperty(D)&&"element"!==D){var P,N=T[D],L=_.isString(N.easing)?E.Easings[N.easing]:N.easing;if(_.isString(N.pattern)){var j=1===w?function(t,e,n){var i=N.endValue[e];return n?Math.round(i):i}:function(t,e,n){var i=N.startValue[e],r=N.endValue[e]-i,o=i+r*L(w,u,r);return n?Math.round(o):o};P=N.pattern.replace(/{(\d+)(!)?}/g,j)}else if(1===w)P=N.endValue;else{var B=N.endValue-N.startValue;P=N.startValue+B*L(w,u,B)}if(!f&&P===N.currentValue)continue;if(N.currentValue=P,"tween"===D)g=P;else{var V;if(C.Hooks.registered[D]){V=C.Hooks.getRoot(D);var F=a(A).rootPropertyValueCache[V];F&&(N.rootPropertyValue=F)}var M=C.setPropertyValue(A,D,N.currentValue+(m<9&&0===parseFloat(P)?"":N.unitType),N.rootPropertyValue,N.scrollData);C.Hooks.registered[D]&&(C.Normalizations.registered[V]?a(A).rootPropertyValueCache[V]=C.Normalizations.registered[V]("extract",null,M[1]):a(A).rootPropertyValueCache[V]=M[1]),"transform"===M[0]&&(I=!0)}}u.mobileHA&&a(A).transformCache.translate3d===i&&(a(A).transformCache.translate3d="(0px, 0px, 0px)",I=!0),I&&C.flushTransformCache(A)}}u.display!==i&&"none"!==u.display&&(E.State.calls[o][2].display=!1),u.visibility!==i&&"hidden"!==u.visibility&&(E.State.calls[o][2].visibility=!1),u.progress&&u.progress.call(s[1],s[1],w,Math.max(0,c+u.duration-e),c,g),1===w&&p(o)}}E.State.isTicking&&O(d)}function p(t,e){if(!E.State.calls[t])return!1;for(var n=E.State.calls[t][0],r=E.State.calls[t][1],o=E.State.calls[t][2],s=E.State.calls[t][4],l=!1,u=0,c=n.length;u<c;u++){var f=n[u].element;e||o.loop||("none"===o.display&&C.setPropertyValue(f,"display",o.display),"hidden"===o.visibility&&C.setPropertyValue(f,"visibility",o.visibility));var d=a(f);if(!0!==o.loop&&(h.queue(f)[1]===i||!/\.velocityQueueEntryFlag/i.test(h.queue(f)[1]))&&d){d.isAnimating=!1,d.rootPropertyValueCache={};var p=!1;h.each(C.Lists.transforms3D,function(t,e){var n=/^scale/.test(e)?1:0,r=d.transformCache[e];d.transformCache[e]!==i&&new RegExp("^\\("+n+"[^.]").test(r)&&(p=!0,delete d.transformCache[e])}),o.mobileHA&&(p=!0,delete d.transformCache.translate3d),p&&C.flushTransformCache(f),C.Values.removeClass(f,"velocity-animating")}if(!e&&o.complete&&!o.loop&&u===c-1)try{o.complete.call(r,r)}catch(t){setTimeout(function(){throw t},1)}s&&!0!==o.loop&&s(r),d&&!0===o.loop&&!e&&(h.each(d.tweensContainer,function(t,e){if(/^rotate/.test(t)&&(parseFloat(e.startValue)-parseFloat(e.endValue))%360==0){var n=e.startValue;e.startValue=e.endValue,e.endValue=n}/^backgroundPosition/.test(t)&&100===parseFloat(e.endValue)&&"%"===e.unitType&&(e.endValue=0,e.startValue=100)}),E(f,"reverse",{loop:!0,delay:o.delay})),!1!==o.queue&&h.dequeue(f,o.queue)}E.State.calls[t]=!1;for(var m=0,g=E.State.calls.length;m<g;m++)if(!1!==E.State.calls[m]){l=!0;break}!1===l&&(E.State.isTicking=!1,delete E.State.calls,E.State.calls=[])}var h,m=function(){if(n.documentMode)return n.documentMode;for(var t=7;t>4;t--){var e=n.createElement("div");if(e.innerHTML="\x3c!--[if IE "+t+"]><span></span><![endif]--\x3e",e.getElementsByTagName("span").length)return e=null,t}return i}(),g=function(){var t=0;return e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||function(e){var n,i=(new Date).getTime();return n=Math.max(0,16-(i-t)),t=i+n,setTimeout(function(){e(i+n)},n)}}(),v=function(){var t=e.performance||{};if("function"!=typeof t.now){var n=t.timing&&t.timing.navigationStart?t.timing.navigationStart:(new Date).getTime();t.now=function(){return(new Date).getTime()-n}}return t}(),y=function(){var t=Array.prototype.slice;try{return t.call(n.documentElement),t}catch(e){return function(e,n){var i=this.length;if("number"!=typeof e&&(e=0),"number"!=typeof n&&(n=i),this.slice)return t.call(this,e,n);var r,o=[],a=e>=0?e:Math.max(0,i+e),s=n<0?i+n:Math.min(n,i),l=s-a;if(l>0)if(o=new Array(l),this.charAt)for(r=0;r<l;r++)o[r]=this.charAt(a+r);else for(r=0;r<l;r++)o[r]=this[a+r];return o}}}(),b=function(){return Array.prototype.includes?function(t,e){return t.includes(e)}:Array.prototype.indexOf?function(t,e){return t.indexOf(e)>=0}:function(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return!0;return!1}},_={isNumber:function(t){return"number"==typeof t},isString:function(t){return"string"==typeof t},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},isFunction:function(t){return"[object Function]"===Object.prototype.toString.call(t)},isNode:function(t){return t&&t.nodeType},isWrapped:function(t){return t&&t!==e&&_.isNumber(t.length)&&!_.isString(t)&&!_.isFunction(t)&&!_.isNode(t)&&(0===t.length||_.isNode(t[0]))},isSVG:function(t){return e.SVGElement&&t instanceof e.SVGElement},isEmptyObject:function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}},w=!1;if(t.fn&&t.fn.jquery?(h=t,w=!0):h=e.Velocity.Utilities,m<=8&&!w)throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if(m<=7)return void(jQuery.fn.velocity=jQuery.fn.animate);var x=400,S="swing",E={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:e.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:n.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[],delayedElements:{count:0}},CSS:{},Utilities:h,Redirects:{},Easings:{},Promise:e.Promise,defaults:{queue:"",duration:x,easing:S,begin:i,complete:i,progress:i,display:i,visibility:i,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0,promiseRejectEmpty:!0},init:function(t){h.data(t,"velocity",{isSVG:_.isSVG(t),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:5,patch:0},debug:!1,timestamp:!0,pauseAll:function(t){var e=(new Date).getTime();h.each(E.State.calls,function(e,n){if(n){if(t!==i&&(n[2].queue!==t||!1===n[2].queue))return!0;n[5]={resume:!1}}}),h.each(E.State.delayedElements,function(t,n){n&&s(n,e)})},resumeAll:function(t){var e=(new Date).getTime();h.each(E.State.calls,function(e,n){if(n){if(t!==i&&(n[2].queue!==t||!1===n[2].queue))return!0;n[5]&&(n[5].resume=!0)}}),h.each(E.State.delayedElements,function(t,n){n&&l(n,e)})}};e.pageYOffset!==i?(E.State.scrollAnchor=e,E.State.scrollPropertyLeft="pageXOffset",E.State.scrollPropertyTop="pageYOffset"):(E.State.scrollAnchor=n.documentElement||n.body.parentNode||n.body,E.State.scrollPropertyLeft="scrollLeft",E.State.scrollPropertyTop="scrollTop");var T=function(){function t(t){return-t.tension*t.x-t.friction*t.v}function e(e,n,i){var r={x:e.x+i.dx*n,v:e.v+i.dv*n,tension:e.tension,friction:e.friction};return{dx:r.v,dv:t(r)}}function n(n,i){var r={dx:n.v,dv:t(n)},o=e(n,.5*i,r),a=e(n,.5*i,o),s=e(n,i,a),l=1/6*(r.dx+2*(o.dx+a.dx)+s.dx),u=1/6*(r.dv+2*(o.dv+a.dv)+s.dv);return n.x=n.x+l*i,n.v=n.v+u*i,n}return function t(e,i,r){var o,a,s,l={x:-1,v:0,tension:null,friction:null},u=[0],c=0;for(e=parseFloat(e)||500,i=parseFloat(i)||20,r=r||null,l.tension=e,l.friction=i,o=null!==r,o?(c=t(e,i),a=c/r*.016):a=.016;;)if(s=n(s||l,a),u.push(1+s.x),c+=16,!(Math.abs(s.x)>1e-4&&Math.abs(s.v)>1e-4))break;return o?function(t){return u[t*(u.length-1)|0]}:c}}();E.Easings={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},spring:function(t){return 1-Math.cos(4.5*t*Math.PI)*Math.exp(6*-t)}},h.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(t,e){E.Easings[e[0]]=c.apply(null,e[1])});var C=E.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"],units:["%","em","ex","ch","rem","vw","vh","vmin","vmax","cm","mm","Q","in","pc","pt","px","deg","grad","rad","turn","s","ms"],colorNames:{aliceblue:"240,248,255",antiquewhite:"250,235,215",aquamarine:"127,255,212",aqua:"0,255,255",azure:"240,255,255",beige:"245,245,220",bisque:"255,228,196",black:"0,0,0",blanchedalmond:"255,235,205",blueviolet:"138,43,226",blue:"0,0,255",brown:"165,42,42",burlywood:"222,184,135",cadetblue:"95,158,160",chartreuse:"127,255,0",chocolate:"210,105,30",coral:"255,127,80",cornflowerblue:"100,149,237",cornsilk:"255,248,220",crimson:"220,20,60",cyan:"0,255,255",darkblue:"0,0,139",darkcyan:"0,139,139",darkgoldenrod:"184,134,11",darkgray:"169,169,169",darkgrey:"169,169,169",darkgreen:"0,100,0",darkkhaki:"189,183,107",darkmagenta:"139,0,139",darkolivegreen:"85,107,47",darkorange:"255,140,0",darkorchid:"153,50,204",darkred:"139,0,0",darksalmon:"233,150,122",darkseagreen:"143,188,143",darkslateblue:"72,61,139",darkslategray:"47,79,79",darkturquoise:"0,206,209",darkviolet:"148,0,211",deeppink:"255,20,147",deepskyblue:"0,191,255",dimgray:"105,105,105",dimgrey:"105,105,105",dodgerblue:"30,144,255",firebrick:"178,34,34",floralwhite:"255,250,240",forestgreen:"34,139,34",fuchsia:"255,0,255",gainsboro:"220,220,220",ghostwhite:"248,248,255",gold:"255,215,0",goldenrod:"218,165,32",gray:"128,128,128",grey:"128,128,128",greenyellow:"173,255,47",green:"0,128,0",honeydew:"240,255,240",hotpink:"255,105,180",indianred:"205,92,92",indigo:"75,0,130",ivory:"255,255,240",khaki:"240,230,140",lavenderblush:"255,240,245",lavender:"230,230,250",lawngreen:"124,252,0",lemonchiffon:"255,250,205",lightblue:"173,216,230",lightcoral:"240,128,128",lightcyan:"224,255,255",lightgoldenrodyellow:"250,250,210",lightgray:"211,211,211",lightgrey:"211,211,211",lightgreen:"144,238,144",lightpink:"255,182,193",lightsalmon:"255,160,122",lightseagreen:"32,178,170",lightskyblue:"135,206,250",lightslategray:"119,136,153",lightsteelblue:"176,196,222",lightyellow:"255,255,224",limegreen:"50,205,50",lime:"0,255,0",linen:"250,240,230",magenta:"255,0,255",maroon:"128,0,0",mediumaquamarine:"102,205,170",mediumblue:"0,0,205",mediumorchid:"186,85,211",mediumpurple:"147,112,219",mediumseagreen:"60,179,113",mediumslateblue:"123,104,238",mediumspringgreen:"0,250,154",mediumturquoise:"72,209,204",mediumvioletred:"199,21,133",midnightblue:"25,25,112",mintcream:"245,255,250",mistyrose:"255,228,225",moccasin:"255,228,181",navajowhite:"255,222,173",navy:"0,0,128",oldlace:"253,245,230",olivedrab:"107,142,35",olive:"128,128,0",orangered:"255,69,0",orange:"255,165,0",orchid:"218,112,214",palegoldenrod:"238,232,170",palegreen:"152,251,152",paleturquoise:"175,238,238",palevioletred:"219,112,147",papayawhip:"255,239,213",peachpuff:"255,218,185",peru:"205,133,63",pink:"255,192,203",plum:"221,160,221",powderblue:"176,224,230",purple:"128,0,128",red:"255,0,0",rosybrown:"188,143,143",royalblue:"65,105,225",saddlebrown:"139,69,19",salmon:"250,128,114",sandybrown:"244,164,96",seagreen:"46,139,87",seashell:"255,245,238",sienna:"160,82,45",silver:"192,192,192",skyblue:"135,206,235",slateblue:"106,90,205",slategray:"112,128,144",snow:"255,250,250",springgreen:"0,255,127",steelblue:"70,130,180",tan:"210,180,140",teal:"0,128,128",thistle:"216,191,216",tomato:"255,99,71",turquoise:"64,224,208",violet:"238,130,238",wheat:"245,222,179",whitesmoke:"245,245,245",white:"255,255,255",yellowgreen:"154,205,50",yellow:"255,255,0"}},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var t=0;t<C.Lists.colors.length;t++){var e="color"===C.Lists.colors[t]?"0 0 0 1":"255 255 255 1";C.Hooks.templates[C.Lists.colors[t]]=["Red Green Blue Alpha",e]}var n,i,r;if(m)for(n in C.Hooks.templates)if(C.Hooks.templates.hasOwnProperty(n)){i=C.Hooks.templates[n],r=i[0].split(" ");var o=i[1].match(C.RegEx.valueSplit);"Color"===r[0]&&(r.push(r.shift()),o.push(o.shift()),C.Hooks.templates[n]=[r.join(" "),o.join(" ")])}for(n in C.Hooks.templates)if(C.Hooks.templates.hasOwnProperty(n)){i=C.Hooks.templates[n],r=i[0].split(" ");for(var a in r)if(r.hasOwnProperty(a)){var s=n+r[a],l=a;C.Hooks.registered[s]=[n,l]}}},getRoot:function(t){var e=C.Hooks.registered[t];return e?e[0]:t},getUnit:function(t,e){var n=(t.substr(e||0,5).match(/^[a-z%]+/)||[])[0]||"";return n&&b(C.Lists.units,n)?n:""},fixColors:function(t){return t.replace(/(rgba?\(\s*)?(\b[a-z]+\b)/g,function(t,e,n){return C.Lists.colorNames.hasOwnProperty(n)?(e||"rgba(")+C.Lists.colorNames[n]+(e?"":",1)"):e+n})},cleanRootPropertyValue:function(t,e){return C.RegEx.valueUnwrap.test(e)&&(e=e.match(C.RegEx.valueUnwrap)[1]),C.Values.isCSSNullValue(e)&&(e=C.Hooks.templates[t][1]),e},extractValue:function(t,e){var n=C.Hooks.registered[t];if(n){var i=n[0],r=n[1];return e=C.Hooks.cleanRootPropertyValue(i,e),e.toString().match(C.RegEx.valueSplit)[r]}return e},injectValue:function(t,e,n){var i=C.Hooks.registered[t];if(i){var r,o=i[0],a=i[1];return n=C.Hooks.cleanRootPropertyValue(o,n),r=n.toString().match(C.RegEx.valueSplit),r[a]=e,r.join(" ")}return n}},Normalizations:{registered:{clip:function(t,e,n){switch(t){case"name":return"clip";case"extract":var i;return C.RegEx.wrappedValueAlreadyExtracted.test(n)?i=n:(i=n.toString().match(C.RegEx.valueUnwrap),i=i?i[1].replace(/,(\s+)?/g," "):n),i;case"inject":return"rect("+n+")"}},blur:function(t,e,n){switch(t){case"name":return E.State.isFirefox?"filter":"-webkit-filter";case"extract":var i=parseFloat(n);if(!i&&0!==i){var r=n.toString().match(/blur\(([0-9]+[A-z]+)\)/i);i=r?r[1]:0}return i;case"inject":return parseFloat(n)?"blur("+n+")":"none"}},opacity:function(t,e,n){if(m<=8)switch(t){case"name":return"filter";case"extract":var i=n.toString().match(/alpha\(opacity=(.*)\)/i);return n=i?i[1]/100:1;case"inject":return e.style.zoom=1,parseFloat(n)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(n),10)+")"}else switch(t){case"name":return"opacity";case"extract":case"inject":return n}}},register:function(){function t(t,e,n){if("border-box"===C.getPropertyValue(e,"boxSizing").toString().toLowerCase()===(n||!1)){var i,r,o=0,a="width"===t?["Left","Right"]:["Top","Bottom"],s=["padding"+a[0],"padding"+a[1],"border"+a[0]+"Width","border"+a[1]+"Width"];for(i=0;i<s.length;i++)r=parseFloat(C.getPropertyValue(e,s[i])),isNaN(r)||(o+=r);return n?-o:o}return 0}function e(e,n){return function(i,r,o){switch(i){case"name":return e;case"extract":return parseFloat(o)+t(e,r,n);case"inject":return parseFloat(o)-t(e,r,n)+"px"}}}m&&!(m>9)||E.State.isGingerbread||(C.Lists.transformsBase=C.Lists.transformsBase.concat(C.Lists.transforms3D));for(var n=0;n<C.Lists.transformsBase.length;n++)!function(){var t=C.Lists.transformsBase[n];C.Normalizations.registered[t]=function(e,n,r){switch(e){case"name":return"transform";case"extract":return a(n)===i||a(n).transformCache[t]===i?/^scale/i.test(t)?1:0:a(n).transformCache[t].replace(/[()]/g,"");case"inject":var o=!1;switch(t.substr(0,t.length-1)){case"translate":o=!/(%|px|em|rem|vw|vh|\d)$/i.test(r);break;case"scal":case"scale":E.State.isAndroid&&a(n).transformCache[t]===i&&r<1&&(r=1),o=!/(\d)$/i.test(r);break;case"skew":case"rotate":o=!/(deg|\d)$/i.test(r)}return o||(a(n).transformCache[t]="("+r+")"),a(n).transformCache[t]}}}();for(var r=0;r<C.Lists.colors.length;r++)!function(){var t=C.Lists.colors[r];C.Normalizations.registered[t]=function(e,n,r){switch(e){case"name":return t;case"extract":var o;if(C.RegEx.wrappedValueAlreadyExtracted.test(r))o=r;else{var a,s={black:"rgb(0, 0, 0)",blue:"rgb(0, 0, 255)",gray:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",red:"rgb(255, 0, 0)",white:"rgb(255, 255, 255)"};/^[A-z]+$/i.test(r)?a=s[r]!==i?s[r]:s.black:C.RegEx.isHex.test(r)?a="rgb("+C.Values.hexToRgb(r).join(" ")+")":/^rgba?\(/i.test(r)||(a=s.black),o=(a||r).toString().match(C.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g," ")}return(!m||m>8)&&3===o.split(" ").length&&(o+=" 1"),o;case"inject":return/^rgb/.test(r)?r:(m<=8?4===r.split(" ").length&&(r=r.split(/\s+/).slice(0,3).join(" ")):3===r.split(" ").length&&(r+=" 1"),(m<=8?"rgb":"rgba")+"("+r.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")")}}}();C.Normalizations.registered.innerWidth=e("width",!0),C.Normalizations.registered.innerHeight=e("height",!0),C.Normalizations.registered.outerWidth=e("width"),C.Normalizations.registered.outerHeight=e("height")}},Names:{camelCase:function(t){return t.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})},SVGAttribute:function(t){var e="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(m||E.State.isAndroid&&!E.State.isChrome)&&(e+="|transform"),new RegExp("^("+e+")$","i").test(t)},prefixCheck:function(t){if(E.State.prefixMatches[t])return[E.State.prefixMatches[t],!0];for(var e=["","Webkit","Moz","ms","O"],n=0,i=e.length;n<i;n++){var r;if(r=0===n?t:e[n]+t.replace(/^\w/,function(t){return t.toUpperCase()}),_.isString(E.State.prefixElement.style[r]))return E.State.prefixMatches[t]=r,[r,!0]}return[t,!1]}},Values:{hexToRgb:function(t){var e,n=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;return t=t.replace(n,function(t,e,n,i){return e+e+n+n+i+i}),e=i.exec(t),e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:[0,0,0]},isCSSNullValue:function(t){return!t||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(t)},getUnitType:function(t){return/^(rotate|skew)/i.test(t)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(t)?"":"px"},getDisplayType:function(t){var e=t&&t.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(e)?"inline":/^(li)$/i.test(e)?"list-item":/^(tr)$/i.test(e)?"table-row":/^(table)$/i.test(e)?"table":/^(tbody)$/i.test(e)?"table-row-group":"block"},addClass:function(t,e){if(t)if(t.classList)t.classList.add(e);else if(_.isString(t.className))t.className+=(t.className.length?" ":"")+e;else{var n=t.getAttribute(m<=7?"className":"class")||"";t.setAttribute("class",n+(n?" ":"")+e)}},removeClass:function(t,e){if(t)if(t.classList)t.classList.remove(e);else if(_.isString(t.className))t.className=t.className.toString().replace(new RegExp("(^|\\s)"+e.split(" ").join("|")+"(\\s|$)","gi")," ");else{var n=t.getAttribute(m<=7?"className":"class")||"";t.setAttribute("class",n.replace(new RegExp("(^|s)"+e.split(" ").join("|")+"(s|$)","gi")," "))}}},getPropertyValue:function(t,n,r,o){function s(t,n){var r=0;if(m<=8)r=h.css(t,n);else{var l=!1;/^(width|height)$/.test(n)&&0===C.getPropertyValue(t,"display")&&(l=!0,C.setPropertyValue(t,"display",C.Values.getDisplayType(t)));var u=function(){l&&C.setPropertyValue(t,"display","none")};if(!o){if("height"===n&&"border-box"!==C.getPropertyValue(t,"boxSizing").toString().toLowerCase()){var c=t.offsetHeight-(parseFloat(C.getPropertyValue(t,"borderTopWidth"))||0)-(parseFloat(C.getPropertyValue(t,"borderBottomWidth"))||0)-(parseFloat(C.getPropertyValue(t,"paddingTop"))||0)-(parseFloat(C.getPropertyValue(t,"paddingBottom"))||0);return u(),c}if("width"===n&&"border-box"!==C.getPropertyValue(t,"boxSizing").toString().toLowerCase()){var f=t.offsetWidth-(parseFloat(C.getPropertyValue(t,"borderLeftWidth"))||0)-(parseFloat(C.getPropertyValue(t,"borderRightWidth"))||0)-(parseFloat(C.getPropertyValue(t,"paddingLeft"))||0)-(parseFloat(C.getPropertyValue(t,"paddingRight"))||0);return u(),f}}var d;d=a(t)===i?e.getComputedStyle(t,null):a(t).computedStyle?a(t).computedStyle:a(t).computedStyle=e.getComputedStyle(t,null),"borderColor"===n&&(n="borderTopColor"),r=9===m&&"filter"===n?d.getPropertyValue(n):d[n],""!==r&&null!==r||(r=t.style[n]),u()}if("auto"===r&&/^(top|right|bottom|left)$/i.test(n)){var p=s(t,"position");("fixed"===p||"absolute"===p&&/top|left/i.test(n))&&(r=h(t).position()[n]+"px")}return r}var l;if(C.Hooks.registered[n]){var u=n,c=C.Hooks.getRoot(u);r===i&&(r=C.getPropertyValue(t,C.Names.prefixCheck(c)[0])),C.Normalizations.registered[c]&&(r=C.Normalizations.registered[c]("extract",t,r)),l=C.Hooks.extractValue(u,r)}else if(C.Normalizations.registered[n]){var f,d;f=C.Normalizations.registered[n]("name",t),"transform"!==f&&(d=s(t,C.Names.prefixCheck(f)[0]),C.Values.isCSSNullValue(d)&&C.Hooks.templates[n]&&(d=C.Hooks.templates[n][1])),l=C.Normalizations.registered[n]("extract",t,d)}if(!/^[\d-]/.test(l)){var p=a(t);if(p&&p.isSVG&&C.Names.SVGAttribute(n))if(/^(height|width)$/i.test(n))try{l=t.getBBox()[n]}catch(t){l=0}else l=t.getAttribute(n);else l=s(t,C.Names.prefixCheck(n)[0])}return C.Values.isCSSNullValue(l)&&(l=0),E.debug,l},setPropertyValue:function(t,n,i,r,o){var s=n;if("scroll"===n)o.container?o.container["scroll"+o.direction]=i:"Left"===o.direction?e.scrollTo(i,o.alternateValue):e.scrollTo(o.alternateValue,i);else if(C.Normalizations.registered[n]&&"transform"===C.Normalizations.registered[n]("name",t))C.Normalizations.registered[n]("inject",t,i),s="transform",i=a(t).transformCache[n];else{if(C.Hooks.registered[n]){var l=n,u=C.Hooks.getRoot(n);r=r||C.getPropertyValue(t,u),i=C.Hooks.injectValue(l,i,r),n=u}if(C.Normalizations.registered[n]&&(i=C.Normalizations.registered[n]("inject",t,i),n=C.Normalizations.registered[n]("name",t)),s=C.Names.prefixCheck(n)[0],m<=8)try{t.style[s]=i}catch(t){E.debug}else{var c=a(t);c&&c.isSVG&&C.Names.SVGAttribute(n)?t.setAttribute(n,i):t.style[s]=i}E.debug}return[s,i]},flushTransformCache:function(t){var e="",n=a(t);if((m||E.State.isAndroid&&!E.State.isChrome)&&n&&n.isSVG){var i=function(e){return parseFloat(C.getPropertyValue(t,e))},r={translate:[i("translateX"),i("translateY")],skewX:[i("skewX")],skewY:[i("skewY")],scale:1!==i("scale")?[i("scale"),i("scale")]:[i("scaleX"),i("scaleY")],rotate:[i("rotateZ"),0,0]};h.each(a(t).transformCache,function(t){/^translate/i.test(t)?t="translate":/^scale/i.test(t)?t="scale":/^rotate/i.test(t)&&(t="rotate"),r[t]&&(e+=t+"("+r[t].join(" ")+") ",delete r[t])})}else{var o,s;h.each(a(t).transformCache,function(n){if(o=a(t).transformCache[n],"transformPerspective"===n)return s=o,!0;9===m&&"rotateZ"===n&&(n="rotate"),e+=n+o+" "}),s&&(e="perspective"+s+" "+e)}C.setPropertyValue(t,"transform",e)}};C.Hooks.register(),C.Normalizations.register(),E.hook=function(t,e,n){var r;return t=o(t),h.each(t,function(t,o){if(a(o)===i&&E.init(o),n===i)r===i&&(r=C.getPropertyValue(o,e));else{var s=C.setPropertyValue(o,e,n);"transform"===s[0]&&E.CSS.flushTransformCache(o),r=s}}),r};var A=function t(){function r(){return m?A.promise||null:g}function u(t,r){function o(o){var c,p;if(l.begin&&0===I)try{l.begin.call(y,y)}catch(t){setTimeout(function(){throw t},1)}if("scroll"===P){var m,g,v,x=/^x$/i.test(l.axis)?"Left":"Top",T=parseFloat(l.offset)||0;l.container?_.isWrapped(l.container)||_.isNode(l.container)?(l.container=l.container[0]||l.container,m=l.container["scroll"+x],v=m+h(t).position()[x.toLowerCase()]+T):l.container=null:(m=E.State.scrollAnchor[E.State["scrollProperty"+x]],g=E.State.scrollAnchor[E.State["scrollProperty"+("Left"===x?"Top":"Left")]],v=h(t).offset()[x.toLowerCase()]+T),u={scroll:{rootPropertyValue:!1,startValue:m,currentValue:m,endValue:v,unitType:"",easing:l.easing,scrollData:{container:l.container,direction:x,alternateValue:g}},element:t},E.debug}else if("reverse"===P){if(!(c=a(t)))return;if(!c.tweensContainer)return void h.dequeue(t,l.queue);"none"===c.opts.display&&(c.opts.display="auto"),"hidden"===c.opts.visibility&&(c.opts.visibility="visible"),c.opts.loop=!1,c.opts.begin=null,c.opts.complete=null,S.easing||delete l.easing,S.duration||delete l.duration,l=h.extend({},c.opts,l),p=h.extend(!0,{},c?c.tweensContainer:null);for(var k in p)if(p.hasOwnProperty(k)&&"element"!==k){var D=p[k].startValue;p[k].startValue=p[k].currentValue=p[k].endValue,p[k].endValue=D,_.isEmptyObject(S)||(p[k].easing=l.easing),E.debug}u=p}else if("start"===P){c=a(t),c&&c.tweensContainer&&!0===c.isAnimating&&(p=c.tweensContainer);var N=function(r,o){var a,f=C.Hooks.getRoot(r),d=!1,m=o[0],g=o[1],v=o[2];if(!(c&&c.isSVG||"tween"===f||!1!==C.Names.prefixCheck(f)[1]||C.Normalizations.registered[f]!==i))return void E.debug;(l.display!==i&&null!==l.display&&"none"!==l.display||l.visibility!==i&&"hidden"!==l.visibility)&&/opacity|filter/.test(r)&&!v&&0!==m&&(v=0),l._cacheValues&&p&&p[r]?(v===i&&(v=p[r].endValue+p[r].unitType),d=c.rootPropertyValueCache[f]):C.Hooks.registered[r]?v===i?(d=C.getPropertyValue(t,f),v=C.getPropertyValue(t,r,d)):d=C.Hooks.templates[f][1]:v===i&&(v=C.getPropertyValue(t,r));var y,b,w,x=!1,S=function(t,e){var n,i;return i=(e||"0").toString().toLowerCase().replace(/[%A-z]+$/,function(t){return n=t,""}),n||(n=C.Values.getUnitType(t)),[i,n]};if(v!==m&&_.isString(v)&&_.isString(m)){a="";var T=0,A=0,O=[],I=[],k=0,D=0,P=0;for(v=C.Hooks.fixColors(v),m=C.Hooks.fixColors(m);T<v.length&&A<m.length;){var N=v[T],L=m[A];if(/[\d\.-]/.test(N)&&/[\d\.-]/.test(L)){for(var j=N,B=L,V=".",M=".";++T<v.length;){if((N=v[T])===V)V="..";else if(!/\d/.test(N))break;j+=N}for(;++A<m.length;){if((L=m[A])===M)M="..";else if(!/\d/.test(L))break;B+=L}var R=C.Hooks.getUnit(v,T),H=C.Hooks.getUnit(m,A);if(T+=R.length,A+=H.length,R===H)j===B?a+=j+R:(a+="{"+O.length+(D?"!":"")+"}"+R,O.push(parseFloat(j)),I.push(parseFloat(B)));else{var W=parseFloat(j),U=parseFloat(B);a+=(k<5?"calc":"")+"("+(W?"{"+O.length+(D?"!":"")+"}":"0")+R+" + "+(U?"{"+(O.length+(W?1:0))+(D?"!":"")+"}":"0")+H+")",W&&(O.push(W),I.push(0)),U&&(O.push(0),I.push(U))}}else{if(N!==L){k=0;break}a+=N,T++,A++,0===k&&"c"===N||1===k&&"a"===N||2===k&&"l"===N||3===k&&"c"===N||k>=4&&"("===N?k++:(k&&k<5||k>=4&&")"===N&&--k<5)&&(k=0),0===D&&"r"===N||1===D&&"g"===N||2===D&&"b"===N||3===D&&"a"===N||D>=3&&"("===N?(3===D&&"a"===N&&(P=1),D++):P&&","===N?++P>3&&(D=P=0):(P&&D<(P?5:4)||D>=(P?4:3)&&")"===N&&--D<(P?5:4))&&(D=P=0)}}T===v.length&&A===m.length||(E.debug,a=i),a&&(O.length?(E.debug,v=O,m=I,b=w=""):a=i)}a||(y=S(r,v),v=y[0],w=y[1],y=S(r,m),m=y[0].replace(/^([+-\/*])=/,function(t,e){return x=e,""}),b=y[1],v=parseFloat(v)||0,m=parseFloat(m)||0,"%"===b&&(/^(fontSize|lineHeight)$/.test(r)?(m/=100,b="em"):/^scale/.test(r)?(m/=100,b=""):/(Red|Green|Blue)$/i.test(r)&&(m=m/100*255,b="")));if(/[\/*]/.test(x))b=w;else if(w!==b&&0!==v)if(0===m)b=w;else{s=s||function(){var i={myParent:t.parentNode||n.body,position:C.getPropertyValue(t,"position"),fontSize:C.getPropertyValue(t,"fontSize")},r=i.position===F.lastPosition&&i.myParent===F.lastParent,o=i.fontSize===F.lastFontSize;F.lastParent=i.myParent,F.lastPosition=i.position,F.lastFontSize=i.fontSize;var a={};if(o&&r)a.emToPx=F.lastEmToPx,a.percentToPxWidth=F.lastPercentToPxWidth,a.percentToPxHeight=F.lastPercentToPxHeight;else{var s=c&&c.isSVG?n.createElementNS("http://www.w3.org/2000/svg","rect"):n.createElement("div");E.init(s),i.myParent.appendChild(s),h.each(["overflow","overflowX","overflowY"],function(t,e){E.CSS.setPropertyValue(s,e,"hidden")}),E.CSS.setPropertyValue(s,"position",i.position),E.CSS.setPropertyValue(s,"fontSize",i.fontSize),E.CSS.setPropertyValue(s,"boxSizing","content-box"),h.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(t,e){E.CSS.setPropertyValue(s,e,"100%")}),E.CSS.setPropertyValue(s,"paddingLeft","100em"),a.percentToPxWidth=F.lastPercentToPxWidth=(parseFloat(C.getPropertyValue(s,"width",null,!0))||1)/100,a.percentToPxHeight=F.lastPercentToPxHeight=(parseFloat(C.getPropertyValue(s,"height",null,!0))||1)/100,a.emToPx=F.lastEmToPx=(parseFloat(C.getPropertyValue(s,"paddingLeft"))||1)/100,i.myParent.removeChild(s)}return null===F.remToPx&&(F.remToPx=parseFloat(C.getPropertyValue(n.body,"fontSize"))||16),null===F.vwToPx&&(F.vwToPx=parseFloat(e.innerWidth)/100,F.vhToPx=parseFloat(e.innerHeight)/100),a.remToPx=F.remToPx,a.vwToPx=F.vwToPx,a.vhToPx=F.vhToPx,E.debug,a}();var q=/margin|padding|left|right|width|text|word|letter/i.test(r)||/X$/.test(r)||"x"===r?"x":"y";switch(w){case"%":v*="x"===q?s.percentToPxWidth:s.percentToPxHeight;break;case"px":break;default:v*=s[w+"ToPx"]}switch(b){case"%":v*=1/("x"===q?s.percentToPxWidth:s.percentToPxHeight);break;case"px":break;default:v*=1/s[b+"ToPx"]}}switch(x){case"+":m=v+m;break;case"-":m=v-m;break;case"*":m*=v;break;case"/":m=v/m}u[r]={rootPropertyValue:d,startValue:v,currentValue:v,endValue:m,unitType:b,easing:g},a&&(u[r].pattern=a),E.debug};for(var L in w)if(w.hasOwnProperty(L)){var j=C.Names.camelCase(L),B=function(e,n){var i,o,a;return _.isFunction(e)&&(e=e.call(t,r,O)),_.isArray(e)?(i=e[0],!_.isArray(e[1])&&/^[\d-]/.test(e[1])||_.isFunction(e[1])||C.RegEx.isHex.test(e[1])?a=e[1]:_.isString(e[1])&&!C.RegEx.isHex.test(e[1])&&E.Easings[e[1]]||_.isArray(e[1])?(o=n?e[1]:f(e[1],l.duration),a=e[2]):a=e[1]||e[2]):i=e,n||(o=o||l.easing),_.isFunction(i)&&(i=i.call(t,r,O)),_.isFunction(a)&&(a=a.call(t,r,O)),[i||0,o,a]}(w[L]);if(b(C.Lists.colors,j)){var V=B[0],R=B[1],H=B[2];if(C.RegEx.isHex.test(V)){for(var W=["Red","Green","Blue"],U=C.Values.hexToRgb(V),q=H?C.Values.hexToRgb(H):i,z=0;z<W.length;z++){var $=[U[z]];R&&$.push(R),q!==i&&$.push(q[z]),N(j+W[z],$)}continue}}N(j,B)}u.element=t}u.element&&(C.Values.addClass(t,"velocity-animating"),M.push(u),c=a(t),c&&(""===l.queue&&(c.tweensContainer=u,c.opts=l),c.isAnimating=!0),I===O-1?(E.State.calls.push([M,y,l,null,A.resolver,null,0]),!1===E.State.isTicking&&(E.State.isTicking=!0,d())):I++)}var s,l=h.extend({},E.defaults,S),u={};switch(a(t)===i&&E.init(t),parseFloat(l.delay)&&!1!==l.queue&&h.queue(t,l.queue,function(e){E.velocityQueueEntryFlag=!0;var n=E.State.delayedElements.count++;E.State.delayedElements[n]=t;var i=function(t){return function(){E.State.delayedElements[t]=!1,e()}}(n);a(t).delayBegin=(new Date).getTime(),a(t).delay=parseFloat(l.delay),a(t).delayTimer={setTimeout:setTimeout(e,parseFloat(l.delay)),next:i}}),l.duration.toString().toLowerCase()){case"fast":l.duration=200;break;case"normal":l.duration=x;break;case"slow":l.duration=600;break;default:l.duration=parseFloat(l.duration)||1}if(!1!==E.mock&&(!0===E.mock?l.duration=l.delay=1:(l.duration*=parseFloat(E.mock)||1,l.delay*=parseFloat(E.mock)||1)),l.easing=f(l.easing,l.duration),l.begin&&!_.isFunction(l.begin)&&(l.begin=null),l.progress&&!_.isFunction(l.progress)&&(l.progress=null),l.complete&&!_.isFunction(l.complete)&&(l.complete=null),l.display!==i&&null!==l.display&&(l.display=l.display.toString().toLowerCase(),"auto"===l.display&&(l.display=E.CSS.Values.getDisplayType(t))),l.visibility!==i&&null!==l.visibility&&(l.visibility=l.visibility.toString().toLowerCase()),l.mobileHA=l.mobileHA&&E.State.isMobile&&!E.State.isGingerbread,!1===l.queue)if(l.delay){var c=E.State.delayedElements.count++;E.State.delayedElements[c]=t;var p=function(t){return function(){E.State.delayedElements[t]=!1,o()}}(c);a(t).delayBegin=(new Date).getTime(),a(t).delay=parseFloat(l.delay),a(t).delayTimer={setTimeout:setTimeout(o,parseFloat(l.delay)),next:p}}else o();else h.queue(t,l.queue,function(t,e){if(!0===e)return A.promise&&A.resolver(y),!0;E.velocityQueueEntryFlag=!0,o(t)});""!==l.queue&&"fx"!==l.queue||"inprogress"===h.queue(t)[0]||h.dequeue(t)}var c,m,g,v,y,w,S,T=arguments[0]&&(arguments[0].p||h.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||_.isString(arguments[0].properties));_.isWrapped(this)?(m=!1,v=0,y=this,g=this):(m=!0,v=1,y=T?arguments[0].elements||arguments[0].e:arguments[0]);var A={promise:null,resolver:null,rejecter:null};if(m&&E.Promise&&(A.promise=new E.Promise(function(t,e){A.resolver=t,A.rejecter=e})),T?(w=arguments[0].properties||arguments[0].p,S=arguments[0].options||arguments[0].o):(w=arguments[v],S=arguments[v+1]),!(y=o(y)))return void(A.promise&&(w&&S&&!1===S.promiseRejectEmpty?A.resolver():A.rejecter()));var O=y.length,I=0;if(!/^(stop|finish|finishAll|pause|resume)$/i.test(w)&&!h.isPlainObject(S)){var k=v+1;S={};for(var D=k;D<arguments.length;D++)_.isArray(arguments[D])||!/^(fast|normal|slow)$/i.test(arguments[D])&&!/^\d/.test(arguments[D])?_.isString(arguments[D])||_.isArray(arguments[D])?S.easing=arguments[D]:_.isFunction(arguments[D])&&(S.complete=arguments[D]):S.duration=arguments[D]}var P;switch(w){case"scroll":P="scroll";break;case"reverse":P="reverse";break;case"pause":var N=(new Date).getTime();return h.each(y,function(t,e){s(e,N)}),h.each(E.State.calls,function(t,e){var n=!1;e&&h.each(e[1],function(t,r){var o=S===i?"":S;return!0!==o&&e[2].queue!==o&&(S!==i||!1!==e[2].queue)||(h.each(y,function(t,i){if(i===r)return e[5]={resume:!1},n=!0,!1}),!n&&void 0)})}),r();case"resume":return h.each(y,function(t,e){l(e,N)}),h.each(E.State.calls,function(t,e){var n=!1;e&&h.each(e[1],function(t,r){var o=S===i?"":S;return!0!==o&&e[2].queue!==o&&(S!==i||!1!==e[2].queue)||(!e[5]||(h.each(y,function(t,i){if(i===r)return e[5].resume=!0,n=!0,!1}),!n&&void 0))})}),r();case"finish":case"finishAll":case"stop":h.each(y,function(t,e){a(e)&&a(e).delayTimer&&(clearTimeout(a(e).delayTimer.setTimeout),a(e).delayTimer.next&&a(e).delayTimer.next(),delete a(e).delayTimer),"finishAll"!==w||!0!==S&&!_.isString(S)||(h.each(h.queue(e,_.isString(S)?S:""),function(t,e){_.isFunction(e)&&e()}),h.queue(e,_.isString(S)?S:"",[]))});var L=[];return h.each(E.State.calls,function(t,e){e&&h.each(e[1],function(n,r){var o=S===i?"":S;if(!0!==o&&e[2].queue!==o&&(S!==i||!1!==e[2].queue))return!0;h.each(y,function(n,i){if(i===r)if((!0===S||_.isString(S))&&(h.each(h.queue(i,_.isString(S)?S:""),function(t,e){_.isFunction(e)&&e(null,!0)}),h.queue(i,_.isString(S)?S:"",[])),"stop"===w){var s=a(i);s&&s.tweensContainer&&!1!==o&&h.each(s.tweensContainer,function(t,e){e.endValue=e.currentValue}),L.push(t)}else"finish"!==w&&"finishAll"!==w||(e[2].duration=1)})})}),"stop"===w&&(h.each(L,function(t,e){p(e,!0)}),A.promise&&A.resolver(y)),r();default:if(!h.isPlainObject(w)||_.isEmptyObject(w)){if(_.isString(w)&&E.Redirects[w]){c=h.extend({},S);var j=c.duration,B=c.delay||0;return!0===c.backwards&&(y=h.extend(!0,[],y).reverse()),h.each(y,function(t,e){parseFloat(c.stagger)?c.delay=B+parseFloat(c.stagger)*t:_.isFunction(c.stagger)&&(c.delay=B+c.stagger.call(e,t,O)),c.drag&&(c.duration=parseFloat(j)||(/^(callout|transition)/.test(w)?1e3:x),c.duration=Math.max(c.duration*(c.backwards?1-t/O:(t+1)/O),.75*c.duration,200)),E.Redirects[w].call(e,e,c||{},t,O,y,A.promise?A:i)}),r()}var V="Velocity: First argument ("+w+") was not a property map, a known action, or a registered redirect. Aborting.";return A.promise?A.rejecter(new Error(V)):e.console,r()}P="start"}var F={lastParent:null,lastPosition:null,lastFontSize:null,lastPercentToPxWidth:null,lastPercentToPxHeight:null,lastEmToPx:null,remToPx:null,vwToPx:null,vhToPx:null},M=[];h.each(y,function(t,e){_.isNode(e)&&u(e,t)}),c=h.extend({},E.defaults,S),c.loop=parseInt(c.loop,10);var R=2*c.loop-1;if(c.loop)for(var H=0;H<R;H++){var W={delay:c.delay,progress:c.progress};H===R-1&&(W.display=c.display,W.visibility=c.visibility,W.complete=c.complete),t(y,"reverse",W)}return r()};E=h.extend(A,E),E.animate=A;var O=e.requestAnimationFrame||g;if(!E.State.isMobile&&n.hidden!==i){var I=function(){n.hidden?(O=function(t){return setTimeout(function(){t(!0)},16)},d()):O=e.requestAnimationFrame||g};I(),n.addEventListener("visibilitychange",I)}return t.Velocity=E,t!==e&&(t.fn.velocity=A,t.fn.velocity.defaults=E.defaults),h.each(["Down","Up"],function(t,e){E.Redirects["slide"+e]=function(t,n,r,o,a,s){var l=h.extend({},n),u=l.begin,c=l.complete,f={},d={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""};l.display===i&&(l.display="Down"===e?"inline"===E.CSS.Values.getDisplayType(t)?"inline-block":"block":"none"),l.begin=function(){0===r&&u&&u.call(a,a);for(var n in d)if(d.hasOwnProperty(n)){f[n]=t.style[n];var i=C.getPropertyValue(t,n);d[n]="Down"===e?[i,0]:[0,i]}f.overflow=t.style.overflow,t.style.overflow="hidden"},l.complete=function(){for(var e in f)f.hasOwnProperty(e)&&(t.style[e]=f[e]);r===o-1&&(c&&c.call(a,a),s&&s.resolver(a))},E(t,d,l)}}),h.each(["In","Out"],function(t,e){E.Redirects["fade"+e]=function(t,n,r,o,a,s){var l=h.extend({},n),u=l.complete,c={opacity:"In"===e?1:0};0!==r&&(l.begin=null),l.complete=r!==o-1?null:function(){u&&u.call(a,a),s&&s.resolver(a)},l.display===i&&(l.display="In"===e?"auto":"none"),E(this,c,l)}}),E}(window.jQuery||window.Zepto||window,window,window?window.document:void 0)})},function(t,e){(function(e){t.exports=e}).call(e,{})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}n(27),n(21),n(23),n(20),n(24),n(19),n(10),n(14),n(17),n(18),n(9);var r=n(1),o=i(r),a=n(22),s=i(a),l=n(2),u=i(l),c=n(12),f=i(c),d=n(3),p=i(d),h=n(4),m=i(h),g=n(13),v=i(g);n(15),n(16),n(11);var y=n(0),b=i(y);for(var _ in s.default.prototype)o.default[_]=s.default.prototype[_];(0,b.default)(document).ready(function(){var t=(0,b.default)(".js-dropdown"),e=new f.default,n=(0,b.default)('.js-top-menu ul[data-depth="0"]'),i=new u.default(t),r=new v.default(n),o=new p.default,a=new m.default;i.init(),e.init(),r.init(),o.init(),a.init(),(0,b.default)('.carousel[data-touch="true"]').swipe({swipe:function(t,e,n,i,r,o){"left"==e&&(0,b.default)(this).carousel("next"),"right"==e&&(0,b.default)(this).carousel("prev")},allowPageScroll:"vertical"})})},function(t,e){},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(){a.default.each((0,a.default)(u),function(t,e){(0,a.default)(e).TouchSpin({verticalbuttons:!0,verticalupclass:"material-icons touchspin-up",verticaldownclass:"material-icons touchspin-down",buttondown_class:"btn btn-touchspin js-touchspin js-increase-product-quantity",buttonup_class:"btn btn-touchspin js-touchspin js-decrease-product-quantity",min:parseInt((0,a.default)(e).attr("min"),10),max:1e6})}),p.switchErrorStat()}var o=n(0),a=i(o),s=n(1),l=i(s);l.default.cart=l.default.cart||{},l.default.cart.active_inputs=null;var u='input[name="product-quantity-spin"]',c=!1,f=!1,d="";(0,a.default)(document).ready(function(){function t(t){return"on.startupspin"===t||"on.startdownspin"===t}function e(t){return"on.startupspin"===t}function n(t){var e=t.parents(".bootstrap-touchspin").find(h);return e.is(":focus")?null:e}function i(t){var e=t.split("-"),n=void 0,i=void 0,r="";for(n=0;n<e.length;n++)i=e[n],0!==n&&(i=i.substring(0,1).toUpperCase()+i.substring(1)),r+=i;return r}function o(r,o){if(!t(o))return{url:r.attr("href"),type:i(r.data("link-action"))};var a=n(r);if(a){return e(o)?{url:a.data("up-url"),type:"increaseProductQuantity"}:{url:a.data("down-url"),type:"decreaseProductQuantity"}}}function s(t,e,n){return v(),a.default.ajax({url:t,method:"POST",data:e,dataType:"json",beforeSend:function(t){m.push(t)}}).then(function(t){p.checkUpdateOpertation(t),n.val(t.quantity);var e;e=n&&n.dataset?n.dataset:t,l.default.emit("updateCart",{reason:e})}).fail(function(t){l.default.emit("handleError",{eventType:"updateProductQuantityInCart",resp:t})})}function c(t){return{ajax:"1",qty:Math.abs(t),action:"update",op:f(t)}}function f(t){return t>0?"up":"down"}function d(t){var e=(0,a.default)(t.currentTarget),n=e.data("update-url"),i=e.attr("value"),r=e.val();if(r!=parseInt(r)||r<0||isNaN(r))return void e.val(i);var o=r-i;0!==o&&(e.attr("value",r),s(n,c(o),e))}var h=".js-cart-line-product-quantity",m=[];l.default.on("updateCart",function(){(0,a.default)(".quickview").modal("hide")}),l.default.on("updatedCart",function(){r()}),r();var g=(0,a.default)("body"),v=function(){for(var t;m.length>0;)t=m.pop(),t.abort()},y=function(t){return(0,a.default)(t.parents(".bootstrap-touchspin").find("input"))},b=function(t){t.preventDefault();var e=(0,a.default)(t.currentTarget),n=t.currentTarget.dataset,i=o(e,t.namespace),r={ajax:"1",action:"update"};void 0!==i&&(v(),a.default.ajax({url:i.url,method:"POST",data:r,dataType:"json",beforeSend:function(t){m.push(t)}}).then(function(t){p.checkUpdateOpertation(t),y(e).val(t.quantity),l.default.emit("updateCart",{reason:n})}).fail(function(t){l.default.emit("handleError",{eventType:"updateProductInCart",resp:t,cartAction:i.type})}))};g.on("click",'[data-link-action="delete-from-cart"], [data-link-action="remove-voucher"]',b),g.on("touchspin.on.startdownspin",u,b),g.on("touchspin.on.startupspin",u,b),g.on("focusout keyup",h,function(t){if("keyup"===t.type)return 13===t.keyCode&&d(t),!1;d(t)});g.on("hidden.bs.collapse","#promo-code",function(){(0,a.default)(".display-promo").show(400)}),g.on("click",".promo-code-button",function(t){t.preventDefault(),(0,a.default)("#promo-code").collapse("toggle")}),g.on("click",".display-promo",function(t){(0,a.default)(t.currentTarget).hide(400)}),g.on("click",".js-discount .code",function(t){t.stopPropagation();var e=(0,a.default)(t.currentTarget);return(0,a.default)("[name=discount_name]").val(e.text()),(0,a.default)("#promo-code").collapse("show"),(0,a.default)(".display-promo").hide(400),!1})});var p={switchErrorStat:function(){var t=(0,a.default)(".checkout a");if(((0,a.default)("#notifications article.alert-danger").length||""!==d&&!c)&&t.addClass("disabled"),""!==d){var e=' <article class="alert alert-danger" role="alert" data-alert="danger"><ul><li>'+d+"</li></ul></article>";(0,a.default)("#notifications .container").html(e),d="",f=!1,c&&t.removeClass("disabled")}else!c&&f&&(c=!1,f=!1,(0,a.default)("#notifications .container").html(""),t.removeClass("disabled"))},checkUpdateOpertation:function(t){c=t.hasOwnProperty("hasError");var e=t.errors||"";d=e instanceof Array?e.join(" "):e,f=!0}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(){(0,s.default)(".js-terms a").on("click",function(t){t.preventDefault();var e=(0,s.default)(t.target).attr("href");e&&(e+="?content_only=1",s.default.get(e,function(t){(0,s.default)("#modal").find(".js-modal-content").html((0,s.default)(t).find(".page-cms").contents())}).fail(function(t){u.default.emit("handleError",{eventType:"clickTerms",resp:t})})),(0,s.default)("#modal").modal("show")}),(0,s.default)(".js-gift-checkbox").on("click",function(t){(0,s.default)("#gift").collapse("toggle")})}function o(){(0,s.default)(".card-block .cart-summary-products p a").on("click",function(t){t=(0,s.default)(this).find("i.material-icons"),"expand_more"==t.text()?t.text("expand_less"):t.text("expand_more")})}var a=n(0),s=i(a),l=n(1),u=i(l);(0,s.default)(document).ready(function(){1===(0,s.default)("body#checkout").length&&(r(),o()),u.default.on("updatedDeliveryForm",function(t){void 0!==t.deliveryOption&&0!==t.deliveryOption.length&&((0,s.default)(".carrier-extra-content").hide(),t.deliveryOption.next(".carrier-extra-content").slideDown())})})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=n(1),o=i(r),a=n(0),s=i(a);o.default.blockcart=o.default.blockcart||{},o.default.blockcart.showModal=function(t){function e(){return(0,s.default)("#blockcart-modal")}var n=e();n.length&&n.remove(),(0,s.default)("body").append(t),n=e(),n.modal("show").on("hidden.bs.modal",function(t){o.default.emit("updateProduct",{reason:t.currentTarget.dataset,event:t})})}},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(0),a=function(t){return t&&t.__esModule?t:{default:t}}(o),s=function(){function t(){i(this,t)}return r(t,[{key:"init",value:function(){this.parentFocus(),this.togglePasswordVisibility()}},{key:"parentFocus",value:function(){(0,a.default)(".js-child-focus").focus(function(){(0,a.default)(this).closest(".js-parent-focus").addClass("focus")}),(0,a.default)(".js-child-focus").focusout(function(){(0,a.default)(this).closest(".js-parent-focus").removeClass("focus")})}},{key:"togglePasswordVisibility",value:function(){(0,a.default)('button[data-action="show-password"]').on("click",function(){var t=(0,a.default)(this).closest(".input-group").children("input.js-visible-password");"password"===t.attr("type")?(t.attr("type","text"),(0,a.default)(this).text((0,a.default)(this).data("textHide"))):(t.attr("type","password"),(0,a.default)(this).text((0,a.default)(this).data("textShow")))})}}]),t}();e.default=s,t.exports=e.default},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=function(t,e,n){for(var i=!0;i;){var r=t,o=e,a=n;i=!1,null===r&&(r=Function.prototype);var s=Object.getOwnPropertyDescriptor(r,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(a)}var u=Object.getPrototypeOf(r);if(null===u)return;t=u,e=o,n=a,i=!0,s=u=void 0}},l=n(0),u=i(l),c=n(2),f=i(c),d=function(t){function e(){r(this,e),s(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),a(e,[{key:"init",value:function(){var t=this,n=void 0,i=this;this.el.find("li").hover(function(e){if(!t.el.parent().hasClass("mobile")){var i=(0,u.default)(e.currentTarget).attr("class");if(n!==i){var r=Array.prototype.slice.call(e.currentTarget.classList).map(function(t){return"string"==typeof t&&"."+t});n=r.join(""),n&&0===(0,u.default)(e.target).data("depth")&&(0,u.default)(n+" .js-sub-menu").css({top:(0,u.default)(""+n).height()+(0,u.default)(""+n).position().top})}}}),(0,u.default)("#menu-icon").on("click",function(){(0,u.default)("#mobile_top_menu_wrapper").toggle(),i.toggleMobileMenu()}),(0,u.default)(".js-top-menu .category").mouseleave(function(){t.el.parent().hasClass("mobile")}),this.el.on("click",function(e){t.el.parent().hasClass("mobile")||e.stopPropagation()}),prestashop.on("responsive update",function(t){(0,u.default)(".js-sub-menu").removeAttr("style"),i.toggleMobileMenu()}),s(Object.getPrototypeOf(e.prototype),"init",this).call(this)}},{key:"toggleMobileMenu",value:function(){(0,u.default)("#header").toggleClass("is-open"),(0,u.default)("#mobile_top_menu_wrapper").is(":visible")?(0,u.default)("#notifications, #wrapper, #footer").hide():(0,u.default)("#notifications, #wrapper, #footer").show()}}]),e}(f.default);e.default=d,t.exports=e.default},function(t,e,n){"use strict";function i(){(0,a.default)("#order-return-form table thead input[type=checkbox]").on("click",function(){var t=(0,a.default)(this).prop("checked");(0,a.default)("#order-return-form table tbody input[type=checkbox]").each(function(e,n){(0,a.default)(n).prop("checked",t)})})}function r(){(0,a.default)("body#order-detail")&&i()}var o=n(0),a=function(t){return t&&t.__esModule?t:{default:t}}(o);(0,a.default)(document).ready(r)},function(t,e,n){"use strict";!function(t){var e=0,n=function(e,n){this.options=n,this.$elementFilestyle=[],this.$element=t(e)};n.prototype={clear:function(){this.$element.val(""),this.$elementFilestyle.find(":text").val(""),this.$elementFilestyle.find(".badge").remove()},destroy:function(){this.$element.removeAttr("style").removeData("filestyle"),this.$elementFilestyle.remove()},disabled:function(t){if(!0===t)this.options.disabled||(this.$element.attr("disabled","true"),this.$elementFilestyle.find("label").attr("disabled","true"),this.options.disabled=!0);else{if(!1!==t)return this.options.disabled;this.options.disabled&&(this.$element.removeAttr("disabled"),this.$elementFilestyle.find("label").removeAttr("disabled"),this.options.disabled=!1)}},buttonBefore:function(t){if(!0===t)this.options.buttonBefore||(this.options.buttonBefore=!0,this.options.input&&(this.$elementFilestyle.remove(),this.constructor(),this.pushNameFiles()));else{if(!1!==t)return this.options.buttonBefore;this.options.buttonBefore&&(this.options.buttonBefore=!1,this.options.input&&(this.$elementFilestyle.remove(),this.constructor(),this.pushNameFiles()))}},icon:function(t){if(!0===t)this.options.icon||(this.options.icon=!0,this.$elementFilestyle.find("label").prepend(this.htmlIcon()));else{if(!1!==t)return this.options.icon;this.options.icon&&(this.options.icon=!1,this.$elementFilestyle.find(".icon-span-filestyle").remove())}},input:function(t){if(!0===t)this.options.input||(this.options.input=!0,this.options.buttonBefore?this.$elementFilestyle.append(this.htmlInput()):this.$elementFilestyle.prepend(this.htmlInput()),this.$elementFilestyle.find(".badge").remove(),this.pushNameFiles(),this.$elementFilestyle.find(".group-span-filestyle").addClass("input-group-btn"));else{if(!1!==t)return this.options.input;if(this.options.input){this.options.input=!1,this.$elementFilestyle.find(":text").remove();var e=this.pushNameFiles();e.length>0&&this.options.badge&&this.$elementFilestyle.find("label").append(' <span class="badge">'+e.length+"</span>"),this.$elementFilestyle.find(".group-span-filestyle").removeClass("input-group-btn")}}},size:function(t){if(void 0===t)return this.options.size;var e=this.$elementFilestyle.find("label"),n=this.$elementFilestyle.find("input");e.removeClass("btn-lg btn-sm"),n.removeClass("input-lg input-sm"),"nr"!=t&&(e.addClass("btn-"+t),n.addClass("input-"+t))},placeholder:function(t){if(void 0===t)return this.options.placeholder;this.options.placeholder=t,this.$elementFilestyle.find("input").attr("placeholder",t)},buttonText:function(t){if(void 0===t)return this.options.buttonText;this.options.buttonText=t,this.$elementFilestyle.find("label .buttonText").html(this.options.buttonText)},buttonName:function(t){if(void 0===t)return this.options.buttonName;this.options.buttonName=t,this.$elementFilestyle.find("label").attr({class:"btn "+this.options.buttonName})},iconName:function(t){if(void 0===t)return this.options.iconName;this.$elementFilestyle.find(".icon-span-filestyle").attr({class:"icon-span-filestyle "+this.options.iconName})},htmlIcon:function(){return this.options.icon?'<span class="icon-span-filestyle '+this.options.iconName+'"></span> ':""},htmlInput:function(){return this.options.input?'<input type="text" class="form-control '+("nr"==this.options.size?"":"input-"+this.options.size)+'" placeholder="'+this.options.placeholder+'" disabled> ':""},pushNameFiles:function(){var t="",e=[];void 0===this.$element[0].files?e[0]={name:this.$element[0]&&this.$element[0].value}:e=this.$element[0].files;for(var n=0;n<e.length;n++)t+=e[n].name.split("\\").pop()+", ";return""!==t?this.$elementFilestyle.find(":text").val(t.replace(/\, $/g,"")):this.$elementFilestyle.find(":text").val(""),e},constructor:function(){var n=this,i="",r=n.$element.attr("id"),o="";""!==r&&r||(r="filestyle-"+e,n.$element.attr({id:r}),e++),o='<span class="group-span-filestyle '+(n.options.input?"input-group-btn":"")+'"><label for="'+r+'" class="btn '+n.options.buttonName+" "+("nr"==n.options.size?"":"btn-"+n.options.size)+'" '+(n.options.disabled?'disabled="true"':"")+">"+n.htmlIcon()+'<span class="buttonText">'+n.options.buttonText+"</span></label></span>",i=n.options.buttonBefore?o+n.htmlInput():n.htmlInput()+o,n.$elementFilestyle=t('<div class="bootstrap-filestyle input-group">'+i+"</div>"),n.$elementFilestyle.find(".group-span-filestyle").attr("tabindex","0").keypress(function(t){if(13===t.keyCode||32===t.charCode)return n.$elementFilestyle.find("label").click(),!1}),n.$element.css({position:"absolute",clip:"rect(0px 0px 0px 0px)"}).attr("tabindex","-1").after(n.$elementFilestyle),n.options.disabled&&n.$element.attr("disabled","true"),n.$element.change(function(){var t=n.pushNameFiles();0==n.options.input&&n.options.badge?0==n.$elementFilestyle.find(".badge").length?n.$elementFilestyle.find("label").append(' <span class="badge">'+t.length+"</span>"):0==t.length?n.$elementFilestyle.find(".badge").remove():n.$elementFilestyle.find(".badge").html(t.length):n.$elementFilestyle.find(".badge").remove()}),window.navigator.userAgent.search(/firefox/i)>-1&&n.$elementFilestyle.find("label").click(function(){return n.$element.click(),!1})}};var i=t.fn.filestyle;t.fn.filestyle=function(e,i){var r="",o=this.each(function(){if("file"===t(this).attr("type")){var o=t(this),a=o.data("filestyle"),s=t.extend({},t.fn.filestyle.defaults,e,"object"==typeof e&&e);a||(o.data("filestyle",a=new n(this,s)),a.constructor()),"string"==typeof e&&(r=a[e](i))}});return void 0!==typeof r?r:o},t.fn.filestyle.defaults={buttonText:"Choose file",iconName:"glyphicon glyphicon-folder-open",buttonName:"btn-default",size:"nr",input:!0,badge:!0,icon:!0,buttonBefore:!1,disabled:!1,placeholder:""},t.fn.filestyle.noConflict=function(){return t.fn.filestyle=i,this},t(function(){t(".filestyle").each(function(){var e=t(this),n={input:"false"!==e.attr("data-input"),icon:"false"!==e.attr("data-icon"),buttonBefore:"true"===e.attr("data-buttonBefore"),disabled:"true"===e.attr("data-disabled"),size:e.attr("data-size"),buttonText:e.attr("data-buttonText"),buttonName:e.attr("data-buttonName"),iconName:e.attr("data-iconName"),badge:"false"!==e.attr("data-badge"),placeholder:e.attr("data-placeholder")};e.filestyle(n)})})}(window.jQuery)},function(t,e,n){"use strict";!function(t){t.fn.scrollbox=function(e){var n={linear:!1,startDelay:2,delay:3,step:5,speed:32,switchItems:1,direction:"vertical",distance:"auto",autoPlay:!0,onMouseOverPause:!0,paused:!1,queue:null,listElement:"ul",listItemElement:"li",infiniteLoop:!0,switchAmount:0,afterForward:null,afterBackward:null,triggerStackable:!1};return e=t.extend(n,e),e.scrollOffset="vertical"===e.direction?"scrollTop":"scrollLeft",e.queue&&(e.queue=t("#"+e.queue)),this.each(function(){var n,i,r,o,a,s,l,u,c,f=t(this),d=null,p=null,h=!1,m=0,g=0;e.onMouseOverPause&&(f.bind("mouseover",function(){h=!0}),f.bind("mouseout",function(){h=!1})),n=f.children(e.listElement+":first-child"),!1===e.infiniteLoop&&0===e.switchAmount&&(e.switchAmount=n.children().length),s=function(){if(!h){var r,a,s,l,u;if(r=n.children(e.listItemElement+":first-child"),l="auto"!==e.distance?e.distance:"vertical"===e.direction?r.outerHeight(!0):r.outerWidth(!0),e.linear?s=Math.min(f[0][e.scrollOffset]+e.step,l):(u=Math.max(3,parseInt(.3*(l-f[0][e.scrollOffset]),10)),s=Math.min(f[0][e.scrollOffset]+u,l)),f[0][e.scrollOffset]=s,s>=l){for(a=0;a<e.switchItems;a++)e.queue&&e.queue.find(e.listItemElement).length>0?(n.append(e.queue.find(e.listItemElement)[0]),n.children(e.listItemElement+":first-child").remove()):n.append(n.children(e.listItemElement+":first-child")),++m;if(f[0][e.scrollOffset]=0,clearInterval(d),d=null,t.isFunction(e.afterForward)&&e.afterForward.call(f,{switchCount:m,currentFirstChild:n.children(e.listItemElement+":first-child")}),e.triggerStackable&&0!==g)return void i();if(!1===e.infiniteLoop&&m>=e.switchAmount)return;e.autoPlay&&(p=setTimeout(o,1e3*e.delay))}}},l=function(){if(!h){var r,a,s,l,u;if(0===f[0][e.scrollOffset]){for(a=0;a<e.switchItems;a++)n.children(e.listItemElement+":last-child").insertBefore(n.children(e.listItemElement+":first-child"));r=n.children(e.listItemElement+":first-child"),l="auto"!==e.distance?e.distance:"vertical"===e.direction?r.height():r.width(),f[0][e.scrollOffset]=l}if(e.linear?s=Math.max(f[0][e.scrollOffset]-e.step,0):(u=Math.max(3,parseInt(.3*f[0][e.scrollOffset],10)),s=Math.max(f[0][e.scrollOffset]-u,0)),f[0][e.scrollOffset]=s,0===s){if(--m,clearInterval(d),d=null,t.isFunction(e.afterBackward)&&e.afterBackward.call(f,{switchCount:m,currentFirstChild:n.children(e.listItemElement+":first-child")}),e.triggerStackable&&0!==g)return void i();e.autoPlay&&(p=setTimeout(o,1e3*e.delay))}}},i=function(){0!==g&&(g>0?(g--,p=setTimeout(o,0)):(g++,p=setTimeout(r,0)))},o=function(){clearInterval(d),d=setInterval(s,e.speed)},r=function(){clearInterval(d),d=setInterval(l,e.speed)},u=function(){e.autoPlay=!0,h=!1,clearInterval(d),d=setInterval(s,e.speed)},c=function(){h=!0},a=function(t){e.delay=t||e.delay,clearTimeout(p),e.autoPlay&&(p=setTimeout(o,1e3*e.delay))},e.autoPlay&&(p=setTimeout(o,1e3*e.startDelay)),f.bind("resetClock",function(t){a(t)}),f.bind("forward",function(){e.triggerStackable?null!==d?g++:o():(clearTimeout(p),o())}),f.bind("backward",function(){e.triggerStackable?null!==d?g--:r():(clearTimeout(p),r())}),f.bind("pauseHover",function(){c()}),f.bind("forwardHover",function(){u()}),f.bind("speedUp",function(t,n){"undefined"===n&&(n=Math.max(1,parseInt(e.speed/2,10))),e.speed=n}),f.bind("speedDown",function(t,n){"undefined"===n&&(n=2*e.speed),e.speed=n}),f.bind("updateConfig",function(n,i){e=t.extend(e,i)})})}}(jQuery)},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t){(0,a.default)("#search_filters").replaceWith(t.rendered_facets),(0,a.default)("#js-active-search-filters").replaceWith(t.rendered_active_filters),(0,a.default)("#js-product-list-top").replaceWith(t.rendered_products_top),(0,a.default)("#js-product-list").replaceWith(t.rendered_products),(0,a.default)("#js-product-list-bottom").replaceWith(t.rendered_products_bottom),t.rendered_products_header&&(0,a.default)("#js-product-list-header").replaceWith(t.rendered_products_header),(new c.default).init()}var o=n(0),a=i(o),s=n(1),l=i(s);n(5);var u=n(3),c=i(u);(0,a.default)(document).ready(function(){l.default.on("clickQuickView",function(e){var n={action:"quickview",id_product:e.dataset.idProduct,id_product_attribute:e.dataset.idProductAttribute};a.default.post(l.default.urls.pages.product,n,null,"json").then(function(e){(0,a.default)("body").append(e.quickview_html);var n=(0,a.default)("#quickview-modal-"+e.product.id+"-"+e.product.id_product_attribute);n.modal("show"),t(n),n.on("hidden.bs.modal",function(){n.remove()})}).fail(function(t){l.default.emit("handleError",{eventType:"clickQuickView",resp:t})})});var t=function(t){var n=(0,a.default)(".js-arrows"),i=t.find(".js-qv-product-images");(0,a.default)(".js-thumb").on("click",function(t){(0,a.default)(".js-thumb").hasClass("selected")&&(0,a.default)(".js-thumb").removeClass("selected"),(0,a.default)(t.currentTarget).addClass("selected"),(0,a.default)(".js-qv-product-cover").attr("src",(0,a.default)(t.target).data("image-large-src"))}),i.find("li").length<=4?n.hide():n.on("click",function(t){(0,a.default)(t.target).hasClass("arrow-up")&&(0,a.default)(".js-qv-product-images").position().top<0?(e("up"),(0,a.default)(".arrow-down").css("opacity","1")):(0,a.default)(t.target).hasClass("arrow-down")&&i.position().top+i.height()>(0,a.default)(".js-qv-mask").height()&&(e("down"),(0,a.default)(".arrow-up").css("opacity","1"))}),t.find("#quantity_wanted").TouchSpin({verticalbuttons:!0,verticalupclass:"material-icons touchspin-up",verticaldownclass:"material-icons touchspin-down",buttondown_class:"btn btn-touchspin js-touchspin",buttonup_class:"btn btn-touchspin js-touchspin",min:1,max:1e6})},e=function(t){var e=(0,a.default)(".js-qv-product-images"),n=(0,a.default)(".js-qv-product-images li img").height()+20,i=e.position().top;e.velocity({translateY:"up"===t?i+n:i-n},function(){e.position().top>=0?(0,a.default)(".arrow-up").css("opacity",".2"):e.position().top+e.height()<=(0,a.default)(".js-qv-mask").height()&&(0,a.default)(".arrow-down").css("opacity",".2")})};(0,a.default)("body").on("click","#search_filter_toggler",function(){(0,a.default)("#search_filters_wrapper").removeClass("hidden-sm-down"),(0,a.default)("#content-wrapper").addClass("hidden-sm-down"),(0,a.default)("#footer").addClass("hidden-sm-down")}),(0,a.default)("#search_filter_controls .clear").on("click",function(){(0,a.default)("#search_filters_wrapper").addClass("hidden-sm-down"),(0,a.default)("#content-wrapper").removeClass("hidden-sm-down"),(0,a.default)("#footer").removeClass("hidden-sm-down")}),(0,a.default)("#search_filter_controls .ok").on("click",function(){(0,a.default)("#search_filters_wrapper").addClass("hidden-sm-down"),(0,a.default)("#content-wrapper").removeClass("hidden-sm-down"),(0,a.default)("#footer").removeClass("hidden-sm-down")});var n=function(t){if(void 0!==t.target.dataset.searchUrl)return t.target.dataset.searchUrl;if(void 0===(0,a.default)(t.target).parent()[0].dataset.searchUrl)throw new Error("Can not parse search URL");return(0,a.default)(t.target).parent()[0].dataset.searchUrl};(0,a.default)("body").on("change","#search_filters input[data-search-url]",function(t){l.default.emit("updateFacets",n(t))}),(0,a.default)("body").on("click",".js-search-filters-clear-all",function(t){l.default.emit("updateFacets",n(t))}),(0,a.default)("body").on("click",".js-search-link",function(t){t.preventDefault(),l.default.emit("updateFacets",(0,a.default)(t.target).closest("a").get(0).href)}),(0,a.default)("body").on("change","#search_filters select",function(t){var e=(0,a.default)(t.target).closest("form");l.default.emit("updateFacets","?"+e.serialize())}),l.default.on("updateProductList",function(t){r(t),window.scrollTo(0,0)})})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=n(0),o=i(r),a=n(1),s=i(a),l=n(4),u=i(l);(0,o.default)(document).ready(function(){function t(){(0,o.default)(".js-thumb").on("click",function(t){(0,o.default)(".js-modal-product-cover").attr("src",(0,o.default)(t.target).data("image-large-src")),(0,o.default)(".selected").removeClass("selected"),(0,o.default)(t.target).addClass("selected"),(0,o.default)(".js-qv-product-cover").prop("src",(0,o.default)(t.currentTarget).data("image-large-src"))})}function e(){(0,o.default)("#main .js-qv-product-images li").length>2?((0,o.default)("#main .js-qv-mask").addClass("scroll"),(0,o.default)(".scroll-box-arrows").addClass("scroll"),(0,o.default)("#main .js-qv-mask").scrollbox({direction:"h",distance:113,autoPlay:!1}),(0,o.default)(".scroll-box-arrows .left").click(function(){(0,o.default)("#main .js-qv-mask").trigger("backward")}),(0,o.default)(".scroll-box-arrows .right").click(function(){(0,o.default)("#main .js-qv-mask").trigger("forward")})):((0,o.default)("#main .js-qv-mask").removeClass("scroll"),(0,o.default)(".scroll-box-arrows").removeClass("scroll"))}function n(){(0,o.default)(".js-file-input").on("change",function(t){var e=void 0,n=void 0;(e=(0,o.default)(t.currentTarget)[0])&&(n=e.files[0])&&(0,o.default)(e).prev().text(n.name)})}!function(){var t=(0,o.default)("#quantity_wanted");t.TouchSpin({verticalbuttons:!0,verticalupclass:"material-icons touchspin-up",verticaldownclass:"material-icons touchspin-down",buttondown_class:"btn btn-touchspin js-touchspin",buttonup_class:"btn btn-touchspin js-touchspin",min:parseInt(t.attr("min"),10),max:1e6}),(0,o.default)("body").on("change keyup","#quantity_wanted",function(t){(0,o.default)(t.currentTarget).trigger("touchspin.stopspin"),s.default.emit("updateProduct",{eventType:"updatedProductQuantity",event:t})})}(),n(),t(),e(),s.default.on("updatedProduct",function(i){if(n(),t(),i&&i.product_minimal_quantity){var r=parseInt(i.product_minimal_quantity,10);(0,o.default)("#quantity_wanted").trigger("touchspin.updatesettings",{min:r})}e(),(0,o.default)((0,o.default)(".tabs .nav-link.active").attr("href")).addClass("active").removeClass("fade"),(0,o.default)(".js-product-images-modal").replaceWith(i.product_images_modal),(new u.default).init()})})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){var n=e.children().detach();e.empty().append(t.children().detach()),t.append(n)}function o(){u.default.responsive.mobile?(0,s.default)("*[id^='_desktop_']").each(function(t,e){var n=(0,s.default)("#"+e.id.replace("_desktop_","_mobile_"));n.length&&r((0,s.default)(e),n)}):(0,s.default)("*[id^='_mobile_']").each(function(t,e){var n=(0,s.default)("#"+e.id.replace("_mobile_","_desktop_"));n.length&&r((0,s.default)(e),n)}),u.default.emit("responsive update",{mobile:u.default.responsive.mobile})}var a=n(0),s=i(a),l=n(1),u=i(l);u.default.responsive=u.default.responsive||{},u.default.responsive.current_width=window.innerWidth,u.default.responsive.min_width=768,u.default.responsive.mobile=u.default.responsive.current_width<u.default.responsive.min_width,(0,s.default)(window).on("resize",function(){var t=u.default.responsive.current_width,e=u.default.responsive.min_width,n=window.innerWidth,i=t>=e&&n<e||t<e&&n>=e;u.default.responsive.current_width=n,u.default.responsive.mobile=u.default.responsive.current_width<u.default.responsive.min_width,i&&o()}),(0,s.default)(document).ready(function(){u.default.responsive.mobile&&o()})},function(t,e,n){"use strict";!function(t){function e(t,e){return t+".touchspin_"+e}function n(n,i){return t.map(n,function(t){return e(t,i)})}var i=0;t.fn.TouchSpin=function(e){if("destroy"===e)return void this.each(function(){var e=t(this),i=e.data();t(document).off(n(["mouseup","touchend","touchcancel","mousemove","touchmove","scroll","scrollstart"],i.spinnerid).join(" "))});var r={min:0,max:100,initval:"",replacementval:"",step:1,decimals:0,stepinterval:100,forcestepdivisibility:"round",stepintervaldelay:500,verticalbuttons:!1,verticalupclass:"glyphicon glyphicon-chevron-up",verticaldownclass:"glyphicon glyphicon-chevron-down",prefix:"",postfix:"",prefix_extraclass:"",postfix_extraclass:"",booster:!0,boostat:10,maxboostedstep:!1,mousewheel:!0,buttondown_class:"btn btn-default",buttonup_class:"btn btn-default",buttondown_txt:"-",buttonup_txt:"+"},o={min:"min",max:"max",initval:"init-val",replacementval:"replacement-val",step:"step",decimals:"decimals",stepinterval:"step-interval",verticalbuttons:"vertical-buttons",verticalupclass:"vertical-up-class",verticaldownclass:"vertical-down-class",forcestepdivisibility:"force-step-divisibility",stepintervaldelay:"step-interval-delay",prefix:"prefix",postfix:"postfix",prefix_extraclass:"prefix-extra-class",postfix_extraclass:"postfix-extra-class",booster:"booster",boostat:"boostat",maxboostedstep:"max-boosted-step",mousewheel:"mouse-wheel",buttondown_class:"button-down-class",buttonup_class:"button-up-class",buttondown_txt:"button-down-txt",buttonup_txt:"button-up-txt"};return this.each(function(){function a(){""!==C.initval&&""===L.val()&&L.val(C.initval)}function s(t){c(t),b();var e=O.input.val();""!==e&&(e=Number(O.input.val()),O.input.val(e.toFixed(C.decimals)))}function l(){C=t.extend({},r,j,u(),e)}function u(){var e={};return t.each(o,function(t,n){var i="bts-"+n;L.is("[data-"+i+"]")&&(e[t]=L.data(i))}),e}function c(e){C=t.extend({},C,e)}function f(){var t=L.val(),e=L.parent();""!==t&&(t=Number(t).toFixed(C.decimals)),L.data("initvalue",t).val(t),L.addClass("form-control"),e.hasClass("input-group")?d(e):p()}function d(e){e.addClass("bootstrap-touchspin");var n,i,r=L.prev(),o=L.next(),a='<span class="input-group-addon bootstrap-touchspin-prefix">'+C.prefix+"</span>",s='<span class="input-group-addon bootstrap-touchspin-postfix">'+C.postfix+"</span>";r.hasClass("input-group-btn")?(n='<button class="'+C.buttondown_class+' bootstrap-touchspin-down" type="button">'+C.buttondown_txt+"</button>",r.append(n)):(n='<span class="input-group-btn"><button class="'+C.buttondown_class+' bootstrap-touchspin-down" type="button">'+C.buttondown_txt+"</button></span>",t(n).insertBefore(L)),o.hasClass("input-group-btn")?(i='<button class="'+C.buttonup_class+' bootstrap-touchspin-up" type="button">'+C.buttonup_txt+"</button>",o.prepend(i)):(i='<span class="input-group-btn"><button class="'+C.buttonup_class+' bootstrap-touchspin-up" type="button">'+C.buttonup_txt+"</button></span>",t(i).insertAfter(L)),t(a).insertBefore(L),t(s).insertAfter(L),A=e}function p(){var e;e=C.verticalbuttons?'<div class="input-group bootstrap-touchspin"><span class="input-group-addon bootstrap-touchspin-prefix">'+C.prefix+'</span><span class="input-group-addon bootstrap-touchspin-postfix">'+C.postfix+'</span><span class="input-group-btn-vertical"><button class="'+C.buttondown_class+' bootstrap-touchspin-up" type="button"><i class="'+C.verticalupclass+'"></i></button><button class="'+C.buttonup_class+' bootstrap-touchspin-down" type="button"><i class="'+C.verticaldownclass+'"></i></button></span></div>':'<div class="input-group bootstrap-touchspin"><span class="input-group-btn"><button class="'+C.buttondown_class+' bootstrap-touchspin-down" type="button">'+C.buttondown_txt+'</button></span><span class="input-group-addon bootstrap-touchspin-prefix">'+C.prefix+'</span><span class="input-group-addon bootstrap-touchspin-postfix">'+C.postfix+'</span><span class="input-group-btn"><button class="'+C.buttonup_class+' bootstrap-touchspin-up" type="button">'+C.buttonup_txt+"</button></span></div>",A=t(e).insertBefore(L),t(".bootstrap-touchspin-prefix",A).after(L),L.hasClass("input-sm")?A.addClass("input-group-sm"):L.hasClass("input-lg")&&A.addClass("input-group-lg")}function h(){O={down:t(".bootstrap-touchspin-down",A),up:t(".bootstrap-touchspin-up",A),input:t("input",A),prefix:t(".bootstrap-touchspin-prefix",A).addClass(C.prefix_extraclass),postfix:t(".bootstrap-touchspin-postfix",A).addClass(C.postfix_extraclass)}}function m(){""===C.prefix&&O.prefix.hide(),""===C.postfix&&O.postfix.hide()}function g(){L.on("keydown",function(t){var e=t.keyCode||t.which;38===e?("up"!==V&&(w(),E()),t.preventDefault()):40===e&&("down"!==V&&(x(),S()),t.preventDefault())}),L.on("keyup",function(t){var e=t.keyCode||t.which;38===e?T():40===e&&T()}),L.on("blur",function(){b()}),O.down.on("keydown",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||("down"!==V&&(x(),S()),t.preventDefault())}),O.down.on("keyup",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||T()}),O.up.on("keydown",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||("up"!==V&&(w(),E()),t.preventDefault())}),O.up.on("keyup",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||T()}),O.down.on("mousedown.touchspin",function(t){O.down.off("touchstart.touchspin"),L.is(":disabled")||(x(),S(),t.preventDefault(),t.stopPropagation())}),O.down.on("touchstart.touchspin",function(t){O.down.off("mousedown.touchspin"),L.is(":disabled")||(x(),S(),t.preventDefault(),t.stopPropagation())}),O.up.on("mousedown.touchspin",function(t){O.up.off("touchstart.touchspin"),L.is(":disabled")||(w(),E(),t.preventDefault(),t.stopPropagation())}),O.up.on("touchstart.touchspin",function(t){O.up.off("mousedown.touchspin"),L.is(":disabled")||(w(),E(),t.preventDefault(),t.stopPropagation())}),O.up.on("mouseout touchleave touchend touchcancel",function(t){V&&(t.stopPropagation(),T())}),O.down.on("mouseout touchleave touchend touchcancel",function(t){V&&(t.stopPropagation(),T())}),O.down.on("mousemove touchmove",function(t){V&&(t.stopPropagation(),t.preventDefault())}),O.up.on("mousemove touchmove",function(t){V&&(t.stopPropagation(),t.preventDefault())}),t(document).on(n(["mouseup","touchend","touchcancel"],i).join(" "),function(t){V&&(t.preventDefault(),T())}),t(document).on(n(["mousemove","touchmove","scroll","scrollstart"],i).join(" "),function(t){V&&(t.preventDefault(),T())}),L.on("mousewheel DOMMouseScroll",function(t){if(C.mousewheel&&L.is(":focus")){var e=t.originalEvent.wheelDelta||-t.originalEvent.deltaY||-t.originalEvent.detail;t.stopPropagation(),t.preventDefault(),e<0?x():w()}})}function v(){L.on("touchspin.uponce",function(){T(),w()}),L.on("touchspin.downonce",function(){T(),x()}),L.on("touchspin.startupspin",function(){E()}),L.on("touchspin.startdownspin",function(){S()}),L.on("touchspin.stopspin",function(){T()}),L.on("touchspin.updatesettings",function(t,e){s(e)})}function y(t){switch(C.forcestepdivisibility){case"round":return(Math.round(t/C.step)*C.step).toFixed(C.decimals);case"floor":return(Math.floor(t/C.step)*C.step).toFixed(C.decimals);case"ceil":return(Math.ceil(t/C.step)*C.step).toFixed(C.decimals);default:return t}}function b(){var t,e,n;if(""===(t=L.val()))return void(""!==C.replacementval&&(L.val(C.replacementval),L.trigger("change")));C.decimals>0&&"."===t||(e=parseFloat(t),isNaN(e)&&(e=""!==C.replacementval?C.replacementval:0),n=e,e.toString()!==t&&(n=e),e<C.min&&(n=C.min),e>C.max&&(n=C.max),n=y(n),Number(t).toString()!==n.toString()&&(L.val(n),L.trigger("change")))}function _(){if(C.booster){var t=Math.pow(2,Math.floor(B/C.boostat))*C.step;return C.maxboostedstep&&t>C.maxboostedstep&&(t=C.maxboostedstep,I=Math.round(I/t)*t),Math.max(C.step,t)}return C.step}function w(){b(),I=parseFloat(O.input.val()),isNaN(I)&&(I=0);var t=I,e=_();I+=e,I>C.max&&(I=C.max,L.trigger("touchspin.on.max"),T()),O.input.val(Number(I).toFixed(C.decimals)),t!==I&&L.trigger("change")}function x(){b(),I=parseFloat(O.input.val()),isNaN(I)&&(I=0);var t=I,e=_();I-=e,I<C.min&&(I=C.min,L.trigger("touchspin.on.min"),T()),O.input.val(I.toFixed(C.decimals)),t!==I&&L.trigger("change")}function S(){T(),B=0,V="down",L.trigger("touchspin.on.startspin"),L.trigger("touchspin.on.startdownspin"),P=setTimeout(function(){k=setInterval(function(){B++,x()},C.stepinterval)},C.stepintervaldelay)}function E(){T(),B=0,V="up",L.trigger("touchspin.on.startspin"),L.trigger("touchspin.on.startupspin"),N=setTimeout(function(){D=setInterval(function(){B++,w()},C.stepinterval)},C.stepintervaldelay)}function T(){switch(clearTimeout(P),clearTimeout(N),clearInterval(k),clearInterval(D),V){case"up":L.trigger("touchspin.on.stopupspin"),L.trigger("touchspin.on.stopspin");break;case"down":L.trigger("touchspin.on.stopdownspin"),L.trigger("touchspin.on.stopspin")}B=0,V=!1}var C,A,O,I,k,D,P,N,L=t(this),j=L.data(),B=0,V=!1;!function(){L.data("alreadyinitialized")||(L.data("alreadyinitialized",!0),i+=1,L.data("spinnerid",i),L.is("input")&&(l(),a(),b(),f(),h(),m(),g(),v(),O.input.css("display","block")))}()})}}(jQuery)},function(t,e,n){"use strict";if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(jQuery),function(){function t(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function e(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(t){function e(t){return{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function n(t){return(t[0]||t).nodeType}function i(){return{bindType:a.end,delegateType:a.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}}function r(){if(window.QUnit)return!1;var t=document.createElement("bootstrap");for(var e in s)if(void 0!==t.style[e])return{end:s[e]};return!1}function o(e){var n=this,i=!1;return t(this).one(l.TRANSITION_END,function(){i=!0}),setTimeout(function(){i||l.triggerTransitionEnd(n)},e),this}var a=!1,s={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},l={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");return e||(e=t.getAttribute("href")||"",e=/^#[a-z]/i.test(e)?e:null),e},reflow:function(t){new Function("bs","return bs")(t.offsetHeight)},triggerTransitionEnd:function(e){t(e).trigger(a.end)},supportsTransitionEnd:function(){return Boolean(a)},typeCheckConfig:function(t,i,r){for(var o in r)if(r.hasOwnProperty(o)){var a=r[o],s=i[o],l=void 0;if(l=s&&n(s)?"element":e(s),!new RegExp(a).test(l))throw new Error(t.toUpperCase()+': Option "'+o+'" provided type "'+l+'" but expected type "'+a+'".')}}};return function(){a=r(),t.fn.emulateTransitionEnd=o,l.supportsTransitionEnd()&&(t.event.special[l.TRANSITION_END]=i())}(),l}(jQuery),a=(function(t){var e="alert",i="bs.alert",a="."+i,s=t.fn[e],l={DISMISS:'[data-dismiss="alert"]'},u={CLOSE:"close"+a,CLOSED:"closed"+a,CLICK_DATA_API:"click"+a+".data-api"},c={ALERT:"alert",FADE:"fade",IN:"in"},f=function(){function e(t){n(this,e),this._element=t}return e.prototype.close=function(t){t=t||this._element;var e=this._getRootElement(t);this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.prototype.dispose=function(){t.removeData(this._element,i),this._element=null},e.prototype._getRootElement=function(e){var n=o.getSelectorFromElement(e),i=!1;return n&&(i=t(n)[0]),i||(i=t(e).closest("."+c.ALERT)[0]),i},e.prototype._triggerCloseEvent=function(e){var n=t.Event(u.CLOSE);return t(e).trigger(n),n},e.prototype._removeElement=function(e){return t(e).removeClass(c.IN),o.supportsTransitionEnd()&&t(e).hasClass(c.FADE)?void t(e).one(o.TRANSITION_END,t.proxy(this._destroyElement,this,e)).emulateTransitionEnd(150):void this._destroyElement(e)},e.prototype._destroyElement=function(e){t(e).detach().trigger(u.CLOSED).remove()},e._jQueryInterface=function(n){return this.each(function(){var r=t(this),o=r.data(i);o||(o=new e(this),r.data(i,o)),"close"===n&&o[n](this)})},e._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},r(e,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}}]),e}();t(document).on(u.CLICK_DATA_API,l.DISMISS,f._handleDismiss(new f)),t.fn[e]=f._jQueryInterface,t.fn[e].Constructor=f,t.fn[e].noConflict=function(){return t.fn[e]=s,f._jQueryInterface}}(jQuery),function(t){var e="button",i="bs.button",o="."+i,a=".data-api",s=t.fn[e],l={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},u={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},c={CLICK_DATA_API:"click"+o+a,FOCUS_BLUR_DATA_API:"focus"+o+a+" blur"+o+a},f=function(){function e(t){n(this,e),this._element=t}return e.prototype.toggle=function(){var e=!0,n=t(this._element).closest(u.DATA_TOGGLE)[0];if(n){var i=t(this._element).find(u.INPUT)[0];if(i){if("radio"===i.type)if(i.checked&&t(this._element).hasClass(l.ACTIVE))e=!1;else{var r=t(n).find(u.ACTIVE)[0];r&&t(r).removeClass(l.ACTIVE)}e&&(i.checked=!t(this._element).hasClass(l.ACTIVE),t(this._element).trigger("change")),i.focus()}}else this._element.setAttribute("aria-pressed",!t(this._element).hasClass(l.ACTIVE));e&&t(this._element).toggleClass(l.ACTIVE)},e.prototype.dispose=function(){t.removeData(this._element,i),this._element=null},e._jQueryInterface=function(n){return this.each(function(){var r=t(this).data(i);r||(r=new e(this),t(this).data(i,r)),"toggle"===n&&r[n]()})},r(e,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}}]),e}();t(document).on(c.CLICK_DATA_API,u.DATA_TOGGLE_CARROT,function(e){e.preventDefault();var n=e.target;t(n).hasClass(l.BUTTON)||(n=t(n).closest(u.BUTTON)),f._jQueryInterface.call(t(n),"toggle")}).on(c.FOCUS_BLUR_DATA_API,u.DATA_TOGGLE_CARROT,function(e){var n=t(e.target).closest(u.BUTTON)[0];t(n).toggleClass(l.FOCUS,/^focus(in)?$/.test(e.type))}),t.fn[e]=f._jQueryInterface,t.fn[e].Constructor=f,t.fn[e].noConflict=function(){return t.fn[e]=s,f._jQueryInterface}}(jQuery),function(t){var e="carousel",a="bs.carousel",s="."+a,l=".data-api",u=t.fn[e],c={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},f={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},d={NEXT:"next",PREVIOUS:"prev"},p={SLIDE:"slide"+s,SLID:"slid"+s,KEYDOWN:"keydown"+s,MOUSEENTER:"mouseenter"+s,MOUSELEAVE:"mouseleave"+s,LOAD_DATA_API:"load"+s+l,CLICK_DATA_API:"click"+s+l},h={CAROUSEL:"carousel",ACTIVE:"active",SLIDE:"slide",RIGHT:"right",LEFT:"left",ITEM:"carousel-item"},m={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".next, .prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},g=function(){function l(e,i){n(this,l),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this._config=this._getConfig(i),this._element=t(e)[0],this._indicatorsElement=t(this._element).find(m.INDICATORS)[0],this._addEventListeners()}return l.prototype.next=function(){this._isSliding||this._slide(d.NEXT)},l.prototype.nextWhenVisible=function(){document.hidden||this.next()},l.prototype.prev=function(){this._isSliding||this._slide(d.PREVIOUS)},l.prototype.pause=function(e){e||(this._isPaused=!0),t(this._element).find(m.NEXT_PREV)[0]&&o.supportsTransitionEnd()&&(o.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},l.prototype.cycle=function(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval(t.proxy(document.visibilityState?this.nextWhenVisible:this.next,this),this._config.interval))},l.prototype.to=function(e){var n=this;this._activeElement=t(this._element).find(m.ACTIVE_ITEM)[0];var i=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0)){if(this._isSliding)return void t(this._element).one(p.SLID,function(){return n.to(e)});if(i===e)return this.pause(),void this.cycle();var r=e>i?d.NEXT:d.PREVIOUS;this._slide(r,this._items[e])}},l.prototype.dispose=function(){t(this._element).off(s),t.removeData(this._element,a),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},l.prototype._getConfig=function(n){return n=t.extend({},c,n),o.typeCheckConfig(e,n,f),n},l.prototype._addEventListeners=function(){this._config.keyboard&&t(this._element).on(p.KEYDOWN,t.proxy(this._keydown,this)),"hover"!==this._config.pause||"ontouchstart"in document.documentElement||t(this._element).on(p.MOUSEENTER,t.proxy(this.pause,this)).on(p.MOUSELEAVE,t.proxy(this.cycle,this))},l.prototype._keydown=function(t){if(t.preventDefault(),!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}},l.prototype._getItemIndex=function(e){return this._items=t.makeArray(t(e).parent().find(m.ITEM)),this._items.indexOf(e)},l.prototype._getItemByDirection=function(t,e){var n=t===d.NEXT,i=t===d.PREVIOUS,r=this._getItemIndex(e),o=this._items.length-1;if((i&&0===r||n&&r===o)&&!this._config.wrap)return e;var a=t===d.PREVIOUS?-1:1,s=(r+a)%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},l.prototype._triggerSlideEvent=function(e,n){var i=t.Event(p.SLIDE,{relatedTarget:e,direction:n});return t(this._element).trigger(i),i},l.prototype._setActiveIndicatorElement=function(e){if(this._indicatorsElement){t(this._indicatorsElement).find(m.ACTIVE).removeClass(h.ACTIVE);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&t(n).addClass(h.ACTIVE)}},l.prototype._slide=function(e,n){var i=this,r=t(this._element).find(m.ACTIVE_ITEM)[0],a=n||r&&this._getItemByDirection(e,r),s=Boolean(this._interval),l=e===d.NEXT?h.LEFT:h.RIGHT;if(a&&t(a).hasClass(h.ACTIVE))return void(this._isSliding=!1);if(!this._triggerSlideEvent(a,l).isDefaultPrevented()&&r&&a){this._isSliding=!0,s&&this.pause(),this._setActiveIndicatorElement(a);var u=t.Event(p.SLID,{relatedTarget:a,direction:l});o.supportsTransitionEnd()&&t(this._element).hasClass(h.SLIDE)?(t(a).addClass(e),o.reflow(a),t(r).addClass(l),t(a).addClass(l),t(r).one(o.TRANSITION_END,function(){t(a).removeClass(l).removeClass(e),t(a).addClass(h.ACTIVE),t(r).removeClass(h.ACTIVE).removeClass(e).removeClass(l),i._isSliding=!1,setTimeout(function(){return t(i._element).trigger(u)},0)}).emulateTransitionEnd(600)):(t(r).removeClass(h.ACTIVE),t(a).addClass(h.ACTIVE),this._isSliding=!1,t(this._element).trigger(u)),s&&this.cycle()}},l._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(a),r=t.extend({},c,t(this).data());"object"===(void 0===e?"undefined":i(e))&&t.extend(r,e);var o="string"==typeof e?e:r.slide;if(n||(n=new l(this,r),t(this).data(a,n)),"number"==typeof e)n.to(e);else if("string"==typeof o){if(void 0===n[o])throw new Error('No method named "'+o+'"');n[o]()}else r.interval&&(n.pause(),n.cycle())})},l._dataApiClickHandler=function(e){var n=o.getSelectorFromElement(this);if(n){var i=t(n)[0];if(i&&t(i).hasClass(h.CAROUSEL)){var r=t.extend({},t(i).data(),t(this).data()),s=this.getAttribute("data-slide-to");s&&(r.interval=!1),l._jQueryInterface.call(t(i),r),s&&t(i).data(a).to(s),e.preventDefault()}}},r(l,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}},{key:"Default",get:function(){return c}}]),l}();t(document).on(p.CLICK_DATA_API,m.DATA_SLIDE,g._dataApiClickHandler),t(window).on(p.LOAD_DATA_API,function(){t(m.DATA_RIDE).each(function(){var e=t(this);g._jQueryInterface.call(e,e.data())})}),t.fn[e]=g._jQueryInterface,t.fn[e].Constructor=g,t.fn[e].noConflict=function(){return t.fn[e]=u,g._jQueryInterface}}(jQuery),function(t){var e="collapse",a="bs.collapse",s="."+a,l=t.fn[e],u={toggle:!0,parent:""},c={toggle:"boolean",parent:"string"},f={SHOW:"show"+s,SHOWN:"shown"+s,HIDE:"hide"+s,HIDDEN:"hidden"+s,CLICK_DATA_API:"click"+s+".data-api"},d={IN:"in",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},p={WIDTH:"width",HEIGHT:"height"},h={ACTIVES:".card > .in, .card > .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},m=function(){function s(e,i){n(this,s),this._isTransitioning=!1,this._element=e,this._config=this._getConfig(i),this._triggerArray=t.makeArray(t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]')),this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return s.prototype.toggle=function(){t(this._element).hasClass(d.IN)?this.hide():this.show()},s.prototype.show=function(){var e=this;if(!this._isTransitioning&&!t(this._element).hasClass(d.IN)){var n=void 0,i=void 0;if(this._parent&&(n=t.makeArray(t(h.ACTIVES)),n.length||(n=null)),!(n&&(i=t(n).data(a))&&i._isTransitioning)){var r=t.Event(f.SHOW);if(t(this._element).trigger(r),!r.isDefaultPrevented()){n&&(s._jQueryInterface.call(t(n),"hide"),i||t(n).data(a,null));var l=this._getDimension();t(this._element).removeClass(d.COLLAPSE).addClass(d.COLLAPSING),this._element.style[l]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&t(this._triggerArray).removeClass(d.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var u=function(){t(e._element).removeClass(d.COLLAPSING).addClass(d.COLLAPSE).addClass(d.IN),e._element.style[l]="",e.setTransitioning(!1),t(e._element).trigger(f.SHOWN)};if(!o.supportsTransitionEnd())return void u();var c=l[0].toUpperCase()+l.slice(1),p="scroll"+c;t(this._element).one(o.TRANSITION_END,u).emulateTransitionEnd(600),this._element.style[l]=this._element[p]+"px"}}}},s.prototype.hide=function(){var e=this;if(!this._isTransitioning&&t(this._element).hasClass(d.IN)){var n=t.Event(f.HIDE);if(t(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension(),r=i===p.WIDTH?"offsetWidth":"offsetHeight";this._element.style[i]=this._element[r]+"px",o.reflow(this._element),t(this._element).addClass(d.COLLAPSING).removeClass(d.COLLAPSE).removeClass(d.IN),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&t(this._triggerArray).addClass(d.COLLAPSED).attr("aria-expanded",!1),this.setTransitioning(!0);var a=function(){e.setTransitioning(!1),t(e._element).removeClass(d.COLLAPSING).addClass(d.COLLAPSE).trigger(f.HIDDEN)};return this._element.style[i]="",o.supportsTransitionEnd()?void t(this._element).one(o.TRANSITION_END,a).emulateTransitionEnd(600):void a()}}},s.prototype.setTransitioning=function(t){this._isTransitioning=t},s.prototype.dispose=function(){t.removeData(this._element,a),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},s.prototype._getConfig=function(n){return n=t.extend({},u,n),n.toggle=Boolean(n.toggle),o.typeCheckConfig(e,n,c),n},s.prototype._getDimension=function(){return t(this._element).hasClass(p.WIDTH)?p.WIDTH:p.HEIGHT},s.prototype._getParent=function(){var e=this,n=t(this._config.parent)[0],i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return t(n).find(i).each(function(t,n){e._addAriaAndCollapsedClass(s._getTargetFromElement(n),[n])}),n},s.prototype._addAriaAndCollapsedClass=function(e,n){if(e){var i=t(e).hasClass(d.IN);e.setAttribute("aria-expanded",i),n.length&&t(n).toggleClass(d.COLLAPSED,!i).attr("aria-expanded",i)}},s._getTargetFromElement=function(e){var n=o.getSelectorFromElement(e);return n?t(n)[0]:null},s._jQueryInterface=function(e){return this.each(function(){var n=t(this),r=n.data(a),o=t.extend({},u,n.data(),"object"===(void 0===e?"undefined":i(e))&&e);if(!r&&o.toggle&&/show|hide/.test(e)&&(o.toggle=!1),r||(r=new s(this,o),n.data(a,r)),"string"==typeof e){if(void 0===r[e])throw new Error('No method named "'+e+'"');r[e]()}})},r(s,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}},{key:"Default",get:function(){return u}}]),s}();t(document).on(f.CLICK_DATA_API,h.DATA_TOGGLE,function(e){e.preventDefault();var n=m._getTargetFromElement(this),i=t(n).data(a),r=i?"toggle":t(this).data();m._jQueryInterface.call(t(n),r)}),t.fn[e]=m._jQueryInterface,t.fn[e].Constructor=m,t.fn[e].noConflict=function(){return t.fn[e]=l,m._jQueryInterface}}(jQuery),function(t){var e="dropdown",i="bs.dropdown",a="."+i,s=".data-api",l=t.fn[e],u={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,CLICK:"click"+a,CLICK_DATA_API:"click"+a+s,KEYDOWN_DATA_API:"keydown"+a+s},c={BACKDROP:"dropdown-backdrop",DISABLED:"disabled",OPEN:"open"},f={BACKDROP:".dropdown-backdrop",DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",ROLE_MENU:'[role="menu"]',ROLE_LISTBOX:'[role="listbox"]',NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:'[role="menu"] li:not(.disabled) a, [role="listbox"] li:not(.disabled) a'},d=function(){function e(t){n(this,e),this._element=t,this._addEventListeners()}return e.prototype.toggle=function(){if(this.disabled||t(this).hasClass(c.DISABLED))return!1;var n=e._getParentFromElement(this),i=t(n).hasClass(c.OPEN);if(e._clearMenus(),i)return!1;if("ontouchstart"in document.documentElement&&!t(n).closest(f.NAVBAR_NAV).length){var r=document.createElement("div");r.className=c.BACKDROP,t(r).insertBefore(this),t(r).on("click",e._clearMenus)}var o={relatedTarget:this},a=t.Event(u.SHOW,o);return t(n).trigger(a),!a.isDefaultPrevented()&&(this.focus(),this.setAttribute("aria-expanded","true"),t(n).toggleClass(c.OPEN),t(n).trigger(t.Event(u.SHOWN,o)),!1)},e.prototype.dispose=function(){t.removeData(this._element,i),t(this._element).off(a),this._element=null},e.prototype._addEventListeners=function(){t(this._element).on(u.CLICK,this.toggle)},e._jQueryInterface=function(n){return this.each(function(){var r=t(this).data(i);if(r||t(this).data(i,r=new e(this)),"string"==typeof n){if(void 0===r[n])throw new Error('No method named "'+n+'"');r[n].call(this)}})},e._clearMenus=function(n){if(!n||3!==n.which){var i=t(f.BACKDROP)[0];i&&i.parentNode.removeChild(i);for(var r=t.makeArray(t(f.DATA_TOGGLE)),o=0;o<r.length;o++){var a=e._getParentFromElement(r[o]),s={relatedTarget:r[o]};if(t(a).hasClass(c.OPEN)&&!(n&&"click"===n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(a,n.target))){var l=t.Event(u.HIDE,s);t(a).trigger(l),l.isDefaultPrevented()||(r[o].setAttribute("aria-expanded","false"),t(a).removeClass(c.OPEN).trigger(t.Event(u.HIDDEN,s)))}}}},e._getParentFromElement=function(e){var n=void 0,i=o.getSelectorFromElement(e);return i&&(n=t(i)[0]),n||e.parentNode},e._dataApiKeydownHandler=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)&&(n.preventDefault(),n.stopPropagation(),!this.disabled&&!t(this).hasClass(c.DISABLED))){var i=e._getParentFromElement(this),r=t(i).hasClass(c.OPEN);if(!r&&27!==n.which||r&&27===n.which){if(27===n.which){var o=t(i).find(f.DATA_TOGGLE)[0];t(o).trigger("focus")}return void t(this).trigger("click")}var a=t.makeArray(t(f.VISIBLE_ITEMS));if(a=a.filter(function(t){return t.offsetWidth||t.offsetHeight}),a.length){var s=a.indexOf(n.target);38===n.which&&s>0&&s--,40===n.which&&s<a.length-1&&s++,s<0&&(s=0),a[s].focus()}}},r(e,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}}]),e}();t(document).on(u.KEYDOWN_DATA_API,f.DATA_TOGGLE,d._dataApiKeydownHandler).on(u.KEYDOWN_DATA_API,f.ROLE_MENU,d._dataApiKeydownHandler).on(u.KEYDOWN_DATA_API,f.ROLE_LISTBOX,d._dataApiKeydownHandler).on(u.CLICK_DATA_API,d._clearMenus).on(u.CLICK_DATA_API,f.DATA_TOGGLE,d.prototype.toggle).on(u.CLICK_DATA_API,f.FORM_CHILD,function(t){t.stopPropagation()}),t.fn[e]=d._jQueryInterface,t.fn[e].Constructor=d,t.fn[e].noConflict=function(){return t.fn[e]=l,d._jQueryInterface}}(jQuery),function(t){var e="modal",a="bs.modal",s="."+a,l=t.fn[e],u={backdrop:!0,keyboard:!0,focus:!0,show:!0},c={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},f={HIDE:"hide"+s,HIDDEN:"hidden"+s,SHOW:"show"+s,SHOWN:"shown"+s,FOCUSIN:"focusin"+s,RESIZE:"resize"+s,CLICK_DISMISS:"click.dismiss"+s,KEYDOWN_DISMISS:"keydown.dismiss"+s,MOUSEUP_DISMISS:"mouseup.dismiss"+s,MOUSEDOWN_DISMISS:"mousedown.dismiss"+s,CLICK_DATA_API:"click"+s+".data-api"},d={SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",IN:"in"},p={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".navbar-fixed-top, .navbar-fixed-bottom, .is-fixed"},h=function(){function l(e,i){n(this,l),this._config=this._getConfig(i),this._element=e,this._dialog=t(e).find(p.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}return l.prototype.toggle=function(t){return this._isShown?this.hide():this.show(t)},l.prototype.show=function(e){var n=this,i=t.Event(f.SHOW,{relatedTarget:e});t(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),t(document.body).addClass(d.OPEN),this._setEscapeEvent(),this._setResizeEvent(),t(this._element).on(f.CLICK_DISMISS,p.DATA_DISMISS,t.proxy(this.hide,this)),t(this._dialog).on(f.MOUSEDOWN_DISMISS,function(){t(n._element).one(f.MOUSEUP_DISMISS,function(e){t(e.target).is(n._element)&&(n._ignoreBackdropClick=!0)})}),this._showBackdrop(t.proxy(this._showElement,this,e)))},l.prototype.hide=function(e){e&&e.preventDefault();var n=t.Event(f.HIDE);t(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()&&(this._isShown=!1,this._setEscapeEvent(),this._setResizeEvent(),t(document).off(f.FOCUSIN),t(this._element).removeClass(d.IN),t(this._element).off(f.CLICK_DISMISS),t(this._dialog).off(f.MOUSEDOWN_DISMISS),o.supportsTransitionEnd()&&t(this._element).hasClass(d.FADE)?t(this._element).one(o.TRANSITION_END,t.proxy(this._hideModal,this)).emulateTransitionEnd(300):this._hideModal())},l.prototype.dispose=function(){t.removeData(this._element,a),t(window).off(s),t(document).off(s),t(this._element).off(s),t(this._backdrop).off(s),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._originalBodyPadding=null,this._scrollbarWidth=null},l.prototype._getConfig=function(n){return n=t.extend({},u,n),o.typeCheckConfig(e,n,c),n},l.prototype._showElement=function(e){var n=this,i=o.supportsTransitionEnd()&&t(this._element).hasClass(d.FADE);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.scrollTop=0,i&&o.reflow(this._element),t(this._element).addClass(d.IN),this._config.focus&&this._enforceFocus();var r=t.Event(f.SHOWN,{relatedTarget:e}),a=function(){n._config.focus&&n._element.focus(),t(n._element).trigger(r)};i?t(this._dialog).one(o.TRANSITION_END,a).emulateTransitionEnd(300):a()},l.prototype._enforceFocus=function(){var e=this;t(document).off(f.FOCUSIN).on(f.FOCUSIN,function(n){document===n.target||e._element===n.target||t(e._element).has(n.target).length||e._element.focus()})},l.prototype._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?t(this._element).on(f.KEYDOWN_DISMISS,function(t){27===t.which&&e.hide()}):this._isShown||t(this._element).off(f.KEYDOWN_DISMISS)},l.prototype._setResizeEvent=function(){this._isShown?t(window).on(f.RESIZE,t.proxy(this._handleUpdate,this)):t(window).off(f.RESIZE)},l.prototype._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden","true"),this._showBackdrop(function(){t(document.body).removeClass(d.OPEN),e._resetAdjustments(),e._resetScrollbar(),t(e._element).trigger(f.HIDDEN)})},l.prototype._removeBackdrop=function(){this._backdrop&&(t(this._backdrop).remove(),this._backdrop=null)},l.prototype._showBackdrop=function(e){var n=this,i=t(this._element).hasClass(d.FADE)?d.FADE:"";if(this._isShown&&this._config.backdrop){var r=o.supportsTransitionEnd()&&i;if(this._backdrop=document.createElement("div"),this._backdrop.className=d.BACKDROP,i&&t(this._backdrop).addClass(i),t(this._backdrop).appendTo(document.body),t(this._element).on(f.CLICK_DISMISS,function(t){return n._ignoreBackdropClick?void(n._ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"===n._config.backdrop?n._element.focus():n.hide()))}),r&&o.reflow(this._backdrop),t(this._backdrop).addClass(d.IN),!e)return;if(!r)return void e();t(this._backdrop).one(o.TRANSITION_END,e).emulateTransitionEnd(150)}else if(!this._isShown&&this._backdrop){t(this._backdrop).removeClass(d.IN);var a=function(){n._removeBackdrop(),e&&e()};o.supportsTransitionEnd()&&t(this._element).hasClass(d.FADE)?t(this._backdrop).one(o.TRANSITION_END,a).emulateTransitionEnd(150):a()}else e&&e()},l.prototype._handleUpdate=function(){this._adjustDialog()},l.prototype._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},l.prototype._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},l.prototype._checkScrollbar=function(){this._isBodyOverflowing=document.body.clientWidth<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},l.prototype._setScrollbar=function(){var e=parseInt(t(p.FIXED_CONTENT).css("padding-right")||0,10);this._originalBodyPadding=document.body.style.paddingRight||"",this._isBodyOverflowing&&(document.body.style.paddingRight=e+this._scrollbarWidth+"px")},l.prototype._resetScrollbar=function(){document.body.style.paddingRight=this._originalBodyPadding},l.prototype._getScrollbarWidth=function(){var t=document.createElement("div");t.className=d.SCROLLBAR_MEASURER,document.body.appendChild(t);var e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),e},l._jQueryInterface=function(e,n){return this.each(function(){var r=t(this).data(a),o=t.extend({},l.Default,t(this).data(),"object"===(void 0===e?"undefined":i(e))&&e);if(r||(r=new l(this,o),t(this).data(a,r)),"string"==typeof e){if(void 0===r[e])throw new Error('No method named "'+e+'"');r[e](n)}else o.show&&r.show(n)})},r(l,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}},{key:"Default",get:function(){return u}}]),l}();t(document).on(f.CLICK_DATA_API,p.DATA_TOGGLE,function(e){var n=this,i=void 0,r=o.getSelectorFromElement(this);r&&(i=t(r)[0]);var s=t(i).data(a)?"toggle":t.extend({},t(i).data(),t(this).data());"A"===this.tagName&&e.preventDefault();var l=t(i).one(f.SHOW,function(e){e.isDefaultPrevented()||l.one(f.HIDDEN,function(){t(n).is(":visible")&&n.focus()})});h._jQueryInterface.call(t(i),s,this)}),t.fn[e]=h._jQueryInterface,t.fn[e].Constructor=h,t.fn[e].noConflict=function(){return t.fn[e]=l,h._jQueryInterface}}(jQuery),function(t){var e="scrollspy",a="bs.scrollspy",s="."+a,l=t.fn[e],u={offset:10,method:"auto",target:""},c={offset:"number",method:"string",target:"(string|element)"},f={ACTIVATE:"activate"+s,SCROLL:"scroll"+s,LOAD_DATA_API:"load"+s+".data-api"},d={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",NAV_LINK:"nav-link",NAV:"nav",ACTIVE:"active"},p={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",LIST_ITEM:".list-item",LI:"li",LI_DROPDOWN:"li.dropdown",NAV_LINKS:".nav-link",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},h={OFFSET:"offset",POSITION:"position"},m=function(){function l(e,i){n(this,l),this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(i),this._selector=this._config.target+" "+p.NAV_LINKS+","+this._config.target+" "+p.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on(f.SCROLL,t.proxy(this._process,this)),this.refresh(),this._process()}return l.prototype.refresh=function(){var e=this,n=this._scrollElement!==this._scrollElement.window?h.POSITION:h.OFFSET,i="auto"===this._config.method?n:this._config.method,r=i===h.POSITION?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),t.makeArray(t(this._selector)).map(function(e){var n=void 0,a=o.getSelectorFromElement(e);return a&&(n=t(a)[0]),n&&(n.offsetWidth||n.offsetHeight)?[t(n)[i]().top+r,a]:null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},l.prototype.dispose=function(){t.removeData(this._element,a),t(this._scrollElement).off(s),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},l.prototype._getConfig=function(n){if(n=t.extend({},u,n),"string"!=typeof n.target){var i=t(n.target).attr("id");i||(i=o.getUID(e),t(n.target).attr("id",i)),n.target="#"+i}return o.typeCheckConfig(e,n,c),n},l.prototype._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.scrollY:this._scrollElement.scrollTop},l.prototype._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},l.prototype._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._scrollElement.offsetHeight;if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}if(this._activeTarget&&t<this._offsets[0])return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;){this._activeTarget!==this._targets[r]&&t>=this._offsets[r]&&(void 0===this._offsets[r+1]||t<this._offsets[r+1])&&this._activate(this._targets[r])}},l.prototype._activate=function(e){this._activeTarget=e,this._clear();var n=this._selector.split(",");n=n.map(function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'});var i=t(n.join(","));i.hasClass(d.DROPDOWN_ITEM)?(i.closest(p.DROPDOWN).find(p.DROPDOWN_TOGGLE).addClass(d.ACTIVE),i.addClass(d.ACTIVE)):i.parents(p.LI).find(p.NAV_LINKS).addClass(d.ACTIVE),t(this._scrollElement).trigger(f.ACTIVATE,{relatedTarget:e})},l.prototype._clear=function(){t(this._selector).filter(p.ACTIVE).removeClass(d.ACTIVE)},l._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(a),r="object"===(void 0===e?"undefined":i(e))&&e||null;if(n||(n=new l(this,r),t(this).data(a,n)),"string"==typeof e){if(void 0===n[e])throw new Error('No method named "'+e+'"');n[e]()}})},r(l,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}},{key:"Default",get:function(){return u}}]),l}();t(window).on(f.LOAD_DATA_API,function(){for(var e=t.makeArray(t(p.DATA_SPY)),n=e.length;n--;){var i=t(e[n]);m._jQueryInterface.call(i,i.data())}}),t.fn[e]=m._jQueryInterface,t.fn[e].Constructor=m,t.fn[e].noConflict=function(){return t.fn[e]=l,m._jQueryInterface}}(jQuery),function(t){var e="tab",i="bs.tab",a="."+i,s=t.fn[e],l={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,CLICK_DATA_API:"click"+a+".data-api"},u={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",FADE:"fade",IN:"in"},c={A:"a",LI:"li",DROPDOWN:".dropdown",UL:"ul:not(.dropdown-menu)",FADE_CHILD:"> .nav-item .fade, > .fade",ACTIVE:".active",ACTIVE_CHILD:"> .nav-item > .active, > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},f=function(){function e(t){n(this,e),this._element=t}return e.prototype.show=function(){var e=this;if(!this._element.parentNode||this._element.parentNode.nodeType!==Node.ELEMENT_NODE||!t(this._element).hasClass(u.ACTIVE)){var n=void 0,i=void 0,r=t(this._element).closest(c.UL)[0],a=o.getSelectorFromElement(this._element);r&&(i=t.makeArray(t(r).find(c.ACTIVE)),i=i[i.length-1]);var s=t.Event(l.HIDE,{relatedTarget:this._element}),f=t.Event(l.SHOW,{relatedTarget:i});if(i&&t(i).trigger(s),t(this._element).trigger(f),!f.isDefaultPrevented()&&!s.isDefaultPrevented()){a&&(n=t(a)[0]),this._activate(this._element,r);var d=function(){var n=t.Event(l.HIDDEN,{relatedTarget:e._element}),r=t.Event(l.SHOWN,{relatedTarget:i});t(i).trigger(n),t(e._element).trigger(r)};n?this._activate(n,n.parentNode,d):d()}}},e.prototype.dispose=function(){t.removeClass(this._element,i),this._element=null},e.prototype._activate=function(e,n,i){var r=t(n).find(c.ACTIVE_CHILD)[0],a=i&&o.supportsTransitionEnd()&&(r&&t(r).hasClass(u.FADE)||Boolean(t(n).find(c.FADE_CHILD)[0])),s=t.proxy(this._transitionComplete,this,e,r,a,i);r&&a?t(r).one(o.TRANSITION_END,s).emulateTransitionEnd(150):s(),r&&t(r).removeClass(u.IN)},e.prototype._transitionComplete=function(e,n,i,r){if(n){t(n).removeClass(u.ACTIVE);var a=t(n).find(c.DROPDOWN_ACTIVE_CHILD)[0];a&&t(a).removeClass(u.ACTIVE),n.setAttribute("aria-expanded",!1)}if(t(e).addClass(u.ACTIVE),e.setAttribute("aria-expanded",!0),i?(o.reflow(e),t(e).addClass(u.IN)):t(e).removeClass(u.FADE),e.parentNode&&t(e.parentNode).hasClass(u.DROPDOWN_MENU)){var s=t(e).closest(c.DROPDOWN)[0];s&&t(s).find(c.DROPDOWN_TOGGLE).addClass(u.ACTIVE),e.setAttribute("aria-expanded",!0)}r&&r()},e._jQueryInterface=function(n){return this.each(function(){var r=t(this),o=r.data(i);if(o||(o=o=new e(this),r.data(i,o)),"string"==typeof n){if(void 0===o[n])throw new Error('No method named "'+n+'"');o[n]()}})},r(e,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}}]),e}();t(document).on(l.CLICK_DATA_API,c.DATA_TOGGLE,function(e){e.preventDefault(),f._jQueryInterface.call(t(this),"show")}),t.fn[e]=f._jQueryInterface,t.fn[e].Constructor=f,t.fn[e].noConflict=function(){return t.fn[e]=s,f._jQueryInterface}}(jQuery),function(t){if(void 0===window.Tether)throw new Error("Bootstrap tooltips require Tether (http://tether.io/)");var e="tooltip",a="bs.tooltip",s="."+a,l=t.fn[e],u={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:"0 0",constraints:[]},c={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"string",constraints:"array"},f={TOP:"bottom center",RIGHT:"middle left",BOTTOM:"top center",LEFT:"middle right"},d={IN:"in",OUT:"out"},p={HIDE:"hide"+s,HIDDEN:"hidden"+s,SHOW:"show"+s,SHOWN:"shown"+s,INSERTED:"inserted"+s,CLICK:"click"+s,FOCUSIN:"focusin"+s,FOCUSOUT:"focusout"+s,MOUSEENTER:"mouseenter"+s,MOUSELEAVE:"mouseleave"+s},h={FADE:"fade",IN:"in"},m={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner"},g={element:!1,enabled:!1},v={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},y=function(){function l(t,e){n(this,l),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._tether=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}return l.prototype.enable=function(){this._isEnabled=!0},l.prototype.disable=function(){this._isEnabled=!1},l.prototype.toggleEnabled=function(){this._isEnabled=!this._isEnabled},l.prototype.toggle=function(e){if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(h.IN))return void this._leave(null,this);this._enter(null,this)}},l.prototype.dispose=function(){clearTimeout(this._timeout),this.cleanupTether(),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._tether=null,this.element=null,this.config=null,this.tip=null},l.prototype.show=function(){var e=this,n=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(n);var i=t.contains(this.element.ownerDocument.documentElement,this.element);if(n.isDefaultPrevented()||!i)return;var r=this.getTipElement(),a=o.getUID(this.constructor.NAME);r.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&t(r).addClass(h.FADE);var s="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,u=this._getAttachment(s);t(r).data(this.constructor.DATA_KEY,this).appendTo(document.body),t(this.element).trigger(this.constructor.Event.INSERTED),this._tether=new Tether({attachment:u,element:r,target:this.element,classes:g,classPrefix:"bs-tether",offset:this.config.offset,constraints:this.config.constraints,addTargetClasses:!1}),o.reflow(r),this._tether.position(),t(r).addClass(h.IN);var c=function(){var n=e._hoverState;e._hoverState=null,t(e.element).trigger(e.constructor.Event.SHOWN),n===d.OUT&&e._leave(null,e)};if(o.supportsTransitionEnd()&&t(this.tip).hasClass(h.FADE))return void t(this.tip).one(o.TRANSITION_END,c).emulateTransitionEnd(l._TRANSITION_DURATION);c()}},l.prototype.hide=function(e){var n=this,i=this.getTipElement(),r=t.Event(this.constructor.Event.HIDE),a=function(){n._hoverState!==d.IN&&i.parentNode&&i.parentNode.removeChild(i),n.element.removeAttribute("aria-describedby"),t(n.element).trigger(n.constructor.Event.HIDDEN),n.cleanupTether(),e&&e()};t(this.element).trigger(r),r.isDefaultPrevented()||(t(i).removeClass(h.IN),o.supportsTransitionEnd()&&t(this.tip).hasClass(h.FADE)?t(i).one(o.TRANSITION_END,a).emulateTransitionEnd(150):a(),this._hoverState="")},l.prototype.isWithContent=function(){return Boolean(this.getTitle())},l.prototype.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0]},l.prototype.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(m.TOOLTIP_INNER),this.getTitle()),e.removeClass(h.FADE).removeClass(h.IN),this.cleanupTether()},l.prototype.setElementContent=function(e,n){var r=this.config.html;"object"===(void 0===n?"undefined":i(n))&&(n.nodeType||n.jquery)?r?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text()):e[r?"html":"text"](n)},l.prototype.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},l.prototype.cleanupTether=function(){this._tether&&this._tether.destroy()},l.prototype._getAttachment=function(t){return f[t.toUpperCase()]},l.prototype._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach(function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,t.proxy(e.toggle,e));else if(n!==v.MANUAL){var i=n===v.HOVER?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,r=n===v.HOVER?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,t.proxy(e._enter,e)).on(r,e.config.selector,t.proxy(e._leave,e))}}),this.config.selector?this.config=t.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},l.prototype._fixTitle=function(){var t=i(this.element.getAttribute("data-original-title"));(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},l.prototype._enter=function(e,n){var i=this.constructor.DATA_KEY;return n=n||t(e.currentTarget).data(i),n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?v.FOCUS:v.HOVER]=!0),t(n.getTipElement()).hasClass(h.IN)||n._hoverState===d.IN?void(n._hoverState=d.IN):(clearTimeout(n._timeout),n._hoverState=d.IN,n.config.delay&&n.config.delay.show?void(n._timeout=setTimeout(function(){n._hoverState===d.IN&&n.show()},n.config.delay.show)):void n.show())},l.prototype._leave=function(e,n){var i=this.constructor.DATA_KEY;if(n=n||t(e.currentTarget).data(i),n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?v.FOCUS:v.HOVER]=!1),!n._isWithActiveTrigger())return clearTimeout(n._timeout),n._hoverState=d.OUT,n.config.delay&&n.config.delay.hide?void(n._timeout=setTimeout(function(){n._hoverState===d.OUT&&n.hide()},n.config.delay.hide)):void n.hide()},l.prototype._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},l.prototype._getConfig=function(n){return n=t.extend({},this.constructor.Default,t(this.element).data(),n),n.delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),o.typeCheckConfig(e,n,this.constructor.DefaultType),n},l.prototype._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},l._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(a),r="object"===(void 0===e?"undefined":i(e))?e:null;if((n||!/dispose|hide/.test(e))&&(n||(n=new l(this,r),t(this).data(a,n)),"string"==typeof e)){if(void 0===n[e])throw new Error('No method named "'+e+'"');n[e]()}})},r(l,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}},{key:"Default",get:function(){return u}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return a}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return s}},{key:"DefaultType",get:function(){return c}}]),l}();return t.fn[e]=y._jQueryInterface,t.fn[e].Constructor=y,t.fn[e].noConflict=function(){return t.fn[e]=l,y._jQueryInterface},y}(jQuery));!function(o){var s="popover",l="bs.popover",u="."+l,c=o.fn[s],f=o.extend({},a.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),d=o.extend({},a.DefaultType,{content:"(string|element|function)"}),p={FADE:"fade",IN:"in"},h={TITLE:".popover-title",CONTENT:".popover-content"},m={HIDE:"hide"+u,HIDDEN:"hidden"+u,SHOW:"show"+u,SHOWN:"shown"+u,INSERTED:"inserted"+u,CLICK:"click"+u,FOCUSIN:"focusin"+u,FOCUSOUT:"focusout"+u,MOUSEENTER:"mouseenter"+u,MOUSELEAVE:"mouseleave"+u},g=function(a){function c(){return n(this,c),t(this,a.apply(this,arguments))}return e(c,a),c.prototype.isWithContent=function(){return this.getTitle()||this._getContent()},c.prototype.getTipElement=function(){return this.tip=this.tip||o(this.config.template)[0]},c.prototype.setContent=function(){var t=o(this.getTipElement());this.setElementContent(t.find(h.TITLE),this.getTitle()),this.setElementContent(t.find(h.CONTENT),this._getContent()),t.removeClass(p.FADE).removeClass(p.IN),this.cleanupTether()},c.prototype._getContent=function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)},c._jQueryInterface=function(t){return this.each(function(){var e=o(this).data(l),n="object"===(void 0===t?"undefined":i(t))?t:null;if((e||!/destroy|hide/.test(t))&&(e||(e=new c(this,n),o(this).data(l,e)),"string"==typeof t)){if(void 0===e[t])throw new Error('No method named "'+t+'"');e[t]()}})},r(c,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.5"}},{key:"Default",get:function(){return f}},{key:"NAME",get:function(){return s}},{key:"DATA_KEY",get:function(){return l}},{key:"Event",get:function(){return m}},{key:"EVENT_KEY",get:function(){return u}},{key:"DefaultType",get:function(){return d}}]),c}(a);o.fn[s]=g._jQueryInterface,o.fn[s].Constructor=g,o.fn[s].noConflict=function(){return o.fn[s]=c,g._jQueryInterface}}(jQuery)}()},function(t,e,n){"use strict";function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"==typeof t}function o(t){return"number"==typeof t}function a(t){return"object"==typeof t&&null!==t}function s(t){return void 0===t}t.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(t){if(!o(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},i.prototype.emit=function(t){var e,n,i,o,l,u;if(this._events||(this._events={}),"error"===t&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(n=this._events[t],s(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),n.apply(this,o)}else if(a(n))for(o=Array.prototype.slice.call(arguments,1),u=n.slice(),i=u.length,l=0;l<i;l++)u[l].apply(this,o);return!0},i.prototype.addListener=function(t,e){var n;if(!r(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,r(e.listener)?e.listener:e),this._events[t]?a(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,a(this._events[t])&&!this._events[t].warned&&(n=s(this._maxListeners)?i.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[t].length>n&&(this._events[t].warned=!0,console.trace),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(t,e){function n(){this.removeListener(t,n),i||(i=!0,e.apply(this,arguments))}if(!r(e))throw TypeError("listener must be a function");var i=!1;return n.listener=e,this.on(t,n),this},i.prototype.removeListener=function(t,e){var n,i,o,s;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],o=n.length,i=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(a(n)){for(s=o;s-->0;)if(n[s]===e||n[s].listener&&n[s].listener===e){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},i.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],r(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},i.prototype.listeners=function(t){return this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},i.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},i.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){"use strict";var i,i;!function(e){t.exports=e()}(function(){return function t(e,n,r){function o(s,l){if(!n[s]){if(!e[s]){var u="function"==typeof i&&i;if(!l&&u)return i(s,!0);if(a)return a(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var f=n[s]={exports:{}};e[s][0].call(f.exports,function(t){var n=e[s][1][t];return o(n||t)},f,f.exports,t,e,n,r)}return n[s].exports}for(var a="function"==typeof i&&i,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(t,e,n){e.exports=function(t){var e,n,i,r=-1;if(t.lines.length>1&&"flex-start"===t.style.alignContent)for(e=0;i=t.lines[++r];)i.crossStart=e,e+=i.cross;else if(t.lines.length>1&&"flex-end"===t.style.alignContent)for(e=t.flexStyle.crossSpace;i=t.lines[++r];)i.crossStart=e,e+=i.cross;else if(t.lines.length>1&&"center"===t.style.alignContent)for(e=t.flexStyle.crossSpace/2;i=t.lines[++r];)i.crossStart=e,e+=i.cross;else if(t.lines.length>1&&"space-between"===t.style.alignContent)for(n=t.flexStyle.crossSpace/(t.lines.length-1),e=0;i=t.lines[++r];)i.crossStart=e,e+=i.cross+n;else if(t.lines.length>1&&"space-around"===t.style.alignContent)for(n=2*t.flexStyle.crossSpace/(2*t.lines.length),e=n/2;i=t.lines[++r];)i.crossStart=e,e+=i.cross+n;else for(n=t.flexStyle.crossSpace/t.lines.length,e=t.flexStyle.crossInnerBefore;i=t.lines[++r];)i.crossStart=e,i.cross+=n,e+=i.cross}},{}],2:[function(t,e,n){e.exports=function(t){for(var e,n=-1;line=t.lines[++n];)for(e=-1;child=line.children[++e];){var i=child.style.alignSelf;"auto"===i&&(i=t.style.alignItems),"flex-start"===i?child.flexStyle.crossStart=line.crossStart:"flex-end"===i?child.flexStyle.crossStart=line.crossStart+line.cross-child.flexStyle.crossOuter:"center"===i?child.flexStyle.crossStart=line.crossStart+(line.cross-child.flexStyle.crossOuter)/2:(child.flexStyle.crossStart=line.crossStart,child.flexStyle.crossOuter=line.cross,child.flexStyle.cross=child.flexStyle.crossOuter-child.flexStyle.crossBefore-child.flexStyle.crossAfter)}}},{}],3:[function(t,e,n){e.exports=function(t,e){var n="row"===e||"row-reverse"===e,i=t.mainAxis;if(i){n&&"inline"===i||!n&&"block"===i||(t.flexStyle={main:t.flexStyle.cross,cross:t.flexStyle.main,mainOffset:t.flexStyle.crossOffset,crossOffset:t.flexStyle.mainOffset,mainBefore:t.flexStyle.crossBefore,mainAfter:t.flexStyle.crossAfter,crossBefore:t.flexStyle.mainBefore,crossAfter:t.flexStyle.mainAfter,mainInnerBefore:t.flexStyle.crossInnerBefore,mainInnerAfter:t.flexStyle.crossInnerAfter,crossInnerBefore:t.flexStyle.mainInnerBefore,crossInnerAfter:t.flexStyle.mainInnerAfter,mainBorderBefore:t.flexStyle.crossBorderBefore,mainBorderAfter:t.flexStyle.crossBorderAfter,crossBorderBefore:t.flexStyle.mainBorderBefore,crossBorderAfter:t.flexStyle.mainBorderAfter})}else t.flexStyle=n?{main:t.style.width,cross:t.style.height,mainOffset:t.style.offsetWidth,crossOffset:t.style.offsetHeight,mainBefore:t.style.marginLeft,mainAfter:t.style.marginRight,crossBefore:t.style.marginTop,crossAfter:t.style.marginBottom,mainInnerBefore:t.style.paddingLeft,mainInnerAfter:t.style.paddingRight,crossInnerBefore:t.style.paddingTop,crossInnerAfter:t.style.paddingBottom,mainBorderBefore:t.style.borderLeftWidth,mainBorderAfter:t.style.borderRightWidth,crossBorderBefore:t.style.borderTopWidth,crossBorderAfter:t.style.borderBottomWidth}:{main:t.style.height,cross:t.style.width,mainOffset:t.style.offsetHeight,crossOffset:t.style.offsetWidth,mainBefore:t.style.marginTop,mainAfter:t.style.marginBottom,crossBefore:t.style.marginLeft,crossAfter:t.style.marginRight,mainInnerBefore:t.style.paddingTop,mainInnerAfter:t.style.paddingBottom,crossInnerBefore:t.style.paddingLeft,crossInnerAfter:t.style.paddingRight,mainBorderBefore:t.style.borderTopWidth,mainBorderAfter:t.style.borderBottomWidth,crossBorderBefore:t.style.borderLeftWidth,crossBorderAfter:t.style.borderRightWidth},"content-box"===t.style.boxSizing&&("number"==typeof t.flexStyle.main&&(t.flexStyle.main+=t.flexStyle.mainInnerBefore+t.flexStyle.mainInnerAfter+t.flexStyle.mainBorderBefore+t.flexStyle.mainBorderAfter),"number"==typeof t.flexStyle.cross&&(t.flexStyle.cross+=t.flexStyle.crossInnerBefore+t.flexStyle.crossInnerAfter+t.flexStyle.crossBorderBefore+t.flexStyle.crossBorderAfter));t.mainAxis=n?"inline":"block",t.crossAxis=n?"block":"inline","number"==typeof t.style.flexBasis&&(t.flexStyle.main=t.style.flexBasis+t.flexStyle.mainInnerBefore+t.flexStyle.mainInnerAfter+t.flexStyle.mainBorderBefore+t.flexStyle.mainBorderAfter),t.flexStyle.mainOuter=t.flexStyle.main,t.flexStyle.crossOuter=t.flexStyle.cross,"auto"===t.flexStyle.mainOuter&&(t.flexStyle.mainOuter=t.flexStyle.mainOffset),"auto"===t.flexStyle.crossOuter&&(t.flexStyle.crossOuter=t.flexStyle.crossOffset),"number"==typeof t.flexStyle.mainBefore&&(t.flexStyle.mainOuter+=t.flexStyle.mainBefore),"number"==typeof t.flexStyle.mainAfter&&(t.flexStyle.mainOuter+=t.flexStyle.mainAfter),"number"==typeof t.flexStyle.crossBefore&&(t.flexStyle.crossOuter+=t.flexStyle.crossBefore),"number"==typeof t.flexStyle.crossAfter&&(t.flexStyle.crossOuter+=t.flexStyle.crossAfter)}},{}],4:[function(t,e,n){var i=t("../reduce");e.exports=function(t){if(t.mainSpace>0){var e=i(t.children,function(t,e){return t+parseFloat(e.style.flexGrow)},0);e>0&&(t.main=i(t.children,function(n,i){return"auto"===i.flexStyle.main?i.flexStyle.main=i.flexStyle.mainOffset+parseFloat(i.style.flexGrow)/e*t.mainSpace:i.flexStyle.main+=parseFloat(i.style.flexGrow)/e*t.mainSpace,i.flexStyle.mainOuter=i.flexStyle.main+i.flexStyle.mainBefore+i.flexStyle.mainAfter,n+i.flexStyle.mainOuter},0),t.mainSpace=0)}}},{"../reduce":12}],5:[function(t,e,n){var i=t("../reduce");e.exports=function(t){if(t.mainSpace<0){var e=i(t.children,function(t,e){return t+parseFloat(e.style.flexShrink)},0);e>0&&(t.main=i(t.children,function(n,i){return i.flexStyle.main+=parseFloat(i.style.flexShrink)/e*t.mainSpace,i.flexStyle.mainOuter=i.flexStyle.main+i.flexStyle.mainBefore+i.flexStyle.mainAfter,n+i.flexStyle.mainOuter},0),t.mainSpace=0)}}},{"../reduce":12}],6:[function(t,e,n){var i=t("../reduce");e.exports=function(t){var e;t.lines=[e={main:0,cross:0,children:[]}];for(var n,r=-1;n=t.children[++r];)"nowrap"===t.style.flexWrap||0===e.children.length||"auto"===t.flexStyle.main||t.flexStyle.main-t.flexStyle.mainInnerBefore-t.flexStyle.mainInnerAfter-t.flexStyle.mainBorderBefore-t.flexStyle.mainBorderAfter>=e.main+n.flexStyle.mainOuter?(e.main+=n.flexStyle.mainOuter,e.cross=Math.max(e.cross,n.flexStyle.crossOuter)):t.lines.push(e={main:n.flexStyle.mainOuter,cross:n.flexStyle.crossOuter,children:[]}),e.children.push(n);t.flexStyle.mainLines=i(t.lines,function(t,e){return Math.max(t,e.main)},0),t.flexStyle.crossLines=i(t.lines,function(t,e){return t+e.cross},0),"auto"===t.flexStyle.main&&(t.flexStyle.main=Math.max(t.flexStyle.mainOffset,t.flexStyle.mainLines+t.flexStyle.mainInnerBefore+t.flexStyle.mainInnerAfter+t.flexStyle.mainBorderBefore+t.flexStyle.mainBorderAfter)),"auto"===t.flexStyle.cross&&(t.flexStyle.cross=Math.max(t.flexStyle.crossOffset,t.flexStyle.crossLines+t.flexStyle.crossInnerBefore+t.flexStyle.crossInnerAfter+t.flexStyle.crossBorderBefore+t.flexStyle.crossBorderAfter)),t.flexStyle.crossSpace=t.flexStyle.cross-t.flexStyle.crossInnerBefore-t.flexStyle.crossInnerAfter-t.flexStyle.crossBorderBefore-t.flexStyle.crossBorderAfter-t.flexStyle.crossLines,t.flexStyle.mainOuter=t.flexStyle.main+t.flexStyle.mainBefore+t.flexStyle.mainAfter,t.flexStyle.crossOuter=t.flexStyle.cross+t.flexStyle.crossBefore+t.flexStyle.crossAfter}},{"../reduce":12}],7:[function(t,e,n){function i(e){for(var n,i=-1;n=e.children[++i];)t("./flex-direction")(n,e.style.flexDirection);t("./flex-direction")(e,e.style.flexDirection),t("./order")(e),t("./flexbox-lines")(e),t("./align-content")(e),i=-1;for(var r;r=e.lines[++i];)r.mainSpace=e.flexStyle.main-e.flexStyle.mainInnerBefore-e.flexStyle.mainInnerAfter-e.flexStyle.mainBorderBefore-e.flexStyle.mainBorderAfter-r.main,t("./flex-grow")(r),t("./flex-shrink")(r),t("./margin-main")(r),t("./margin-cross")(r),t("./justify-content")(r,e.style.justifyContent,e);t("./align-items")(e)}e.exports=i},{"./align-content":1,"./align-items":2,"./flex-direction":3,"./flex-grow":4,"./flex-shrink":5,"./flexbox-lines":6,"./justify-content":8,"./margin-cross":9,"./margin-main":10,"./order":11}],8:[function(t,e,n){e.exports=function(t,e,n){var i,r,o,a=n.flexStyle.mainInnerBefore,s=-1;if("flex-end"===e)for(i=t.mainSpace,i+=a;o=t.children[++s];)o.flexStyle.mainStart=i,i+=o.flexStyle.mainOuter;else if("center"===e)for(i=t.mainSpace/2,i+=a;o=t.children[++s];)o.flexStyle.mainStart=i,i+=o.flexStyle.mainOuter;else if("space-between"===e)for(r=t.mainSpace/(t.children.length-1),i=0,i+=a;o=t.children[++s];)o.flexStyle.mainStart=i,i+=o.flexStyle.mainOuter+r;else if("space-around"===e)for(r=2*t.mainSpace/(2*t.children.length),i=r/2,i+=a;o=t.children[++s];)o.flexStyle.mainStart=i,i+=o.flexStyle.mainOuter+r;else for(i=0,i+=a;o=t.children[++s];)o.flexStyle.mainStart=i,i+=o.flexStyle.mainOuter}},{}],9:[function(t,e,n){e.exports=function(t){for(var e,n=-1;e=t.children[++n];){var i=0;"auto"===e.flexStyle.crossBefore&&++i,"auto"===e.flexStyle.crossAfter&&++i;var r=t.cross-e.flexStyle.crossOuter;"auto"===e.flexStyle.crossBefore&&(e.flexStyle.crossBefore=r/i),"auto"===e.flexStyle.crossAfter&&(e.flexStyle.crossAfter=r/i),"auto"===e.flexStyle.cross?e.flexStyle.crossOuter=e.flexStyle.crossOffset+e.flexStyle.crossBefore+e.flexStyle.crossAfter:e.flexStyle.crossOuter=e.flexStyle.cross+e.flexStyle.crossBefore+e.flexStyle.crossAfter}}},{}],10:[function(t,e,n){e.exports=function(t){for(var e,n=0,i=-1;e=t.children[++i];)"auto"===e.flexStyle.mainBefore&&++n,"auto"===e.flexStyle.mainAfter&&++n;if(n>0){for(i=-1;e=t.children[++i];)"auto"===e.flexStyle.mainBefore&&(e.flexStyle.mainBefore=t.mainSpace/n),"auto"===e.flexStyle.mainAfter&&(e.flexStyle.mainAfter=t.mainSpace/n),"auto"===e.flexStyle.main?e.flexStyle.mainOuter=e.flexStyle.mainOffset+e.flexStyle.mainBefore+e.flexStyle.mainAfter:e.flexStyle.mainOuter=e.flexStyle.main+e.flexStyle.mainBefore+e.flexStyle.mainAfter;t.mainSpace=0}}},{}],11:[function(t,e,n){var i=/^(column|row)-reverse$/;e.exports=function(t){t.children.sort(function(t,e){return t.style.order-e.style.order||t.index-e.index}),i.test(t.style.flexDirection)&&t.children.reverse()}},{}],12:[function(t,e,n){function i(t,e,n){for(var i=t.length,r=-1;++r<i;)r in t&&(n=e(n,t[r],r));return n}e.exports=i},{}],13:[function(t,e,n){function i(t){s(a(t))}var r=t("./read"),o=t("./write"),a=t("./readAll"),s=t("./writeAll");e.exports=i,e.exports.read=r,e.exports.write=o,e.exports.readAll=a,e.exports.writeAll=s},{"./read":15,"./readAll":16,"./write":17,"./writeAll":18}],14:[function(t,e,n){function i(t,e){var n=String(t).match(o);if(!n)return t;var i=n[1],a=n[2];return"px"===a?1*i:"cm"===a?.3937*i*96:"in"===a?96*i:"mm"===a?.3937*i*96/10:"pc"===a?12*i*96/72:"pt"===a?96*i/72:"rem"===a?16*i:r(t,e)}function r(t,e){a.style.cssText="border:none!important;clip:rect(0 0 0 0)!important;display:block!important;font-size:1em!important;height:0!important;margin:0!important;padding:0!important;position:relative!important;width:"+t+"!important",e.parentNode.insertBefore(a,e.nextSibling);var n=a.offsetWidth;return e.parentNode.removeChild(a),n}e.exports=i;var o=/^([-+]?\d*\.?\d+)(%|[a-z]+)$/,a=document.createElement("div")},{}],15:[function(t,e,n){function i(t){var e={alignContent:"stretch",alignItems:"stretch",alignSelf:"auto",borderBottomWidth:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,boxSizing:"content-box",display:"inline",flexBasis:"auto",flexDirection:"row",flexGrow:0,flexShrink:1,flexWrap:"nowrap",justifyContent:"flex-start",height:"auto",marginTop:0,marginRight:0,marginLeft:0,marginBottom:0,paddingTop:0,paddingRight:0,paddingLeft:0,paddingBottom:0,maxHeight:"none",maxWidth:"none",minHeight:0,minWidth:0,order:0,position:"static",width:"auto"};if(t instanceof Element){var n=t.hasAttribute("data-style"),i=n?t.getAttribute("data-style"):t.getAttribute("style")||"";n||t.setAttribute("data-style",i),a(e,window.getComputedStyle&&getComputedStyle(t)||{}),r(e,t.currentStyle||{}),o(e,i);for(var s in e)e[s]=l(e[s],t);var u=t.getBoundingClientRect();e.offsetHeight=u.height||t.offsetHeight,e.offsetWidth=u.width||t.offsetWidth}return{element:t,style:e}}function r(t,e){for(var n in t){if(n in e)t[n]=e[n];else{var i=n.replace(/[A-Z]/g,"-$&").toLowerCase();i in e&&(t[n]=e[i])}}"-js-display"in e&&(t.display=e["-js-display"])}function o(t,e){for(var n;n=s.exec(e);){t[n[1].toLowerCase().replace(/-[a-z]/g,function(t){return t.slice(1).toUpperCase()})]=n[2]}}function a(t,e){for(var n in t){n in e&&!/^(alignSelf|height|width)$/.test(n)&&(t[n]=e[n])}}e.exports=i;var s=/([^\s:;]+)\s*:\s*([^;]+?)\s*(;|$)/g,l=t("./getComputedLength")},{"./getComputedLength":14}],16:[function(t,e,n){function i(t){var e=[];return r(t,e),e}function r(t,e){for(var n,i=o(t),s=[],l=-1;n=t.childNodes[++l];){var u=3===n.nodeType&&!/^\s*$/.test(n.nodeValue);if(i&&u){var c=n;n=t.insertBefore(document.createElement("flex-item"),c),n.appendChild(c)}if(n instanceof Element){var f=r(n,e);if(i){var d=n.style;d.display="inline-block",d.position="absolute",f.style=a(n).style,s.push(f)}}}var p={element:t,children:s};return i&&(p.style=a(t).style,e.push(p)),p}function o(t){var e=t instanceof Element,n=e&&t.getAttribute("data-style"),i=e&&t.currentStyle&&t.currentStyle["-js-display"];return s.test(n)||l.test(i)}e.exports=i;var a=t("../read"),s=/(^|;)\s*display\s*:\s*(inline-)?flex\s*(;|$)/i,l=/^(inline-)?flex$/i},{"../read":15}],17:[function(t,e,n){function i(t){o(t);var e=t.element.style,n="inline"===t.mainAxis?["main","cross"]:["cross","main"];e.boxSizing="content-box",e.display="block",e.position="relative",e.width=r(t.flexStyle[n[0]]-t.flexStyle[n[0]+"InnerBefore"]-t.flexStyle[n[0]+"InnerAfter"]-t.flexStyle[n[0]+"BorderBefore"]-t.flexStyle[n[0]+"BorderAfter"]),e.height=r(t.flexStyle[n[1]]-t.flexStyle[n[1]+"InnerBefore"]-t.flexStyle[n[1]+"InnerAfter"]-t.flexStyle[n[1]+"BorderBefore"]-t.flexStyle[n[1]+"BorderAfter"]);for(var i,a=-1;i=t.children[++a];){var s=i.element.style,l="inline"===i.mainAxis?["main","cross"]:["cross","main"];s.boxSizing="content-box",s.display="block",s.position="absolute","auto"!==i.flexStyle[l[0]]&&(s.width=r(i.flexStyle[l[0]]-i.flexStyle[l[0]+"InnerBefore"]-i.flexStyle[l[0]+"InnerAfter"]-i.flexStyle[l[0]+"BorderBefore"]-i.flexStyle[l[0]+"BorderAfter"])),"auto"!==i.flexStyle[l[1]]&&(s.height=r(i.flexStyle[l[1]]-i.flexStyle[l[1]+"InnerBefore"]-i.flexStyle[l[1]+"InnerAfter"]-i.flexStyle[l[1]+"BorderBefore"]-i.flexStyle[l[1]+"BorderAfter"])),s.top=r(i.flexStyle[l[1]+"Start"]),s.left=r(i.flexStyle[l[0]+"Start"]),s.marginTop=r(i.flexStyle[l[1]+"Before"]),s.marginRight=r(i.flexStyle[l[0]+"After"]),s.marginBottom=r(i.flexStyle[l[1]+"After"]),s.marginLeft=r(i.flexStyle[l[0]+"Before"])}}function r(t){return"string"==typeof t?t:Math.max(t,0)+"px"}e.exports=i;var o=t("../flexbox")},{"../flexbox":7}],18:[function(t,e,n){function i(t){for(var e,n=-1;e=t[++n];)r(e)}e.exports=i;var r=t("../write")},{"../write":17}]},{},[13])(13)})},function(t,e,n){"use strict";var i,r,o;!function(a){n(6)&&n(6).jQuery?(r=[n(0)],i=a,void 0!==(o="function"==typeof i?i.apply(e,r):i)&&(t.exports=o)):a(void 0!==t&&t.exports?n(0):jQuery)}(function(t){function e(e){return!e||void 0!==e.allowPageScroll||void 0===e.swipe&&void 0===e.swipeStatus||(e.allowPageScroll=u),void 0!==e.click&&void 0===e.tap&&(e.tap=e.click),e||(e={}),e=t.extend({},t.fn.swipe.defaults,e),this.each(function(){var i=t(this),r=i.data(A);r||(r=new n(this,e),i.data(A,r))})}function n(e,n){function O(e){if(!(ut()||t(e.target).closest(n.excludedElements,zt).length>0)){var i=e.originalEvent?e.originalEvent:e;if(!i.pointerType||"mouse"!=i.pointerType||0!=n.fallbackToMouseEvents){var r,o=i.touches,a=o?o[0]:i;return $t=_,o?Qt=o.length:!1!==n.preventDefaultEvents&&e.preventDefault(),jt=0,Bt=null,Vt=null,Ut=null,Ft=0,Mt=0,Rt=0,Ht=1,Wt=0,qt=gt(),st(),ft(0,a),!o||Qt===n.fingers||n.fingers===y||U()?(Yt=Tt(),2==Qt&&(ft(1,o[1]),Mt=Rt=bt(Gt[0].start,Gt[1].start)),(n.swipeStatus||n.pinchStatus)&&(r=j(i,$t))):r=!1,!1===r?($t=S,j(i,$t),r):(n.hold&&(ee=setTimeout(t.proxy(function(){zt.trigger("hold",[i.target]),n.hold&&(r=n.hold.call(zt,i,i.target))},this),n.longTapThreshold)),ct(!0),null)}}}function I(t){var e=t.originalEvent?t.originalEvent:t;if($t!==x&&$t!==S&&!lt()){var i,r=e.touches,o=r?r[0]:e,a=dt(o);if(Kt=Tt(),r&&(Qt=r.length),n.hold&&clearTimeout(ee),$t=w,2==Qt&&(0==Mt?(ft(1,r[1]),Mt=Rt=bt(Gt[0].start,Gt[1].start)):(dt(r[1]),Rt=bt(Gt[0].end,Gt[1].end),Ut=wt(Gt[0].end,Gt[1].end)),Ht=_t(Mt,Rt),Wt=Math.abs(Mt-Rt)),Qt===n.fingers||n.fingers===y||!r||U()){if(Bt=Et(a.start,a.end),Vt=Et(a.last,a.end),H(t,Vt),jt=xt(a.start,a.end),Ft=yt(),ht(Bt,jt),i=j(e,$t),!n.triggerOnTouchEnd||n.triggerOnTouchLeave){var s=!0;if(n.triggerOnTouchLeave){var l=Ct(this);s=At(a.end,l)}!n.triggerOnTouchEnd&&s?$t=L(w):n.triggerOnTouchLeave&&!s&&($t=L(x)),$t!=S&&$t!=x||j(e,$t)}}else $t=S,j(e,$t);!1===i&&($t=S,j(e,$t))}}function k(t){var e=t.originalEvent?t.originalEvent:t,i=e.touches;if(i){if(i.length&&!lt())return at(e),!0;if(i.length&&lt())return!0}return lt()&&(Qt=Zt),Kt=Tt(),Ft=yt(),F()||!V()?($t=S,j(e,$t)):n.triggerOnTouchEnd||!1===n.triggerOnTouchEnd&&$t===w?(!1!==n.preventDefaultEvents&&!1!==t.cancelable&&t.preventDefault(),$t=x,j(e,$t)):!n.triggerOnTouchEnd&&K()?($t=x,B(e,$t,p)):$t===w&&($t=S,j(e,$t)),ct(!1),null}function D(){Qt=0,Kt=0,Yt=0,Mt=0,Rt=0,Ht=1,st(),ct(!1)}function P(t){var e=t.originalEvent?t.originalEvent:t;n.triggerOnTouchLeave&&($t=L(x),j(e,$t))}function N(){zt.off(kt,O),zt.off(Lt,D),zt.off(Dt,I),zt.off(Pt,k),Nt&&zt.off(Nt,P),ct(!1)}function L(t){var e=t,i=R(),r=V(),o=F();return!i||o?e=S:!r||t!=w||n.triggerOnTouchEnd&&!n.triggerOnTouchLeave?!r&&t==x&&n.triggerOnTouchLeave&&(e=S):e=x,e}function j(t,e){var n,i=t.touches;return(Q()||$())&&(n=B(t,e,f)),(q()||U())&&!1!==n&&(n=B(t,e,d)),rt()&&!1!==n?n=B(t,e,h):ot()&&!1!==n?n=B(t,e,m):it()&&!1!==n&&(n=B(t,e,p)),e===S&&D(t),e===x&&(i?i.length||D(t):D(t)),n}function B(e,u,c){var g;if(c==f){if(zt.trigger("swipeStatus",[u,Bt||null,jt||0,Ft||0,Qt,Gt,Vt]),n.swipeStatus&&!1===(g=n.swipeStatus.call(zt,e,u,Bt||null,jt||0,Ft||0,Qt,Gt,Vt)))return!1;if(u==x&&z()){if(clearTimeout(te),clearTimeout(ee),zt.trigger("swipe",[Bt,jt,Ft,Qt,Gt,Vt]),n.swipe&&!1===(g=n.swipe.call(zt,e,Bt,jt,Ft,Qt,Gt,Vt)))return!1;switch(Bt){case i:zt.trigger("swipeLeft",[Bt,jt,Ft,Qt,Gt,Vt]),n.swipeLeft&&(g=n.swipeLeft.call(zt,e,Bt,jt,Ft,Qt,Gt,Vt));break;case r:zt.trigger("swipeRight",[Bt,jt,Ft,Qt,Gt,Vt]),n.swipeRight&&(g=n.swipeRight.call(zt,e,Bt,jt,Ft,Qt,Gt,Vt));break;case o:zt.trigger("swipeUp",[Bt,jt,Ft,Qt,Gt,Vt]),n.swipeUp&&(g=n.swipeUp.call(zt,e,Bt,jt,Ft,Qt,Gt,Vt));break;case a:zt.trigger("swipeDown",[Bt,jt,Ft,Qt,Gt,Vt]),n.swipeDown&&(g=n.swipeDown.call(zt,e,Bt,jt,Ft,Qt,Gt,Vt))}}}if(c==d){if(zt.trigger("pinchStatus",[u,Ut||null,Wt||0,Ft||0,Qt,Ht,Gt]),n.pinchStatus&&!1===(g=n.pinchStatus.call(zt,e,u,Ut||null,Wt||0,Ft||0,Qt,Ht,Gt)))return!1;if(u==x&&W())switch(Ut){case s:zt.trigger("pinchIn",[Ut||null,Wt||0,Ft||0,Qt,Ht,Gt]),n.pinchIn&&(g=n.pinchIn.call(zt,e,Ut||null,Wt||0,Ft||0,Qt,Ht,Gt));break;case l:zt.trigger("pinchOut",[Ut||null,Wt||0,Ft||0,Qt,Ht,Gt]),n.pinchOut&&(g=n.pinchOut.call(zt,e,Ut||null,Wt||0,Ft||0,Qt,Ht,Gt))}}return c==p?u!==S&&u!==x||(clearTimeout(te),clearTimeout(ee),X()&&!tt()?(Jt=Tt(),te=setTimeout(t.proxy(function(){Jt=null,zt.trigger("tap",[e.target]),n.tap&&(g=n.tap.call(zt,e,e.target))},this),n.doubleTapThreshold)):(Jt=null,zt.trigger("tap",[e.target]),n.tap&&(g=n.tap.call(zt,e,e.target)))):c==h?u!==S&&u!==x||(clearTimeout(te),clearTimeout(ee),Jt=null,zt.trigger("doubletap",[e.target]),n.doubleTap&&(g=n.doubleTap.call(zt,e,e.target))):c==m&&(u!==S&&u!==x||(clearTimeout(te),Jt=null,zt.trigger("longtap",[e.target]),n.longTap&&(g=n.longTap.call(zt,e,e.target)))),g}function V(){var t=!0;return null!==n.threshold&&(t=jt>=n.threshold),t}function F(){var t=!1;return null!==n.cancelThreshold&&null!==Bt&&(t=mt(Bt)-jt>=n.cancelThreshold),t}function M(){return null===n.pinchThreshold||Wt>=n.pinchThreshold}function R(){return!n.maxTimeThreshold||!(Ft>=n.maxTimeThreshold)}function H(t,e){if(!1!==n.preventDefaultEvents)if(n.allowPageScroll===u)t.preventDefault();else{var s=n.allowPageScroll===c;switch(e){case i:(n.swipeLeft&&s||!s&&n.allowPageScroll!=g)&&t.preventDefault();break;case r:(n.swipeRight&&s||!s&&n.allowPageScroll!=g)&&t.preventDefault();break;case o:(n.swipeUp&&s||!s&&n.allowPageScroll!=v)&&t.preventDefault();break;case a:(n.swipeDown&&s||!s&&n.allowPageScroll!=v)&&t.preventDefault()}}}function W(){var t=G(),e=Y(),n=M();return t&&e&&n}function U(){return!!(n.pinchStatus||n.pinchIn||n.pinchOut)}function q(){return!(!W()||!U())}function z(){var t=R(),e=V(),n=G(),i=Y();return!F()&&i&&n&&e&&t}function $(){return!!(n.swipe||n.swipeStatus||n.swipeLeft||n.swipeRight||n.swipeUp||n.swipeDown)}function Q(){return!(!z()||!$())}function G(){return Qt===n.fingers||n.fingers===y||!E}function Y(){return 0!==Gt[0].end.x}function K(){return!!n.tap}function X(){return!!n.doubleTap}function Z(){return!!n.longTap}function J(){if(null==Jt)return!1;var t=Tt();return X()&&t-Jt<=n.doubleTapThreshold}function tt(){return J()}function et(){return(1===Qt||!E)&&(isNaN(jt)||jt<n.threshold)}function nt(){return Ft>n.longTapThreshold&&b>jt}function it(){return!(!et()||!K())}function rt(){return!(!J()||!X())}function ot(){return!(!nt()||!Z())}function at(t){Xt=Tt(),Zt=t.touches.length+1}function st(){Xt=0,Zt=0}function lt(){var t=!1;if(Xt){Tt()-Xt<=n.fingerReleaseThreshold&&(t=!0)}return t}function ut(){return!(!0!==zt.data(A+"_intouch"))}function ct(t){zt&&(!0===t?(zt.on(Dt,I),zt.on(Pt,k),Nt&&zt.on(Nt,P)):(zt.off(Dt,I,!1),zt.off(Pt,k,!1),Nt&&zt.off(Nt,P,!1)),zt.data(A+"_intouch",!0===t))}function ft(t,e){var n={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return n.start.x=n.last.x=n.end.x=e.pageX||e.clientX,n.start.y=n.last.y=n.end.y=e.pageY||e.clientY,Gt[t]=n,n}function dt(t){var e=void 0!==t.identifier?t.identifier:0,n=pt(e);return null===n&&(n=ft(e,t)),n.last.x=n.end.x,n.last.y=n.end.y,n.end.x=t.pageX||t.clientX,n.end.y=t.pageY||t.clientY,n}function pt(t){return Gt[t]||null}function ht(t,e){t!=u&&(e=Math.max(e,mt(t)),qt[t].distance=e)}function mt(t){return qt[t]?qt[t].distance:void 0}function gt(){var t={};return t[i]=vt(i),t[r]=vt(r),t[o]=vt(o),t[a]=vt(a),t}function vt(t){return{direction:t,distance:0}}function yt(){return Kt-Yt}function bt(t,e){var n=Math.abs(t.x-e.x),i=Math.abs(t.y-e.y);return Math.round(Math.sqrt(n*n+i*i))}function _t(t,e){return(e/t*1).toFixed(2)}function wt(){return 1>Ht?l:s}function xt(t,e){return Math.round(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)))}function St(t,e){var n=t.x-e.x,i=e.y-t.y,r=Math.atan2(i,n),o=Math.round(180*r/Math.PI);return 0>o&&(o=360-Math.abs(o)),o}function Et(t,e){if(Ot(t,e))return u;var n=St(t,e);return 45>=n&&n>=0?i:360>=n&&n>=315?i:n>=135&&225>=n?r:n>45&&135>n?a:o}function Tt(){return(new Date).getTime()}function Ct(e){e=t(e);var n=e.offset();return{left:n.left,right:n.left+e.outerWidth(),top:n.top,bottom:n.top+e.outerHeight()}}function At(t,e){return t.x>e.left&&t.x<e.right&&t.y>e.top&&t.y<e.bottom}function Ot(t,e){return t.x==e.x&&t.y==e.y}var n=t.extend({},n),It=E||C||!n.fallbackToMouseEvents,kt=It?C?T?"MSPointerDown":"pointerdown":"touchstart":"mousedown",Dt=It?C?T?"MSPointerMove":"pointermove":"touchmove":"mousemove",Pt=It?C?T?"MSPointerUp":"pointerup":"touchend":"mouseup",Nt=It?C?"mouseleave":null:"mouseleave",Lt=C?T?"MSPointerCancel":"pointercancel":"touchcancel",jt=0,Bt=null,Vt=null,Ft=0,Mt=0,Rt=0,Ht=1,Wt=0,Ut=0,qt=null,zt=t(e),$t="start",Qt=0,Gt={},Yt=0,Kt=0,Xt=0,Zt=0,Jt=0,te=null,ee=null;try{zt.on(kt,O),zt.on(Lt,D)}catch(e){t.error("events not supported "+kt+","+Lt+" on jQuery.swipe")}this.enable=function(){return this.disable(),zt.on(kt,O),zt.on(Lt,D),zt},this.disable=function(){return N(),zt},this.destroy=function(){N(),zt.data(A,null),zt=null},this.option=function(e,i){if("object"==typeof e)n=t.extend(n,e);else if(void 0!==n[e]){if(void 0===i)return n[e];n[e]=i}else{if(!e)return n;t.error("Option "+e+" does not exist on jQuery.swipe.options")}return null}}var i="left",r="right",o="up",a="down",s="in",l="out",u="none",c="auto",f="swipe",d="pinch",p="tap",h="doubletap",m="longtap",g="horizontal",v="vertical",y="all",b=10,_="start",w="move",x="end",S="cancel",E="ontouchstart"in window,T=window.navigator.msPointerEnabled&&!window.PointerEvent&&!E,C=(window.PointerEvent||window.navigator.msPointerEnabled)&&!E,A="TouchSwipe",O={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:".noSwipe",preventDefaultEvents:!0};t.fn.swipe=function(n){var i=t(this),r=i.data(A);if(r&&"string"==typeof n){if(r[n])return r[n].apply(r,Array.prototype.slice.call(arguments,1));t.error("Method "+n+" does not exist on jQuery.swipe")}else if(r&&"object"==typeof n)r.option.apply(r,arguments);else if(!(r||"object"!=typeof n&&n))return e.apply(this,arguments);return i},t.fn.swipe.version="1.6.18",t.fn.swipe.defaults=O,t.fn.swipe.phases={PHASE_START:_,PHASE_MOVE:w,PHASE_END:x,PHASE_CANCEL:S},t.fn.swipe.directions={LEFT:i,RIGHT:r,UP:o,DOWN:a,IN:s,OUT:l},t.fn.swipe.pageScroll={NONE:u,HORIZONTAL:g,VERTICAL:v,AUTO:c},t.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:y}})},function(t,e,n){"use strict";var i,r;!function(o,a){i=a,void 0!==(r="function"==typeof i?i.call(e,n,e,t):i)&&(t.exports=r)}(0,function(t,e,n){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t){var e=t.getBoundingClientRect(),n={};for(var i in e)n[i]=e[i];if(t.ownerDocument!==document){var o=t.ownerDocument.defaultView.frameElement;if(o){var a=r(o);n.top+=a.top,n.bottom+=a.top,n.left+=a.left,n.right+=a.left}}return n}function o(t){var e=getComputedStyle(t)||{},n=e.position,i=[];if("fixed"===n)return[t];for(var r=t;(r=r.parentNode)&&r&&1===r.nodeType;){var o=void 0;try{o=getComputedStyle(r)}catch(t){}if(void 0===o||null===o)return i.push(r),i;var a=o,s=a.overflow,l=a.overflowX;/(auto|scroll)/.test(s+a.overflowY+l)&&("absolute"!==n||["relative","absolute","fixed"].indexOf(o.position)>=0)&&i.push(r)}return i.push(t.ownerDocument.body),t.ownerDocument!==document&&i.push(t.ownerDocument.defaultView),i}function a(){T&&document.body.removeChild(T),T=null}function s(t){var e=void 0;t===document?(e=document,t=document.documentElement):e=t.ownerDocument;var n=e.documentElement,i=r(t),o=O();return i.top-=o.top,i.left-=o.left,void 0===i.width&&(i.width=document.body.scrollWidth-i.left-i.right),void 0===i.height&&(i.height=document.body.scrollHeight-i.top-i.bottom),i.top=i.top-n.clientTop,i.left=i.left-n.clientLeft,i.right=e.body.clientWidth-i.width-i.left,i.bottom=e.body.clientHeight-i.height-i.top,i}function l(t){return t.offsetParent||document.documentElement}function u(){if(I)return I;var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");c(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var n=t.offsetWidth;e.style.overflow="scroll";var i=t.offsetWidth;n===i&&(i=e.clientWidth),document.body.removeChild(e);var r=n-i;return I={width:r,height:r}}function c(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var n in e)({}).hasOwnProperty.call(e,n)&&(t[n]=e[n])}),t}function f(t,e){if(void 0!==t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var n=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),i=h(t).replace(n," ");m(t,i)}}function d(t,e){if(void 0!==t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{f(t,e);var n=h(t)+" "+e;m(t,n)}}function p(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=h(t);return new RegExp("(^| )"+e+"( |$)","gi").test(n)}function h(t){return t.className instanceof t.ownerDocument.defaultView.SVGAnimatedString?t.className.baseVal:t.className}function m(t,e){t.setAttribute("class",e)}function g(t,e,n){n.forEach(function(n){-1===e.indexOf(n)&&p(t,n)&&f(t,n)}),e.forEach(function(e){p(t,e)||d(t,e)})}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function y(t,e){var n=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+n>=e&&e>=t-n}function b(){return"undefined"!=typeof performance&&void 0!==performance.now?performance.now():+new Date}function _(){for(var t={top:0,left:0},e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return n.forEach(function(e){var n=e.top,i=e.left;"string"==typeof n&&(n=parseFloat(n,10)),"string"==typeof i&&(i=parseFloat(i,10)),t.top+=n,t.left+=i}),t}function w(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}function x(t,e){return"scrollParent"===e?e=t.scrollParents[0]:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),void 0!==e.nodeType&&function(){var t=e,n=s(e),i=n,r=getComputedStyle(e);if(e=[i.left,i.top,n.width+i.left,n.height+i.top],t.ownerDocument!==document){var o=t.ownerDocument.defaultView;e[0]+=o.pageXOffset,e[1]+=o.pageYOffset,e[2]+=o.pageXOffset,e[3]+=o.pageYOffset}Y.forEach(function(t,n){t=t[0].toUpperCase()+t.substr(1),"Top"===t||"Left"===t?e[n]+=parseFloat(r["border"+t+"Width"]):e[n]-=parseFloat(r["border"+t+"Width"])})}(),e}var S=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),E=void 0;void 0===E&&(E={modules:[]});var T=null,C=function(){var t=0;return function(){return++t}}(),A={},O=function(){var t=T;t&&document.body.contains(t)||(t=document.createElement("div"),t.setAttribute("data-tether-id",C()),c(t.style,{top:0,left:0,position:"absolute"}),document.body.appendChild(t),T=t);var e=t.getAttribute("data-tether-id");return void 0===A[e]&&(A[e]=r(t),D(function(){delete A[e]})),A[e]},I=null,k=[],D=function(t){k.push(t)},P=function(){for(var t=void 0;t=k.pop();)t()},N=function(){function t(){i(this,t)}return S(t,[{key:"on",value:function(t,e,n){var i=!(arguments.length<=3||void 0===arguments[3])&&arguments[3];void 0===this.bindings&&(this.bindings={}),void 0===this.bindings[t]&&(this.bindings[t]=[]),this.bindings[t].push({handler:e,ctx:n,once:i})}},{key:"once",value:function(t,e,n){this.on(t,e,n,!0)}},{key:"off",value:function(t,e){if(void 0!==this.bindings&&void 0!==this.bindings[t])if(void 0===e)delete this.bindings[t];else for(var n=0;n<this.bindings[t].length;)this.bindings[t][n].handler===e?this.bindings[t].splice(n,1):++n}},{key:"trigger",value:function(t){if(void 0!==this.bindings&&this.bindings[t]){for(var e=0,n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];for(;e<this.bindings[t].length;){var o=this.bindings[t][e],a=o.handler,s=o.ctx,l=o.once,u=s;void 0===u&&(u=this),a.apply(u,i),l?this.bindings[t].splice(e,1):++e}}}}]),t}();E.Utils={getActualBoundingClientRect:r,getScrollParents:o,getBounds:s,getOffsetParent:l,extend:c,addClass:d,removeClass:f,hasClass:p,updateClasses:g,defer:D,flush:P,uniqueId:C,Evented:N,getScrollBarSize:u,removeUtilElements:a};var L=function(){function t(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),S=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),j=function(t,e,n){for(var i=!0;i;){var r=t,o=e,a=n;i=!1,null===r&&(r=Function.prototype);var s=Object.getOwnPropertyDescriptor(r,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(a)}var u=Object.getPrototypeOf(r);if(null===u)return;t=u,e=o,n=a,i=!0,s=u=void 0}};if(void 0===E)throw new Error("You must include the utils.js file before tether.js");var B=E.Utils,o=B.getScrollParents,s=B.getBounds,l=B.getOffsetParent,c=B.extend,d=B.addClass,f=B.removeClass,g=B.updateClasses,D=B.defer,P=B.flush,u=B.getScrollBarSize,a=B.removeUtilElements,V=function(){if("undefined"==typeof document)return"";for(var t=document.createElement("div"),e=["transform","WebkitTransform","OTransform","MozTransform","msTransform"],n=0;n<e.length;++n){var i=e[n];if(void 0!==t.style[i])return i}}(),F=[],M=function(){F.forEach(function(t){t.position(!1)}),P()};!function(){var t=null,e=null,n=null,i=function i(){if(void 0!==e&&e>16)return e=Math.min(e-16,250),void(n=setTimeout(i,250));void 0!==t&&b()-t<10||(null!=n&&(clearTimeout(n),n=null),t=b(),M(),e=b()-t)};"undefined"!=typeof window&&void 0!==window.addEventListener&&["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,i)})}();var R={center:"center",left:"right",right:"left"},H={middle:"middle",top:"bottom",bottom:"top"},W={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},U=function(t,e){var n=t.left,i=t.top;return"auto"===n&&(n=R[e.left]),"auto"===i&&(i=H[e.top]),{left:n,top:i}},q=function(t){var e=t.left,n=t.top;return void 0!==W[t.left]&&(e=W[t.left]),void 0!==W[t.top]&&(n=W[t.top]),{left:e,top:n}},z=function(t){var e=t.split(" "),n=L(e,2);return{top:n[0],left:n[1]}},$=z,Q=function(t){function e(t){var n=this;i(this,e),j(Object.getPrototypeOf(e.prototype),"constructor",this).call(this),this.position=this.position.bind(this),F.push(this),this.history=[],this.setOptions(t,!1),E.modules.forEach(function(t){void 0!==t.initialize&&t.initialize.call(n)}),this.position()}return v(e,t),S(e,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return void 0!==e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,n=arguments.length<=1||void 0===arguments[1]||arguments[1],i={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=c(i,t);var r=this.options,a=r.element,s=r.target,l=r.targetModifier;if(this.element=a,this.target=s,this.targetModifier=l,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if(void 0===e[t])throw new Error("Tether Error: Both element and target must be defined");void 0!==e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),d(this.element,this.getClass("element")),!1!==this.options.addTargetClasses&&d(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=$(this.options.targetAttachment),this.attachment=$(this.options.attachment),this.offset=z(this.options.offset),this.targetOffset=z(this.options.targetOffset),void 0!==this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=o(this.target),!1!==this.options.enabled&&this.enable(n)}},{key:"getTargetBounds",value:function(){if(void 0===this.targetModifier)return s(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var t=s(this.target),e={height:t.height,width:t.width,top:t.top,left:t.left};return e.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.top<pageYOffset&&(e.top=pageYOffset),e.left<pageXOffset&&(e.left=pageXOffset),e}if("scroll-handle"===this.targetModifier){var t=void 0,n=this.target;n===document.body?(n=document.documentElement,t={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):t=s(n);var i=getComputedStyle(n),r=n.scrollWidth>n.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body,o=0;r&&(o=15);var a=t.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-o,e={width:15,height:.975*a*(a/n.scrollHeight),left:t.left+t.width-parseFloat(i.borderLeftWidth)-15},l=0;a<408&&this.target===document.body&&(l=-11e-5*Math.pow(a,2)-.00727*a+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));var u=this.target.scrollTop/(n.scrollHeight-a);return e.top=u*(a-e.height-l)+t.top+parseFloat(i.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return void 0===this._cache&&(this._cache={}),void 0===this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];!1!==this.options.addTargetClasses&&d(this.target,this.getClass("enabled")),d(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(e){e!==t.target.ownerDocument&&e.addEventListener("scroll",t.position)}),e&&this.position()}},{key:"disable",value:function(){var t=this;f(this.target,this.getClass("enabled")),f(this.element,this.getClass("enabled")),this.enabled=!1,void 0!==this.scrollParents&&this.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.position)})}},{key:"destroy",value:function(){var t=this;this.disable(),F.forEach(function(e,n){e===t&&F.splice(n,1)}),0===F.length&&a()}},{key:"updateAttachClasses",value:function(t,e){var n=this;t=t||this.attachment,e=e||this.targetAttachment;var i=["left","top","bottom","right","middle","center"];void 0!==this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),void 0===this._addAttachClasses&&(this._addAttachClasses=[]);var r=this._addAttachClasses;t.top&&r.push(this.getClass("element-attached")+"-"+t.top),t.left&&r.push(this.getClass("element-attached")+"-"+t.left),e.top&&r.push(this.getClass("target-attached")+"-"+e.top),e.left&&r.push(this.getClass("target-attached")+"-"+e.left);var o=[];i.forEach(function(t){o.push(n.getClass("element-attached")+"-"+t),o.push(n.getClass("target-attached")+"-"+t)}),D(function(){void 0!==n._addAttachClasses&&(g(n.element,n._addAttachClasses,o),!1!==n.options.addTargetClasses&&g(n.target,n._addAttachClasses,o),delete n._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];if(this.enabled){this.clearCache();var n=U(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,n);var i=this.cache("element-bounds",function(){return s(t.element)}),r=i.width,o=i.height;if(0===r&&0===o&&void 0!==this.lastSize){var a=this.lastSize;r=a.width,o=a.height}else this.lastSize={width:r,height:o};var c=this.cache("target-bounds",function(){return t.getTargetBounds()}),f=c,d=w(q(this.attachment),{width:r,height:o}),p=w(q(n),f),h=w(this.offset,{width:r,height:o}),m=w(this.targetOffset,f);d=_(d,h),p=_(p,m);for(var g=c.left+p.left-d.left,v=c.top+p.top-d.top,y=0;y<E.modules.length;++y){var b=E.modules[y],x=b.position.call(this,{left:g,top:v,targetAttachment:n,targetPos:c,elementPos:i,offset:d,targetOffset:p,manualOffset:h,manualTargetOffset:m,scrollbarSize:A,attachment:this.attachment});if(!1===x)return!1;void 0!==x&&"object"==typeof x&&(v=x.top,g=x.left)}var S={page:{top:v,left:g},viewport:{top:v-pageYOffset,bottom:pageYOffset-v-o+innerHeight,left:g-pageXOffset,right:pageXOffset-g-r+innerWidth}},T=this.target.ownerDocument,C=T.defaultView,A=void 0;return C.innerHeight>T.documentElement.clientHeight&&(A=this.cache("scrollbar-size",u),S.viewport.bottom-=A.height),C.innerWidth>T.documentElement.clientWidth&&(A=this.cache("scrollbar-size",u),S.viewport.right-=A.width),-1!==["","static"].indexOf(T.body.style.position)&&-1!==["","static"].indexOf(T.body.parentElement.style.position)||(S.page.bottom=T.body.scrollHeight-v-o,S.page.right=T.body.scrollWidth-g-r),void 0!==this.options.optimizations&&!1!==this.options.optimizations.moveElement&&void 0===this.targetModifier&&function(){var e=t.cache("target-offsetparent",function(){return l(t.target)}),n=t.cache("target-offsetparent-bounds",function(){return s(e)}),i=getComputedStyle(e),r=n,o={};if(["Top","Left","Bottom","Right"].forEach(function(t){o[t.toLowerCase()]=parseFloat(i["border"+t+"Width"])}),n.right=T.body.scrollWidth-n.left-r.width+o.right,n.bottom=T.body.scrollHeight-n.top-r.height+o.bottom,S.page.top>=n.top+o.top&&S.page.bottom>=n.bottom&&S.page.left>=n.left+o.left&&S.page.right>=n.right){var a=e.scrollTop,u=e.scrollLeft;S.offset={top:S.page.top-n.top+a-o.top,left:S.page.left-n.left+u-o.left}}}(),this.move(S),this.history.unshift(S),this.history.length>3&&this.history.pop(),e&&P(),!0}}},{key:"move",value:function(t){var e=this;if(void 0!==this.element.parentNode){var n={};for(var i in t){n[i]={};for(var r in t[i]){for(var o=!1,a=0;a<this.history.length;++a){var s=this.history[a];if(void 0!==s[i]&&!y(s[i][r],t[i][r])){o=!0;break}}o||(n[i][r]=!0)}}var u={top:"",left:"",right:"",bottom:""},f=function(t,n){if(!1!==(void 0!==e.options.optimizations?e.options.optimizations.gpu:null)){var i=void 0,r=void 0;t.top?(u.top=0,i=n.top):(u.bottom=0,i=-n.bottom),t.left?(u.left=0,r=n.left):(u.right=0,r=-n.right),window.matchMedia&&(window.matchMedia("only screen and (min-resolution: 1.3dppx)").matches||window.matchMedia("only screen and (-webkit-min-device-pixel-ratio: 1.3)").matches||(r=Math.round(r),i=Math.round(i))),u[V]="translateX("+r+"px) translateY("+i+"px)","msTransform"!==V&&(u[V]+=" translateZ(0)")}else t.top?u.top=n.top+"px":u.bottom=n.bottom+"px",t.left?u.left=n.left+"px":u.right=n.right+"px"},d=!1;if((n.page.top||n.page.bottom)&&(n.page.left||n.page.right)?(u.position="absolute",f(n.page,t.page)):(n.viewport.top||n.viewport.bottom)&&(n.viewport.left||n.viewport.right)?(u.position="fixed",f(n.viewport,t.viewport)):void 0!==n.offset&&n.offset.top&&n.offset.left?function(){u.position="absolute";var i=e.cache("target-offsetparent",function(){return l(e.target)});l(e.element)!==i&&D(function(){e.element.parentNode.removeChild(e.element),i.appendChild(e.element)}),f(n.offset,t.offset),d=!0}():(u.position="absolute",f({top:!0,left:!0},t.page)),!d)if(this.options.bodyElement)this.options.bodyElement.appendChild(this.element);else{for(var p=!0,h=this.element.parentNode;h&&1===h.nodeType&&"BODY"!==h.tagName;){if("static"!==getComputedStyle(h).position){p=!1;break}h=h.parentNode}p||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var m={},g=!1;for(var r in u){var v=u[r];this.element.style[r]!==v&&(g=!0,m[r]=v)}g&&D(function(){c(e.element.style,m),e.trigger("repositioned")})}}}]),e}(N);Q.modules=[],E.position=M;var G=c(Q,E),L=function(){function t(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),B=E.Utils,s=B.getBounds,c=B.extend,g=B.updateClasses,D=B.defer,Y=["left","top","right","bottom"];E.modules.push({position:function(t){var e=this,n=t.top,i=t.left,r=t.targetAttachment;if(!this.options.constraints)return!0;var o=this.cache("element-bounds",function(){return s(e.element)}),a=o.height,l=o.width;if(0===l&&0===a&&void 0!==this.lastSize){var u=this.lastSize;l=u.width,a=u.height}var f=this.cache("target-bounds",function(){return e.getTargetBounds()}),d=f.height,p=f.width,h=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(t){var e=t.outOfBoundsClass,n=t.pinnedClass;e&&h.push(e),n&&h.push(n)}),h.forEach(function(t){["left","top","right","bottom"].forEach(function(e){h.push(t+"-"+e)})});var m=[],v=c({},r),y=c({},this.attachment);return this.options.constraints.forEach(function(t){var o=t.to,s=t.attachment,u=t.pin;void 0===s&&(s="");var c=void 0,f=void 0;if(s.indexOf(" ")>=0){var h=s.split(" "),g=L(h,2);f=g[0],c=g[1]}else c=f=s;var b=x(e,o);"target"!==f&&"both"!==f||(n<b[1]&&"top"===v.top&&(n+=d,v.top="bottom"),n+a>b[3]&&"bottom"===v.top&&(n-=d,v.top="top")),"together"===f&&("top"===v.top&&("bottom"===y.top&&n<b[1]?(n+=d,v.top="bottom",n+=a,y.top="top"):"top"===y.top&&n+a>b[3]&&n-(a-d)>=b[1]&&(n-=a-d,v.top="bottom",y.top="bottom")),"bottom"===v.top&&("top"===y.top&&n+a>b[3]?(n-=d,v.top="top",n-=a,y.top="bottom"):"bottom"===y.top&&n<b[1]&&n+(2*a-d)<=b[3]&&(n+=a-d,v.top="top",y.top="top")),"middle"===v.top&&(n+a>b[3]&&"top"===y.top?(n-=a,y.top="bottom"):n<b[1]&&"bottom"===y.top&&(n+=a,y.top="top"))),"target"!==c&&"both"!==c||(i<b[0]&&"left"===v.left&&(i+=p,v.left="right"),i+l>b[2]&&"right"===v.left&&(i-=p,v.left="left")),"together"===c&&(i<b[0]&&"left"===v.left?"right"===y.left?(i+=p,v.left="right",i+=l,y.left="left"):"left"===y.left&&(i+=p,v.left="right",i-=l,y.left="right"):i+l>b[2]&&"right"===v.left?"left"===y.left?(i-=p,v.left="left",i-=l,y.left="right"):"right"===y.left&&(i-=p,v.left="left",i+=l,y.left="left"):"center"===v.left&&(i+l>b[2]&&"left"===y.left?(i-=l,y.left="right"):i<b[0]&&"right"===y.left&&(i+=l,y.left="left"))),"element"!==f&&"both"!==f||(n<b[1]&&"bottom"===y.top&&(n+=a,y.top="top"),n+a>b[3]&&"top"===y.top&&(n-=a,y.top="bottom")),"element"!==c&&"both"!==c||(i<b[0]&&("right"===y.left?(i+=l,y.left="left"):"center"===y.left&&(i+=l/2,y.left="left")),i+l>b[2]&&("left"===y.left?(i-=l,y.left="right"):"center"===y.left&&(i-=l/2,y.left="right"))),"string"==typeof u?u=u.split(",").map(function(t){return t.trim()}):!0===u&&(u=["top","left","right","bottom"]),u=u||[];var _=[],w=[];n<b[1]&&(u.indexOf("top")>=0?(n=b[1],_.push("top")):w.push("top")),n+a>b[3]&&(u.indexOf("bottom")>=0?(n=b[3]-a,_.push("bottom")):w.push("bottom")),i<b[0]&&(u.indexOf("left")>=0?(i=b[0],_.push("left")):w.push("left")),i+l>b[2]&&(u.indexOf("right")>=0?(i=b[2]-l,_.push("right")):w.push("right")),_.length&&function(){var t=void 0;t=void 0!==e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),m.push(t),_.forEach(function(e){m.push(t+"-"+e)})}(),w.length&&function(){var t=void 0;t=void 0!==e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),m.push(t),w.forEach(function(e){m.push(t+"-"+e)})}(),(_.indexOf("left")>=0||_.indexOf("right")>=0)&&(y.left=v.left=!1),(_.indexOf("top")>=0||_.indexOf("bottom")>=0)&&(y.top=v.top=!1),v.top===r.top&&v.left===r.left&&y.top===e.attachment.top&&y.left===e.attachment.left||(e.updateAttachClasses(y,v),e.trigger("update",{attachment:y,targetAttachment:v}))}),D(function(){!1!==e.options.addTargetClasses&&g(e.target,m,h),g(e.element,m,h)}),{top:n,left:i}}});var B=E.Utils,s=B.getBounds,g=B.updateClasses,D=B.defer;E.modules.push({position:function(t){var e=this,n=t.top,i=t.left,r=this.cache("element-bounds",function(){return s(e.element)}),o=r.height,a=r.width,l=this.getTargetBounds(),u=n+o,c=i+a,f=[];n<=l.bottom&&u>=l.top&&["left","right"].forEach(function(t){var e=l[t];e!==i&&e!==c||f.push(t)}),i<=l.right&&c>=l.left&&["top","bottom"].forEach(function(t){var e=l[t];e!==n&&e!==u||f.push(t)});var d=[],p=[],h=["left","top","right","bottom"];return d.push(this.getClass("abutted")),h.forEach(function(t){d.push(e.getClass("abutted")+"-"+t)}),f.length&&p.push(this.getClass("abutted")),f.forEach(function(t){p.push(e.getClass("abutted")+"-"+t)}),D(function(){!1!==e.options.addTargetClasses&&g(e.target,p,d),g(e.element,p,d)}),!0}});var L=function(){function t(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return E.modules.push({position:function(t){var e=t.top,n=t.left;if(this.options.shift){var i=this.options.shift;"function"==typeof this.options.shift&&(i=this.options.shift.call(this,{top:e,left:n}));var r=void 0,o=void 0;if("string"==typeof i){i=i.split(" "),i[1]=i[1]||i[0];var a=i,s=L(a,2);r=s[0],o=s[1],r=parseFloat(r,10),o=parseFloat(o,10)}else r=i.top,o=i.left;return e+=r,n+=o,{top:e,left:n}}}}),G})},function(t,e,n){"use strict";var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,n){(function(e){t.exports=e.Tether=n(25)}).call(e,n(26))},function(t,e,n){n(7),t.exports=n(8)}]);/*! For license information please see front.js.LICENSE.txt */
(()=>{var e={267:()=>{},379:e=>{"use strict";var t=[];function r(e){for(var r=-1,n=0;n<t.length;n++)if(t[n].identifier===e){r=n;break}return r}function n(e,n){for(var a={},o=[],i=0;i<e.length;i++){var c=e[i],l=n.base?c[0]+n.base:c[0],u=a[l]||0,d="".concat(l," ").concat(u);a[l]=u+1;var p=r(d),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==p)t[p].references++,t[p].updater(f);else{var v=s(f,n);n.byIndex=i,t.splice(i,0,{identifier:d,updater:v,references:1})}o.push(d)}return o}function s(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,s){var a=n(e=e||[],s=s||{});return function(e){e=e||[];for(var o=0;o<a.length;o++){var i=r(a[o]);t[i].references--}for(var c=n(e,s),l=0;l<a.length;l++){var u=r(a[l]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}a=c}}},569:e=>{"use strict";var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:(e,t,r)=>{"use strict";e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},795:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var s=void 0!==r.layer;s&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,s&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var a=r.sourceMap;a&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.nc=void 0,(()=>{"use strict";var e=r(379),t=r.n(e),n=r(795),s=r.n(n),a=r(569),o=r.n(a),i=r(565),c=r.n(i),l=r(216),u=r.n(l),d=r(589),p=r.n(d),f=r(267),v=r.n(f),m={};m.styleTagTransform=p(),m.setAttributes=c(),m.insert=o().bind(null,"head"),m.domAPI=s(),m.insertStyleElement=u(),t()(v(),m),v()&&v().locals&&v().locals,$(window).ready((()=>{const e=$(".blockreassurance_product img.svg, .blockreassurance img.svg").map((function(){return $(this).attr("src")})).toArray();e.filter(((t,r)=>e.indexOf(t)===r)).forEach((function(e){const t=$(`.blockreassurance_product img.svg.invisible[src="${e}"], .blockreassurance img.svg.invisible[src="${e}"]`);0!==t.length&&$.ajax({url:e,type:"GET",success(r){if($.isXMLDoc(r)){let n=$(r).find("svg");n=n.attr("data-img-url",e),n=n.removeAttr("xmlns:a"),n.find("path[fill]").attr("fill",window.psr_icon_color),n.find("path:not([fill])").css("fill",window.psr_icon_color),t.each((function(){const e=$(this).attr("id"),t=$(this).attr("class");let r=n.clone();r=void 0!==e?r.attr("id",e):r,r=void 0!==t?r.attr("class",`${t} replaced-svg`):r.attr("class"," replaced-svg"),r.removeClass("invisible"),$(this).replaceWith(r)}))}}})}))}))})()})();/**
 * 2007-2020 PrestaShop.
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 * @author    PrestaShop SA <contact@prestashop.com>
 * @copyright 2007-2020 PrestaShop SA
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 * International Registered Trademark & Property of PrestaShop SA
 */
$(document).ready(function(){$('.block_newsletter form').on('submit',function(){var psemailsubscriptionForm=$(this);if(typeof psemailsubscription_subscription==='undefined'){return!0}
$('.block_newsletter_alert').remove();$.ajax({type:'POST',dataType:'JSON',url:psemailsubscription_subscription,cache:!1,data:$(this).serialize(),success:function(data){if(data.nw_error){psemailsubscriptionForm.prepend('<p class="alert alert-danger block_newsletter_alert">'+data.msg+'</p>')}else{psemailsubscriptionForm.prepend('<p class="alert alert-success block_newsletter_alert">'+data.msg+'</p>')}},error:function(err){console.log(err)}});return!1})});/**
 * Copyright 2022 LÍNEA GRÁFICA E.C.E S.L.
 *
 * @author    Línea Gráfica E.C.E. S.L.
 * @copyright Lineagrafica.es - Línea Gráfica E.C.E. S.L. all rights reserved.
 * @license   https://www.apache.org/licenses/LICENSE-2.0
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){function b(a){this.$container,this.constraints=null,this.__$tooltip,this.__init(a)}function c(b,c){var d=!0;return a.each(b,function(a,e){return void 0===c[a]||b[a]!==c[a]?(d=!1,!1):void 0}),d}function d(b){var c=b.attr("id"),d=c?h.window.document.getElementById(c):null;return d?d===b[0]:a.contains(h.window.document.body,b[0])}function e(){if(!g)return!1;var a=g.document.body||g.document.documentElement,b=a.style,c="transition",d=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof b[c])return!0;c=c.charAt(0).toUpperCase()+c.substr(1);for(var e=0;e<d.length;e++)if("string"==typeof b[d[e]+c])return!0;return!1}var f={animation:"fade",animationDuration:350,content:null,contentAsHTML:!1,contentCloning:!1,debug:!0,delay:300,delayTouch:[300,500],functionInit:null,functionBefore:null,functionReady:null,functionAfter:null,functionFormat:null,IEmin:6,interactive:!1,multiple:!1,parent:null,plugins:["sideTip"],repositionOnScroll:!1,restoration:"none",selfDestruction:!0,theme:[],timer:0,trackerInterval:500,trackOrigin:!1,trackTooltip:!1,trigger:"hover",triggerClose:{click:!1,mouseleave:!1,originClick:!1,scroll:!1,tap:!1,touchleave:!1},triggerOpen:{click:!1,mouseenter:!1,tap:!1,touchstart:!1},updateAnimation:"rotate",zIndex:9999999},g="undefined"!=typeof window?window:null,h={hasTouchCapability:!(!g||!("ontouchstart"in g||g.DocumentTouch&&g.document instanceof g.DocumentTouch||g.navigator.maxTouchPoints)),hasTransitions:e(),IE:!1,semVer:"4.2.8",window:g},i=function(){this.__$emitterPrivate=a({}),this.__$emitterPublic=a({}),this.__instancesLatestArr=[],this.__plugins={},this._env=h};i.prototype={__bridge:function(b,c,d){if(!c[d]){var e=function(){};e.prototype=b;var g=new e;g.__init&&g.__init(c),a.each(b,function(a,b){0!=a.indexOf("__")&&(c[a]?f.debug&&console.log("The "+a+" method of the "+d+" plugin conflicts with another plugin or native methods"):(c[a]=function(){return g[a].apply(g,Array.prototype.slice.apply(arguments))},c[a].bridged=g))}),c[d]=g}return this},__setWindow:function(a){return h.window=a,this},_getRuler:function(a){return new b(a)},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_plugin:function(b){var c=this;if("string"==typeof b){var d=b,e=null;return d.indexOf(".")>0?e=c.__plugins[d]:a.each(c.__plugins,function(a,b){return b.name.substring(b.name.length-d.length-1)=="."+d?(e=b,!1):void 0}),e}if(b.name.indexOf(".")<0)throw new Error("Plugins must be namespaced");return c.__plugins[b.name]=b,b.core&&c.__bridge(b.core,c,b.name),this},_trigger:function(){var a=Array.prototype.slice.apply(arguments);return"string"==typeof a[0]&&(a[0]={type:a[0]}),this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,a),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,a),this},instances:function(b){var c=[],d=b||".tooltipstered";return a(d).each(function(){var b=a(this),d=b.data("tooltipster-ns");d&&a.each(d,function(a,d){c.push(b.data(d))})}),c},instancesLatest:function(){return this.__instancesLatestArr},off:function(){return this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},origins:function(b){var c=b?b+" ":"";return a(c+".tooltipstered").toArray()},setDefaults:function(b){return a.extend(f,b),this},triggerHandler:function(){return this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},a.tooltipster=new i,a.Tooltipster=function(b,c){this.__callbacks={close:[],open:[]},this.__closingTime,this.__Content,this.__contentBcr,this.__destroyed=!1,this.__$emitterPrivate=a({}),this.__$emitterPublic=a({}),this.__enabled=!0,this.__garbageCollector,this.__Geometry,this.__lastPosition,this.__namespace="tooltipster-"+Math.round(1e6*Math.random()),this.__options,this.__$originParents,this.__pointerIsOverOrigin=!1,this.__previousThemes=[],this.__state="closed",this.__timeouts={close:[],open:null},this.__touchEvents=[],this.__tracker=null,this._$origin,this._$tooltip,this.__init(b,c)},a.Tooltipster.prototype={__init:function(b,c){var d=this;if(d._$origin=a(b),d.__options=a.extend(!0,{},f,c),d.__optionsFormat(),!h.IE||h.IE>=d.__options.IEmin){var e=null;if(void 0===d._$origin.data("tooltipster-initialTitle")&&(e=d._$origin.attr("title"),void 0===e&&(e=null),d._$origin.data("tooltipster-initialTitle",e)),null!==d.__options.content)d.__contentSet(d.__options.content);else{var g,i=d._$origin.attr("data-tooltip-content");i&&(g=a(i)),g&&g[0]?d.__contentSet(g.first()):d.__contentSet(e)}d._$origin.removeAttr("title").addClass("tooltipstered"),d.__prepareOrigin(),d.__prepareGC(),a.each(d.__options.plugins,function(a,b){d._plug(b)}),h.hasTouchCapability&&a(h.window.document.body).on("touchmove."+d.__namespace+"-triggerOpen",function(a){d._touchRecordEvent(a)}),d._on("created",function(){d.__prepareTooltip()})._on("repositioned",function(a){d.__lastPosition=a.position})}else d.__options.disabled=!0},__contentInsert:function(){var a=this,b=a._$tooltip.find(".tooltipster-content"),c=a.__Content,d=function(a){c=a};return a._trigger({type:"format",content:a.__Content,format:d}),a.__options.functionFormat&&(c=a.__options.functionFormat.call(a,a,{origin:a._$origin[0]},a.__Content)),"string"!=typeof c||a.__options.contentAsHTML?b.empty().append(c):b.text(c),a},__contentSet:function(b){return b instanceof a&&this.__options.contentCloning&&(b=b.clone(!0)),this.__Content=b,this._trigger({type:"updated",content:b}),this},__destroyError:function(){throw new Error("This tooltip has been destroyed and cannot execute your method call.")},__geometry:function(){var b=this,c=b._$origin,d=b._$origin.is("area");if(d){var e=b._$origin.parent().attr("name");c=a('img[usemap="#'+e+'"]')}var f=c[0].getBoundingClientRect(),g=a(h.window.document),i=a(h.window),j=c,k={available:{document:null,window:null},document:{size:{height:g.height(),width:g.width()}},window:{scroll:{left:h.window.scrollX||h.window.document.documentElement.scrollLeft,top:h.window.scrollY||h.window.document.documentElement.scrollTop},size:{height:i.height(),width:i.width()}},origin:{fixedLineage:!1,offset:{},size:{height:f.bottom-f.top,width:f.right-f.left},usemapImage:d?c[0]:null,windowOffset:{bottom:f.bottom,left:f.left,right:f.right,top:f.top}}};if(d){var l=b._$origin.attr("shape"),m=b._$origin.attr("coords");if(m&&(m=m.split(","),a.map(m,function(a,b){m[b]=parseInt(a)})),"default"!=l)switch(l){case"circle":var n=m[0],o=m[1],p=m[2],q=o-p,r=n-p;k.origin.size.height=2*p,k.origin.size.width=k.origin.size.height,k.origin.windowOffset.left+=r,k.origin.windowOffset.top+=q;break;case"rect":var s=m[0],t=m[1],u=m[2],v=m[3];k.origin.size.height=v-t,k.origin.size.width=u-s,k.origin.windowOffset.left+=s,k.origin.windowOffset.top+=t;break;case"poly":for(var w=0,x=0,y=0,z=0,A="even",B=0;B<m.length;B++){var C=m[B];"even"==A?(C>y&&(y=C,0===B&&(w=y)),w>C&&(w=C),A="odd"):(C>z&&(z=C,1==B&&(x=z)),x>C&&(x=C),A="even")}k.origin.size.height=z-x,k.origin.size.width=y-w,k.origin.windowOffset.left+=w,k.origin.windowOffset.top+=x}}var D=function(a){k.origin.size.height=a.height,k.origin.windowOffset.left=a.left,k.origin.windowOffset.top=a.top,k.origin.size.width=a.width};for(b._trigger({type:"geometry",edit:D,geometry:{height:k.origin.size.height,left:k.origin.windowOffset.left,top:k.origin.windowOffset.top,width:k.origin.size.width}}),k.origin.windowOffset.right=k.origin.windowOffset.left+k.origin.size.width,k.origin.windowOffset.bottom=k.origin.windowOffset.top+k.origin.size.height,k.origin.offset.left=k.origin.windowOffset.left+k.window.scroll.left,k.origin.offset.top=k.origin.windowOffset.top+k.window.scroll.top,k.origin.offset.bottom=k.origin.offset.top+k.origin.size.height,k.origin.offset.right=k.origin.offset.left+k.origin.size.width,k.available.document={bottom:{height:k.document.size.height-k.origin.offset.bottom,width:k.document.size.width},left:{height:k.document.size.height,width:k.origin.offset.left},right:{height:k.document.size.height,width:k.document.size.width-k.origin.offset.right},top:{height:k.origin.offset.top,width:k.document.size.width}},k.available.window={bottom:{height:Math.max(k.window.size.height-Math.max(k.origin.windowOffset.bottom,0),0),width:k.window.size.width},left:{height:k.window.size.height,width:Math.max(k.origin.windowOffset.left,0)},right:{height:k.window.size.height,width:Math.max(k.window.size.width-Math.max(k.origin.windowOffset.right,0),0)},top:{height:Math.max(k.origin.windowOffset.top,0),width:k.window.size.width}};"html"!=j[0].tagName.toLowerCase();){if("fixed"==j.css("position")){k.origin.fixedLineage=!0;break}j=j.parent()}return k},__optionsFormat:function(){return"number"==typeof this.__options.animationDuration&&(this.__options.animationDuration=[this.__options.animationDuration,this.__options.animationDuration]),"number"==typeof this.__options.delay&&(this.__options.delay=[this.__options.delay,this.__options.delay]),"number"==typeof this.__options.delayTouch&&(this.__options.delayTouch=[this.__options.delayTouch,this.__options.delayTouch]),"string"==typeof this.__options.theme&&(this.__options.theme=[this.__options.theme]),null===this.__options.parent?this.__options.parent=a(h.window.document.body):"string"==typeof this.__options.parent&&(this.__options.parent=a(this.__options.parent)),"hover"==this.__options.trigger?(this.__options.triggerOpen={mouseenter:!0,touchstart:!0},this.__options.triggerClose={mouseleave:!0,originClick:!0,touchleave:!0}):"click"==this.__options.trigger&&(this.__options.triggerOpen={click:!0,tap:!0},this.__options.triggerClose={click:!0,tap:!0}),this._trigger("options"),this},__prepareGC:function(){var b=this;return b.__options.selfDestruction?b.__garbageCollector=setInterval(function(){var c=(new Date).getTime();b.__touchEvents=a.grep(b.__touchEvents,function(a,b){return c-a.time>6e4}),d(b._$origin)||b.close(function(){b.destroy()})},2e4):clearInterval(b.__garbageCollector),b},__prepareOrigin:function(){var a=this;if(a._$origin.off("."+a.__namespace+"-triggerOpen"),h.hasTouchCapability&&a._$origin.on("touchstart."+a.__namespace+"-triggerOpen touchend."+a.__namespace+"-triggerOpen touchcancel."+a.__namespace+"-triggerOpen",function(b){a._touchRecordEvent(b)}),a.__options.triggerOpen.click||a.__options.triggerOpen.tap&&h.hasTouchCapability){var b="";a.__options.triggerOpen.click&&(b+="click."+a.__namespace+"-triggerOpen "),a.__options.triggerOpen.tap&&h.hasTouchCapability&&(b+="touchend."+a.__namespace+"-triggerOpen"),a._$origin.on(b,function(b){a._touchIsMeaningfulEvent(b)&&a._open(b)})}if(a.__options.triggerOpen.mouseenter||a.__options.triggerOpen.touchstart&&h.hasTouchCapability){var b="";a.__options.triggerOpen.mouseenter&&(b+="mouseenter."+a.__namespace+"-triggerOpen "),a.__options.triggerOpen.touchstart&&h.hasTouchCapability&&(b+="touchstart."+a.__namespace+"-triggerOpen"),a._$origin.on(b,function(b){!a._touchIsTouchEvent(b)&&a._touchIsEmulatedEvent(b)||(a.__pointerIsOverOrigin=!0,a._openShortly(b))})}if(a.__options.triggerClose.mouseleave||a.__options.triggerClose.touchleave&&h.hasTouchCapability){var b="";a.__options.triggerClose.mouseleave&&(b+="mouseleave."+a.__namespace+"-triggerOpen "),a.__options.triggerClose.touchleave&&h.hasTouchCapability&&(b+="touchend."+a.__namespace+"-triggerOpen touchcancel."+a.__namespace+"-triggerOpen"),a._$origin.on(b,function(b){a._touchIsMeaningfulEvent(b)&&(a.__pointerIsOverOrigin=!1)})}return a},__prepareTooltip:function(){var b=this,c=b.__options.interactive?"auto":"";return b._$tooltip.attr("id",b.__namespace).css({"pointer-events":c,zIndex:b.__options.zIndex}),a.each(b.__previousThemes,function(a,c){b._$tooltip.removeClass(c)}),a.each(b.__options.theme,function(a,c){b._$tooltip.addClass(c)}),b.__previousThemes=a.merge([],b.__options.theme),b},__scrollHandler:function(b){var c=this;if(c.__options.triggerClose.scroll)c._close(b);else if(d(c._$origin)&&d(c._$tooltip)){var e=null;if(b.target===h.window.document)c.__Geometry.origin.fixedLineage||c.__options.repositionOnScroll&&c.reposition(b);else{e=c.__geometry();var f=!1;if("fixed"!=c._$origin.css("position")&&c.__$originParents.each(function(b,c){var d=a(c),g=d.css("overflow-x"),h=d.css("overflow-y");if("visible"!=g||"visible"!=h){var i=c.getBoundingClientRect();if("visible"!=g&&(e.origin.windowOffset.left<i.left||e.origin.windowOffset.right>i.right))return f=!0,!1;if("visible"!=h&&(e.origin.windowOffset.top<i.top||e.origin.windowOffset.bottom>i.bottom))return f=!0,!1}return"fixed"==d.css("position")?!1:void 0}),f)c._$tooltip.css("visibility","hidden");else if(c._$tooltip.css("visibility","visible"),c.__options.repositionOnScroll)c.reposition(b);else{var g=e.origin.offset.left-c.__Geometry.origin.offset.left,i=e.origin.offset.top-c.__Geometry.origin.offset.top;c._$tooltip.css({left:c.__lastPosition.coord.left+g,top:c.__lastPosition.coord.top+i})}}c._trigger({type:"scroll",event:b,geo:e})}return c},__stateSet:function(a){return this.__state=a,this._trigger({type:"state",state:a}),this},__timeoutsClear:function(){return clearTimeout(this.__timeouts.open),this.__timeouts.open=null,a.each(this.__timeouts.close,function(a,b){clearTimeout(b)}),this.__timeouts.close=[],this},__trackerStart:function(){var a=this,b=a._$tooltip.find(".tooltipster-content");return a.__options.trackTooltip&&(a.__contentBcr=b[0].getBoundingClientRect()),a.__tracker=setInterval(function(){if(d(a._$origin)&&d(a._$tooltip)){if(a.__options.trackOrigin){var e=a.__geometry(),f=!1;c(e.origin.size,a.__Geometry.origin.size)&&(a.__Geometry.origin.fixedLineage?c(e.origin.windowOffset,a.__Geometry.origin.windowOffset)&&(f=!0):c(e.origin.offset,a.__Geometry.origin.offset)&&(f=!0)),f||(a.__options.triggerClose.mouseleave?a._close():a.reposition())}if(a.__options.trackTooltip){var g=b[0].getBoundingClientRect();g.height===a.__contentBcr.height&&g.width===a.__contentBcr.width||(a.reposition(),a.__contentBcr=g)}}else a._close()},a.__options.trackerInterval),a},_close:function(b,c,d){var e=this,f=!0;if(e._trigger({type:"close",event:b,stop:function(){f=!1}}),f||d){c&&e.__callbacks.close.push(c),e.__callbacks.open=[],e.__timeoutsClear();var g=function(){a.each(e.__callbacks.close,function(a,c){c.call(e,e,{event:b,origin:e._$origin[0]})}),e.__callbacks.close=[]};if("closed"!=e.__state){var i=!0,j=new Date,k=j.getTime(),l=k+e.__options.animationDuration[1];if("disappearing"==e.__state&&l>e.__closingTime&&e.__options.animationDuration[1]>0&&(i=!1),i){e.__closingTime=l,"disappearing"!=e.__state&&e.__stateSet("disappearing");var m=function(){clearInterval(e.__tracker),e._trigger({type:"closing",event:b}),e._$tooltip.off("."+e.__namespace+"-triggerClose").removeClass("tooltipster-dying"),a(h.window).off("."+e.__namespace+"-triggerClose"),e.__$originParents.each(function(b,c){a(c).off("scroll."+e.__namespace+"-triggerClose")}),e.__$originParents=null,a(h.window.document.body).off("."+e.__namespace+"-triggerClose"),e._$origin.off("."+e.__namespace+"-triggerClose"),e._off("dismissable"),e.__stateSet("closed"),e._trigger({type:"after",event:b}),e.__options.functionAfter&&e.__options.functionAfter.call(e,e,{event:b,origin:e._$origin[0]}),g()};h.hasTransitions?(e._$tooltip.css({"-moz-animation-duration":e.__options.animationDuration[1]+"ms","-ms-animation-duration":e.__options.animationDuration[1]+"ms","-o-animation-duration":e.__options.animationDuration[1]+"ms","-webkit-animation-duration":e.__options.animationDuration[1]+"ms","animation-duration":e.__options.animationDuration[1]+"ms","transition-duration":e.__options.animationDuration[1]+"ms"}),e._$tooltip.clearQueue().removeClass("tooltipster-show").addClass("tooltipster-dying"),e.__options.animationDuration[1]>0&&e._$tooltip.delay(e.__options.animationDuration[1]),e._$tooltip.queue(m)):e._$tooltip.stop().fadeOut(e.__options.animationDuration[1],m)}}else g()}return e},_off:function(){return this.__$emitterPrivate.off.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_on:function(){return this.__$emitterPrivate.on.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_one:function(){return this.__$emitterPrivate.one.apply(this.__$emitterPrivate,Array.prototype.slice.apply(arguments)),this},_open:function(b,c){var e=this;if(!e.__destroying&&d(e._$origin)&&e.__enabled){var f=!0;if("closed"==e.__state&&(e._trigger({type:"before",event:b,stop:function(){f=!1}}),f&&e.__options.functionBefore&&(f=e.__options.functionBefore.call(e,e,{event:b,origin:e._$origin[0]}))),f!==!1&&null!==e.__Content){c&&e.__callbacks.open.push(c),e.__callbacks.close=[],e.__timeoutsClear();var g,i=function(){"stable"!=e.__state&&e.__stateSet("stable"),a.each(e.__callbacks.open,function(a,b){b.call(e,e,{origin:e._$origin[0],tooltip:e._$tooltip[0]})}),e.__callbacks.open=[]};if("closed"!==e.__state)g=0,"disappearing"===e.__state?(e.__stateSet("appearing"),h.hasTransitions?(e._$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-show"),e.__options.animationDuration[0]>0&&e._$tooltip.delay(e.__options.animationDuration[0]),e._$tooltip.queue(i)):e._$tooltip.stop().fadeIn(i)):"stable"==e.__state&&i();else{if(e.__stateSet("appearing"),g=e.__options.animationDuration[0],e.__contentInsert(),e.reposition(b,!0),h.hasTransitions?(e._$tooltip.addClass("tooltipster-"+e.__options.animation).addClass("tooltipster-initial").css({"-moz-animation-duration":e.__options.animationDuration[0]+"ms","-ms-animation-duration":e.__options.animationDuration[0]+"ms","-o-animation-duration":e.__options.animationDuration[0]+"ms","-webkit-animation-duration":e.__options.animationDuration[0]+"ms","animation-duration":e.__options.animationDuration[0]+"ms","transition-duration":e.__options.animationDuration[0]+"ms"}),setTimeout(function(){"closed"!=e.__state&&(e._$tooltip.addClass("tooltipster-show").removeClass("tooltipster-initial"),e.__options.animationDuration[0]>0&&e._$tooltip.delay(e.__options.animationDuration[0]),e._$tooltip.queue(i))},0)):e._$tooltip.css("display","none").fadeIn(e.__options.animationDuration[0],i),e.__trackerStart(),a(h.window).on("resize."+e.__namespace+"-triggerClose",function(b){var c=a(document.activeElement);(c.is("input")||c.is("textarea"))&&a.contains(e._$tooltip[0],c[0])||e.reposition(b)}).on("scroll."+e.__namespace+"-triggerClose",function(a){e.__scrollHandler(a)}),e.__$originParents=e._$origin.parents(),e.__$originParents.each(function(b,c){a(c).on("scroll."+e.__namespace+"-triggerClose",function(a){e.__scrollHandler(a)})}),e.__options.triggerClose.mouseleave||e.__options.triggerClose.touchleave&&h.hasTouchCapability){e._on("dismissable",function(a){a.dismissable?a.delay?(m=setTimeout(function(){e._close(a.event)},a.delay),e.__timeouts.close.push(m)):e._close(a):clearTimeout(m)});var j=e._$origin,k="",l="",m=null;e.__options.interactive&&(j=j.add(e._$tooltip)),e.__options.triggerClose.mouseleave&&(k+="mouseenter."+e.__namespace+"-triggerClose ",l+="mouseleave."+e.__namespace+"-triggerClose "),e.__options.triggerClose.touchleave&&h.hasTouchCapability&&(k+="touchstart."+e.__namespace+"-triggerClose",l+="touchend."+e.__namespace+"-triggerClose touchcancel."+e.__namespace+"-triggerClose"),j.on(l,function(a){if(e._touchIsTouchEvent(a)||!e._touchIsEmulatedEvent(a)){var b="mouseleave"==a.type?e.__options.delay:e.__options.delayTouch;e._trigger({delay:b[1],dismissable:!0,event:a,type:"dismissable"})}}).on(k,function(a){!e._touchIsTouchEvent(a)&&e._touchIsEmulatedEvent(a)||e._trigger({dismissable:!1,event:a,type:"dismissable"})})}e.__options.triggerClose.originClick&&e._$origin.on("click."+e.__namespace+"-triggerClose",function(a){e._touchIsTouchEvent(a)||e._touchIsEmulatedEvent(a)||e._close(a)}),(e.__options.triggerClose.click||e.__options.triggerClose.tap&&h.hasTouchCapability)&&setTimeout(function(){if("closed"!=e.__state){var b="",c=a(h.window.document.body);e.__options.triggerClose.click&&(b+="click."+e.__namespace+"-triggerClose "),e.__options.triggerClose.tap&&h.hasTouchCapability&&(b+="touchend."+e.__namespace+"-triggerClose"),c.on(b,function(b){e._touchIsMeaningfulEvent(b)&&(e._touchRecordEvent(b),e.__options.interactive&&a.contains(e._$tooltip[0],b.target)||e._close(b))}),e.__options.triggerClose.tap&&h.hasTouchCapability&&c.on("touchstart."+e.__namespace+"-triggerClose",function(a){e._touchRecordEvent(a)})}},0),e._trigger("ready"),e.__options.functionReady&&e.__options.functionReady.call(e,e,{origin:e._$origin[0],tooltip:e._$tooltip[0]})}if(e.__options.timer>0){var m=setTimeout(function(){e._close()},e.__options.timer+g);e.__timeouts.close.push(m)}}}return e},_openShortly:function(a){var b=this,c=!0;if("stable"!=b.__state&&"appearing"!=b.__state&&!b.__timeouts.open&&(b._trigger({type:"start",event:a,stop:function(){c=!1}}),c)){var d=0==a.type.indexOf("touch")?b.__options.delayTouch:b.__options.delay;d[0]?b.__timeouts.open=setTimeout(function(){b.__timeouts.open=null,b.__pointerIsOverOrigin&&b._touchIsMeaningfulEvent(a)?(b._trigger("startend"),b._open(a)):b._trigger("startcancel")},d[0]):(b._trigger("startend"),b._open(a))}return b},_optionsExtract:function(b,c){var d=this,e=a.extend(!0,{},c),f=d.__options[b];return f||(f={},a.each(c,function(a,b){var c=d.__options[a];void 0!==c&&(f[a]=c)})),a.each(e,function(b,c){void 0!==f[b]&&("object"!=typeof c||c instanceof Array||null==c||"object"!=typeof f[b]||f[b]instanceof Array||null==f[b]?e[b]=f[b]:a.extend(e[b],f[b]))}),e},_plug:function(b){var c=a.tooltipster._plugin(b);if(!c)throw new Error('The "'+b+'" plugin is not defined');return c.instance&&a.tooltipster.__bridge(c.instance,this,c.name),this},_touchIsEmulatedEvent:function(a){for(var b=!1,c=(new Date).getTime(),d=this.__touchEvents.length-1;d>=0;d--){var e=this.__touchEvents[d];if(!(c-e.time<500))break;e.target===a.target&&(b=!0)}return b},_touchIsMeaningfulEvent:function(a){return this._touchIsTouchEvent(a)&&!this._touchSwiped(a.target)||!this._touchIsTouchEvent(a)&&!this._touchIsEmulatedEvent(a)},_touchIsTouchEvent:function(a){return 0==a.type.indexOf("touch")},_touchRecordEvent:function(a){return this._touchIsTouchEvent(a)&&(a.time=(new Date).getTime(),this.__touchEvents.push(a)),this},_touchSwiped:function(a){for(var b=!1,c=this.__touchEvents.length-1;c>=0;c--){var d=this.__touchEvents[c];if("touchmove"==d.type){b=!0;break}if("touchstart"==d.type&&a===d.target)break}return b},_trigger:function(){var b=Array.prototype.slice.apply(arguments);return"string"==typeof b[0]&&(b[0]={type:b[0]}),b[0].instance=this,b[0].origin=this._$origin?this._$origin[0]:null,b[0].tooltip=this._$tooltip?this._$tooltip[0]:null,this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate,b),a.tooltipster._trigger.apply(a.tooltipster,b),this.__$emitterPublic.trigger.apply(this.__$emitterPublic,b),this},_unplug:function(b){var c=this;if(c[b]){var d=a.tooltipster._plugin(b);d.instance&&a.each(d.instance,function(a,d){c[a]&&c[a].bridged===c[b]&&delete c[a]}),c[b].__destroy&&c[b].__destroy(),delete c[b]}return c},close:function(a){return this.__destroyed?this.__destroyError():this._close(null,a),this},content:function(a){var b=this;if(void 0===a)return b.__Content;if(b.__destroyed)b.__destroyError();else if(b.__contentSet(a),null!==b.__Content){if("closed"!==b.__state&&(b.__contentInsert(),b.reposition(),b.__options.updateAnimation))if(h.hasTransitions){var c=b.__options.updateAnimation;b._$tooltip.addClass("tooltipster-update-"+c),setTimeout(function(){"closed"!=b.__state&&b._$tooltip.removeClass("tooltipster-update-"+c)},1e3)}else b._$tooltip.fadeTo(200,.5,function(){"closed"!=b.__state&&b._$tooltip.fadeTo(200,1)})}else b._close();return b},destroy:function(){var b=this;if(b.__destroyed)b.__destroyError();else{"closed"!=b.__state?b.option("animationDuration",0)._close(null,null,!0):b.__timeoutsClear(),b._trigger("destroy"),b.__destroyed=!0,b._$origin.removeData(b.__namespace).off("."+b.__namespace+"-triggerOpen"),a(h.window.document.body).off("."+b.__namespace+"-triggerOpen");var c=b._$origin.data("tooltipster-ns");if(c)if(1===c.length){var d=null;"previous"==b.__options.restoration?d=b._$origin.data("tooltipster-initialTitle"):"current"==b.__options.restoration&&(d="string"==typeof b.__Content?b.__Content:a("<div></div>").append(b.__Content).html()),d&&b._$origin.attr("title",d),b._$origin.removeClass("tooltipstered"),b._$origin.removeData("tooltipster-ns").removeData("tooltipster-initialTitle")}else c=a.grep(c,function(a,c){return a!==b.__namespace}),b._$origin.data("tooltipster-ns",c);b._trigger("destroyed"),b._off(),b.off(),b.__Content=null,b.__$emitterPrivate=null,b.__$emitterPublic=null,b.__options.parent=null,b._$origin=null,b._$tooltip=null,a.tooltipster.__instancesLatestArr=a.grep(a.tooltipster.__instancesLatestArr,function(a,c){return b!==a}),clearInterval(b.__garbageCollector)}return b},disable:function(){return this.__destroyed?(this.__destroyError(),this):(this._close(),this.__enabled=!1,this)},elementOrigin:function(){return this.__destroyed?void this.__destroyError():this._$origin[0]},elementTooltip:function(){return this._$tooltip?this._$tooltip[0]:null},enable:function(){return this.__enabled=!0,this},hide:function(a){return this.close(a)},instance:function(){return this},off:function(){return this.__destroyed||this.__$emitterPublic.off.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},on:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.on.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},one:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.one.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this},open:function(a){return this.__destroyed?this.__destroyError():this._open(null,a),this},option:function(b,c){return void 0===c?this.__options[b]:(this.__destroyed?this.__destroyError():(this.__options[b]=c,this.__optionsFormat(),a.inArray(b,["trigger","triggerClose","triggerOpen"])>=0&&this.__prepareOrigin(),"selfDestruction"===b&&this.__prepareGC()),this)},reposition:function(a,b){var c=this;return c.__destroyed?c.__destroyError():"closed"!=c.__state&&d(c._$origin)&&(b||d(c._$tooltip))&&(b||c._$tooltip.detach(),c.__Geometry=c.__geometry(),c._trigger({type:"reposition",event:a,helper:{geo:c.__Geometry}})),c},show:function(a){return this.open(a)},status:function(){return{destroyed:this.__destroyed,enabled:this.__enabled,open:"closed"!==this.__state,state:this.__state}},triggerHandler:function(){return this.__destroyed?this.__destroyError():this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic,Array.prototype.slice.apply(arguments)),this}},a.fn.tooltipster=function(){var b=Array.prototype.slice.apply(arguments),c="You are using a single HTML element as content for several tooltips. You probably want to set the contentCloning option to TRUE.";if(0===this.length)return this;if("string"==typeof b[0]){var d="#*$~&";return this.each(function(){var e=a(this).data("tooltipster-ns"),f=e?a(this).data(e[0]):null;if(!f)throw new Error("You called Tooltipster's \""+b[0]+'" method on an uninitialized element');if("function"!=typeof f[b[0]])throw new Error('Unknown method "'+b[0]+'"');this.length>1&&"content"==b[0]&&(b[1]instanceof a||"object"==typeof b[1]&&null!=b[1]&&b[1].tagName)&&!f.__options.contentCloning&&f.__options.debug&&console.log(c);var g=f[b[0]](b[1],b[2]);return g!==f||"instance"===b[0]?(d=g,!1):void 0}),"#*$~&"!==d?d:this}a.tooltipster.__instancesLatestArr=[];var e=b[0]&&void 0!==b[0].multiple,g=e&&b[0].multiple||!e&&f.multiple,h=b[0]&&void 0!==b[0].content,i=h&&b[0].content||!h&&f.content,j=b[0]&&void 0!==b[0].contentCloning,k=j&&b[0].contentCloning||!j&&f.contentCloning,l=b[0]&&void 0!==b[0].debug,m=l&&b[0].debug||!l&&f.debug;return this.length>1&&(i instanceof a||"object"==typeof i&&null!=i&&i.tagName)&&!k&&m&&console.log(c),this.each(function(){var c=!1,d=a(this),e=d.data("tooltipster-ns"),f=null;e?g?c=!0:m&&(console.log("Tooltipster: one or more tooltips are already attached to the element below. Ignoring."),console.log(this)):c=!0,c&&(f=new a.Tooltipster(this,b[0]),e||(e=[]),e.push(f.__namespace),d.data("tooltipster-ns",e),d.data(f.__namespace,f),f.__options.functionInit&&f.__options.functionInit.call(f,f,{origin:this}),f._trigger("init")),a.tooltipster.__instancesLatestArr.push(f)}),this},b.prototype={__init:function(b){this.__$tooltip=b,this.__$tooltip.css({left:0,overflow:"hidden",position:"absolute",top:0}).find(".tooltipster-content").css("overflow","auto"),this.$container=a('<div class="tooltipster-ruler"></div>').append(this.__$tooltip).appendTo(h.window.document.body)},__forceRedraw:function(){var a=this.__$tooltip.parent();this.__$tooltip.detach(),this.__$tooltip.appendTo(a)},constrain:function(a,b){return this.constraints={width:a,height:b},this.__$tooltip.css({display:"block",height:"",overflow:"auto",width:a}),this},destroy:function(){this.__$tooltip.detach().find(".tooltipster-content").css({display:"",overflow:""}),this.$container.remove()},free:function(){return this.constraints=null,this.__$tooltip.css({display:"",height:"",overflow:"visible",width:""}),this},measure:function(){this.__forceRedraw();var a=this.__$tooltip[0].getBoundingClientRect(),b={size:{height:a.height||a.bottom-a.top,width:a.width||a.right-a.left}};if(this.constraints){var c=this.__$tooltip.find(".tooltipster-content"),d=this.__$tooltip.outerHeight(),e=c[0].getBoundingClientRect(),f={height:d<=this.constraints.height,width:a.width<=this.constraints.width&&e.width>=c[0].scrollWidth-1};b.fits=f.height&&f.width}return h.IE&&h.IE<=11&&b.size.width!==h.window.document.documentElement.clientWidth&&(b.size.width=Math.ceil(b.size.width)+1),b}};var j=navigator.userAgent.toLowerCase();-1!=j.indexOf("msie")?h.IE=parseInt(j.split("msie")[1]):-1!==j.toLowerCase().indexOf("trident")&&-1!==j.indexOf(" rv:11")?h.IE=11:-1!=j.toLowerCase().indexOf("edge/")&&(h.IE=parseInt(j.toLowerCase().split("edge/")[1]));var k="tooltipster.sideTip";return a.tooltipster._plugin({name:k,instance:{__defaults:function(){return{arrow:!0,distance:6,functionPosition:null,maxWidth:null,minIntersection:16,minWidth:0,position:null,side:"top",viewportAware:!0}},__init:function(a){var b=this;b.__instance=a,b.__namespace="tooltipster-sideTip-"+Math.round(1e6*Math.random()),b.__previousState="closed",b.__options,b.__optionsFormat(),b.__instance._on("state."+b.__namespace,function(a){"closed"==a.state?b.__close():"appearing"==a.state&&"closed"==b.__previousState&&b.__create(),b.__previousState=a.state}),b.__instance._on("options."+b.__namespace,function(){b.__optionsFormat()}),b.__instance._on("reposition."+b.__namespace,function(a){b.__reposition(a.event,a.helper)})},__close:function(){this.__instance.content()instanceof a&&this.__instance.content().detach(),this.__instance._$tooltip.remove(),this.__instance._$tooltip=null},__create:function(){var b=a('<div class="tooltipster-base tooltipster-sidetip"><div class="tooltipster-box"><div class="tooltipster-content"></div></div><div class="tooltipster-arrow"><div class="tooltipster-arrow-uncropped"><div class="tooltipster-arrow-border"></div><div class="tooltipster-arrow-background"></div></div></div></div>');this.__options.arrow||b.find(".tooltipster-box").css("margin",0).end().find(".tooltipster-arrow").hide(),this.__options.minWidth&&b.css("min-width",this.__options.minWidth+"px"),this.__options.maxWidth&&b.css("max-width",this.__options.maxWidth+"px"),this.__instance._$tooltip=b,this.__instance._trigger("created")},__destroy:function(){this.__instance._off("."+self.__namespace)},__optionsFormat:function(){var b=this;if(b.__options=b.__instance._optionsExtract(k,b.__defaults()),b.__options.position&&(b.__options.side=b.__options.position),"object"!=typeof b.__options.distance&&(b.__options.distance=[b.__options.distance]),b.__options.distance.length<4&&(void 0===b.__options.distance[1]&&(b.__options.distance[1]=b.__options.distance[0]),void 0===b.__options.distance[2]&&(b.__options.distance[2]=b.__options.distance[0]),void 0===b.__options.distance[3]&&(b.__options.distance[3]=b.__options.distance[1])),b.__options.distance={top:b.__options.distance[0],right:b.__options.distance[1],bottom:b.__options.distance[2],left:b.__options.distance[3]},"string"==typeof b.__options.side){var c={top:"bottom",right:"left",bottom:"top",left:"right"};b.__options.side=[b.__options.side,c[b.__options.side]],"left"==b.__options.side[0]||"right"==b.__options.side[0]?b.__options.side.push("top","bottom"):b.__options.side.push("right","left")}6===a.tooltipster._env.IE&&b.__options.arrow!==!0&&(b.__options.arrow=!1)},__reposition:function(b,c){var d,e=this,f=e.__targetFind(c),g=[];e.__instance._$tooltip.detach();var h=e.__instance._$tooltip.clone(),i=a.tooltipster._getRuler(h),j=!1,k=e.__instance.option("animation");switch(k&&h.removeClass("tooltipster-"+k),a.each(["window","document"],function(d,k){var l=null;if(e.__instance._trigger({container:k,helper:c,satisfied:j,takeTest:function(a){l=a},results:g,type:"positionTest"}),1==l||0!=l&&0==j&&("window"!=k||e.__options.viewportAware))for(var d=0;d<e.__options.side.length;d++){var m={horizontal:0,vertical:0},n=e.__options.side[d];"top"==n||"bottom"==n?m.vertical=e.__options.distance[n]:m.horizontal=e.__options.distance[n],e.__sideChange(h,n),a.each(["natural","constrained"],function(a,d){if(l=null,e.__instance._trigger({container:k,event:b,helper:c,mode:d,results:g,satisfied:j,side:n,takeTest:function(a){l=a},type:"positionTest"}),1==l||0!=l&&0==j){var h={container:k,distance:m,fits:null,mode:d,outerSize:null,side:n,size:null,target:f[n],whole:null},o="natural"==d?i.free():i.constrain(c.geo.available[k][n].width-m.horizontal,c.geo.available[k][n].height-m.vertical),p=o.measure();if(h.size=p.size,h.outerSize={height:p.size.height+m.vertical,width:p.size.width+m.horizontal},"natural"==d?c.geo.available[k][n].width>=h.outerSize.width&&c.geo.available[k][n].height>=h.outerSize.height?h.fits=!0:h.fits=!1:h.fits=p.fits,"window"==k&&(h.fits?"top"==n||"bottom"==n?h.whole=c.geo.origin.windowOffset.right>=e.__options.minIntersection&&c.geo.window.size.width-c.geo.origin.windowOffset.left>=e.__options.minIntersection:h.whole=c.geo.origin.windowOffset.bottom>=e.__options.minIntersection&&c.geo.window.size.height-c.geo.origin.windowOffset.top>=e.__options.minIntersection:h.whole=!1),g.push(h),h.whole)j=!0;else if("natural"==h.mode&&(h.fits||h.size.width<=c.geo.available[k][n].width))return!1}})}}),e.__instance._trigger({edit:function(a){g=a},event:b,helper:c,results:g,type:"positionTested"}),g.sort(function(a,b){if(a.whole&&!b.whole)return-1;if(!a.whole&&b.whole)return 1;if(a.whole&&b.whole){var c=e.__options.side.indexOf(a.side),d=e.__options.side.indexOf(b.side);return d>c?-1:c>d?1:"natural"==a.mode?-1:1}if(a.fits&&!b.fits)return-1;if(!a.fits&&b.fits)return 1;if(a.fits&&b.fits){var c=e.__options.side.indexOf(a.side),d=e.__options.side.indexOf(b.side);return d>c?-1:c>d?1:"natural"==a.mode?-1:1}return"document"==a.container&&"bottom"==a.side&&"natural"==a.mode?-1:1}),d=g[0],d.coord={},d.side){case"left":case"right":d.coord.top=Math.floor(d.target-d.size.height/2);break;case"bottom":case"top":d.coord.left=Math.floor(d.target-d.size.width/2)}switch(d.side){case"left":d.coord.left=c.geo.origin.windowOffset.left-d.outerSize.width;break;case"right":d.coord.left=c.geo.origin.windowOffset.right+d.distance.horizontal;break;case"top":d.coord.top=c.geo.origin.windowOffset.top-d.outerSize.height;break;case"bottom":d.coord.top=c.geo.origin.windowOffset.bottom+d.distance.vertical}"window"==d.container?"top"==d.side||"bottom"==d.side?d.coord.left<0?c.geo.origin.windowOffset.right-this.__options.minIntersection>=0?d.coord.left=0:d.coord.left=c.geo.origin.windowOffset.right-this.__options.minIntersection-1:d.coord.left>c.geo.window.size.width-d.size.width&&(c.geo.origin.windowOffset.left+this.__options.minIntersection<=c.geo.window.size.width?d.coord.left=c.geo.window.size.width-d.size.width:d.coord.left=c.geo.origin.windowOffset.left+this.__options.minIntersection+1-d.size.width):d.coord.top<0?c.geo.origin.windowOffset.bottom-this.__options.minIntersection>=0?d.coord.top=0:d.coord.top=c.geo.origin.windowOffset.bottom-this.__options.minIntersection-1:d.coord.top>c.geo.window.size.height-d.size.height&&(c.geo.origin.windowOffset.top+this.__options.minIntersection<=c.geo.window.size.height?d.coord.top=c.geo.window.size.height-d.size.height:d.coord.top=c.geo.origin.windowOffset.top+this.__options.minIntersection+1-d.size.height):(d.coord.left>c.geo.window.size.width-d.size.width&&(d.coord.left=c.geo.window.size.width-d.size.width),d.coord.left<0&&(d.coord.left=0)),e.__sideChange(h,d.side),c.tooltipClone=h[0],c.tooltipParent=e.__instance.option("parent").parent[0],c.mode=d.mode,c.whole=d.whole,c.origin=e.__instance._$origin[0],c.tooltip=e.__instance._$tooltip[0],delete d.container,delete d.fits,delete d.mode,delete d.outerSize,delete d.whole,d.distance=d.distance.horizontal||d.distance.vertical;var l=a.extend(!0,{},d);if(e.__instance._trigger({edit:function(a){d=a},event:b,helper:c,position:l,type:"position"}),e.__options.functionPosition){var m=e.__options.functionPosition.call(e,e.__instance,c,l);m&&(d=m)}i.destroy();var n,o;"top"==d.side||"bottom"==d.side?(n={prop:"left",val:d.target-d.coord.left},o=d.size.width-this.__options.minIntersection):(n={prop:"top",val:d.target-d.coord.top},o=d.size.height-this.__options.minIntersection),n.val<this.__options.minIntersection?n.val=this.__options.minIntersection:n.val>o&&(n.val=o);var p;p=c.geo.origin.fixedLineage?c.geo.origin.windowOffset:{left:c.geo.origin.windowOffset.left+c.geo.window.scroll.left,top:c.geo.origin.windowOffset.top+c.geo.window.scroll.top},d.coord={left:p.left+(d.coord.left-c.geo.origin.windowOffset.left),top:p.top+(d.coord.top-c.geo.origin.windowOffset.top)},e.__sideChange(e.__instance._$tooltip,d.side),c.geo.origin.fixedLineage?e.__instance._$tooltip.css("position","fixed"):e.__instance._$tooltip.css("position",""),e.__instance._$tooltip.css({left:d.coord.left,top:d.coord.top,height:d.size.height,width:d.size.width}).find(".tooltipster-arrow").css({left:"",top:""}).css(n.prop,n.val),e.__instance._$tooltip.appendTo(e.__instance.option("parent")),e.__instance._trigger({type:"repositioned",event:b,position:d})},__sideChange:function(a,b){a.removeClass("tooltipster-bottom").removeClass("tooltipster-left").removeClass("tooltipster-right").removeClass("tooltipster-top").addClass("tooltipster-"+b)},__targetFind:function(a){var b={},c=this.__instance._$origin[0].getClientRects();if(c.length>1){var d=this.__instance._$origin.css("opacity");1==d&&(this.__instance._$origin.css("opacity",.99),c=this.__instance._$origin[0].getClientRects(),this.__instance._$origin.css("opacity",1))}if(c.length<2)b.top=Math.floor(a.geo.origin.windowOffset.left+a.geo.origin.size.width/2),b.bottom=b.top,b.left=Math.floor(a.geo.origin.windowOffset.top+a.geo.origin.size.height/2),b.right=b.left;else{var e=c[0];b.top=Math.floor(e.left+(e.right-e.left)/2),e=c.length>2?c[Math.ceil(c.length/2)-1]:c[0],b.right=Math.floor(e.top+(e.bottom-e.top)/2),e=c[c.length-1],b.bottom=Math.floor(e.left+(e.right-e.left)/2),e=c.length>2?c[Math.ceil((c.length+1)/2)-1]:c[c.length-1],b.left=Math.floor(e.top+(e.bottom-e.top)/2)}return b}}}),a});/**
 * Copyright 2022 LÍNEA GRÁFICA E.C.E S.L.
 *
 * @author    Línea Gráfica E.C.E. S.L.
 * @copyright Lineagrafica.es - Línea Gráfica E.C.E. S.L. all rights reserved.
 * @license   https://www.apache.org/licenses/LICENSE-2.0
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
window.addEventListener('load',function(){var object_lgcookieslaw_front=new LGCookiesLawFront();object_lgcookieslaw_front.init()});function LGCookiesLawFront(){var self=this;var reload;var show_fixed_button;var saved_preferences;var save_user_consent;var reject_cookies_when_closing_banner;var consent_mode;var banner_urls;var banner_selectors;this.init=function(){self.reload=lgcookieslaw_reload;self.block_navigation=lgcookieslaw_block_navigation;self.show_fixed_button=lgcookieslaw_show_fixed_button;self.saved_preferences=lgcookieslaw_saved_preferences;self.save_user_consent=lgcookieslaw_save_user_consent;self.reject_cookies_when_closing_banner=lgcookieslaw_reject_cookies_when_closing_banner;self.consent_mode=lgcookieslaw_consent_mode;self.initBanner()};this.initBanner=function(){self.initBannerURLs();self.initBannerSelectors();self.initBannerEvents();self.initBannerElements();self.showInitialBanner()};this.initBannerSelectors=function(){self.banner_selectors={banner:'#lgcookieslaw_banner',overlay:'.lgcookieslaw-overlay',modal:'#lgcookieslaw_modal',customize_cookies_link:'#lgcookieslaw_customize_cookies_link',fixed_button:'#lgcookieslaw_fixed_button',accept_buttons:'.lgcookieslaw-accept-button',reject_buttons:'.lgcookieslaw-reject-button',partial_accept_buttons:'.lgcookieslaw-partial-accept-button',banner_close_button:'.lgcookieslaw-banner-close-button',sliders:'.lgcookieslaw-slider',slider:'#lgcookieslaw_slider_',tooltips:'.lgcookieslaw-tooltip-container',cancel_button:'#lgcookieslaw_cancel_button',purposes:'.lgcookieslaw-purpose',user_consent_elements:'.lgcookieslaw-modal-header-title-user-consent-elements',user_consent_download:'.lgcookieslaw-user-consent-download',user_consent_consent_date:'.lgcookieslaw-user-consent-consent-date',user_consent_consent_date_text:'.lgcookieslaw-user-consent-consent-date-text',}};this.initBannerURLs=function(){self.banner_urls={ajax_controller:lgcookieslaw_banner_url_ajax_controller,}};this.initBannerEvents=function(){$(self.banner_selectors.cancel_button).click(function(e){e.preventDefault();let cancelButtonCallBack=async function(){if(typeof $.fancybox.close!=='function'){$(self.banner_selectors.modal).hide('slow',function(){self.enableButtons()})}else{$.fancybox.close()}
await self.showInitialBanner()}
cancelButtonCallBack()});$(self.banner_selectors.accept_buttons).click(function(e){e.preventDefault();self.saveUserPreferences('accept')});$(self.banner_selectors.reject_buttons).click(function(e){e.preventDefault();self.saveUserPreferences('reject')});$(self.banner_selectors.partial_accept_buttons).click(function(e){e.preventDefault();self.saveUserPreferences('partial_accept')});$(self.banner_selectors.sliders).click(function(e){e.preventDefault();self.slideSwitch(this)});if($(self.banner_selectors.banner_close_button).length){$(self.banner_selectors.banner_close_button).click(function(e){e.preventDefault();if(self.reject_cookies_when_closing_banner){self.saveUserPreferences('reject')}else{self.hideBanner()}})}};this.initBannerElements=function(){self.initFancyBoxElements();self.initTooltipElements();self.initConsentElements()};this.initConsentElements=function(){if(self.save_user_consent&&self.saved_preferences){$(self.banner_selectors.user_consent_elements).show()}else{$(self.banner_selectors.user_consent_elements).hide()}};this.showInitialBanner=function(){if(self.saved_preferences){self.hideBanner();self.showFixedButton()}else{self.showBanner();self.hideFixedButton()}};this.showBanner=function(){var banner=$(self.banner_selectors.banner);if(banner.length){banner.css('display','table')}
if(self.block_navigation){$(self.banner_selectors.overlay).css('display','block')}};this.hideBanner=function(){var banner=$(self.banner_selectors.banner);if(banner.length){banner.css('display','none')}
if(self.block_navigation){$(self.banner_selectors.overlay).css('display','none')}};this.showFixedButton=function(){if(self.show_fixed_button){var fixed_button=$(self.banner_selectors.fixed_button);if(fixed_button.length){fixed_button.css('display','flex').hide().fadeIn()}}};this.hideFixedButton=function(){if(self.show_fixed_button){var fixed_button=$(self.banner_selectors.fixed_button);if(fixed_button.length){fixed_button.fadeOut()}}};this.initFancyBoxElements=function(){var fancybox_options={href:self.banner_selectors.modal,autoSize:!1,width:700,height:'auto',padding:0,wrapCSS:'lgcookieslaw-fancybox',modal:!0,helpers:{overlay:{css:{'transition':'1s',},},},beforeClose:function(){self.showInitialBanner()},afterClose:function(){self.enableButtons()},beforeLoad:function(){self.hideBanner();self.hideFixedButton();self.enableButtons()},};$(self.banner_selectors.customize_cookies_link).fancybox(fancybox_options);if(self.show_fixed_button){$(self.banner_selectors.fixed_button).fancybox(fancybox_options)}};this.initTooltipElements=function(){$(self.banner_selectors.tooltips).tooltipster({theme:'tooltipster-borderless',})};this.enableButtons=function(){$(self.banner_selectors.accept_buttons).prop('disabled',!1);$(self.banner_selectors.reject_buttons).prop('disabled',!1);$(self.banner_selectors.partial_accept_buttons).prop('disabled',!1)};this.disableButtons=function(){$(self.banner_selectors.accept_buttons).prop('disabled',!0);$(self.banner_selectors.reject_buttons).prop('disabled',!0);$(self.banner_selectors.partial_accept_buttons).prop('disabled',!0)};this.saveUserPreferences=function(consent_type){var success=consent_type;self.disableButtons();if(success){self.setConsentType(consent_type);var accepted_purposes=self.getAcceptedPurposes();$.ajax({type:'POST',headers:{'cache-control':'no-cache',},url:self.banner_urls.ajax_controller+'?rand='+new Date().getTime(),async:!1,cache:!1,dataType:'json',data:{action:'saveUserPreferences',ajax:!0,token:lgcookieslaw_ajax_calls_token,accepted_purposes:accepted_purposes,},success:function(data){success=data.status;if(data.status){if(self.reload==!0){location.reload()}else{self.saved_preferences=!0;$(self.banner_selectors.user_consent_consent_date).tooltipster('destroy');$(self.banner_selectors.user_consent_consent_date).attr('title',data.user_consent_consent_date_content).tooltipster({theme:'tooltipster-borderless',restoration:'current',});$(self.banner_selectors.user_consent_consent_date_text).text(data.user_consent_consent_date_text);if(data.user_consent_download_url!=!1){$(self.banner_selectors.user_consent_download).attr('href',data.user_consent_download_url);$(self.banner_selectors.user_consent_download).show()}else{$(self.banner_selectors.user_consent_download).hide()}
self.initConsentElements();self.updateConsentMode();$(self.banner_selectors.cancel_button).click()}}},})}
return success};this.setConsentType=function(consent_type){var check=null;switch(consent_type){case 'accept':check=!0;break;case 'reject':check=!1;break;case 'partial_accept':default:break}
if(check!==null){$(self.banner_selectors.purposes).each(function(){var checkbox=$(this);if(!checkbox.data('technical')&&checkbox.data('checked')!=check){var slider=$(self.banner_selectors.slider+checkbox.data('id-lgcookieslaw-purpose'));let clickSliderCallBack=async function(){await self.slideSwitch(slider)}
clickSliderCallBack()}})}};this.getAcceptedPurposes=function(){var accepted_purposes=[];$(self.banner_selectors.purposes).each(function(){var checkbox=$(this);if(checkbox.data('checked')){accepted_purposes.push(checkbox.data('id-lgcookieslaw-purpose'))}});return accepted_purposes};this.getCookies=function(){var cookies=[];var pairs=document.cookie.split(';');for(var i=0;i<pairs.length;i++){var pair=pairs[i].split('=');cookies[(pair[0]+'').trim()]=unescape(pair[1])}
return cookies};this.deleteCookies=function(cookies){var success=!self.isEmpty(cookies);if(success){Object.keys(cookies).map(function(key,index){document.cookie=key+'=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/';document.cookie=key+'=; domain=.'+window.location.hostname+'; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/';document.cookie=key+'=; domain=.'+window.location.hostname.replace('www.','')+'; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/'})}
return success};this.updateConsentMode=function(){if(self.consent_mode){$(self.banner_selectors.purposes).each(function(){var checkbox=$(this);if(checkbox.data('consent-mode')&&checkbox.data('consent-type')!==null){gtag('consent','update',{[checkbox.data('consent-type')]:checkbox.data('checked')?'granted':'denied',})}})}};this.slideSwitch=function(slider){if(!$(slider).parent().hasClass('lgcookieslaw-switch-disabled')){var checkbox=$(slider).parent().find('input[type=checkbox]');if($(slider).hasClass('lgcookieslaw-slider-checked')){$(slider).removeClass('lgcookieslaw-slider-checked');checkbox.data('checked',!1)}else{$(slider).addClass('lgcookieslaw-slider-checked');checkbox.data('checked',!0)}}};this.showMessage=function(caller_element,caller_element_context,alert_type,message){self.cleanMessage(caller_element);$(caller_element+'_alert').addClass('alert-'+alert_type).html(message).fadeIn();$(caller_element_context).animate({scrollTop:0})};this.cleanMessage=function(caller_element){$(caller_element+'_alert').removeClass('alert-success alert-danger').html('')};this.validateFieldsForm=function(caller_element,caller_element_context,error_message){var correct_fields=!0;$(caller_element+' input[type=text].is_required:visible, '+caller_element+' input[type=password].is_required:visible, '+caller_element+' input[type=tel].is_required:visible, '+caller_element+' textarea.is_required:visible').each(function(){if(!$(this).val()||$(this).parent().hasClass('form-error')||$(this).parent().parent().hasClass('form-error')){if($(this).parent().hasClass('input-group')){$(this).parent().parent().addClass('form-error')}else{$(this).parent().addClass('form-error')}
correct_fields=!1}});if(!correct_fields){self.showMessage(caller_element,caller_element_context,'danger',error_message)}
return correct_fields};this.validateIsCustomerName=function(s){var reg=/^(?:[^0-9!<>,;?=+()\/\\@#"°*`\{\}_^$%:¤\[\]|\.。]|[\.。](?:\s|$))*$/;return reg.test(s)};this.validateIsName=function(s){var reg=/^[^0-9!<>,;?=+()@#"°\{\}_$%:]+$/;return reg.test(s)}
this.validateIsGenericName=function(s){var reg=/^[^<>={}]+$/;return reg.test(s)};this.validateIsAddress=function(s){var reg=/^[^!<>?=+@{}_$%]+$/;return reg.test(s)};this.validateIsPostCode=function(s,pattern,iso_code){if(typeof iso_code==='undefined'||iso_code==''){iso_code='[A-Z]{2}'}
if(typeof(pattern)=='undefined'||pattern.length==0){pattern='[a-zA-Z 0-9-]+'}else{var replacements={' ':'(?:\ |)','-':'(?:-|)','N':'[0-9]','L':'[a-zA-Z]','C':iso_code};for(var new_value in replacements){pattern=pattern.split(new_value).join(replacements[new_value])}}
var reg=new RegExp('^'+pattern+'$');return reg.test(s)};this.validateIsCityName=function(s){var reg=/^[^!<>;?=+@#"°{}_$%]+$/;return reg.test(s)};this.validateIsMessage=function(s){var reg=/^[^<>{}]+$/;return reg.test(s)};this.validateIsPhoneNumber=function(s){var reg=/^[+0-9. ()-]+$/;return reg.test(s)};this.validateIsDniLite=function(s){var reg=/^[0-9a-z-.]{1,16}$/i;return reg.test(s)};this.validateIsEmail=function(s){var reg=LGCookiesLawUnicodeHack(/^[a-z\p{L}0-9!#$%&'*+\/=?^`{}|~_-]+[.a-z\p{L}0-9!#$%&'*+\/=?^`{}|~_-]*@[a-z\p{L}0-9]+[._a-z\p{L}0-9-]*\.[a-z\p{L}0-9]+$/i,!1);return reg.test(s)};this.validateIsPasswd=function(s){return(s.length>=5&&s.length<255)};this.validateField=function(that){if($(that).hasClass('is_required')||$(that).val().length){var result=!0;if($(that).hasClass('is_required')&&!$(that).val().length){result=!1}
if(result){if($(that).attr('data-validate')){var result=eval("self.validate"+self.capitalizeFirstLetter($(that).attr('data-validate'))+"($(that).val());")}}
if($(that).parent().hasClass('input-group')){if(result){$(that).parent().parent().removeClass('form-error').addClass('form-ok')}else{$(that).parent().parent().addClass('form-error').removeClass('form-ok')}}else{if(result){$(that).parent().removeClass('form-error').addClass('form-ok')}else{$(that).parent().addClass('form-error').removeClass('form-ok')}}}};this.capitalizeFirstLetter=function(string){return string.charAt(0).toUpperCase()+string.slice(1)};this.inArray=function(needle,haystack){var length=haystack.length;for(var i=0;i<length;i++){if(haystack[i]==needle){return!0}}
return!1};this.isEmpty=function(value){return value===undefined||value==null||value.length<=0}}
var LGCookiesLawUnicodeHack=(function(){var unicodeCategories={Pi:'[\u00ab\u2018\u201b\u201c\u201f\u2039\u2e02\u2e04\u2e09\u2e0c\u2e1c]',Sk:'[\u005e\u0060\u00a8\u00af\u00b4\u00b8\u02c2-\u02c5\u02d2-\u02df\u02e5-\u02ed\u02ef-\u02ff\u0374\u0375\u0384\u0385\u1fbd\u1fbf-\u1fc1\u1fcd-\u1fcf\u1fdd-\u1fdf\u1fed-\u1fef\u1ffd\u1ffe\u309b\u309c\ua700-\ua716\ua720\ua721\uff3e\uff40\uffe3]',Sm:'[\u002b\u003c-\u003e\u007c\u007e\u00ac\u00b1\u00d7\u00f7\u03f6\u2044\u2052\u207a-\u207c\u208a-\u208c\u2140-\u2144\u214b\u2190-\u2194\u219a\u219b\u21a0\u21a3\u21a6\u21ae\u21ce\u21cf\u21d2\u21d4\u21f4-\u22ff\u2308-\u230b\u2320\u2321\u237c\u239b-\u23b3\u23dc-\u23e1\u25b7\u25c1\u25f8-\u25ff\u266f\u27c0-\u27c4\u27c7-\u27ca\u27d0-\u27e5\u27f0-\u27ff\u2900-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2aff\ufb29\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe9-\uffec]',So:'[\u00a6\u00a7\u00a9\u00ae\u00b0\u00b6\u0482\u060e\u060f\u06e9\u06fd\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0cf1\u0cf2\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcc\u0fcf\u1360\u1390-\u1399\u1940\u19e0-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a\u213b\u214a\u214c\u214d\u2195-\u2199\u219c-\u219f\u21a1\u21a2\u21a4\u21a5\u21a7-\u21ad\u21af-\u21cd\u21d0\u21d1\u21d3\u21d5-\u21f3\u2300-\u2307\u230c-\u231f\u2322-\u2328\u232b-\u237b\u237d-\u239a\u23b4-\u23db\u23e2-\u23e7\u2400-\u2426\u2440-\u244a\u249c-\u24e9\u2500-\u25b6\u25b8-\u25c0\u25c2-\u25f7\u2600-\u266e\u2670-\u269c\u26a0-\u26b2\u2701-\u2704\u2706-\u2709\u270c-\u2727\u2729-\u274b\u274d\u274f-\u2752\u2756\u2758-\u275e\u2761-\u2767\u2794\u2798-\u27af\u27b1-\u27be\u2800-\u28ff\u2b00-\u2b1a\u2b20-\u2b23\u2ce5-\u2cea\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u2ffb\u3004\u3012\u3013\u3020\u3036\u3037\u303e\u303f\u3190\u3191\u3196-\u319f\u31c0-\u31cf\u3200-\u321e\u322a-\u3243\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u32fe\u3300-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ufdfd\uffe4\uffe8\uffed\uffee\ufffc\ufffd]',Po:'[\u0021-\u0023\u0025-\u0027\u002a\u002c\u002e\u002f\u003a\u003b\u003f\u0040\u005c\u00a1\u00b7\u00bf\u037e\u0387\u055a-\u055f\u0589\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0964\u0965\u0970\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f85\u0fd0\u0fd1\u104a-\u104f\u10fb\u1361-\u1368\u166d\u166e\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u1805\u1807-\u180a\u1944\u1945\u19de\u19df\u1a1e\u1a1f\u1b5a-\u1b60\u2016\u2017\u2020-\u2027\u2030-\u2038\u203b-\u203e\u2041-\u2043\u2047-\u2051\u2053\u2055-\u205e\u2cf9-\u2cfc\u2cfe\u2cff\u2e00\u2e01\u2e06-\u2e08\u2e0b\u2e0e-\u2e16\u3001-\u3003\u303d\u30fb\ua874-\ua877\ufe10-\ufe16\ufe19\ufe30\ufe45\ufe46\ufe49-\ufe4c\ufe50-\ufe52\ufe54-\ufe57\ufe5f-\ufe61\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff07\uff0a\uff0c\uff0e\uff0f\uff1a\uff1b\uff1f\uff20\uff3c\uff61\uff64\uff65]',Mn:'[\u0300-\u036f\u0483-\u0486\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u0615\u064b-\u065e\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0901\u0902\u093c\u0941-\u0948\u094d\u0951-\u0954\u0962\u0963\u0981\u09bc\u09c1-\u09c4\u09cd\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a70\u0a71\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3f\u0b41-\u0b43\u0b4d\u0b56\u0b82\u0bc0\u0bcd\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0cbc\u0cbf\u0cc6\u0ccc\u0ccd\u0ce2\u0ce3\u0d41-\u0d43\u0d4d\u0dca\u0dd2-\u0dd4\u0dd6\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032\u1036\u1037\u1039\u1058\u1059\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1dc0-\u1dca\u1dfe\u1dff\u20d0-\u20dc\u20e1\u20e5-\u20ef\u302a-\u302f\u3099\u309a\ua806\ua80b\ua825\ua826\ufb1e\ufe00-\ufe0f\ufe20-\ufe23]',Ps:'[\u0028\u005b\u007b\u0f3a\u0f3c\u169b\u201a\u201e\u2045\u207d\u208d\u2329\u2768\u276a\u276c\u276e\u2770\u2772\u2774\u27c5\u27e6\u27e8\u27ea\u2983\u2985\u2987\u2989\u298b\u298d\u298f\u2991\u2993\u2995\u2997\u29d8\u29da\u29fc\u3008\u300a\u300c\u300e\u3010\u3014\u3016\u3018\u301a\u301d\ufd3e\ufe17\ufe35\ufe37\ufe39\ufe3b\ufe3d\ufe3f\ufe41\ufe43\ufe47\ufe59\ufe5b\ufe5d\uff08\uff3b\uff5b\uff5f\uff62]',Cc:'[\u0000-\u001f\u007f-\u009f]',Cf:'[\u00ad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u202a-\u202e\u2060-\u2063\u206a-\u206f\ufeff\ufff9-\ufffb]',Ll:'[\u0061-\u007a\u00aa\u00b5\u00ba\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u037b-\u037d\u0390\u03ac-\u03ce\u03d0\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0561-\u0587\u1d00-\u1d2b\u1d62-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9b\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1f00-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6\u1fc7\u1fd0-\u1fd3\u1fd6\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6\u1ff7\u2071\u207f\u210a\u210e\u210f\u2113\u212f\u2134\u2139\u213c\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65\u2c66\u2c68\u2c6a\u2c6c\u2c74\u2c76\u2c77\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3\u2ce4\u2d00-\u2d25\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a]',Lm:'[\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ee\u037a\u0559\u0640\u06e5\u06e6\u07f4\u07f5\u07fa\u0e46\u0ec6\u10fc\u17d7\u1843\u1d2c-\u1d61\u1d78\u1d9b-\u1dbf\u2090-\u2094\u2d6f\u3005\u3031-\u3035\u303b\u309d\u309e\u30fc-\u30fe\ua015\ua717-\ua71a\uff70\uff9e\uff9f]',Lo:'[\u01bb\u01c0-\u01c3\u0294\u05d0-\u05ea\u05f0-\u05f2\u0621-\u063a\u0641-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u076d\u0780-\u07a5\u07b1\u07ca-\u07ea\u0904-\u0939\u093d\u0950\u0958-\u0961\u097b-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d28\u0d2a-\u0d39\u0d60\u0d61\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e45\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0edc\u0edd\u0f00\u0f40-\u0f47\u0f49-\u0f6a\u0f88-\u0f8b\u1000-\u1021\u1023-\u1027\u1029\u102a\u1050-\u1055\u10d0-\u10fa\u1100-\u1159\u115f-\u11a2\u11a8-\u11f9\u1200-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u1676\u1681-\u169a\u16a0-\u16ea\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u1877\u1880-\u18a8\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19a9\u19c1-\u19c7\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u2135-\u2138\u2d30-\u2d65\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3006\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff\u3105-\u312c\u3131-\u318e\u31a0-\u31b7\u31f0-\u31ff\u3400\u4db5\u4e00\u9fbb\ua000-\ua014\ua016-\ua48c\ua800\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\uac00\ud7a3\uf900-\ufa2d\ufa30-\ufa6a\ufa70-\ufad9\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff66-\uff6f\uff71-\uff9d\uffa0-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]',Co:'[\ue000\uf8ff]',Nd:'[\u0030-\u0039\u0660-\u0669\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1b50-\u1b59\uff10-\uff19]',Lt:'[\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc]',Lu:'[\u0041-\u005a\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178\u0179\u017b\u017d\u0181\u0182\u0184\u0186\u0187\u0189-\u018b\u018e-\u0191\u0193\u0194\u0196-\u0198\u019c\u019d\u019f\u01a0\u01a2\u01a4\u01a6\u01a7\u01a9\u01ac\u01ae\u01af\u01b1-\u01b3\u01b5\u01b7\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a\u023b\u023d\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0386\u0388-\u038a\u038c\u038e\u038f\u0391-\u03a1\u03a3-\u03ab\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0531-\u0556\u10a0-\u10c5\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c75\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\uff21-\uff3a]',Cs:'[\ud800\udb7f\udb80\udbff\udc00\udfff]',Zl:'[\u2028]',Nl:'[\u16ee-\u16f0\u2160-\u2182\u3007\u3021-\u3029\u3038-\u303a]',Zp:'[\u2029]',No:'[\u00b2\u00b3\u00b9\u00bc-\u00be\u09f4-\u09f9\u0bf0-\u0bf2\u0f2a-\u0f33\u1369-\u137c\u17f0-\u17f9\u2070\u2074-\u2079\u2080-\u2089\u2153-\u215f\u2460-\u249b\u24ea-\u24ff\u2776-\u2793\u2cfd\u3192-\u3195\u3220-\u3229\u3251-\u325f\u3280-\u3289\u32b1-\u32bf]',Zs:'[\u0020\u00a0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000]',Sc:'[\u0024\u00a2-\u00a5\u060b\u09f2\u09f3\u0af1\u0bf9\u0e3f\u17db\u20a0-\u20b5\ufdfc\ufe69\uff04\uffe0\uffe1\uffe5\uffe6]',Pc:'[\u005f\u203f\u2040\u2054\ufe33\ufe34\ufe4d-\ufe4f\uff3f]',Pd:'[\u002d\u058a\u1806\u2010-\u2015\u2e17\u301c\u3030\u30a0\ufe31\ufe32\ufe58\ufe63\uff0d]',Pe:'[\u0029\u005d\u007d\u0f3b\u0f3d\u169c\u2046\u207e\u208e\u232a\u2769\u276b\u276d\u276f\u2771\u2773\u2775\u27c6\u27e7\u27e9\u27eb\u2984\u2986\u2988\u298a\u298c\u298e\u2990\u2992\u2994\u2996\u2998\u29d9\u29db\u29fd\u3009\u300b\u300d\u300f\u3011\u3015\u3017\u3019\u301b\u301e\u301f\ufd3f\ufe18\ufe36\ufe38\ufe3a\ufe3c\ufe3e\ufe40\ufe42\ufe44\ufe48\ufe5a\ufe5c\ufe5e\uff09\uff3d\uff5d\uff60\uff63]',Pf:'[\u00bb\u2019\u201d\u203a\u2e03\u2e05\u2e0a\u2e0d\u2e1d]',Me:'[\u0488\u0489\u06de\u20dd-\u20e0\u20e2-\u20e4]',Mc:'[\u0903\u093e-\u0940\u0949-\u094c\u0982\u0983\u09be-\u09c0\u09c7\u09c8\u09cb\u09cc\u09d7\u0a03\u0a3e-\u0a40\u0a83\u0abe-\u0ac0\u0ac9\u0acb\u0acc\u0b02\u0b03\u0b3e\u0b40\u0b47\u0b48\u0b4b\u0b4c\u0b57\u0bbe\u0bbf\u0bc1\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd7\u0c01-\u0c03\u0c41-\u0c44\u0c82\u0c83\u0cbe\u0cc0-\u0cc4\u0cc7\u0cc8\u0cca\u0ccb\u0cd5\u0cd6\u0d02\u0d03\u0d3e-\u0d40\u0d46-\u0d48\u0d4a-\u0d4c\u0d57\u0d82\u0d83\u0dcf-\u0dd1\u0dd8-\u0ddf\u0df2\u0df3\u0f3e\u0f3f\u0f7f\u102c\u1031\u1038\u1056\u1057\u17b6\u17be-\u17c5\u17c7\u17c8\u1923-\u1926\u1929-\u192b\u1930\u1931\u1933-\u1938\u19b0-\u19c0\u19c8\u19c9\u1a19-\u1a1b\u1b04\u1b35\u1b3b\u1b3d-\u1b41\u1b43\u1b44\ua802\ua823\ua824\ua827]'};var firstLetters={};for(var p in unicodeCategories){if(firstLetters[p[0]])
firstLetters[p[0]]=unicodeCategories[p].substring(0,unicodeCategories[p].length-1)+firstLetters[p[0]].substring(1);else firstLetters[p[0]]=unicodeCategories[p]}
for(var p in firstLetters)
unicodeCategories[p]=firstLetters[p];return function(regexpString,classes){var modifiers="";if(regexpString instanceof RegExp){modifiers=(regexpString.global?"g":"")+(regexpString.ignoreCase?"i":"")+(regexpString.multiline?"m":"");regexpString=regexpString.source}
regexpString=regexpString.replace(/\\p\{(..?)\}/g,function(match,group){var unicode_categorie=unicodeCategories[group];if(!classes)
unicode_category=unicode_categorie.replace(/\[(.*?)\]/g,"$1")
return unicode_category||match});return new RegExp(regexpString,modifiers)}})();/**
 * Copyright ETS Software Technology Co., Ltd
 *
 * NOTICE OF LICENSE
 *
 * This file is not open source! Each license that you purchased is only available for 1 website only.
 * If you want to use this file on more websites (or projects), you need to purchase additional licenses.
 * You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future.
 *
 * @author ETS Software Technology Co., Ltd
 * @copyright  ETS Software Technology Co., Ltd
 * @license    Valid for 1 website (or project) for each purchase of license
 */
(function(window,factory){var lazySizes=factory(window,window.document);window.lazySizes=lazySizes;if(typeof module=='object'&&module.exports){module.exports=lazySizes}}(typeof window!='undefined'?window:{},function l(window,document){'use strict';var lazysizes,lazySizesCfg;(function(){var prop;var lazySizesDefaults={lazyClass:'lazyload',loadedClass:'lazyloaded',loadingClass:'lazyloading',preloadClass:'lazypreload',errorClass:'lazyerror',autosizesClass:'lazyautosizes',srcAttr:'data-src',srcsetAttr:'data-srcset',sizesAttr:'data-sizes',minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:0.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125,};lazySizesCfg=window.lazySizesConfig||window.lazysizesConfig||{};for(prop in lazySizesDefaults){if(!(prop in lazySizesCfg)){lazySizesCfg[prop]=lazySizesDefaults[prop]}}})();if(!document||!document.getElementsByClassName){return{init:function(){},cfg:lazySizesCfg,noSupport:!0,}}
var docElem=document.documentElement;var Date=window.Date;var supportPicture=window.HTMLPictureElement;var _addEventListener='addEventListener';var _getAttribute='getAttribute';var addEventListener=window[_addEventListener];var setTimeout=window.setTimeout;var requestAnimationFrame=window.requestAnimationFrame||setTimeout;var requestIdleCallback=window.requestIdleCallback;var regPicture=/^picture$/i;var regLoadElements=/^img|iframe$/i;var loadEvents=['load','error','lazyincluded','_lazyloaded'];var regClassCache={};var forEach=Array.prototype.forEach;var hasClass=function(ele,cls){if(!regClassCache[cls]){regClassCache[cls]=new RegExp('(\\s|^)'+cls+'(\\s|$)')}
return regClassCache[cls].test(ele[_getAttribute]('class')||'')&&regClassCache[cls]};var addClass=function(ele,cls){if(!hasClass(ele,cls)){ele.setAttribute('class',(ele[_getAttribute]('class')||'').trim()+' '+cls)}};var removeClass=function(ele,cls){var reg;if((reg=hasClass(ele,cls))){ele.setAttribute('class',(ele[_getAttribute]('class')||'').replace(reg,' '))}};var addRemoveLoadEvents=function(dom,fn,add){var action=add?_addEventListener:'removeEventListener';if(add){addRemoveLoadEvents(dom,fn)}
loadEvents.forEach(function(evt){dom[action](evt,fn)})};var triggerEvent=function(elem,name,detail,noBubbles,noCancelable){var event=document.createEvent('Event');if(!detail){detail={}}
detail.instance=lazysizes;event.initEvent(name,!noBubbles,!noCancelable);event.detail=detail;elem.dispatchEvent(event);return event};var updatePolyfill=function(el,full){var polyfill;if(!supportPicture&&(polyfill=(window.picturefill||lazySizesCfg.pf))){if(full&&full.src&&!el[_getAttribute]('srcset')){el.setAttribute('srcset',full.src)}
polyfill({reevaluate:!0,elements:[el]})}else if(full&&full.src){el.src=full.src}};var getCSS=function(elem,style){return(getComputedStyle(elem,null)||{})[style]};var getWidth=function(elem,parent,width){width=width||elem.offsetWidth;while(width<lazySizesCfg.minSize&&parent&&!elem._lazysizesWidth){width=parent.offsetWidth;parent=parent.parentNode}
return width};var rAF=(function(){var running,waiting;var firstFns=[];var secondFns=[];var fns=firstFns;var run=function(){var runFns=fns;fns=firstFns.length?secondFns:firstFns;running=!0;waiting=!1;while(runFns.length){runFns.shift()()}
running=!1};var rafBatch=function(fn,queue){if(running&&!queue){fn.apply(this,arguments)}else{fns.push(fn);if(!waiting){waiting=!0;(document.hidden?setTimeout:requestAnimationFrame)(run)}}};rafBatch._lsFlush=run;return rafBatch})();var rAFIt=function(fn,simple){return simple?function(){rAF(fn)}:function(){var that=this;var args=arguments;rAF(function(){fn.apply(that,args)})}};var throttle=function(fn){var running;var lastTime=0;var gDelay=lazySizesCfg.throttleDelay;var rICTimeout=lazySizesCfg.ricTimeout;var run=function(){running=!1;lastTime=Date.now();fn()};var idleCallback=requestIdleCallback&&rICTimeout>49?function(){requestIdleCallback(run,{timeout:rICTimeout});if(rICTimeout!==lazySizesCfg.ricTimeout){rICTimeout=lazySizesCfg.ricTimeout}}:rAFIt(function(){setTimeout(run)},!0);return function(isPriority){var delay;if((isPriority=isPriority===!0)){rICTimeout=33}
if(running){return}
running=!0;delay=gDelay-(Date.now()-lastTime);if(delay<0){delay=0}
if(isPriority||delay<9){idleCallback()}else{setTimeout(idleCallback,delay)}}};var debounce=function(func){var timeout,timestamp;var wait=99;var run=function(){timeout=null;func()};var later=function(){var last=Date.now()-timestamp;if(last<wait){setTimeout(later,wait-last)}else{(requestIdleCallback||run)(run)}};return function(){timestamp=Date.now();if(!timeout){timeout=setTimeout(later,wait)}}};var loader=(function(){var preloadElems,isCompleted,resetPreloadingTimer,loadMode,started;var eLvW,elvH,eLtop,eLleft,eLright,eLbottom,isBodyHidden;var regImg=/^img$/i;var regIframe=/^iframe$/i;var supportScroll=('onscroll' in window)&&!(/(gle|ing)bot/.test(navigator.userAgent));var shrinkExpand=0;var currentExpand=0;var isLoading=0;var lowRuns=-1;var resetPreloading=function(e){isLoading--;if(!e||isLoading<0||!e.target){isLoading=0}};var isVisible=function(elem){if(isBodyHidden==null){isBodyHidden=getCSS(document.body,'visibility')=='hidden'}
return isBodyHidden||(getCSS(elem.parentNode,'visibility')!='hidden'&&getCSS(elem,'visibility')!='hidden')};var isNestedVisible=function(elem,elemExpand){var outerRect;var parent=elem;var visible=isVisible(elem);eLtop-=elemExpand;eLbottom+=elemExpand;eLleft-=elemExpand;eLright+=elemExpand;while(visible&&(parent=parent.offsetParent)&&parent!=document.body&&parent!=docElem){visible=((getCSS(parent,'opacity')||1)>0);if(visible&&getCSS(parent,'overflow')!='visible'){outerRect=parent.getBoundingClientRect();visible=eLright>outerRect.left&&eLleft<outerRect.right&&eLbottom>outerRect.top-1&&eLtop<outerRect.bottom+1}}
return visible};var checkElements=function(){var eLlen,i,rect,autoLoadElem,loadedSomething,elemExpand,elemNegativeExpand,elemExpandVal,beforeExpandVal,defaultExpand,preloadExpand,hFac;var lazyloadElems=lazysizes.elements;if((loadMode=lazySizesCfg.loadMode)&&isLoading<8&&(eLlen=lazyloadElems.length)){i=0;lowRuns++;for(;i<eLlen;i++){if(!lazyloadElems[i]||lazyloadElems[i]._lazyRace){continue}
if(!supportScroll||(lazysizes.prematureUnveil&&lazysizes.prematureUnveil(lazyloadElems[i]))){unveilElement(lazyloadElems[i]);continue}
if(!(elemExpandVal=lazyloadElems[i][_getAttribute]('data-expand'))||!(elemExpand=elemExpandVal*1)){elemExpand=currentExpand}
if(!defaultExpand){defaultExpand=(!lazySizesCfg.expand||lazySizesCfg.expand<1)?docElem.clientHeight>500&&docElem.clientWidth>500?500:370:lazySizesCfg.expand;lazysizes._defEx=defaultExpand;preloadExpand=defaultExpand*lazySizesCfg.expFactor;hFac=lazySizesCfg.hFac;isBodyHidden=null;if(currentExpand<preloadExpand&&isLoading<1&&lowRuns>2&&loadMode>2&&!document.hidden){currentExpand=preloadExpand;lowRuns=0}else if(loadMode>1&&lowRuns>1&&isLoading<6){currentExpand=defaultExpand}else{currentExpand=shrinkExpand}}
if(beforeExpandVal!==elemExpand){eLvW=innerWidth+(elemExpand*hFac);elvH=innerHeight+elemExpand;elemNegativeExpand=elemExpand*-1;beforeExpandVal=elemExpand}
rect=lazyloadElems[i].getBoundingClientRect();if((eLbottom=rect.bottom)>=elemNegativeExpand&&(eLtop=rect.top)<=elvH&&(eLright=rect.right)>=elemNegativeExpand*hFac&&(eLleft=rect.left)<=eLvW&&(eLbottom||eLright||eLleft||eLtop)&&(lazySizesCfg.loadHidden||isVisible(lazyloadElems[i]))&&((isCompleted&&isLoading<3&&!elemExpandVal&&(loadMode<3||lowRuns<4))||isNestedVisible(lazyloadElems[i],elemExpand))){unveilElement(lazyloadElems[i]);loadedSomething=!0;if(isLoading>9){break}}else if(!loadedSomething&&isCompleted&&!autoLoadElem&&isLoading<4&&lowRuns<4&&loadMode>2&&(preloadElems[0]||lazySizesCfg.preloadAfterLoad)&&(preloadElems[0]||(!elemExpandVal&&((eLbottom||eLright||eLleft||eLtop)||lazyloadElems[i][_getAttribute](lazySizesCfg.sizesAttr)!='auto')))){autoLoadElem=preloadElems[0]||lazyloadElems[i]}}
if(autoLoadElem&&!loadedSomething){unveilElement(autoLoadElem)}}};var throttledCheckElements=throttle(checkElements);var switchLoadingClass=function(e){var elem=e.target;if(elem._lazyCache){delete elem._lazyCache;return}
resetPreloading(e);addClass(elem,lazySizesCfg.loadedClass);removeClass(elem,lazySizesCfg.loadingClass);addRemoveLoadEvents(elem,rafSwitchLoadingClass);triggerEvent(elem,'lazyloaded')};var rafedSwitchLoadingClass=rAFIt(switchLoadingClass);var rafSwitchLoadingClass=function(e){rafedSwitchLoadingClass({target:e.target})};var changeIframeSrc=function(elem,src){try{elem.contentWindow.location.replace(src)}catch(e){elem.src=src}};var handleSources=function(source){var customMedia;var sourceSrcset=source[_getAttribute](lazySizesCfg.srcsetAttr);if((customMedia=lazySizesCfg.customMedia[source[_getAttribute]('data-media')||source[_getAttribute]('media')])){source.setAttribute('media',customMedia)}
if(sourceSrcset){source.setAttribute('srcset',sourceSrcset)}};var lazyUnveil=rAFIt(function(elem,detail,isAuto,sizes,isImg){var src,srcset,parent,isPicture,event,firesLoad;if(!(event=triggerEvent(elem,'lazybeforeunveil',detail)).defaultPrevented){if(sizes){if(isAuto){addClass(elem,lazySizesCfg.autosizesClass)}else{elem.setAttribute('sizes',sizes)}}
srcset=elem[_getAttribute](lazySizesCfg.srcsetAttr);src=elem[_getAttribute](lazySizesCfg.srcAttr);if(isImg){parent=elem.parentNode;isPicture=parent&&regPicture.test(parent.nodeName||'')}
firesLoad=detail.firesLoad||!!(('src' in elem&&regLoadElements.test(elem.nodeName))&&(srcset||src||isPicture));event={target:elem};addClass(elem,lazySizesCfg.loadingClass);if(firesLoad){clearTimeout(resetPreloadingTimer);resetPreloadingTimer=setTimeout(resetPreloading,2500);addRemoveLoadEvents(elem,rafSwitchLoadingClass,!0)}
if(isPicture){forEach.call(parent.getElementsByTagName('source'),handleSources)}
if(srcset){elem.setAttribute('srcset',srcset)}else if(src&&!isPicture){if(regIframe.test(elem.nodeName)){changeIframeSrc(elem,src)}else{elem.src=src}}
if(isImg&&(srcset||isPicture)){updatePolyfill(elem,{src:src})}}
if(elem._lazyRace){delete elem._lazyRace}
removeClass(elem,lazySizesCfg.lazyClass);rAF(function(){var isLoaded=elem.complete&&elem.naturalWidth>1;if(!firesLoad||isLoaded){if(isLoaded){addClass(elem,'ls-is-cached')}
switchLoadingClass(event);elem._lazyCache=!0;setTimeout(function(){if('_lazyCache' in elem){delete elem._lazyCache}},9)}
if(elem.loading=='lazy'){isLoading--}},!0)});var unveilElement=function(elem){if(elem._lazyRace){return}
var detail;var isImg=regImg.test(elem.nodeName);var sizes=isImg&&(elem[_getAttribute](lazySizesCfg.sizesAttr)||elem[_getAttribute]('sizes'));var isAuto=sizes=='auto';if((isAuto||!isCompleted)&&isImg&&(elem[_getAttribute]('src')||elem.srcset)&&!elem.complete&&!hasClass(elem,lazySizesCfg.errorClass)&&hasClass(elem,lazySizesCfg.lazyClass)){return}
detail=triggerEvent(elem,'lazyunveilread').detail;if(isAuto){autoSizer.updateElem(elem,!0,elem.offsetWidth)}
elem._lazyRace=!0;isLoading++;lazyUnveil(elem,detail,isAuto,sizes,isImg)};var afterScroll=debounce(function(){lazySizesCfg.loadMode=3;throttledCheckElements()});var altLoadmodeScrollListner=function(){if(lazySizesCfg.loadMode==3){lazySizesCfg.loadMode=2}
afterScroll()};var onload=function(){if(isCompleted){return}
if(Date.now()-started<999){setTimeout(onload,999);return}
isCompleted=!0;lazySizesCfg.loadMode=3;throttledCheckElements();addEventListener('scroll',altLoadmodeScrollListner,!0)};return{_:function(){started=Date.now();lazysizes.elements=document.getElementsByClassName(lazySizesCfg.lazyClass);preloadElems=document.getElementsByClassName(lazySizesCfg.lazyClass+' '+lazySizesCfg.preloadClass);addEventListener('scroll',throttledCheckElements,!0);addEventListener('resize',throttledCheckElements,!0);if(window.MutationObserver){new MutationObserver(throttledCheckElements).observe(docElem,{childList:!0,subtree:!0,attributes:!0})}else{docElem[_addEventListener]('DOMNodeInserted',throttledCheckElements,!0);docElem[_addEventListener]('DOMAttrModified',throttledCheckElements,!0);setInterval(throttledCheckElements,999)}
addEventListener('hashchange',throttledCheckElements,!0);['focus','mouseover','click','load','transitionend','animationend'].forEach(function(name){document[_addEventListener](name,throttledCheckElements,!0)});if((/d$|^c/.test(document.readyState))){onload()}else{addEventListener('load',onload);document[_addEventListener]('DOMContentLoaded',throttledCheckElements);setTimeout(onload,20000)}
if(lazysizes.elements.length){checkElements();rAF._lsFlush()}else{throttledCheckElements()}},checkElems:throttledCheckElements,unveil:unveilElement,_aLSL:altLoadmodeScrollListner,}})();var autoSizer=(function(){var autosizesElems;var sizeElement=rAFIt(function(elem,parent,event,width){var sources,i,len;elem._lazysizesWidth=width;width+='px';elem.setAttribute('sizes',width);if(regPicture.test(parent.nodeName||'')){sources=parent.getElementsByTagName('source');for(i=0,len=sources.length;i<len;i++){sources[i].setAttribute('sizes',width)}}
if(!event.detail.dataAttr){updatePolyfill(elem,event.detail)}});var getSizeElement=function(elem,dataAttr,width){var event;var parent=elem.parentNode;if(parent){width=getWidth(elem,parent,width);event=triggerEvent(elem,'lazybeforesizes',{width:width,dataAttr:!!dataAttr});if(!event.defaultPrevented){width=event.detail.width;if(width&&width!==elem._lazysizesWidth){sizeElement(elem,parent,event,width)}}}};var updateElementsSizes=function(){var i;var len=autosizesElems.length;if(len){i=0;for(;i<len;i++){getSizeElement(autosizesElems[i])}}};var debouncedUpdateElementsSizes=debounce(updateElementsSizes);return{_:function(){autosizesElems=document.getElementsByClassName(lazySizesCfg.autosizesClass);addEventListener('resize',debouncedUpdateElementsSizes)},checkElems:debouncedUpdateElementsSizes,updateElem:getSizeElement}})();var init=function(){if(!init.i&&document.getElementsByClassName){init.i=!0;autoSizer._();loader._()}};setTimeout(function(){if(lazySizesCfg.init){init()}});lazysizes={cfg:lazySizesCfg,autoSizer:autoSizer,loader:loader,init:init,uP:updatePolyfill,aC:addClass,rC:removeClass,hC:hasClass,fire:triggerEvent,gW:getWidth,rAF:rAF,};return lazysizes}));/**
 * Copyright ETS Software Technology Co., Ltd
 *
 * NOTICE OF LICENSE
 *
 * This file is not open source! Each license that you purchased is only available for 1 website only.
 * If you want to use this file on more websites (or projects), you need to purchase additional licenses.
 * You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future.
 *
 * @author ETS Software Technology Co., Ltd
 * @copyright  ETS Software Technology Co., Ltd
 * @license    Valid for 1 website (or project) for each purchase of license
 */
$(document).ready(function(){if($('#quantity_wanted').length&&$('.product-add-to-cart').length){setTimeout(function(){$.ajax({type:'POST',url:'',async:!0,cache:!1,dataType:"json",data:'ajax=1&quickview=0&action=refresh&quantity_wanted='+$('#quantity_wanted').val(),success:function(jsonData,textStatus,jqXHR){if(jsonData){var addToCartBt=".page-product:not(.modal-open) .row .product-add-to-cart, .page-product:not(.modal-open) .product-container .product-add-to-cart, .page-product:not(.modal-open) .row .js-product-add-to-cart, .page-product:not(.modal-open) .product-container .js-product-add-to-cart";if(jsonData.product_add_to_cart&&$(addToCartBt).length){var t=$(addToCartBt).find('.add');if(!(t.length<=0)){var n=$(jsonData.product_add_to_cart).find('.add');if(n.length>0)
t.replaceWith(n[0].outerHTML);else t.html("")}
t=$(addToCartBt).find('#product-availability');if(!(t.length<=0)){var p=$(jsonData.product_add_to_cart).find('#product-availability');if(p.length>0)
t.replaceWith(p[0].outerHTML);else t.html("")}
t=$(addToCartBt).find('.product-minimal-quantity');if(!(t.length<=0)){var m=$(jsonData.product_add_to_cart).find('.product-minimal-quantity');if(m.length>0)
t.replaceWith(m[0].outerHTML);else t.html("")}}}},error:function(XMLHttpRequest,textStatus,errorThrown){}})},200)}
prestashop.on('updateCart',function(){const currentCart=$('.elementor-element[data-widget_type="shopping-cart.default"]');const lightbox=currentCart.find('.elementor-cart__wrapper .elementor-lightbox');if(currentCart.length&&lightbox.length&&!lightbox.hasClass('elementor-cart--shown')){currentCart.find('.elementor-cart__toggle').find('a').first().trigger('click')}});if($('.ets_speed_dynamic_hook').length||ssIsCeInstalled){var datas='';$('.ets_speed_dynamic_hook').each(function(index,domhook){datas=datas+'&hook_'+index+'='+$(this).attr('data-hook')+'&module_'+index+'='+$(this).attr('data-moudule')});var url=window.location.href;var indexphp=url.indexOf('?');var indexthang=url.indexOf('#');if(indexthang>=0)
url=url.substr(0,indexthang);$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:url,async:!0,cache:!1,dataType:"json",data:'ajax=1&ets_superseed_load_content=1&ajax=1&count_datas='+$('.ets_speed_dynamic_hook').length+datas,success:function(jsonData,textStatus,jqXHR){if(jsonData){renderDataAjax(jsonData);if(jsonData.creativeelements_header&&$('.elementor-'+jsonData.creativeelements_header.uid).length){$('.elementor-'+jsonData.creativeelements_header.uid).replaceWith(jsonData.creativeelements_header.content);if(typeof ceFrontend!='undefined'){ceFrontend.init()}}
if($(window).width()<768){$("*[id^='_desktop_']").each(function(t,e){var n=$("#"+e.id.replace("_desktop_","_mobile_"));if($(this).html().trim()!=''&&n.length)
n.html($(this).html())})}
$(document).trigger("hooksLoaded")}},error:function(XMLHttpRequest,textStatus,errorThrown){}})}});function ets_superspeed_getCeCartHandler(){var ShoppingCart=elementorModules.frontend.handlers.Base.extend({getDefaultSettings:function getDefaultSettings(){return{selectors:{container:'.elementor-cart__container',toggle:'.elementor-cart__toggle .elementor-button',closeButton:'.elementor-cart__close-button'},classes:{isShown:'elementor-cart--shown',lightbox:'elementor-lightbox',isHidden:'elementor-cart-hidden'}}},getDefaultElements:function getDefaultElements(){var selectors=this.getSettings('selectors'),elements={};elements.$container=this.$element.find(selectors.container);elements.$toggle=this.$element.find(selectors.toggle);elements.$closeButton=this.$element.find(selectors.closeButton);return elements},bindEvents:function bindEvents(){var self=this,$=jQuery,$container=self.elements.$container,$closeButton=self.elements.$closeButton,classes=this.getSettings('classes');self.elements.$toggle.on('click',function(event){if(!self.elements.$toggle.hasClass(classes.isHidden)){event.preventDefault();$container.toggleClass(classes.isShown)}});$container.on('click',function(event){if($container.hasClass(classes.isShown)&&$container[0]===event.target){$container.removeClass(classes.isShown)}});$closeButton.on('click',function(){$container.removeClass(classes.isShown)});ceFrontend.elements.$document.keyup(function(event){var ESC_KEY=27;if(ESC_KEY===event.keyCode){if($container.hasClass(classes.isShown)){$container.click()}}});$container.on('click','.elementor-cart__product-remove a',function(event){var dataset=$(this).data();dataset.linkAction='delete-from-cart';$(this).closest('.elementor-cart__product').addClass('ce-disabled');event.preventDefault();$.ajax({url:this.href,method:'POST',dataType:'json',data:{ajax:1,action:'update',},}).then(function(resp){prestashop.emit('updateCart',{reason:dataset,resp:resp,})}).fail(function(resp){prestashop.emit('handleError',{eventType:'updateProductInCart',resp:resp,cartAction:dataset.linkAction,})})});prestashop.on('updateCart',function(data){if(!data||!data.resp||!data.resp.cart){return}
var cart=data.resp.cart,gift=$container.find('.elementor-cart__products').data('gift'),$products=$();self.elements.$toggle.find('.elementor-button-text').html(cart.subtotals.products.value);self.elements.$toggle.find('.elementor-button-icon').attr('data-counter',cart.products_count).data('counter',cart.products_count);cart.products.forEach(function(product){var $prod=$('<div class="elementor-cart__product">'+'<div class="elementor-cart__product-image"></div>'+'<div class="elementor-cart__product-name">'+'<div class="elementor-cart__product-attrs"></div>'+'</div>'+'<div class="elementor-cart__product-price"></div>'+'<div class="elementor-cart__product-remove ceicon-times"></div>'+'</div>'),$attrs=$prod.find('.elementor-cart__product-attrs'),cover=product.cover||prestashop.urls.no_picture_image;if(product.embedded_attributes&&product.embedded_attributes.id_image){var i,id_cover=product.embedded_attributes.id_image.split('-').pop();for(i=0;i<product.images.length;i++){if(id_cover==product.images[i].id_image){cover=product.images[i];break}}}
$('<img>').appendTo($prod.find('.elementor-cart__product-image')).attr({src:cover.bySize.cart_default&&cover.bySize.cart_default.url||cover.small.url,alt:cover.legend,});$('<a>').prependTo($prod.find('.elementor-cart__product-name')).attr('href',product.url).html(product.name);for(var label in product.attributes){$('<div class="elementor-cart__product-attr">').html('<span class="elementor-cart__product-attr-label">'+label+':</span> '+'<span class="elementor-cart__product-attr-value">'+product.attributes[label]+'</span>').appendTo($attrs)}
product.customizations&&product.customizations.forEach(function(customization){customization.fields.forEach(function(field){$('<div class="elementor-cart__product-attr">').html('<span class="elementor-cart__product-attr-label">'+field.label+':</span> '+'<span class="elementor-cart__product-attr-value">'+('image'===field.type?$('<img>').attr('src',field.image.small.url)[0].outerHTML:field.text)+'</span>').appendTo($attrs)})});$prod.find('.elementor-cart__product-price').html('<span class="elementor-cart__product-quantity">'+product.quantity+'</span> &times; '+(product.is_gift?gift:product.price)+' ').append(product.has_discount?$('<del>').html(product.regular_price):[]);$('<a>').appendTo($prod.find('.elementor-cart__product-remove')).attr({href:product.remove_from_cart_url,rel:'nofollow','data-id-product':product.id_product,'data-id-product-attribute':product.id_product_attribute,'data-id-customization':product.id_customization,}).data({'idProduct':product.id_product,'idProductAttribute':product.id_product_attribute,'idCustomization':product.id_customization,});$products.push($prod[0])});$container.find('.elementor-cart__products').empty().append($products);$container.find('.elementor-cart__empty-message').toggleClass('elementor-hidden',!!cart.products_count);$container.find('.elementor-cart__summary').html('<div class="elementor-cart__summary-label">'+cart.summary_string+'</div>'+'<div class="elementor-cart__summary-value">'+cart.subtotals.products.value+'</div>'+'<span class="elementor-cart__summary-label">'+cart.subtotals.shipping.label+'</span>'+'<span class="elementor-cart__summary-value">'+cart.subtotals.shipping.value+'</span>'+'<strong class="elementor-cart__summary-label">'+cart.totals.total.label+'</strong>'+'<strong class="elementor-cart__summary-value">'+cart.totals.total.value+'</strong>');$container.find('.elementor-alert-warning').toggleClass('elementor-hidden',!cart.minimalPurchaseRequired).html('<span class="elementor-alert-description">'+cart.minimalPurchaseRequired+'</span>');$container.find('.elementor-button--checkout').toggleClass('ce-disabled',cart.minimalPurchaseRequired||!cart.products_count);if(self.getElementSettings('action_open_cart')){self.elements.$container.hasClass(classes.isShown)||self.elements.$toggle.triggerHandler('click')}})}});return ShoppingCart};(function(a){var b="0.3.4",c="hasOwnProperty",d=/[\.\/]/,e="*",f=function(){},g=function(a,b){return a-b},h,i,j={n:{}},k=function(a,b){var c=j,d=i,e=Array.prototype.slice.call(arguments,2),f=k.listeners(a),l=0,m=!1,n,o=[],p={},q=[],r=h,s=[];h=a,i=0;for(var t=0,u=f.length;t<u;t++)"zIndex"in f[t]&&(o.push(f[t].zIndex),f[t].zIndex<0&&(p[f[t].zIndex]=f[t]));o.sort(g);while(o[l]<0){n=p[o[l++]],q.push(n.apply(b,e));if(i){i=d;return q}}for(t=0;t<u;t++){n=f[t];if("zIndex"in n)if(n.zIndex==o[l]){q.push(n.apply(b,e));if(i)break;do{l++,n=p[o[l]],n&&q.push(n.apply(b,e));if(i)break}while(n)}else p[n.zIndex]=n;else{q.push(n.apply(b,e));if(i)break}}i=d,h=r;return q.length?q:null};k.listeners=function(a){var b=a.split(d),c=j,f,g,h,i,k,l,m,n,o=[c],p=[];for(i=0,k=b.length;i<k;i++){n=[];for(l=0,m=o.length;l<m;l++){c=o[l].n,g=[c[b[i]],c[e]],h=2;while(h--)f=g[h],f&&(n.push(f),p=p.concat(f.f||[]))}o=n}return p},k.on=function(a,b){var c=a.split(d),e=j;for(var g=0,h=c.length;g<h;g++)e=e.n,!e[c[g]]&&(e[c[g]]={n:{}}),e=e[c[g]];e.f=e.f||[];for(g=0,h=e.f.length;g<h;g++)if(e.f[g]==b)return f;e.f.push(b);return function(a){+a==+a&&(b.zIndex=+a)}},k.stop=function(){i=1},k.nt=function(a){if(a)return(new RegExp("(?:\\.|\\/|^)"+a+"(?:\\.|\\/|$)")).test(h);return h},k.off=k.unbind=function(a,b){var f=a.split(d),g,h,i,k,l,m,n,o=[j];for(k=0,l=f.length;k<l;k++)for(m=0;m<o.length;m+=i.length-2){i=[m,1],g=o[m].n;if(f[k]!=e)g[f[k]]&&i.push(g[f[k]]);else for(h in g)g[c](h)&&i.push(g[h]);o.splice.apply(o,i)}for(k=0,l=o.length;k<l;k++){g=o[k];while(g.n){if(b){if(g.f){for(m=0,n=g.f.length;m<n;m++)if(g.f[m]==b){g.f.splice(m,1);break}!g.f.length&&delete g.f}for(h in g.n)if(g.n[c](h)&&g.n[h].f){var p=g.n[h].f;for(m=0,n=p.length;m<n;m++)if(p[m]==b){p.splice(m,1);break}!p.length&&delete g.n[h].f}}else{delete g.f;for(h in g.n)g.n[c](h)&&g.n[h].f&&delete g.n[h].f}g=g.n}}},k.once=function(a,b){var c=function(){var d=b.apply(this,arguments);k.unbind(a,c);return d};return k.on(a,c)},k.version=b,k.toString=function(){return"You are running Eve "+b},typeof module!="undefined"&&module.exports?module.exports=k:typeof define!="undefined"?define("eve",[],function(){return k}):a.eve=k})(this),function(){function cF(a){for(var b=0;b<cy.length;b++)cy[b].el.paper==a&&cy.splice(b--,1)}function cE(b,d,e,f,h,i){e=Q(e);var j,k,l,m=[],o,p,q,t=b.ms,u={},v={},w={};if(f)for(y=0,z=cy.length;y<z;y++){var x=cy[y];if(x.el.id==d.id&&x.anim==b){x.percent!=e?(cy.splice(y,1),l=1):k=x,d.attr(x.totalOrigin);break}}else f=+v;for(var y=0,z=b.percents.length;y<z;y++){if(b.percents[y]==e||b.percents[y]>f*b.top){e=b.percents[y],p=b.percents[y-1]||0,t=t/b.top*(e-p),o=b.percents[y+1],j=b.anim[e];break}f&&d.attr(b.anim[b.percents[y]])}if(!!j){if(!k){for(var A in j)if(j[g](A))if(U[g](A)||d.paper.customAttributes[g](A)){u[A]=d.attr(A),u[A]==null&&(u[A]=T[A]),v[A]=j[A];switch(U[A]){case C:w[A]=(v[A]-u[A])/t;break;case"colour":u[A]=a.getRGB(u[A]);var B=a.getRGB(v[A]);w[A]={r:(B.r-u[A].r)/t,g:(B.g-u[A].g)/t,b:(B.b-u[A].b)/t};break;case"path":var D=bR(u[A],v[A]),E=D[1];u[A]=D[0],w[A]=[];for(y=0,z=u[A].length;y<z;y++){w[A][y]=[0];for(var F=1,G=u[A][y].length;F<G;F++)w[A][y][F]=(E[y][F]-u[A][y][F])/t}break;case"transform":var H=d._,I=ca(H[A],v[A]);if(I){u[A]=I.from,v[A]=I.to,w[A]=[],w[A].real=!0;for(y=0,z=u[A].length;y<z;y++){w[A][y]=[u[A][y][0]];for(F=1,G=u[A][y].length;F<G;F++)w[A][y][F]=(v[A][y][F]-u[A][y][F])/t}}else{var J=d.matrix||new cb,K={_:{transform:H.transform},getBBox:function(){return d.getBBox(1)}};u[A]=[J.a,J.b,J.c,J.d,J.e,J.f],b$(K,v[A]),v[A]=K._.transform,w[A]=[(K.matrix.a-J.a)/t,(K.matrix.b-J.b)/t,(K.matrix.c-J.c)/t,(K.matrix.d-J.d)/t,(K.matrix.e-J.e)/t,(K.matrix.f-J.f)/t]}break;case"csv":var L=r(j[A])[s](c),M=r(u[A])[s](c);if(A=="clip-rect"){u[A]=M,w[A]=[],y=M.length;while(y--)w[A][y]=(L[y]-u[A][y])/t}v[A]=L;break;default:L=[][n](j[A]),M=[][n](u[A]),w[A]=[],y=d.paper.customAttributes[A].length;while(y--)w[A][y]=((L[y]||0)-(M[y]||0))/t}}var O=j.easing,P=a.easing_formulas[O];if(!P){P=r(O).match(N);if(P&&P.length==5){var R=P;P=function(a){return cC(a,+R[1],+R[2],+R[3],+R[4],t)}}else P=bf}q=j.start||b.start||+(new Date),x={anim:b,percent:e,timestamp:q,start:q+(b.del||0),status:0,initstatus:f||0,stop:!1,ms:t,easing:P,from:u,diff:w,to:v,el:d,callback:j.callback,prev:p,next:o,repeat:i||b.times,origin:d.attr(),totalOrigin:h},cy.push(x);if(f&&!k&&!l){x.stop=!0,x.start=new Date-t*f;if(cy.length==1)return cA()}l&&(x.start=new Date-x.ms*f),cy.length==1&&cz(cA)}else k.initstatus=f,k.start=new Date-k.ms*f;eve("raphael.anim.start."+d.id,d,b)}}function cD(a,b){var c=[],d={};this.ms=b,this.times=1;if(a){for(var e in a)a[g](e)&&(d[Q(e)]=a[e],c.push(Q(e)));c.sort(bd)}this.anim=d,this.top=c[c.length-1],this.percents=c}function cC(a,b,c,d,e,f){function o(a,b){var c,d,e,f,j,k;for(e=a,k=0;k<8;k++){f=m(e)-a;if(z(f)<b)return e;j=(3*i*e+2*h)*e+g;if(z(j)<1e-6)break;e=e-f/j}c=0,d=1,e=a;if(e<c)return c;if(e>d)return d;while(c<d){f=m(e);if(z(f-a)<b)return e;a>f?c=e:d=e,e=(d-c)/2+c}return e}function n(a,b){var c=o(a,b);return((l*c+k)*c+j)*c}function m(a){return((i*a+h)*a+g)*a}var g=3*b,h=3*(d-b)-g,i=1-g-h,j=3*c,k=3*(e-c)-j,l=1-j-k;return n(a,1/(200*f))}function cq(){return this.x+q+this.y+q+this.width+" × "+this.height}function cp(){return this.x+q+this.y}function cb(a,b,c,d,e,f){a!=null?(this.a=+a,this.b=+b,this.c=+c,this.d=+d,this.e=+e,this.f=+f):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function bH(b,c,d){b=a._path2curve(b),c=a._path2curve(c);var e,f,g,h,i,j,k,l,m,n,o=d?0:[];for(var p=0,q=b.length;p<q;p++){var r=b[p];if(r[0]=="M")e=i=r[1],f=j=r[2];else{r[0]=="C"?(m=[e,f].concat(r.slice(1)),e=m[6],f=m[7]):(m=[e,f,e,f,i,j,i,j],e=i,f=j);for(var s=0,t=c.length;s<t;s++){var u=c[s];if(u[0]=="M")g=k=u[1],h=l=u[2];else{u[0]=="C"?(n=[g,h].concat(u.slice(1)),g=n[6],h=n[7]):(n=[g,h,g,h,k,l,k,l],g=k,h=l);var v=bG(m,n,d);if(d)o+=v;else{for(var w=0,x=v.length;w<x;w++)v[w].segment1=p,v[w].segment2=s,v[w].bez1=m,v[w].bez2=n;o=o.concat(v)}}}}}return o}function bG(b,c,d){var e=a.bezierBBox(b),f=a.bezierBBox(c);if(!a.isBBoxIntersect(e,f))return d?0:[];var g=bB.apply(0,b),h=bB.apply(0,c),i=~~(g/5),j=~~(h/5),k=[],l=[],m={},n=d?0:[];for(var o=0;o<i+1;o++){var p=a.findDotsAtSegment.apply(a,b.concat(o/i));k.push({x:p.x,y:p.y,t:o/i})}for(o=0;o<j+1;o++)p=a.findDotsAtSegment.apply(a,c.concat(o/j)),l.push({x:p.x,y:p.y,t:o/j});for(o=0;o<i;o++)for(var q=0;q<j;q++){var r=k[o],s=k[o+1],t=l[q],u=l[q+1],v=z(s.x-r.x)<.001?"y":"x",w=z(u.x-t.x)<.001?"y":"x",x=bD(r.x,r.y,s.x,s.y,t.x,t.y,u.x,u.y);if(x){if(m[x.x.toFixed(4)]==x.y.toFixed(4))continue;m[x.x.toFixed(4)]=x.y.toFixed(4);var y=r.t+z((x[v]-r[v])/(s[v]-r[v]))*(s.t-r.t),A=t.t+z((x[w]-t[w])/(u[w]-t[w]))*(u.t-t.t);y>=0&&y<=1&&A>=0&&A<=1&&(d?n++:n.push({x:x.x,y:x.y,t1:y,t2:A}))}}return n}function bF(a,b){return bG(a,b,1)}function bE(a,b){return bG(a,b)}function bD(a,b,c,d,e,f,g,h){if(!(x(a,c)<y(e,g)||y(a,c)>x(e,g)||x(b,d)<y(f,h)||y(b,d)>x(f,h))){var i=(a*d-b*c)*(e-g)-(a-c)*(e*h-f*g),j=(a*d-b*c)*(f-h)-(b-d)*(e*h-f*g),k=(a-c)*(f-h)-(b-d)*(e-g);if(!k)return;var l=i/k,m=j/k,n=+l.toFixed(2),o=+m.toFixed(2);if(n<+y(a,c).toFixed(2)||n>+x(a,c).toFixed(2)||n<+y(e,g).toFixed(2)||n>+x(e,g).toFixed(2)||o<+y(b,d).toFixed(2)||o>+x(b,d).toFixed(2)||o<+y(f,h).toFixed(2)||o>+x(f,h).toFixed(2))return;return{x:l,y:m}}}function bC(a,b,c,d,e,f,g,h,i){if(!(i<0||bB(a,b,c,d,e,f,g,h)<i)){var j=1,k=j/2,l=j-k,m,n=.01;m=bB(a,b,c,d,e,f,g,h,l);while(z(m-i)>n)k/=2,l+=(m<i?1:-1)*k,m=bB(a,b,c,d,e,f,g,h,l);return l}}function bB(a,b,c,d,e,f,g,h,i){i==null&&(i=1),i=i>1?1:i<0?0:i;var j=i/2,k=12,l=[-0.1252,.1252,-0.3678,.3678,-0.5873,.5873,-0.7699,.7699,-0.9041,.9041,-0.9816,.9816],m=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],n=0;for(var o=0;o<k;o++){var p=j*l[o]+j,q=bA(p,a,c,e,g),r=bA(p,b,d,f,h),s=q*q+r*r;n+=m[o]*w.sqrt(s)}return j*n}function bA(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a*g-3*b+3*c}function by(a,b){var c=[];for(var d=0,e=a.length;e-2*!b>d;d+=2){var f=[{x:+a[d-2],y:+a[d-1]},{x:+a[d],y:+a[d+1]},{x:+a[d+2],y:+a[d+3]},{x:+a[d+4],y:+a[d+5]}];b?d?e-4==d?f[3]={x:+a[0],y:+a[1]}:e-2==d&&(f[2]={x:+a[0],y:+a[1]},f[3]={x:+a[2],y:+a[3]}):f[0]={x:+a[e-2],y:+a[e-1]}:e-4==d?f[3]=f[2]:d||(f[0]={x:+a[d],y:+a[d+1]}),c.push(["C",(-f[0].x+6*f[1].x+f[2].x)/6,(-f[0].y+6*f[1].y+f[2].y)/6,(f[1].x+6*f[2].x-f[3].x)/6,(f[1].y+6*f[2].y-f[3].y)/6,f[2].x,f[2].y])}return c}function bx(){return this.hex}function bv(a,b,c){function d(){var e=Array.prototype.slice.call(arguments,0),f=e.join("␀"),h=d.cache=d.cache||{},i=d.count=d.count||[];if(h[g](f)){bu(i,f);return c?c(h[f]):h[f]}i.length>=1e3&&delete h[i.shift()],i.push(f),h[f]=a[m](b,e);return c?c(h[f]):h[f]}return d}function bu(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return a.push(a.splice(c,1)[0])}function bm(a){if(Object(a)!==a)return a;var b=new a.constructor;for(var c in a)a[g](c)&&(b[c]=bm(a[c]));return b}function a(c){if(a.is(c,"function"))return b?c():eve.on("raphael.DOMload",c);if(a.is(c,E))return a._engine.create[m](a,c.splice(0,3+a.is(c[0],C))).add(c);var d=Array.prototype.slice.call(arguments,0);if(a.is(d[d.length-1],"function")){var e=d.pop();return b?e.call(a._engine.create[m](a,d)):eve.on("raphael.DOMload",function(){e.call(a._engine.create[m](a,d))})}return a._engine.create[m](a,arguments)}a.version="2.1.0",a.eve=eve;var b,c=/[, ]+/,d={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},e=/\{(\d+)\}/g,f="prototype",g="hasOwnProperty",h={doc:document,win:window},i={was:Object.prototype[g].call(h.win,"Raphael"),is:h.win.Raphael},j=function(){this.ca=this.customAttributes={}},k,l="appendChild",m="apply",n="concat",o="createTouch"in h.doc,p="",q=" ",r=String,s="split",t="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[s](q),u={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},v=r.prototype.toLowerCase,w=Math,x=w.max,y=w.min,z=w.abs,A=w.pow,B=w.PI,C="number",D="string",E="array",F="toString",G="fill",H=Object.prototype.toString,I={},J="push",K=a._ISURL=/^url\(['"]?([^\)]+?)['"]?\)$/i,L=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,M={NaN:1,Infinity:1,"-Infinity":1},N=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,O=w.round,P="setAttribute",Q=parseFloat,R=parseInt,S=r.prototype.toUpperCase,T=a._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0},U=a._availableAnimAttrs={blur:C,"clip-rect":"csv",cx:C,cy:C,fill:"colour","fill-opacity":C,"font-size":C,height:C,opacity:C,path:"path",r:C,rx:C,ry:C,stroke:"colour","stroke-opacity":C,"stroke-width":C,transform:"transform",width:C,x:C,y:C},V=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]/g,W=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,X={hs:1,rg:1},Y=/,?([achlmqrstvxz]),?/gi,Z=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig,$=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig,_=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/ig,ba=a._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,bb={},bc=function(a,b){return a.key-b.key},bd=function(a,b){return Q(a)-Q(b)},be=function(){},bf=function(a){return a},bg=a._rectPath=function(a,b,c,d,e){if(e)return[["M",a+e,b],["l",c-e*2,0],["a",e,e,0,0,1,e,e],["l",0,d-e*2],["a",e,e,0,0,1,-e,e],["l",e*2-c,0],["a",e,e,0,0,1,-e,-e],["l",0,e*2-d],["a",e,e,0,0,1,e,-e],["z"]];return[["M",a,b],["l",c,0],["l",0,d],["l",-c,0],["z"]]},bh=function(a,b,c,d){d==null&&(d=c);return[["M",a,b],["m",0,-d],["a",c,d,0,1,1,0,2*d],["a",c,d,0,1,1,0,-2*d],["z"]]},bi=a._getPath={path:function(a){return a.attr("path")},circle:function(a){var b=a.attrs;return bh(b.cx,b.cy,b.r)},ellipse:function(a){var b=a.attrs;return bh(b.cx,b.cy,b.rx,b.ry)},rect:function(a){var b=a.attrs;return bg(b.x,b.y,b.width,b.height,b.r)},image:function(a){var b=a.attrs;return bg(b.x,b.y,b.width,b.height)},text:function(a){var b=a._getBBox();return bg(b.x,b.y,b.width,b.height)}},bj=a.mapPath=function(a,b){if(!b)return a;var c,d,e,f,g,h,i;a=bR(a);for(e=0,g=a.length;e<g;e++){i=a[e];for(f=1,h=i.length;f<h;f+=2)c=b.x(i[f],i[f+1]),d=b.y(i[f],i[f+1]),i[f]=c,i[f+1]=d}return a};a._g=h,a.type=h.win.SVGAngle||h.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML";if(a.type=="VML"){var bk=h.doc.createElement("div"),bl;bk.innerHTML='<v:shape adj="1"/>',bl=bk.firstChild,bl.style.behavior="url(#default#VML)";if(!bl||typeof bl.adj!="object")return a.type=p;bk=null}a.svg=!(a.vml=a.type=="VML"),a._Paper=j,a.fn=k=j.prototype=a.prototype,a._id=0,a._oid=0,a.is=function(a,b){b=v.call(b);if(b=="finite")return!M[g](+a);if(b=="array")return a instanceof Array;return b=="null"&&a===null||b==typeof a&&a!==null||b=="object"&&a===Object(a)||b=="array"&&Array.isArray&&Array.isArray(a)||H.call(a).slice(8,-1).toLowerCase()==b},a.angle=function(b,c,d,e,f,g){if(f==null){var h=b-d,i=c-e;if(!h&&!i)return 0;return(180+w.atan2(-i,-h)*180/B+360)%360}return a.angle(b,c,f,g)-a.angle(d,e,f,g)},a.rad=function(a){return a%360*B/180},a.deg=function(a){return a*180/B%360},a.snapTo=function(b,c,d){d=a.is(d,"finite")?d:10;if(a.is(b,E)){var e=b.length;while(e--)if(z(b[e]-c)<=d)return b[e]}else{b=+b;var f=c%b;if(f<d)return c-f;if(f>b-d)return c-f+b}return c};var bn=a.createUUID=function(a,b){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a,b).toUpperCase()}}(/[xy]/g,function(a){var b=w.random()*16|0,c=a=="x"?b:b&3|8;return c.toString(16)});a.setWindow=function(b){eve("raphael.setWindow",a,h.win,b),h.win=b,h.doc=h.win.document,a._engine.initWin&&a._engine.initWin(h.win)};var bo=function(b){if(a.vml){var c=/^\s+|\s+$/g,d;try{var e=new ActiveXObject("htmlfile");e.write("<body>"),e.close(),d=e.body}catch(f){d=createPopup().document.body}var g=d.createTextRange();bo=bv(function(a){try{d.style.color=r(a).replace(c,p);var b=g.queryCommandValue("ForeColor");b=(b&255)<<16|b&65280|(b&16711680)>>>16;return"#"+("000000"+b.toString(16)).slice(-6)}catch(e){return"none"}})}else{var i=h.doc.createElement("i");i.title="Raphaël Colour Picker",i.style.display="none",h.doc.body.appendChild(i),bo=bv(function(a){i.style.color=a;return h.doc.defaultView.getComputedStyle(i,p).getPropertyValue("color")})}return bo(b)},bp=function(){return"hsb("+[this.h,this.s,this.b]+")"},bq=function(){return"hsl("+[this.h,this.s,this.l]+")"},br=function(){return this.hex},bs=function(b,c,d){c==null&&a.is(b,"object")&&"r"in b&&"g"in b&&"b"in b&&(d=b.b,c=b.g,b=b.r);if(c==null&&a.is(b,D)){var e=a.getRGB(b);b=e.r,c=e.g,d=e.b}if(b>1||c>1||d>1)b/=255,c/=255,d/=255;return[b,c,d]},bt=function(b,c,d,e){b*=255,c*=255,d*=255;var f={r:b,g:c,b:d,hex:a.rgb(b,c,d),toString:br};a.is(e,"finite")&&(f.opacity=e);return f};a.color=function(b){var c;a.is(b,"object")&&"h"in b&&"s"in b&&"b"in b?(c=a.hsb2rgb(b),b.r=c.r,b.g=c.g,b.b=c.b,b.hex=c.hex):a.is(b,"object")&&"h"in b&&"s"in b&&"l"in b?(c=a.hsl2rgb(b),b.r=c.r,b.g=c.g,b.b=c.b,b.hex=c.hex):(a.is(b,"string")&&(b=a.getRGB(b)),a.is(b,"object")&&"r"in b&&"g"in b&&"b"in b?(c=a.rgb2hsl(b),b.h=c.h,b.s=c.s,b.l=c.l,c=a.rgb2hsb(b),b.v=c.b):(b={hex:"none"},b.r=b.g=b.b=b.h=b.s=b.v=b.l=-1)),b.toString=br;return b},a.hsb2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,a=a.h,d=a.o),a*=360;var e,f,g,h,i;a=a%360/60,i=c*b,h=i*(1-z(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a];return bt(e,f,g,d)},a.hsl2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"l"in a&&(c=a.l,b=a.s,a=a.h);if(a>1||b>1||c>1)a/=360,b/=100,c/=100;a*=360;var e,f,g,h,i;a=a%360/60,i=2*b*(c<.5?c:1-c),h=i*(1-z(a%2-1)),e=f=g=c-i/2,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a];return bt(e,f,g,d)},a.rgb2hsb=function(a,b,c){c=bs(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;f=x(a,b,c),g=f-y(a,b,c),d=g==0?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=(d+360)%6*60/360,e=g==0?0:g/f;return{h:d,s:e,b:f,toString:bp}},a.rgb2hsl=function(a,b,c){c=bs(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;g=x(a,b,c),h=y(a,b,c),i=g-h,d=i==0?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=(d+360)%6*60/360,f=(g+h)/2,e=i==0?0:f<.5?i/(2*f):i/(2-2*f);return{h:d,s:e,l:f,toString:bq}},a._path2string=function(){return this.join(",").replace(Y,"$1")};var bw=a._preload=function(a,b){var c=h.doc.createElement("img");c.style.cssText="position:absolute;left:-9999em;top:-9999em",c.onload=function(){b.call(this),this.onload=null,h.doc.body.removeChild(this)},c.onerror=function(){h.doc.body.removeChild(this)},h.doc.body.appendChild(c),c.src=a};a.getRGB=bv(function(b){if(!b||!!((b=r(b)).indexOf("-")+1))return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:bx};if(b=="none")return{r:-1,g:-1,b:-1,hex:"none",toString:bx};!X[g](b.toLowerCase().substring(0,2))&&b.charAt()!="#"&&(b=bo(b));var c,d,e,f,h,i,j,k=b.match(L);if(k){k[2]&&(f=R(k[2].substring(5),16),e=R(k[2].substring(3,5),16),d=R(k[2].substring(1,3),16)),k[3]&&(f=R((i=k[3].charAt(3))+i,16),e=R((i=k[3].charAt(2))+i,16),d=R((i=k[3].charAt(1))+i,16)),k[4]&&(j=k[4][s](W),d=Q(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=Q(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),f=Q(j[2]),j[2].slice(-1)=="%"&&(f*=2.55),k[1].toLowerCase().slice(0,4)=="rgba"&&(h=Q(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100));if(k[5]){j=k[5][s](W),d=Q(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=Q(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),f=Q(j[2]),j[2].slice(-1)=="%"&&(f*=2.55),(j[0].slice(-3)=="deg"||j[0].slice(-1)=="°")&&(d/=360),k[1].toLowerCase().slice(0,4)=="hsba"&&(h=Q(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100);return a.hsb2rgb(d,e,f,h)}if(k[6]){j=k[6][s](W),d=Q(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=Q(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),f=Q(j[2]),j[2].slice(-1)=="%"&&(f*=2.55),(j[0].slice(-3)=="deg"||j[0].slice(-1)=="°")&&(d/=360),k[1].toLowerCase().slice(0,4)=="hsla"&&(h=Q(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100);return a.hsl2rgb(d,e,f,h)}k={r:d,g:e,b:f,toString:bx},k.hex="#"+(16777216|f|e<<8|d<<16).toString(16).slice(1),a.is(h,"finite")&&(k.opacity=h);return k}return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:bx}},a),a.hsb=bv(function(b,c,d){return a.hsb2rgb(b,c,d).hex}),a.hsl=bv(function(b,c,d){return a.hsl2rgb(b,c,d).hex}),a.rgb=bv(function(a,b,c){return"#"+(16777216|c|b<<8|a<<16).toString(16).slice(1)}),a.getColor=function(a){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||.75},c=this.hsb2rgb(b.h,b.s,b.b);b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b}));return c.hex},a.getColor.reset=function(){delete this.start},a.parsePathString=function(b){if(!b)return null;var c=bz(b);if(c.arr)return bJ(c.arr);var d={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},e=[];a.is(b,E)&&a.is(b[0],E)&&(e=bJ(b)),e.length||r(b).replace(Z,function(a,b,c){var f=[],g=b.toLowerCase();c.replace(_,function(a,b){b&&f.push(+b)}),g=="m"&&f.length>2&&(e.push([b][n](f.splice(0,2))),g="l",b=b=="m"?"l":"L");if(g=="r")e.push([b][n](f));else while(f.length>=d[g]){e.push([b][n](f.splice(0,d[g])));if(!d[g])break}}),e.toString=a._path2string,c.arr=bJ(e);return e},a.parseTransformString=bv(function(b){if(!b)return null;var c={r:3,s:4,t:2,m:6},d=[];a.is(b,E)&&a.is(b[0],E)&&(d=bJ(b)),d.length||r(b).replace($,function(a,b,c){var e=[],f=v.call(b);c.replace(_,function(a,b){b&&e.push(+b)}),d.push([b][n](e))}),d.toString=a._path2string;return d});var bz=function(a){var b=bz.ps=bz.ps||{};b[a]?b[a].sleep=100:b[a]={sleep:100},setTimeout(function(){for(var c in b)b[g](c)&&c!=a&&(b[c].sleep--,!b[c].sleep&&delete b[c])});return b[a]};a.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=A(j,3),l=A(j,2),m=i*i,n=m*i,o=k*a+l*3*i*c+j*3*i*i*e+n*g,p=k*b+l*3*i*d+j*3*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,x=j*e+i*g,y=j*f+i*h,z=90-w.atan2(q-s,r-t)*180/B;(q>s||r<t)&&(z+=180);return{x:o,y:p,m:{x:q,y:r},n:{x:s,y:t},start:{x:u,y:v},end:{x:x,y:y},alpha:z}},a.bezierBBox=function(b,c,d,e,f,g,h,i){a.is(b,"array")||(b=[b,c,d,e,f,g,h,i]);var j=bQ.apply(null,b);return{x:j.min.x,y:j.min.y,x2:j.max.x,y2:j.max.y,width:j.max.x-j.min.x,height:j.max.y-j.min.y}},a.isPointInsideBBox=function(a,b,c){return b>=a.x&&b<=a.x2&&c>=a.y&&c<=a.y2},a.isBBoxIntersect=function(b,c){var d=a.isPointInsideBBox;return d(c,b.x,b.y)||d(c,b.x2,b.y)||d(c,b.x,b.y2)||d(c,b.x2,b.y2)||d(b,c.x,c.y)||d(b,c.x2,c.y)||d(b,c.x,c.y2)||d(b,c.x2,c.y2)||(b.x<c.x2&&b.x>c.x||c.x<b.x2&&c.x>b.x)&&(b.y<c.y2&&b.y>c.y||c.y<b.y2&&c.y>b.y)},a.pathIntersection=function(a,b){return bH(a,b)},a.pathIntersectionNumber=function(a,b){return bH(a,b,1)},a.isPointInsidePath=function(b,c,d){var e=a.pathBBox(b);return a.isPointInsideBBox(e,c,d)&&bH(b,[["M",c,d],["H",e.x2+10]],1)%2==1},a._removedFactory=function(a){return function(){eve("raphael.log",null,"Raphaël: you are calling to method “"+a+"” of removed object",a)}};var bI=a.pathBBox=function(a){var b=bz(a);if(b.bbox)return b.bbox;if(!a)return{x:0,y:0,width:0,height:0,x2:0,y2:0};a=bR(a);var c=0,d=0,e=[],f=[],g;for(var h=0,i=a.length;h<i;h++){g=a[h];if(g[0]=="M")c=g[1],d=g[2],e.push(c),f.push(d);else{var j=bQ(c,d,g[1],g[2],g[3],g[4],g[5],g[6]);e=e[n](j.min.x,j.max.x),f=f[n](j.min.y,j.max.y),c=g[5],d=g[6]}}var k=y[m](0,e),l=y[m](0,f),o=x[m](0,e),p=x[m](0,f),q={x:k,y:l,x2:o,y2:p,width:o-k,height:p-l};b.bbox=bm(q);return q},bJ=function(b){var c=bm(b);c.toString=a._path2string;return c},bK=a._pathToRelative=function(b){var c=bz(b);if(c.rel)return bJ(c.rel);if(!a.is(b,E)||!a.is(b&&b[0],E))b=a.parsePathString(b);var d=[],e=0,f=0,g=0,h=0,i=0;b[0][0]=="M"&&(e=b[0][1],f=b[0][2],g=e,h=f,i++,d.push(["M",e,f]));for(var j=i,k=b.length;j<k;j++){var l=d[j]=[],m=b[j];if(m[0]!=v.call(m[0])){l[0]=v.call(m[0]);switch(l[0]){case"a":l[1]=m[1],l[2]=m[2],l[3]=m[3],l[4]=m[4],l[5]=m[5],l[6]=+(m[6]-e).toFixed(3),l[7]=+(m[7]-f).toFixed(3);break;case"v":l[1]=+(m[1]-f).toFixed(3);break;case"m":g=m[1],h=m[2];default:for(var n=1,o=m.length;n<o;n++)l[n]=+(m[n]-(n%2?e:f)).toFixed(3)}}else{l=d[j]=[],m[0]=="m"&&(g=m[1]+e,h=m[2]+f);for(var p=0,q=m.length;p<q;p++)d[j][p]=m[p]}var r=d[j].length;switch(d[j][0]){case"z":e=g,f=h;break;case"h":e+=+d[j][r-1];break;case"v":f+=+d[j][r-1];break;default:e+=+d[j][r-2],f+=+d[j][r-1]}}d.toString=a._path2string,c.rel=bJ(d);return d},bL=a._pathToAbsolute=function(b){var c=bz(b);if(c.abs)return bJ(c.abs);if(!a.is(b,E)||!a.is(b&&b[0],E))b=a.parsePathString(b);if(!b||!b.length)return[["M",0,0]];var d=[],e=0,f=0,g=0,h=0,i=0;b[0][0]=="M"&&(e=+b[0][1],f=+b[0][2],g=e,h=f,i++,d[0]=["M",e,f]);var j=b.length==3&&b[0][0]=="M"&&b[1][0].toUpperCase()=="R"&&b[2][0].toUpperCase()=="Z";for(var k,l,m=i,o=b.length;m<o;m++){d.push(k=[]),l=b[m];if(l[0]!=S.call(l[0])){k[0]=S.call(l[0]);switch(k[0]){case"A":k[1]=l[1],k[2]=l[2],k[3]=l[3],k[4]=l[4],k[5]=l[5],k[6]=+(l[6]+e),k[7]=+(l[7]+f);break;case"V":k[1]=+l[1]+f;break;case"H":k[1]=+l[1]+e;break;case"R":var p=[e,f][n](l.slice(1));for(var q=2,r=p.length;q<r;q++)p[q]=+p[q]+e,p[++q]=+p[q]+f;d.pop(),d=d[n](by(p,j));break;case"M":g=+l[1]+e,h=+l[2]+f;default:for(q=1,r=l.length;q<r;q++)k[q]=+l[q]+(q%2?e:f)}}else if(l[0]=="R")p=[e,f][n](l.slice(1)),d.pop(),d=d[n](by(p,j)),k=["R"][n](l.slice(-2));else for(var s=0,t=l.length;s<t;s++)k[s]=l[s];switch(k[0]){case"Z":e=g,f=h;break;case"H":e=k[1];break;case"V":f=k[1];break;case"M":g=k[k.length-2],h=k[k.length-1];default:e=k[k.length-2],f=k[k.length-1]}}d.toString=a._path2string,c.abs=bJ(d);return d},bM=function(a,b,c,d){return[a,b,c,d,c,d]},bN=function(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]},bO=function(a,b,c,d,e,f,g,h,i,j){var k=B*120/180,l=B/180*(+e||0),m=[],o,p=bv(function(a,b,c){var d=a*w.cos(c)-b*w.sin(c),e=a*w.sin(c)+b*w.cos(c);return{x:d,y:e}});if(!j){o=p(a,b,-l),a=o.x,b=o.y,o=p(h,i,-l),h=o.x,i=o.y;var q=w.cos(B/180*e),r=w.sin(B/180*e),t=(a-h)/2,u=(b-i)/2,v=t*t/(c*c)+u*u/(d*d);v>1&&(v=w.sqrt(v),c=v*c,d=v*d);var x=c*c,y=d*d,A=(f==g?-1:1)*w.sqrt(z((x*y-x*u*u-y*t*t)/(x*u*u+y*t*t))),C=A*c*u/d+(a+h)/2,D=A*-d*t/c+(b+i)/2,E=w.asin(((b-D)/d).toFixed(9)),F=w.asin(((i-D)/d).toFixed(9));E=a<C?B-E:E,F=h<C?B-F:F,E<0&&(E=B*2+E),F<0&&(F=B*2+F),g&&E>F&&(E=E-B*2),!g&&F>E&&(F=F-B*2)}else E=j[0],F=j[1],C=j[2],D=j[3];var G=F-E;if(z(G)>k){var H=F,I=h,J=i;F=E+k*(g&&F>E?1:-1),h=C+c*w.cos(F),i=D+d*w.sin(F),m=bO(h,i,c,d,e,0,g,I,J,[F,H,C,D])}G=F-E;var K=w.cos(E),L=w.sin(E),M=w.cos(F),N=w.sin(F),O=w.tan(G/4),P=4/3*c*O,Q=4/3*d*O,R=[a,b],S=[a+P*L,b-Q*K],T=[h+P*N,i-Q*M],U=[h,i];S[0]=2*R[0]-S[0],S[1]=2*R[1]-S[1];if(j)return[S,T,U][n](m);m=[S,T,U][n](m).join()[s](",");var V=[];for(var W=0,X=m.length;W<X;W++)V[W]=W%2?p(m[W-1],m[W],l).y:p(m[W],m[W+1],l).x;return V},bP=function(a,b,c,d,e,f,g,h,i){var j=1-i;return{x:A(j,3)*a+A(j,2)*3*i*c+j*3*i*i*e+A(i,3)*g,y:A(j,3)*b+A(j,2)*3*i*d+j*3*i*i*f+A(i,3)*h}},bQ=bv(function(a,b,c,d,e,f,g,h){var i=e-2*c+a-(g-2*e+c),j=2*(c-a)-2*(e-c),k=a-c,l=(-j+w.sqrt(j*j-4*i*k))/2/i,n=(-j-w.sqrt(j*j-4*i*k))/2/i,o=[b,h],p=[a,g],q;z(l)>"1e12"&&(l=.5),z(n)>"1e12"&&(n=.5),l>0&&l<1&&(q=bP(a,b,c,d,e,f,g,h,l),p.push(q.x),o.push(q.y)),n>0&&n<1&&(q=bP(a,b,c,d,e,f,g,h,n),p.push(q.x),o.push(q.y)),i=f-2*d+b-(h-2*f+d),j=2*(d-b)-2*(f-d),k=b-d,l=(-j+w.sqrt(j*j-4*i*k))/2/i,n=(-j-w.sqrt(j*j-4*i*k))/2/i,z(l)>"1e12"&&(l=.5),z(n)>"1e12"&&(n=.5),l>0&&l<1&&(q=bP(a,b,c,d,e,f,g,h,l),p.push(q.x),o.push(q.y)),n>0&&n<1&&(q=bP(a,b,c,d,e,f,g,h,n),p.push(q.x),o.push(q.y));return{min:{x:y[m](0,p),y:y[m](0,o)},max:{x:x[m](0,p),y:x[m](0,o)}}}),bR=a._path2curve=bv(function(a,b){var c=!b&&bz(a);if(!b&&c.curve)return bJ(c.curve);var d=bL(a),e=b&&bL(b),f={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},g={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},h=function(a,b){var c,d;if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];!(a[0]in{T:1,Q:1})&&(b.qx=b.qy=null);switch(a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"][n](bO[m](0,[b.x,b.y][n](a.slice(1))));break;case"S":c=b.x+(b.x-(b.bx||b.x)),d=b.y+(b.y-(b.by||b.y)),a=["C",c,d][n](a.slice(1));break;case"T":b.qx=b.x+(b.x-(b.qx||b.x)),b.qy=b.y+(b.y-(b.qy||b.y)),a=["C"][n](bN(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"][n](bN(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][n](bM(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][n](bM(b.x,b.y,a[1],b.y));break;case"V":a=["C"][n](bM(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][n](bM(b.x,b.y,b.X,b.Y))}return a},i=function(a,b){if(a[b].length>7){a[b].shift();var c=a[b];while(c.length)a.splice(b++,0,["C"][n](c.splice(0,6)));a.splice(b,1),l=x(d.length,e&&e.length||0)}},j=function(a,b,c,f,g){a&&b&&a[g][0]=="M"&&b[g][0]!="M"&&(b.splice(g,0,["M",f.x,f.y]),c.bx=0,c.by=0,c.x=a[g][1],c.y=a[g][2],l=x(d.length,e&&e.length||0))};for(var k=0,l=x(d.length,e&&e.length||0);k<l;k++){d[k]=h(d[k],f),i(d,k),e&&(e[k]=h(e[k],g)),e&&i(e,k),j(d,e,f,g,k),j(e,d,g,f,k);var o=d[k],p=e&&e[k],q=o.length,r=e&&p.length;f.x=o[q-2],f.y=o[q-1],f.bx=Q(o[q-4])||f.x,f.by=Q(o[q-3])||f.y,g.bx=e&&(Q(p[r-4])||g.x),g.by=e&&(Q(p[r-3])||g.y),g.x=e&&p[r-2],g.y=e&&p[r-1]}e||(c.curve=bJ(d));return e?[d,e]:d},null,bJ),bS=a._parseDots=bv(function(b){var c=[];for(var d=0,e=b.length;d<e;d++){var f={},g=b[d].match(/^([^:]*):?([\d\.]*)/);f.color=a.getRGB(g[1]);if(f.color.error)return null;f.color=f.color.hex,g[2]&&(f.offset=g[2]+"%"),c.push(f)}for(d=1,e=c.length-1;d<e;d++)if(!c[d].offset){var h=Q(c[d-1].offset||0),i=0;for(var j=d+1;j<e;j++)if(c[j].offset){i=c[j].offset;break}i||(i=100,j=e),i=Q(i);var k=(i-h)/(j-d+1);for(;d<j;d++)h+=k,c[d].offset=h+"%"}return c}),bT=a._tear=function(a,b){a==b.top&&(b.top=a.prev),a==b.bottom&&(b.bottom=a.next),a.next&&(a.next.prev=a.prev),a.prev&&(a.prev.next=a.next)},bU=a._tofront=function(a,b){b.top!==a&&(bT(a,b),a.next=null,a.prev=b.top,b.top.next=a,b.top=a)},bV=a._toback=function(a,b){b.bottom!==a&&(bT(a,b),a.next=b.bottom,a.prev=null,b.bottom.prev=a,b.bottom=a)},bW=a._insertafter=function(a,b,c){bT(a,c),b==c.top&&(c.top=a),b.next&&(b.next.prev=a),a.next=b.next,a.prev=b,b.next=a},bX=a._insertbefore=function(a,b,c){bT(a,c),b==c.bottom&&(c.bottom=a),b.prev&&(b.prev.next=a),a.prev=b.prev,b.prev=a,a.next=b},bY=a.toMatrix=function(a,b){var c=bI(a),d={_:{transform:p},getBBox:function(){return c}};b$(d,b);return d.matrix},bZ=a.transformPath=function(a,b){return bj(a,bY(a,b))},b$=a._extractTransform=function(b,c){if(c==null)return b._.transform;c=r(c).replace(/\.{3}|\u2026/g,b._.transform||p);var d=a.parseTransformString(c),e=0,f=0,g=0,h=1,i=1,j=b._,k=new cb;j.transform=d||[];if(d)for(var l=0,m=d.length;l<m;l++){var n=d[l],o=n.length,q=r(n[0]).toLowerCase(),s=n[0]!=q,t=s?k.invert():0,u,v,w,x,y;q=="t"&&o==3?s?(u=t.x(0,0),v=t.y(0,0),w=t.x(n[1],n[2]),x=t.y(n[1],n[2]),k.translate(w-u,x-v)):k.translate(n[1],n[2]):q=="r"?o==2?(y=y||b.getBBox(1),k.rotate(n[1],y.x+y.width/2,y.y+y.height/2),e+=n[1]):o==4&&(s?(w=t.x(n[2],n[3]),x=t.y(n[2],n[3]),k.rotate(n[1],w,x)):k.rotate(n[1],n[2],n[3]),e+=n[1]):q=="s"?o==2||o==3?(y=y||b.getBBox(1),k.scale(n[1],n[o-1],y.x+y.width/2,y.y+y.height/2),h*=n[1],i*=n[o-1]):o==5&&(s?(w=t.x(n[3],n[4]),x=t.y(n[3],n[4]),k.scale(n[1],n[2],w,x)):k.scale(n[1],n[2],n[3],n[4]),h*=n[1],i*=n[2]):q=="m"&&o==7&&k.add(n[1],n[2],n[3],n[4],n[5],n[6]),j.dirtyT=1,b.matrix=k}b.matrix=k,j.sx=h,j.sy=i,j.deg=e,j.dx=f=k.e,j.dy=g=k.f,h==1&&i==1&&!e&&j.bbox?(j.bbox.x+=+f,j.bbox.y+=+g):j.dirtyT=1},b_=function(a){var b=a[0];switch(b.toLowerCase()){case"t":return[b,0,0];case"m":return[b,1,0,0,1,0,0];case"r":return a.length==4?[b,0,a[2],a[3]]:[b,0];case"s":return a.length==5?[b,1,1,a[3],a[4]]:a.length==3?[b,1,1]:[b,1]}},ca=a._equaliseTransform=function(b,c){c=r(c).replace(/\.{3}|\u2026/g,b),b=a.parseTransformString(b)||[],c=a.parseTransformString(c)||[];var d=x(b.length,c.length),e=[],f=[],g=0,h,i,j,k;for(;g<d;g++){j=b[g]||b_(c[g]),k=c[g]||b_(j);if(j[0]!=k[0]||j[0].toLowerCase()=="r"&&(j[2]!=k[2]||j[3]!=k[3])||j[0].toLowerCase()=="s"&&(j[3]!=k[3]||j[4]!=k[4]))return;e[g]=[],f[g]=[];for(h=0,i=x(j.length,k.length);h<i;h++)h in j&&(e[g][h]=j[h]),h in k&&(f[g][h]=k[h])}return{from:e,to:f}};a._getContainer=function(b,c,d,e){var f;f=e==null&&!a.is(b,"object")?h.doc.getElementById(b):b;if(f!=null){if(f.tagName)return c==null?{container:f,width:f.style.pixelWidth||f.offsetWidth,height:f.style.pixelHeight||f.offsetHeight}:{container:f,width:c,height:d};return{container:1,x:b,y:c,width:d,height:e}}},a.pathToRelative=bK,a._engine={},a.path2curve=bR,a.matrix=function(a,b,c,d,e,f){return new cb(a,b,c,d,e,f)},function(b){function d(a){var b=w.sqrt(c(a));a[0]&&(a[0]/=b),a[1]&&(a[1]/=b)}function c(a){return a[0]*a[0]+a[1]*a[1]}b.add=function(a,b,c,d,e,f){var g=[[],[],[]],h=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],i=[[a,c,e],[b,d,f],[0,0,1]],j,k,l,m;a&&a instanceof cb&&(i=[[a.a,a.c,a.e],[a.b,a.d,a.f],[0,0,1]]);for(j=0;j<3;j++)for(k=0;k<3;k++){m=0;for(l=0;l<3;l++)m+=h[j][l]*i[l][k];g[j][k]=m}this.a=g[0][0],this.b=g[1][0],this.c=g[0][1],this.d=g[1][1],this.e=g[0][2],this.f=g[1][2]},b.invert=function(){var a=this,b=a.a*a.d-a.b*a.c;return new cb(a.d/b,-a.b/b,-a.c/b,a.a/b,(a.c*a.f-a.d*a.e)/b,(a.b*a.e-a.a*a.f)/b)},b.clone=function(){return new cb(this.a,this.b,this.c,this.d,this.e,this.f)},b.translate=function(a,b){this.add(1,0,0,1,a,b)},b.scale=function(a,b,c,d){b==null&&(b=a),(c||d)&&this.add(1,0,0,1,c,d),this.add(a,0,0,b,0,0),(c||d)&&this.add(1,0,0,1,-c,-d)},b.rotate=function(b,c,d){b=a.rad(b),c=c||0,d=d||0;var e=+w.cos(b).toFixed(9),f=+w.sin(b).toFixed(9);this.add(e,f,-f,e,c,d),this.add(1,0,0,1,-c,-d)},b.x=function(a,b){return a*this.a+b*this.c+this.e},b.y=function(a,b){return a*this.b+b*this.d+this.f},b.get=function(a){return+this[r.fromCharCode(97+a)].toFixed(4)},b.toString=function(){return a.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},b.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},b.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},b.split=function(){var b={};b.dx=this.e,b.dy=this.f;var e=[[this.a,this.c],[this.b,this.d]];b.scalex=w.sqrt(c(e[0])),d(e[0]),b.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1],e[1]=[e[1][0]-e[0][0]*b.shear,e[1][1]-e[0][1]*b.shear],b.scaley=w.sqrt(c(e[1])),d(e[1]),b.shear/=b.scaley;var f=-e[0][1],g=e[1][1];g<0?(b.rotate=a.deg(w.acos(g)),f<0&&(b.rotate=360-b.rotate)):b.rotate=a.deg(w.asin(f)),b.isSimple=!+b.shear.toFixed(9)&&(b.scalex.toFixed(9)==b.scaley.toFixed(9)||!b.rotate),b.isSuperSimple=!+b.shear.toFixed(9)&&b.scalex.toFixed(9)==b.scaley.toFixed(9)&&!b.rotate,b.noRotation=!+b.shear.toFixed(9)&&!b.rotate;return b},b.toTransformString=function(a){var b=a||this[s]();if(b.isSimple){b.scalex=+b.scalex.toFixed(4),b.scaley=+b.scaley.toFixed(4),b.rotate=+b.rotate.toFixed(4);return(b.dx||b.dy?"t"+[b.dx,b.dy]:p)+(b.scalex!=1||b.scaley!=1?"s"+[b.scalex,b.scaley,0,0]:p)+(b.rotate?"r"+[b.rotate,0,0]:p)}return"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(cb.prototype);var cc=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);navigator.vendor=="Apple Computer, Inc."&&(cc&&cc[1]<4||navigator.platform.slice(0,2)=="iP")||navigator.vendor=="Google Inc."&&cc&&cc[1]<8?k.safari=function(){var a=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){a.remove()})}:k.safari=be;var cd=function(){this.returnValue=!1},ce=function(){return this.originalEvent.preventDefault()},cf=function(){this.cancelBubble=!0},cg=function(){return this.originalEvent.stopPropagation()},ch=function(){if(h.doc.addEventListener)return function(a,b,c,d){var e=o&&u[b]?u[b]:b,f=function(e){var f=h.doc.documentElement.scrollTop||h.doc.body.scrollTop,i=h.doc.documentElement.scrollLeft||h.doc.body.scrollLeft,j=e.clientX+i,k=e.clientY+f;if(o&&u[g](b))for(var l=0,m=e.targetTouches&&e.targetTouches.length;l<m;l++)if(e.targetTouches[l].target==a){var n=e;e=e.targetTouches[l],e.originalEvent=n,e.preventDefault=ce,e.stopPropagation=cg;break}return c.call(d,e,j,k)};a.addEventListener(e,f,!1);return function(){a.removeEventListener(e,f,!1);return!0}};if(h.doc.attachEvent)return function(a,b,c,d){var e=function(a){a=a||h.win.event;var b=h.doc.documentElement.scrollTop||h.doc.body.scrollTop,e=h.doc.documentElement.scrollLeft||h.doc.body.scrollLeft,f=a.clientX+e,g=a.clientY+b;a.preventDefault=a.preventDefault||cd,a.stopPropagation=a.stopPropagation||cf;return c.call(d,a,f,g)};a.attachEvent("on"+b,e);var f=function(){a.detachEvent("on"+b,e);return!0};return f}}(),ci=[],cj=function(a){var b=a.clientX,c=a.clientY,d=h.doc.documentElement.scrollTop||h.doc.body.scrollTop,e=h.doc.documentElement.scrollLeft||h.doc.body.scrollLeft,f,g=ci.length;while(g--){f=ci[g];if(o){var i=a.touches.length,j;while(i--){j=a.touches[i];if(j.identifier==f.el._drag.id){b=j.clientX,c=j.clientY,(a.originalEvent?a.originalEvent:a).preventDefault();break}}}else a.preventDefault();var k=f.el.node,l,m=k.nextSibling,n=k.parentNode,p=k.style.display;h.win.opera&&n.removeChild(k),k.style.display="none",l=f.el.paper.getElementByPoint(b,c),k.style.display=p,h.win.opera&&(m?n.insertBefore(k,m):n.appendChild(k)),l&&eve("raphael.drag.over."+f.el.id,f.el,l),b+=e,c+=d,eve("raphael.drag.move."+f.el.id,f.move_scope||f.el,b-f.el._drag.x,c-f.el._drag.y,b,c,a)}},ck=function(b){a.unmousemove(cj).unmouseup(ck);var c=ci.length,d;while(c--)d=ci[c],d.el._drag={},eve("raphael.drag.end."+d.el.id,d.end_scope||d.start_scope||d.move_scope||d.el,b);ci=[]},cl=a.el={};for(var cm=t.length;cm--;)(function(b){a[b]=cl[b]=function(c,d){a.is(c,"function")&&(this.events=this.events||[],this.events.push({name:b,f:c,unbind:ch(this.shape||this.node||h.doc,b,c,d||this)}));return this},a["un"+b]=cl["un"+b]=function(a){var c=this.events||[],d=c.length;while(d--)if(c[d].name==b&&c[d].f==a){c[d].unbind(),c.splice(d,1),!c.length&&delete this.events;return this}return this}})(t[cm]);cl.data=function(b,c){var d=bb[this.id]=bb[this.id]||{};if(arguments.length==1){if(a.is(b,"object")){for(var e in b)b[g](e)&&this.data(e,b[e]);return this}eve("raphael.data.get."+this.id,this,d[b],b);return d[b]}d[b]=c,eve("raphael.data.set."+this.id,this,c,b);return this},cl.removeData=function(a){a==null?bb[this.id]={}:bb[this.id]&&delete bb[this.id][a];return this},cl.hover=function(a,b,c,d){return this.mouseover(a,c).mouseout(b,d||c)},cl.unhover=function(a,b){return this.unmouseover(a).unmouseout(b)};var cn=[];cl.drag=function(b,c,d,e,f,g){function i(i){(i.originalEvent||i).preventDefault();var j=h.doc.documentElement.scrollTop||h.doc.body.scrollTop,k=h.doc.documentElement.scrollLeft||h.doc.body.scrollLeft;this._drag.x=i.clientX+k,this._drag.y=i.clientY+j,this._drag.id=i.identifier,!ci.length&&a.mousemove(cj).mouseup(ck),ci.push({el:this,move_scope:e,start_scope:f,end_scope:g}),c&&eve.on("raphael.drag.start."+this.id,c),b&&eve.on("raphael.drag.move."+this.id,b),d&&eve.on("raphael.drag.end."+this.id,d),eve("raphael.drag.start."+this.id,f||e||this,i.clientX+k,i.clientY+j,i)}this._drag={},cn.push({el:this,start:i}),this.mousedown(i);return this},cl.onDragOver=function(a){a?eve.on("raphael.drag.over."+this.id,a):eve.unbind("raphael.drag.over."+this.id)},cl.undrag=function(){var b=cn.length;while(b--)cn[b].el==this&&(this.unmousedown(cn[b].start),cn.splice(b,1),eve.unbind("raphael.drag.*."+this.id));!cn.length&&a.unmousemove(cj).unmouseup(ck)},k.circle=function(b,c,d){var e=a._engine.circle(this,b||0,c||0,d||0);this.__set__&&this.__set__.push(e);return e},k.rect=function(b,c,d,e,f){var g=a._engine.rect(this,b||0,c||0,d||0,e||0,f||0);this.__set__&&this.__set__.push(g);return g},k.ellipse=function(b,c,d,e){var f=a._engine.ellipse(this,b||0,c||0,d||0,e||0);this.__set__&&this.__set__.push(f);return f},k.path=function(b){b&&!a.is(b,D)&&!a.is(b[0],E)&&(b+=p);var c=a._engine.path(a.format[m](a,arguments),this);this.__set__&&this.__set__.push(c);return c},k.image=function(b,c,d,e,f){var g=a._engine.image(this,b||"about:blank",c||0,d||0,e||0,f||0);this.__set__&&this.__set__.push(g);return g},k.text=function(b,c,d){var e=a._engine.text(this,b||0,c||0,r(d));this.__set__&&this.__set__.push(e);return e},k.set=function(b){!a.is(b,"array")&&(b=Array.prototype.splice.call(arguments,0,arguments.length));var c=new cG(b);this.__set__&&this.__set__.push(c);return c},k.setStart=function(a){this.__set__=a||this.set()},k.setFinish=function(a){var b=this.__set__;delete this.__set__;return b},k.setSize=function(b,c){return a._engine.setSize.call(this,b,c)},k.setViewBox=function(b,c,d,e,f){return a._engine.setViewBox.call(this,b,c,d,e,f)},k.top=k.bottom=null,k.raphael=a;var co=function(a){var b=a.getBoundingClientRect(),c=a.ownerDocument,d=c.body,e=c.documentElement,f=e.clientTop||d.clientTop||0,g=e.clientLeft||d.clientLeft||0,i=b.top+(h.win.pageYOffset||e.scrollTop||d.scrollTop)-f,j=b.left+(h.win.pageXOffset||e.scrollLeft||d.scrollLeft)-g;return{y:i,x:j}};k.getElementByPoint=function(a,b){var c=this,d=c.canvas,e=h.doc.elementFromPoint(a,b);if(h.win.opera&&e.tagName=="svg"){var f=co(d),g=d.createSVGRect();g.x=a-f.x,g.y=b-f.y,g.width=g.height=1;var i=d.getIntersectionList(g,null);i.length&&(e=i[i.length-1])}if(!e)return null;while(e.parentNode&&e!=d.parentNode&&!e.raphael)e=e.parentNode;e==c.canvas.parentNode&&(e=d),e=e&&e.raphael?c.getById(e.raphaelid):null;return e},k.getById=function(a){var b=this.bottom;while(b){if(b.id==a)return b;b=b.next}return null},k.forEach=function(a,b){var c=this.bottom;while(c){if(a.call(b,c)===!1)return this;c=c.next}return this},k.getElementsByPoint=function(a,b){var c=this.set();this.forEach(function(d){d.isPointInside(a,b)&&c.push(d)});return c},cl.isPointInside=function(b,c){var d=this.realPath=this.realPath||bi[this.type](this);return a.isPointInsidePath(d,b,c)},cl.getBBox=function(a){if(this.removed)return{};var b=this._;if(a){if(b.dirty||!b.bboxwt)this.realPath=bi[this.type](this),b.bboxwt=bI(this.realPath),b.bboxwt.toString=cq,b.dirty=0;return b.bboxwt}if(b.dirty||b.dirtyT||!b.bbox){if(b.dirty||!this.realPath)b.bboxwt=0,this.realPath=bi[this.type](this);b.bbox=bI(bj(this.realPath,this.matrix)),b.bbox.toString=cq,b.dirty=b.dirtyT=0}return b.bbox},cl.clone=function(){if(this.removed)return null;var a=this.paper[this.type]().attr(this.attr());this.__set__&&this.__set__.push(a);return a},cl.glow=function(a){if(this.type=="text")return null;a=a||{};var b={width:(a.width||10)+(+this.attr("stroke-width")||1),fill:a.fill||!1,opacity:a.opacity||.5,offsetx:a.offsetx||0,offsety:a.offsety||0,color:a.color||"#000"},c=b.width/2,d=this.paper,e=d.set(),f=this.realPath||bi[this.type](this);f=this.matrix?bj(f,this.matrix):f;for(var g=1;g<c+1;g++)e.push(d.path(f).attr({stroke:b.color,fill:b.fill?b.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(b.width/c*g).toFixed(3),opacity:+(b.opacity/c).toFixed(3)}));return e.insertBefore(this).translate(b.offsetx,b.offsety)};var cr={},cs=function(b,c,d,e,f,g,h,i,j){return j==null?bB(b,c,d,e,f,g,h,i):a.findDotsAtSegment(b,c,d,e,f,g,h,i,bC(b,c,d,e,f,g,h,i,j))},ct=function(b,c){return function(d,e,f){d=bR(d);var g,h,i,j,k="",l={},m,n=0;for(var o=0,p=d.length;o<p;o++){i=d[o];if(i[0]=="M")g=+i[1],h=+i[2];else{j=cs(g,h,i[1],i[2],i[3],i[4],i[5],i[6]);if(n+j>e){if(c&&!l.start){m=cs(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),k+=["C"+m.start.x,m.start.y,m.m.x,m.m.y,m.x,m.y];if(f)return k;l.start=k,k=["M"+m.x,m.y+"C"+m.n.x,m.n.y,m.end.x,m.end.y,i[5],i[6]].join(),n+=j,g=+i[5],h=+i[6];continue}if(!b&&!c){m=cs(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n);return{x:m.x,y:m.y,alpha:m.alpha}}}n+=j,g=+i[5],h=+i[6]}k+=i.shift()+i}l.end=k,m=b?n:c?l:a.findDotsAtSegment(g,h,i[0],i[1],i[2],i[3],i[4],i[5],1),m.alpha&&(m={x:m.x,y:m.y,alpha:m.alpha});return m}},cu=ct(1),cv=ct(),cw=ct(0,1);a.getTotalLength=cu,a.getPointAtLength=cv,a.getSubpath=function(a,b,c){if(this.getTotalLength(a)-c<1e-6)return cw(a,b).end;var d=cw(a,c,1);return b?cw(d,b).end:d},cl.getTotalLength=function(){if(this.type=="path"){if(this.node.getTotalLength)return this.node.getTotalLength();return cu(this.attrs.path)}},cl.getPointAtLength=function(a){if(this.type=="path")return cv(this.attrs.path,a)},cl.getSubpath=function(b,c){if(this.type=="path")return a.getSubpath(this.attrs.path,b,c)};var cx=a.easing_formulas={linear:function(a){return a},"<":function(a){return A(a,1.7)},">":function(a){return A(a,.48)},"<>":function(a){var b=.48-a/1.04,c=w.sqrt(.1734+b*b),d=c-b,e=A(z(d),1/3)*(d<0?-1:1),f=-c-b,g=A(z(f),1/3)*(f<0?-1:1),h=e+g+.5;return(1-h)*3*h*h+h*h*h},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a=a-1;var b=1.70158;return a*a*((b+1)*a+b)+1},elastic:function(a){if(a==!!a)return a;return A(2,-10*a)*w.sin((a-.075)*2*B/.3)+1},bounce:function(a){var b=7.5625,c=2.75,d;a<1/c?d=b*a*a:a<2/c?(a-=1.5/c,d=b*a*a+.75):a<2.5/c?(a-=2.25/c,d=b*a*a+.9375):(a-=2.625/c,d=b*a*a+.984375);return d}};cx.easeIn=cx["ease-in"]=cx["<"],cx.easeOut=cx["ease-out"]=cx[">"],cx.easeInOut=cx["ease-in-out"]=cx["<>"],cx["back-in"]=cx.backIn,cx["back-out"]=cx.backOut;var cy=[],cz=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,16)},cA=function(){var b=+(new Date),c=0;for(;c<cy.length;c++){var d=cy[c];if(d.el.removed||d.paused)continue;var e=b-d.start,f=d.ms,h=d.easing,i=d.from,j=d.diff,k=d.to,l=d.t,m=d.el,o={},p,r={},s;d.initstatus?(e=(d.initstatus*d.anim.top-d.prev)/(d.percent-d.prev)*f,d.status=d.initstatus,delete d.initstatus,d.stop&&cy.splice(c--,1)):d.status=(d.prev+(d.percent-d.prev)*(e/f))/d.anim.top;if(e<0)continue;if(e<f){var t=h(e/f);for(var u in i)if(i[g](u)){switch(U[u]){case C:p=+i[u]+t*f*j[u];break;case"colour":p="rgb("+[cB(O(i[u].r+t*f*j[u].r)),cB(O(i[u].g+t*f*j[u].g)),cB(O(i[u].b+t*f*j[u].b))].join(",")+")";break;case"path":p=[];for(var v=0,w=i[u].length;v<w;v++){p[v]=[i[u][v][0]];for(var x=1,y=i[u][v].length;x<y;x++)p[v][x]=+i[u][v][x]+t*f*j[u][v][x];p[v]=p[v].join(q)}p=p.join(q);break;case"transform":if(j[u].real){p=[];for(v=0,w=i[u].length;v<w;v++){p[v]=[i[u][v][0]];for(x=1,y=i[u][v].length;x<y;x++)p[v][x]=i[u][v][x]+t*f*j[u][v][x]}}else{var z=function(a){return+i[u][a]+t*f*j[u][a]};p=[["m",z(0),z(1),z(2),z(3),z(4),z(5)]]}break;case"csv":if(u=="clip-rect"){p=[],v=4;while(v--)p[v]=+i[u][v]+t*f*j[u][v]}break;default:var A=[][n](i[u]);p=[],v=m.paper.customAttributes[u].length;while(v--)p[v]=+A[v]+t*f*j[u][v]}o[u]=p}m.attr(o),function(a,b,c){setTimeout(function(){eve("raphael.anim.frame."+a,b,c)})}(m.id,m,d.anim)}else{(function(b,c,d){setTimeout(function(){eve("raphael.anim.frame."+c.id,c,d),eve("raphael.anim.finish."+c.id,c,d),a.is(b,"function")&&b.call(c)})})(d.callback,m,d.anim),m.attr(k),cy.splice(c--,1);if(d.repeat>1&&!d.next){for(s in k)k[g](s)&&(r[s]=d.totalOrigin[s]);d.el.attr(r),cE(d.anim,d.el,d.anim.percents[0],null,d.totalOrigin,d.repeat-1)}d.next&&!d.stop&&cE(d.anim,d.el,d.next,null,d.totalOrigin,d.repeat)}}a.svg&&m&&m.paper&&m.paper.safari(),cy.length&&cz(cA)},cB=function(a){return a>255?255:a<0?0:a};cl.animateWith=function(b,c,d,e,f,g){var h=this;if(h.removed){g&&g.call(h);return h}var i=d instanceof cD?d:a.animation(d,e,f,g),j,k;cE(i,h,i.percents[0],null,h.attr());for(var l=0,m=cy.length;l<m;l++)if(cy[l].anim==c&&cy[l].el==b){cy[m-1].start=cy[l].start;break}return h},cl.onAnimation=function(a){a?eve.on("raphael.anim.frame."+this.id,a):eve.unbind("raphael.anim.frame."+this.id);return this},cD.prototype.delay=function(a){var b=new cD(this.anim,this.ms);b.times=this.times,b.del=+a||0;return b},cD.prototype.repeat=function(a){var b=new cD(this.anim,this.ms);b.del=this.del,b.times=w.floor(x(a,0))||1;return b},a.animation=function(b,c,d,e){if(b instanceof cD)return b;if(a.is(d,"function")||!d)e=e||d||null,d=null;b=Object(b),c=+c||0;var f={},h,i;for(i in b)b[g](i)&&Q(i)!=i&&Q(i)+"%"!=i&&(h=!0,f[i]=b[i]);if(!h)return new cD(b,c);d&&(f.easing=d),e&&(f.callback=e);return new cD({100:f},c)},cl.animate=function(b,c,d,e){var f=this;if(f.removed){e&&e.call(f);return f}var g=b instanceof cD?b:a.animation(b,c,d,e);cE(g,f,g.percents[0],null,f.attr());return f},cl.setTime=function(a,b){a&&b!=null&&this.status(a,y(b,a.ms)/a.ms);return this},cl.status=function(a,b){var c=[],d=0,e,f;if(b!=null){cE(a,this,-1,y(b,1));return this}e=cy.length;for(;d<e;d++){f=cy[d];if(f.el.id==this.id&&(!a||f.anim==a)){if(a)return f.status;c.push({anim:f.anim,status:f.status})}}if(a)return 0;return c},cl.pause=function(a){for(var b=0;b<cy.length;b++)cy[b].el.id==this.id&&(!a||cy[b].anim==a)&&eve("raphael.anim.pause."+this.id,this,cy[b].anim)!==!1&&(cy[b].paused=!0);return this},cl.resume=function(a){for(var b=0;b<cy.length;b++)if(cy[b].el.id==this.id&&(!a||cy[b].anim==a)){var c=cy[b];eve("raphael.anim.resume."+this.id,this,c.anim)!==!1&&(delete c.paused,this.status(c.anim,c.status))}return this},cl.stop=function(a){for(var b=0;b<cy.length;b++)cy[b].el.id==this.id&&(!a||cy[b].anim==a)&&eve("raphael.anim.stop."+this.id,this,cy[b].anim)!==!1&&cy.splice(b--,1);return this},eve.on("raphael.remove",cF),eve.on("raphael.clear",cF),cl.toString=function(){return"Raphaël’s object"};var cG=function(a){this.items=[],this.length=0,this.type="set";if(a)for(var b=0,c=a.length;b<c;b++)a[b]&&(a[b].constructor==cl.constructor||a[b].constructor==cG)&&(this[this.items.length]=this.items[this.items.length]=a[b],this.length++)},cH=cG.prototype;cH.push=function(){var a,b;for(var c=0,d=arguments.length;c<d;c++)a=arguments[c],a&&(a.constructor==cl.constructor||a.constructor==cG)&&(b=this.items.length,this[b]=this.items[b]=a,this.length++);return this},cH.pop=function(){this.length&&delete this[this.length--];return this.items.pop()},cH.forEach=function(a,b){for(var c=0,d=this.items.length;c<d;c++)if(a.call(b,this.items[c],c)===!1)return this;return this};for(var cI in cl)cl[g](cI)&&(cH[cI]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a][m](c,b)})}}(cI));cH.attr=function(b,c){if(b&&a.is(b,E)&&a.is(b[0],"object"))for(var d=0,e=b.length;d<e;d++)this.items[d].attr(b[d]);else for(var f=0,g=this.items.length;f<g;f++)this.items[f].attr(b,c);return this},cH.clear=function(){while(this.length)this.pop()},cH.splice=function(a,b,c){a=a<0?x(this.length+a,0):a,b=x(0,y(this.length-a,b));var d=[],e=[],f=[],g;for(g=2;g<arguments.length;g++)f.push(arguments[g]);for(g=0;g<b;g++)e.push(this[a+g]);for(;g<this.length-a;g++)d.push(this[a+g]);var h=f.length;for(g=0;g<h+d.length;g++)this.items[a+g]=this[a+g]=g<h?f[g]:d[g-h];g=this.items.length=this.length-=b-h;while(this[g])delete this[g++];return new cG(e)},cH.exclude=function(a){for(var b=0,c=this.length;b<c;b++)if(this[b]==a){this.splice(b,1);return!0}},cH.animate=function(b,c,d,e){(a.is(d,"function")||!d)&&(e=d||null);var f=this.items.length,g=f,h,i=this,j;if(!f)return this;e&&(j=function(){!--f&&e.call(i)}),d=a.is(d,D)?d:j;var k=a.animation(b,c,d,j);h=this.items[--g].animate(k);while(g--)this.items[g]&&!this.items[g].removed&&this.items[g].animateWith(h,k,k);return this},cH.insertAfter=function(a){var b=this.items.length;while(b--)this.items[b].insertAfter(a);return this},cH.getBBox=function(){var a=[],b=[],c=[],d=[];for(var e=this.items.length;e--;)if(!this.items[e].removed){var f=this.items[e].getBBox();a.push(f.x),b.push(f.y),c.push(f.x+f.width),d.push(f.y+f.height)}a=y[m](0,a),b=y[m](0,b),c=x[m](0,c),d=x[m](0,d);return{x:a,y:b,x2:c,y2:d,width:c-a,height:d-b}},cH.clone=function(a){a=new cG;for(var b=0,c=this.items.length;b<c;b++)a.push(this.items[b].clone());return a},cH.toString=function(){return"Raphaël‘s set"},a.registerFont=function(a){if(!a.face)return a;this.fonts=this.fonts||{};var b={w:a.w,face:{},glyphs:{}},c=a.face["font-family"];for(var d in a.face)a.face[g](d)&&(b.face[d]=a.face[d]);this.fonts[c]?this.fonts[c].push(b):this.fonts[c]=[b];if(!a.svg){b.face["units-per-em"]=R(a.face["units-per-em"],10);for(var e in a.glyphs)if(a.glyphs[g](e)){var f=a.glyphs[e];b.glyphs[e]={w:f.w,k:{},d:f.d&&"M"+f.d.replace(/[mlcxtrv]/g,function(a){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[a]||"M"})+"z"};if(f.k)for(var h in f.k)f[g](h)&&(b.glyphs[e].k[h]=f.k[h])}}return a},k.getFont=function(b,c,d,e){e=e||"normal",d=d||"normal",c=+c||{normal:400,bold:700,lighter:300,bolder:800}[c]||400;if(!!a.fonts){var f=a.fonts[b];if(!f){var h=new RegExp("(^|\\s)"+b.replace(/[^\w\d\s+!~.:_-]/g,p)+"(\\s|$)","i");for(var i in a.fonts)if(a.fonts[g](i)&&h.test(i)){f=a.fonts[i];break}}var j;if(f)for(var k=0,l=f.length;k<l;k++){j=f[k];if(j.face["font-weight"]==c&&(j.face["font-style"]==d||!j.face["font-style"])&&j.face["font-stretch"]==e)break}return j}},k.print=function(b,d,e,f,g,h,i){h=h||"middle",i=x(y(i||0,1),-1);var j=r(e)[s](p),k=0,l=0,m=p,n;a.is(f,e)&&(f=this.getFont(f));if(f){n=(g||16)/f.face["units-per-em"];var o=f.face.bbox[s](c),q=+o[0],t=o[3]-o[1],u=0,v=+o[1]+(h=="baseline"?t+ +f.face.descent:t/2);for(var w=0,z=j.length;w<z;w++){if(j[w]=="\n")k=0,B=0,l=0,u+=t;else{var A=l&&f.glyphs[j[w-1]]||{},B=f.glyphs[j[w]];k+=l?(A.w||f.w)+(A.k&&A.k[j[w]]||0)+f.w*i:0,l=1}B&&B.d&&(m+=a.transformPath(B.d,["t",k*n,u*n,"s",n,n,q,v,"t",(b-q)/n,(d-v)/n]))}}return this.path(m).attr({fill:"#000",stroke:"none"})},k.add=function(b){if(a.is(b,"array")){var c=this.set(),e=0,f=b.length,h;for(;e<f;e++)h=b[e]||{},d[g](h.type)&&c.push(this[h.type]().attr(h))}return c},a.format=function(b,c){var d=a.is(c,E)?[0][n](c):arguments;b&&a.is(b,D)&&d.length-1&&(b=b.replace(e,function(a,b){return d[++b]==null?p:d[b]}));return b||p},a.fullfill=function(){var a=/\{([^\}]+)\}/g,b=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,c=function(a,c,d){var e=d;c.replace(b,function(a,b,c,d,f){b=b||d,e&&(b in e&&(e=e[b]),typeof e=="function"&&f&&(e=e()))}),e=(e==null||e==d?a:e)+"";return e};return function(b,d){return String(b).replace(a,function(a,b){return c(a,b,d)})}}(),a.ninja=function(){i.was?h.win.Raphael=i.is:delete Raphael;return a},a.st=cH,function(b,c,d){function e(){/in/.test(b.readyState)?setTimeout(e,9):a.eve("raphael.DOMload")}b.readyState==null&&b.addEventListener&&(b.addEventListener(c,d=function(){b.removeEventListener(c,d,!1),b.readyState="complete"},!1),b.readyState="loading"),e()}(document,"DOMContentLoaded"),i.was?h.win.Raphael=a:Raphael=a,eve.on("raphael.DOMload",function(){b=!0})}(),window.Raphael.svg&&function(a){var b="hasOwnProperty",c=String,d=parseFloat,e=parseInt,f=Math,g=f.max,h=f.abs,i=f.pow,j=/[, ]+/,k=a.eve,l="",m=" ",n="http://www.w3.org/1999/xlink",o={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},p={};a.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var q=function(d,e){if(e){typeof d=="string"&&(d=q(d));for(var f in e)e[b](f)&&(f.substring(0,6)=="xlink:"?d.setAttributeNS(n,f.substring(6),c(e[f])):d.setAttribute(f,c(e[f])))}else d=a._g.doc.createElementNS("http://www.w3.org/2000/svg",d),d.style&&(d.style.webkitTapHighlightColor="rgba(0,0,0,0)");return d},r=function(b,e){var j="linear",k=b.id+e,m=.5,n=.5,o=b.node,p=b.paper,r=o.style,s=a._g.doc.getElementById(k);if(!s){e=c(e).replace(a._radial_gradient,function(a,b,c){j="radial";if(b&&c){m=d(b),n=d(c);var e=(n>.5)*2-1;i(m-.5,2)+i(n-.5,2)>.25&&(n=f.sqrt(.25-i(m-.5,2))*e+.5)&&n!=.5&&(n=n.toFixed(5)-1e-5*e)}return l}),e=e.split(/\s*\-\s*/);if(j=="linear"){var t=e.shift();t=-d(t);if(isNaN(t))return null;var u=[0,0,f.cos(a.rad(t)),f.sin(a.rad(t))],v=1/(g(h(u[2]),h(u[3]))||1);u[2]*=v,u[3]*=v,u[2]<0&&(u[0]=-u[2],u[2]=0),u[3]<0&&(u[1]=-u[3],u[3]=0)}var w=a._parseDots(e);if(!w)return null;k=k.replace(/[\(\)\s,\xb0#]/g,"_"),b.gradient&&k!=b.gradient.id&&(p.defs.removeChild(b.gradient),delete b.gradient);if(!b.gradient){s=q(j+"Gradient",{id:k}),b.gradient=s,q(s,j=="radial"?{fx:m,fy:n}:{x1:u[0],y1:u[1],x2:u[2],y2:u[3],gradientTransform:b.matrix.invert()}),p.defs.appendChild(s);for(var x=0,y=w.length;x<y;x++)s.appendChild(q("stop",{offset:w[x].offset?w[x].offset:x?"100%":"0%","stop-color":w[x].color||"#fff"}))}}q(o,{fill:"url(#"+k+")",opacity:1,"fill-opacity":1}),r.fill=l,r.opacity=1,r.fillOpacity=1;return 1},s=function(a){var b=a.getBBox(1);q(a.pattern,{patternTransform:a.matrix.invert()+" translate("+b.x+","+b.y+")"})},t=function(d,e,f){if(d.type=="path"){var g=c(e).toLowerCase().split("-"),h=d.paper,i=f?"end":"start",j=d.node,k=d.attrs,m=k["stroke-width"],n=g.length,r="classic",s,t,u,v,w,x=3,y=3,z=5;while(n--)switch(g[n]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":r=g[n];break;case"wide":y=5;break;case"narrow":y=2;break;case"long":x=5;break;case"short":x=2}r=="open"?(x+=2,y+=2,z+=2,u=1,v=f?4:1,w={fill:"none",stroke:k.stroke}):(v=u=x/2,w={fill:k.stroke,stroke:"none"}),d._.arrows?f?(d._.arrows.endPath&&p[d._.arrows.endPath]--,d._.arrows.endMarker&&p[d._.arrows.endMarker]--):(d._.arrows.startPath&&p[d._.arrows.startPath]--,d._.arrows.startMarker&&p[d._.arrows.startMarker]--):d._.arrows={};if(r!="none"){var A="raphael-marker-"+r,B="raphael-marker-"+i+r+x+y;a._g.doc.getElementById(A)?p[A]++:(h.defs.appendChild(q(q("path"),{"stroke-linecap":"round",d:o[r],id:A})),p[A]=1);var C=a._g.doc.getElementById(B),D;C?(p[B]++,D=C.getElementsByTagName("use")[0]):(C=q(q("marker"),{id:B,markerHeight:y,markerWidth:x,orient:"auto",refX:v,refY:y/2}),D=q(q("use"),{"xlink:href":"#"+A,transform:(f?"rotate(180 "+x/2+" "+y/2+") ":l)+"scale("+x/z+","+y/z+")","stroke-width":(1/((x/z+y/z)/2)).toFixed(4)}),C.appendChild(D),h.defs.appendChild(C),p[B]=1),q(D,w);var F=u*(r!="diamond"&&r!="oval");f?(s=d._.arrows.startdx*m||0,t=a.getTotalLength(k.path)-F*m):(s=F*m,t=a.getTotalLength(k.path)-(d._.arrows.enddx*m||0)),w={},w["marker-"+i]="url(#"+B+")";if(t||s)w.d=Raphael.getSubpath(k.path,s,t);q(j,w),d._.arrows[i+"Path"]=A,d._.arrows[i+"Marker"]=B,d._.arrows[i+"dx"]=F,d._.arrows[i+"Type"]=r,d._.arrows[i+"String"]=e}else f?(s=d._.arrows.startdx*m||0,t=a.getTotalLength(k.path)-s):(s=0,t=a.getTotalLength(k.path)-(d._.arrows.enddx*m||0)),d._.arrows[i+"Path"]&&q(j,{d:Raphael.getSubpath(k.path,s,t)}),delete d._.arrows[i+"Path"],delete d._.arrows[i+"Marker"],delete d._.arrows[i+"dx"],delete d._.arrows[i+"Type"],delete d._.arrows[i+"String"];for(w in p)if(p[b](w)&&!p[w]){var G=a._g.doc.getElementById(w);G&&G.parentNode.removeChild(G)}}},u={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},v=function(a,b,d){b=u[c(b).toLowerCase()];if(b){var e=a.attrs["stroke-width"]||"1",f={round:e,square:e,butt:0}[a.attrs["stroke-linecap"]||d["stroke-linecap"]]||0,g=[],h=b.length;while(h--)g[h]=b[h]*e+(h%2?1:-1)*f;q(a.node,{"stroke-dasharray":g.join(",")})}},w=function(d,f){var i=d.node,k=d.attrs,m=i.style.visibility;i.style.visibility="hidden";for(var o in f)if(f[b](o)){if(!a._availableAttrs[b](o))continue;var p=f[o];k[o]=p;switch(o){case"blur":d.blur(p);break;case"href":case"title":case"target":var u=i.parentNode;if(u.tagName.toLowerCase()!="a"){var w=q("a");u.insertBefore(w,i),w.appendChild(i),u=w}o=="target"?u.setAttributeNS(n,"show",p=="blank"?"new":p):u.setAttributeNS(n,o,p);break;case"cursor":i.style.cursor=p;break;case"transform":d.transform(p);break;case"arrow-start":t(d,p);break;case"arrow-end":t(d,p,1);break;case"clip-rect":var x=c(p).split(j);if(x.length==4){d.clip&&d.clip.parentNode.parentNode.removeChild(d.clip.parentNode);var z=q("clipPath"),A=q("rect");z.id=a.createUUID(),q(A,{x:x[0],y:x[1],width:x[2],height:x[3]}),z.appendChild(A),d.paper.defs.appendChild(z),q(i,{"clip-path":"url(#"+z.id+")"}),d.clip=A}if(!p){var B=i.getAttribute("clip-path");if(B){var C=a._g.doc.getElementById(B.replace(/(^url\(#|\)$)/g,l));C&&C.parentNode.removeChild(C),q(i,{"clip-path":l}),delete d.clip}}break;case"path":d.type=="path"&&(q(i,{d:p?k.path=a._pathToAbsolute(p):"M0,0"}),d._.dirty=1,d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1)));break;case"width":i.setAttribute(o,p),d._.dirty=1;if(k.fx)o="x",p=k.x;else break;case"x":k.fx&&(p=-k.x-(k.width||0));case"rx":if(o=="rx"&&d.type=="rect")break;case"cx":i.setAttribute(o,p),d.pattern&&s(d),d._.dirty=1;break;case"height":i.setAttribute(o,p),d._.dirty=1;if(k.fy)o="y",p=k.y;else break;case"y":k.fy&&(p=-k.y-(k.height||0));case"ry":if(o=="ry"&&d.type=="rect")break;case"cy":i.setAttribute(o,p),d.pattern&&s(d),d._.dirty=1;break;case"r":d.type=="rect"?q(i,{rx:p,ry:p}):i.setAttribute(o,p),d._.dirty=1;break;case"src":d.type=="image"&&i.setAttributeNS(n,"href",p);break;case"stroke-width":if(d._.sx!=1||d._.sy!=1)p/=g(h(d._.sx),h(d._.sy))||1;d.paper._vbSize&&(p*=d.paper._vbSize),i.setAttribute(o,p),k["stroke-dasharray"]&&v(d,k["stroke-dasharray"],f),d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1));break;case"stroke-dasharray":v(d,p,f);break;case"fill":var D=c(p).match(a._ISURL);if(D){z=q("pattern");var F=q("image");z.id=a.createUUID(),q(z,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),q(F,{x:0,y:0,"xlink:href":D[1]}),z.appendChild(F),function(b){a._preload(D[1],function(){var a=this.offsetWidth,c=this.offsetHeight;q(b,{width:a,height:c}),q(F,{width:a,height:c}),d.paper.safari()})}(z),d.paper.defs.appendChild(z),q(i,{fill:"url(#"+z.id+")"}),d.pattern=z,d.pattern&&s(d);break}var G=a.getRGB(p);if(!G.error)delete f.gradient,delete k.gradient,!a.is(k.opacity,"undefined")&&a.is(f.opacity,"undefined")&&q(i,{opacity:k.opacity}),!a.is(k["fill-opacity"],"undefined")&&a.is(f["fill-opacity"],"undefined")&&q(i,{"fill-opacity":k["fill-opacity"]});else if((d.type=="circle"||d.type=="ellipse"||c(p).charAt()!="r")&&r(d,p)){if("opacity"in k||"fill-opacity"in k){var H=a._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,l));if(H){var I=H.getElementsByTagName("stop");q(I[I.length-1],{"stop-opacity":("opacity"in k?k.opacity:1)*("fill-opacity"in k?k["fill-opacity"]:1)})}}k.gradient=p,k.fill="none";break}G[b]("opacity")&&q(i,{"fill-opacity":G.opacity>1?G.opacity/100:G.opacity});case"stroke":G=a.getRGB(p),i.setAttribute(o,G.hex),o=="stroke"&&G[b]("opacity")&&q(i,{"stroke-opacity":G.opacity>1?G.opacity/100:G.opacity}),o=="stroke"&&d._.arrows&&("startString"in d._.arrows&&t(d,d._.arrows.startString),"endString"in d._.arrows&&t(d,d._.arrows.endString,1));break;case"gradient":(d.type=="circle"||d.type=="ellipse"||c(p).charAt()!="r")&&r(d,p);break;case"opacity":k.gradient&&!k[b]("stroke-opacity")&&q(i,{"stroke-opacity":p>1?p/100:p});case"fill-opacity":if(k.gradient){H=a._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,l)),H&&(I=H.getElementsByTagName("stop"),q(I[I.length-1],{"stop-opacity":p}));break};default:o=="font-size"&&(p=e(p,10)+"px");var J=o.replace(/(\-.)/g,function(a){return a.substring(1).toUpperCase()});i.style[J]=p,d._.dirty=1,i.setAttribute(o,p)}}y(d,f),i.style.visibility=m},x=1.2,y=function(d,f){if(d.type=="text"&&!!(f[b]("text")||f[b]("font")||f[b]("font-size")||f[b]("x")||f[b]("y"))){var g=d.attrs,h=d.node,i=h.firstChild?e(a._g.doc.defaultView.getComputedStyle(h.firstChild,l).getPropertyValue("font-size"),10):10;if(f[b]("text")){g.text=f.text;while(h.firstChild)h.removeChild(h.firstChild);var j=c(f.text).split("\n"),k=[],m;for(var n=0,o=j.length;n<o;n++)m=q("tspan"),n&&q(m,{dy:i*x,x:g.x}),m.appendChild(a._g.doc.createTextNode(j[n])),h.appendChild(m),k[n]=m}else{k=h.getElementsByTagName("tspan");for(n=0,o=k.length;n<o;n++)n?q(k[n],{dy:i*x,x:g.x}):q(k[0],{dy:0})}q(h,{x:g.x,y:g.y}),d._.dirty=1;var p=d._getBBox(),r=g.y-(p.y+p.height/2);r&&a.is(r,"finite")&&q(k[0],{dy:r})}},z=function(b,c){var d=0,e=0;this[0]=this.node=b,b.raphael=!0,this.id=a._oid++,b.raphaelid=this.id,this.matrix=a.matrix(),this.realPath=null,this.paper=c,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!c.bottom&&(c.bottom=this),this.prev=c.top,c.top&&(c.top.next=this),c.top=this,this.next=null},A=a.el;z.prototype=A,A.constructor=z,a._engine.path=function(a,b){var c=q("path");b.canvas&&b.canvas.appendChild(c);var d=new z(c,b);d.type="path",w(d,{fill:"none",stroke:"#000",path:a});return d},A.rotate=function(a,b,e){if(this.removed)return this;a=c(a).split(j),a.length-1&&(b=d(a[1]),e=d(a[2])),a=d(a[0]),e==null&&(b=e);if(b==null||e==null){var f=this.getBBox(1);b=f.x+f.width/2,e=f.y+f.height/2}this.transform(this._.transform.concat([["r",a,b,e]]));return this},A.scale=function(a,b,e,f){if(this.removed)return this;a=c(a).split(j),a.length-1&&(b=d(a[1]),e=d(a[2]),f=d(a[3])),a=d(a[0]),b==null&&(b=a),f==null&&(e=f);if(e==null||f==null)var g=this.getBBox(1);e=e==null?g.x+g.width/2:e,f=f==null?g.y+g.height/2:f,this.transform(this._.transform.concat([["s",a,b,e,f]]));return this},A.translate=function(a,b){if(this.removed)return this;a=c(a).split(j),a.length-1&&(b=d(a[1])),a=d(a[0])||0,b=+b||0,this.transform(this._.transform.concat([["t",a,b]]));return this},A.transform=function(c){var d=this._;if(c==null)return d.transform;a._extractTransform(this,c),this.clip&&q(this.clip,{transform:this.matrix.invert()}),this.pattern&&s(this),this.node&&q(this.node,{transform:this.matrix});if(d.sx!=1||d.sy!=1){var e=this.attrs[b]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":e})}return this},A.hide=function(){!this.removed&&this.paper.safari(this.node.style.display="none");return this},A.show=function(){!this.removed&&this.paper.safari(this.node.style.display="");return this},A.remove=function(){if(!this.removed&&!!this.node.parentNode){var b=this.paper;b.__set__&&b.__set__.exclude(this),k.unbind("raphael.*.*."+this.id),this.gradient&&b.defs.removeChild(this.gradient),a._tear(this,b),this.node.parentNode.tagName.toLowerCase()=="a"?this.node.parentNode.parentNode.removeChild(this.node.parentNode):this.node.parentNode.removeChild(this.node);for(var c in this)this[c]=typeof this[c]=="function"?a._removedFactory(c):null;this.removed=!0}},A._getBBox=function(){if(this.node.style.display=="none"){this.show();var a=!0}var b={};try{b=this.node.getBBox()}catch(c){}finally{b=b||{}}a&&this.hide();return b},A.attr=function(c,d){if(this.removed)return this;if(c==null){var e={};for(var f in this.attrs)this.attrs[b](f)&&(e[f]=this.attrs[f]);e.gradient&&e.fill=="none"&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform;return e}if(d==null&&a.is(c,"string")){if(c=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;if(c=="transform")return this._.transform;var g=c.split(j),h={};for(var i=0,l=g.length;i<l;i++)c=g[i],c in this.attrs?h[c]=this.attrs[c]:a.is(this.paper.customAttributes[c],"function")?h[c]=this.paper.customAttributes[c].def:h[c]=a._availableAttrs[c];return l-1?h:h[g[0]]}if(d==null&&a.is(c,"array")){h={};for(i=0,l=c.length;i<l;i++)h[c[i]]=this.attr(c[i]);return h}if(d!=null){var m={};m[c]=d}else c!=null&&a.is(c,"object")&&(m=c);for(var n in m)k("raphael.attr."+n+"."+this.id,this,m[n]);for(n in this.paper.customAttributes)if(this.paper.customAttributes[b](n)&&m[b](n)&&a.is(this.paper.customAttributes[n],"function")){var o=this.paper.customAttributes[n].apply(this,[].concat(m[n]));this.attrs[n]=m[n];for(var p in o)o[b](p)&&(m[p]=o[p])}w(this,m);return this},A.toFront=function(){if(this.removed)return this;this.node.parentNode.tagName.toLowerCase()=="a"?this.node.parentNode.parentNode.appendChild(this.node.parentNode):this.node.parentNode.appendChild(this.node);var b=this.paper;b.top!=this&&a._tofront(this,b);return this},A.toBack=function(){if(this.removed)return this;var b=this.node.parentNode;b.tagName.toLowerCase()=="a"?b.parentNode.insertBefore(this.node.parentNode,this.node.parentNode.parentNode.firstChild):b.firstChild!=this.node&&b.insertBefore(this.node,this.node.parentNode.firstChild),a._toback(this,this.paper);var c=this.paper;return this},A.insertAfter=function(b){if(this.removed)return this;var c=b.node||b[b.length-1].node;c.nextSibling?c.parentNode.insertBefore(this.node,c.nextSibling):c.parentNode.appendChild(this.node),a._insertafter(this,b,this.paper);return this},A.insertBefore=function(b){if(this.removed)return this;var c=b.node||b[0].node;c.parentNode.insertBefore(this.node,c),a._insertbefore(this,b,this.paper);return this},A.blur=function(b){var c=this;if(+b!==0){var d=q("filter"),e=q("feGaussianBlur");c.attrs.blur=b,d.id=a.createUUID(),q(e,{stdDeviation:+b||1.5}),d.appendChild(e),c.paper.defs.appendChild(d),c._blur=d,q(c.node,{filter:"url(#"+d.id+")"})}else c._blur&&(c._blur.parentNode.removeChild(c._blur),delete c._blur,delete c.attrs.blur),c.node.removeAttribute("filter")},a._engine.circle=function(a,b,c,d){var e=q("circle");a.canvas&&a.canvas.appendChild(e);var f=new z(e,a);f.attrs={cx:b,cy:c,r:d,fill:"none",stroke:"#000"},f.type="circle",q(e,f.attrs);return f},a._engine.rect=function(a,b,c,d,e,f){var g=q("rect");a.canvas&&a.canvas.appendChild(g);var h=new z(g,a);h.attrs={x:b,y:c,width:d,height:e,r:f||0,rx:f||0,ry:f||0,fill:"none",stroke:"#000"},h.type="rect",q(g,h.attrs);return h},a._engine.ellipse=function(a,b,c,d,e){var f=q("ellipse");a.canvas&&a.canvas.appendChild(f);var g=new z(f,a);g.attrs={cx:b,cy:c,rx:d,ry:e,fill:"none",stroke:"#000"},g.type="ellipse",q(f,g.attrs);return g},a._engine.image=function(a,b,c,d,e,f){var g=q("image");q(g,{x:c,y:d,width:e,height:f,preserveAspectRatio:"none"}),g.setAttributeNS(n,"href",b),a.canvas&&a.canvas.appendChild(g);var h=new z(g,a);h.attrs={x:c,y:d,width:e,height:f,src:b},h.type="image";return h},a._engine.text=function(b,c,d,e){var f=q("text");b.canvas&&b.canvas.appendChild(f);var g=new z(f,b);g.attrs={x:c,y:d,"text-anchor":"middle",text:e,font:a._availableAttrs.font,stroke:"none",fill:"#000"},g.type="text",w(g,g.attrs);return g},a._engine.setSize=function(a,b){this.width=a||this.width,this.height=b||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox);return this},a._engine.create=function(){var b=a._getContainer.apply(0,arguments),c=b&&b.container,d=b.x,e=b.y,f=b.width,g=b.height;if(!c)throw new Error("SVG container not found.");var h=q("svg"),i="overflow:hidden;",j;d=d||0,e=e||0,f=f||512,g=g||342,q(h,{height:g,version:1.1,width:f,xmlns:"http://www.w3.org/2000/svg"}),c==1?(h.style.cssText=i+"position:absolute;left:"+d+"px;top:"+e+"px",a._g.doc.body.appendChild(h),j=1):(h.style.cssText=i+"position:relative",c.firstChild?c.insertBefore(h,c.firstChild):c.appendChild(h)),c=new a._Paper,c.width=f,c.height=g,c.canvas=h,c.clear(),c._left=c._top=0,j&&(c.renderfix=function(){}),c.renderfix();return c},a._engine.setViewBox=function(a,b,c,d,e){k("raphael.setViewBox",this,this._viewBox,[a,b,c,d,e]);var f=g(c/this.width,d/this.height),h=this.top,i=e?"meet":"xMinYMin",j,l;a==null?(this._vbSize&&(f=1),delete this._vbSize,j="0 0 "+this.width+m+this.height):(this._vbSize=f,j=a+m+b+m+c+m+d),q(this.canvas,{viewBox:j,preserveAspectRatio:i});while(f&&h)l="stroke-width"in h.attrs?h.attrs["stroke-width"]:1,h.attr({"stroke-width":l}),h._.dirty=1,h._.dirtyT=1,h=h.prev;this._viewBox=[a,b,c,d,!!e];return this},a.prototype.renderfix=function(){var a=this.canvas,b=a.style,c;try{c=a.getScreenCTM()||a.createSVGMatrix()}catch(d){c=a.createSVGMatrix()}var e=-c.e%1,f=-c.f%1;if(e||f)e&&(this._left=(this._left+e)%1,b.left=this._left+"px"),f&&(this._top=(this._top+f)%1,b.top=this._top+"px")},a.prototype.clear=function(){a.eve("raphael.clear",this);var b=this.canvas;while(b.firstChild)b.removeChild(b.firstChild);this.bottom=this.top=null,(this.desc=q("desc")).appendChild(a._g.doc.createTextNode("Created with Raphaël "+a.version)),b.appendChild(this.desc),b.appendChild(this.defs=q("defs"))},a.prototype.remove=function(){k("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var b in this)this[b]=typeof this[b]=="function"?a._removedFactory(b):null};var B=a.st;for(var C in A)A[b](C)&&!B[b](C)&&(B[C]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(C))}(window.Raphael),window.Raphael.vml&&function(a){var b="hasOwnProperty",c=String,d=parseFloat,e=Math,f=e.round,g=e.max,h=e.min,i=e.abs,j="fill",k=/[, ]+/,l=a.eve,m=" progid:DXImageTransform.Microsoft",n=" ",o="",p={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},q=/([clmz]),?([^clmz]*)/gi,r=/ progid:\S+Blur\([^\)]+\)/g,s=/-?[^,\s-]+/g,t="position:absolute;left:0;top:0;width:1px;height:1px",u=21600,v={path:1,rect:1,image:1},w={circle:1,ellipse:1},x=function(b){var d=/[ahqstv]/ig,e=a._pathToAbsolute;c(b).match(d)&&(e=a._path2curve),d=/[clmz]/g;if(e==a._pathToAbsolute&&!c(b).match(d)){var g=c(b).replace(q,function(a,b,c){var d=[],e=b.toLowerCase()=="m",g=p[b];c.replace(s,function(a){e&&d.length==2&&(g+=d+p[b=="m"?"l":"L"],d=[]),d.push(f(a*u))});return g+d});return g}var h=e(b),i,j;g=[];for(var k=0,l=h.length;k<l;k++){i=h[k],j=h[k][0].toLowerCase(),j=="z"&&(j="x");for(var m=1,r=i.length;m<r;m++)j+=f(i[m]*u)+(m!=r-1?",":o);g.push(j)}return g.join(n)},y=function(b,c,d){var e=a.matrix();e.rotate(-b,.5,.5);return{dx:e.x(c,d),dy:e.y(c,d)}},z=function(a,b,c,d,e,f){var g=a._,h=a.matrix,k=g.fillpos,l=a.node,m=l.style,o=1,p="",q,r=u/b,s=u/c;m.visibility="hidden";if(!!b&&!!c){l.coordsize=i(r)+n+i(s),m.rotation=f*(b*c<0?-1:1);if(f){var t=y(f,d,e);d=t.dx,e=t.dy}b<0&&(p+="x"),c<0&&(p+=" y")&&(o=-1),m.flip=p,l.coordorigin=d*-r+n+e*-s;if(k||g.fillsize){var v=l.getElementsByTagName(j);v=v&&v[0],l.removeChild(v),k&&(t=y(f,h.x(k[0],k[1]),h.y(k[0],k[1])),v.position=t.dx*o+n+t.dy*o),g.fillsize&&(v.size=g.fillsize[0]*i(b)+n+g.fillsize[1]*i(c)),l.appendChild(v)}m.visibility="visible"}};a.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var A=function(a,b,d){var e=c(b).toLowerCase().split("-"),f=d?"end":"start",g=e.length,h="classic",i="medium",j="medium";while(g--)switch(e[g]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":h=e[g];break;case"wide":case"narrow":j=e[g];break;case"long":case"short":i=e[g]}var k=a.node.getElementsByTagName("stroke")[0];k[f+"arrow"]=h,k[f+"arrowlength"]=i,k[f+"arrowwidth"]=j},B=function(e,i){e.attrs=e.attrs||{};var l=e.node,m=e.attrs,p=l.style,q,r=v[e.type]&&(i.x!=m.x||i.y!=m.y||i.width!=m.width||i.height!=m.height||i.cx!=m.cx||i.cy!=m.cy||i.rx!=m.rx||i.ry!=m.ry||i.r!=m.r),s=w[e.type]&&(m.cx!=i.cx||m.cy!=i.cy||m.r!=i.r||m.rx!=i.rx||m.ry!=i.ry),t=e;for(var y in i)i[b](y)&&(m[y]=i[y]);r&&(m.path=a._getPath[e.type](e),e._.dirty=1),i.href&&(l.href=i.href),i.title&&(l.title=i.title),i.target&&(l.target=i.target),i.cursor&&(p.cursor=i.cursor),"blur"in i&&e.blur(i.blur);if(i.path&&e.type=="path"||r)l.path=x(~c(m.path).toLowerCase().indexOf("r")?a._pathToAbsolute(m.path):m.path),e.type=="image"&&(e._.fillpos=[m.x,m.y],e._.fillsize=[m.width,m.height],z(e,1,1,0,0,0));"transform"in i&&e.transform(i.transform);if(s){var B=+m.cx,D=+m.cy,E=+m.rx||+m.r||0,G=+m.ry||+m.r||0;l.path=a.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",f((B-E)*u),f((D-G)*u),f((B+E)*u),f((D+G)*u),f(B*u))}if("clip-rect"in i){var H=c(i["clip-rect"]).split(k);if(H.length==4){H[2]=+H[2]+ +H[0],H[3]=+H[3]+ +H[1];var I=l.clipRect||a._g.doc.createElement("div"),J=I.style;J.clip=a.format("rect({1}px {2}px {3}px {0}px)",H),l.clipRect||(J.position="absolute",J.top=0,J.left=0,J.width=e.paper.width+"px",J.height=e.paper.height+"px",l.parentNode.insertBefore(I,l),I.appendChild(l),l.clipRect=I)}i["clip-rect"]||l.clipRect&&(l.clipRect.style.clip="auto")}if(e.textpath){var K=e.textpath.style;i.font&&(K.font=i.font),i["font-family"]&&(K.fontFamily='"'+i["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,o)+'"'),i["font-size"]&&(K.fontSize=i["font-size"]),i["font-weight"]&&(K.fontWeight=i["font-weight"]),i["font-style"]&&(K.fontStyle=i["font-style"])}"arrow-start"in i&&A(t,i["arrow-start"]),"arrow-end"in i&&A(t,i["arrow-end"],1);if(i.opacity!=null||i["stroke-width"]!=null||i.fill!=null||i.src!=null||i.stroke!=null||i["stroke-width"]!=null||i["stroke-opacity"]!=null||i["fill-opacity"]!=null||i["stroke-dasharray"]!=null||i["stroke-miterlimit"]!=null||i["stroke-linejoin"]!=null||i["stroke-linecap"]!=null){var L=l.getElementsByTagName(j),M=!1;L=L&&L[0],!L&&(M=L=F(j)),e.type=="image"&&i.src&&(L.src=i.src),i.fill&&(L.on=!0);if(L.on==null||i.fill=="none"||i.fill===null)L.on=!1;if(L.on&&i.fill){var N=c(i.fill).match(a._ISURL);if(N){L.parentNode==l&&l.removeChild(L),L.rotate=!0,L.src=N[1],L.type="tile";var O=e.getBBox(1);L.position=O.x+n+O.y,e._.fillpos=[O.x,O.y],a._preload(N[1],function(){e._.fillsize=[this.offsetWidth,this.offsetHeight]})}else L.color=a.getRGB(i.fill).hex,L.src=o,L.type="solid",a.getRGB(i.fill).error&&(t.type in{circle:1,ellipse:1}||c(i.fill).charAt()!="r")&&C(t,i.fill,L)&&(m.fill="none",m.gradient=i.fill,L.rotate=!1)}if("fill-opacity"in i||"opacity"in i){var P=((+m["fill-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+a.getRGB(i.fill).o+1||2)-1);P=h(g(P,0),1),L.opacity=P,L.src&&(L.color="none")}l.appendChild(L);var Q=l.getElementsByTagName("stroke")&&l.getElementsByTagName("stroke")[0],T=!1;!Q&&(T=Q=F("stroke"));if(i.stroke&&i.stroke!="none"||i["stroke-width"]||i["stroke-opacity"]!=null||i["stroke-dasharray"]||i["stroke-miterlimit"]||i["stroke-linejoin"]||i["stroke-linecap"])Q.on=!0;(i.stroke=="none"||i.stroke===null||Q.on==null||i.stroke==0||i["stroke-width"]==0)&&(Q.on=!1);var U=a.getRGB(i.stroke);Q.on&&i.stroke&&(Q.color=U.hex),P=((+m["stroke-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+U.o+1||2)-1);var V=(d(i["stroke-width"])||1)*.75;P=h(g(P,0),1),i["stroke-width"]==null&&(V=m["stroke-width"]),i["stroke-width"]&&(Q.weight=V),V&&V<1&&(P*=V)&&(Q.weight=1),Q.opacity=P,i["stroke-linejoin"]&&(Q.joinstyle=i["stroke-linejoin"]||"miter"),Q.miterlimit=i["stroke-miterlimit"]||8,i["stroke-linecap"]&&(Q.endcap=i["stroke-linecap"]=="butt"?"flat":i["stroke-linecap"]=="square"?"square":"round");if(i["stroke-dasharray"]){var W={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};Q.dashstyle=W[b](i["stroke-dasharray"])?W[i["stroke-dasharray"]]:o}T&&l.appendChild(Q)}if(t.type=="text"){t.paper.canvas.style.display=o;var X=t.paper.span,Y=100,Z=m.font&&m.font.match(/\d+(?:\.\d*)?(?=px)/);p=X.style,m.font&&(p.font=m.font),m["font-family"]&&(p.fontFamily=m["font-family"]),m["font-weight"]&&(p.fontWeight=m["font-weight"]),m["font-style"]&&(p.fontStyle=m["font-style"]),Z=d(m["font-size"]||Z&&Z[0])||10,p.fontSize=Z*Y+"px",t.textpath.string&&(X.innerHTML=c(t.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var $=X.getBoundingClientRect();t.W=m.w=($.right-$.left)/Y,t.H=m.h=($.bottom-$.top)/Y,t.X=m.x,t.Y=m.y+t.H/2,("x"in i||"y"in i)&&(t.path.v=a.format("m{0},{1}l{2},{1}",f(m.x*u),f(m.y*u),f(m.x*u)+1));var _=["x","y","text","font","font-family","font-weight","font-style","font-size"];for(var ba=0,bb=_.length;ba<bb;ba++)if(_[ba]in i){t._.dirty=1;break}switch(m["text-anchor"]){case"start":t.textpath.style["v-text-align"]="left",t.bbx=t.W/2;break;case"end":t.textpath.style["v-text-align"]="right",t.bbx=-t.W/2;break;default:t.textpath.style["v-text-align"]="center",t.bbx=0}t.textpath.style["v-text-kern"]=!0}},C=function(b,f,g){b.attrs=b.attrs||{};var h=b.attrs,i=Math.pow,j,k,l="linear",m=".5 .5";b.attrs.gradient=f,f=c(f).replace(a._radial_gradient,function(a,b,c){l="radial",b&&c&&(b=d(b),c=d(c),i(b-.5,2)+i(c-.5,2)>.25&&(c=e.sqrt(.25-i(b-.5,2))*((c>.5)*2-1)+.5),m=b+n+c);return o}),f=f.split(/\s*\-\s*/);if(l=="linear"){var p=f.shift();p=-d(p);if(isNaN(p))return null}var q=a._parseDots(f);if(!q)return null;b=b.shape||b.node;if(q.length){b.removeChild(g),g.on=!0,g.method="none",g.color=q[0].color,g.color2=q[q.length-1].color;var r=[];for(var s=0,t=q.length;s<t;s++)q[s].offset&&r.push(q[s].offset+n+q[s].color);g.colors=r.length?r.join():"0% "+g.color,l=="radial"?(g.type="gradientTitle",g.focus="100%",g.focussize="0 0",g.focusposition=m,g.angle=0):(g.type="gradient",g.angle=(270-p)%360),b.appendChild(g)}return 1},D=function(b,c){this[0]=this.node=b,b.raphael=!0,this.id=a._oid++,b.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=c,this.matrix=a.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!c.bottom&&(c.bottom=this),this.prev=c.top,c.top&&(c.top.next=this),c.top=this,this.next=null},E=a.el;D.prototype=E,E.constructor=D,E.transform=function(b){if(b==null)return this._.transform;var d=this.paper._viewBoxShift,e=d?"s"+[d.scale,d.scale]+"-1-1t"+[d.dx,d.dy]:o,f;d&&(f=b=c(b).replace(/\.{3}|\u2026/g,this._.transform||o)),a._extractTransform(this,e+b);var g=this.matrix.clone(),h=this.skew,i=this.node,j,k=~c(this.attrs.fill).indexOf("-"),l=!c(this.attrs.fill).indexOf("url(");g.translate(-0.5,-0.5);if(l||k||this.type=="image"){h.matrix="1 0 0 1",h.offset="0 0",j=g.split();if(k&&j.noRotation||!j.isSimple){i.style.filter=g.toFilter();var m=this.getBBox(),p=this.getBBox(1),q=m.x-p.x,r=m.y-p.y;i.coordorigin=q*-u+n+r*-u,z(this,1,1,q,r,0)}else i.style.filter=o,z(this,j.scalex,j.scaley,j.dx,j.dy,j.rotate)}else i.style.filter=o,h.matrix=c(g),h.offset=g.offset();f&&(this._.transform=f);return this},E.rotate=function(a,b,e){if(this.removed)return this;if(a!=null){a=c(a).split(k),a.length-1&&(b=d(a[1]),e=d(a[2])),a=d(a[0]),e==null&&(b=e);if(b==null||e==null){var f=this.getBBox(1);b=f.x+f.width/2,e=f.y+f.height/2}this._.dirtyT=1,this.transform(this._.transform.concat([["r",a,b,e]]));return this}},E.translate=function(a,b){if(this.removed)return this;a=c(a).split(k),a.length-1&&(b=d(a[1])),a=d(a[0])||0,b=+b||0,this._.bbox&&(this._.bbox.x+=a,this._.bbox.y+=b),this.transform(this._.transform.concat([["t",a,b]]));return this},E.scale=function(a,b,e,f){if(this.removed)return this;a=c(a).split(k),a.length-1&&(b=d(a[1]),e=d(a[2]),f=d(a[3]),isNaN(e)&&(e=null),isNaN(f)&&(f=null)),a=d(a[0]),b==null&&(b=a),f==null&&(e=f);if(e==null||f==null)var g=this.getBBox(1);e=e==null?g.x+g.width/2:e,f=f==null?g.y+g.height/2:f,this.transform(this._.transform.concat([["s",a,b,e,f]])),this._.dirtyT=1;return this},E.hide=function(){!this.removed&&(this.node.style.display="none");return this},E.show=function(){!this.removed&&(this.node.style.display=o);return this},E._getBBox=function(){if(this.removed)return{};return{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},E.remove=function(){if(!this.removed&&!!this.node.parentNode){this.paper.__set__&&this.paper.__set__.exclude(this),a.eve.unbind("raphael.*.*."+this.id),a._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var b in this)this[b]=typeof this[b]=="function"?a._removedFactory(b):null;this.removed=!0}},E.attr=function(c,d){if(this.removed)return this;if(c==null){var e={};for(var f in this.attrs)this.attrs[b](f)&&(e[f]=this.attrs[f]);e.gradient&&e.fill=="none"&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform;return e}if(d==null&&a.is(c,"string")){if(c==j&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;var g=c.split(k),h={};for(var i=0,m=g.length;i<m;i++)c=g[i],c in this.attrs?h[c]=this.attrs[c]:a.is(this.paper.customAttributes[c],"function")?h[c]=this.paper.customAttributes[c].def:h[c]=a._availableAttrs[c];return m-1?h:h[g[0]]}if(this.attrs&&d==null&&a.is(c,"array")){h={};for(i=0,m=c.length;i<m;i++)h[c[i]]=this.attr(c[i]);return h}var n;d!=null&&(n={},n[c]=d),d==null&&a.is(c,"object")&&(n=c);for(var o in n)l("raphael.attr."+o+"."+this.id,this,n[o]);if(n){for(o in this.paper.customAttributes)if(this.paper.customAttributes[b](o)&&n[b](o)&&a.is(this.paper.customAttributes[o],"function")){var p=this.paper.customAttributes[o].apply(this,[].concat(n[o]));this.attrs[o]=n[o];for(var q in p)p[b](q)&&(n[q]=p[q])}n.text&&this.type=="text"&&(this.textpath.string=n.text),B(this,n)}return this},E.toFront=function(){!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&a._tofront(this,this.paper);return this},E.toBack=function(){if(this.removed)return this;this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),a._toback(this,this.paper));return this},E.insertAfter=function(b){if(this.removed)return this;b.constructor==a.st.constructor&&(b=b[b.length-1]),b.node.nextSibling?b.node.parentNode.insertBefore(this.node,b.node.nextSibling):b.node.parentNode.appendChild(this.node),a._insertafter(this,b,this.paper);return this},E.insertBefore=function(b){if(this.removed)return this;b.constructor==a.st.constructor&&(b=b[0]),b.node.parentNode.insertBefore(this.node,b.node),a._insertbefore(this,b,this.paper);return this},E.blur=function(b){var c=this.node.runtimeStyle,d=c.filter;d=d.replace(r,o),+b!==0?(this.attrs.blur=b,c.filter=d+n+m+".Blur(pixelradius="+(+b||1.5)+")",c.margin=a.format("-{0}px 0 0 -{0}px",f(+b||1.5))):(c.filter=d,c.margin=0,delete this.attrs.blur)},a._engine.path=function(a,b){var c=F("shape");c.style.cssText=t,c.coordsize=u+n+u,c.coordorigin=b.coordorigin;var d=new D(c,b),e={fill:"none",stroke:"#000"};a&&(e.path=a),d.type="path",d.path=[],d.Path=o,B(d,e),b.canvas.appendChild(c);var f=F("skew");f.on=!0,c.appendChild(f),d.skew=f,d.transform(o);return d},a._engine.rect=function(b,c,d,e,f,g){var h=a._rectPath(c,d,e,f,g),i=b.path(h),j=i.attrs;i.X=j.x=c,i.Y=j.y=d,i.W=j.width=e,i.H=j.height=f,j.r=g,j.path=h,i.type="rect";return i},a._engine.ellipse=function(a,b,c,d,e){var f=a.path(),g=f.attrs;f.X=b-d,f.Y=c-e,f.W=d*2,f.H=e*2,f.type="ellipse",B(f,{cx:b,cy:c,rx:d,ry:e});return f},a._engine.circle=function(a,b,c,d){var e=a.path(),f=e.attrs;e.X=b-d,e.Y=c-d,e.W=e.H=d*2,e.type="circle",B(e,{cx:b,cy:c,r:d});return e},a._engine.image=function(b,c,d,e,f,g){var h=a._rectPath(d,e,f,g),i=b.path(h).attr({stroke:"none"}),k=i.attrs,l=i.node,m=l.getElementsByTagName(j)[0];k.src=c,i.X=k.x=d,i.Y=k.y=e,i.W=k.width=f,i.H=k.height=g,k.path=h,i.type="image",m.parentNode==l&&l.removeChild(m),m.rotate=!0,m.src=c,m.type="tile",i._.fillpos=[d,e],i._.fillsize=[f,g],l.appendChild(m),z(i,1,1,0,0,0);return i},a._engine.text=function(b,d,e,g){var h=F("shape"),i=F("path"),j=F("textpath");d=d||0,e=e||0,g=g||"",i.v=a.format("m{0},{1}l{2},{1}",f(d*u),f(e*u),f(d*u)+1),i.textpathok=!0,j.string=c(g),j.on=!0,h.style.cssText=t,h.coordsize=u+n+u,h.coordorigin="0 0";var k=new D(h,b),l={fill:"#000",stroke:"none",font:a._availableAttrs.font,text:g};k.shape=h,k.path=i,k.textpath=j,k.type="text",k.attrs.text=c(g),k.attrs.x=d,k.attrs.y=e,k.attrs.w=1,k.attrs.h=1,B(k,l),h.appendChild(j),h.appendChild(i),b.canvas.appendChild(h);var m=F("skew");m.on=!0,h.appendChild(m),k.skew=m,k.transform(o);return k},a._engine.setSize=function(b,c){var d=this.canvas.style;this.width=b,this.height=c,b==+b&&(b+="px"),c==+c&&(c+="px"),d.width=b,d.height=c,d.clip="rect(0 "+b+" "+c+" 0)",this._viewBox&&a._engine.setViewBox.apply(this,this._viewBox);return this},a._engine.setViewBox=function(b,c,d,e,f){a.eve("raphael.setViewBox",this,this._viewBox,[b,c,d,e,f]);var h=this.width,i=this.height,j=1/g(d/h,e/i),k,l;f&&(k=i/e,l=h/d,d*k<h&&(b-=(h-d*k)/2/k),e*l<i&&(c-=(i-e*l)/2/l)),this._viewBox=[b,c,d,e,!!f],this._viewBoxShift={dx:-b,dy:-c,scale:j},this.forEach(function(a){a.transform("...")});return this};var F;a._engine.initWin=function(a){var b=a.document;b.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!b.namespaces.rvml&&b.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),F=function(a){return b.createElement("<rvml:"+a+' class="rvml">')}}catch(c){F=function(a){return b.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},a._engine.initWin(a._g.win),a._engine.create=function(){var b=a._getContainer.apply(0,arguments),c=b.container,d=b.height,e,f=b.width,g=b.x,h=b.y;if(!c)throw new Error("VML container not found.");var i=new a._Paper,j=i.canvas=a._g.doc.createElement("div"),k=j.style;g=g||0,h=h||0,f=f||512,d=d||342,i.width=f,i.height=d,f==+f&&(f+="px"),d==+d&&(d+="px"),i.coordsize=u*1e3+n+u*1e3,i.coordorigin="0 0",i.span=a._g.doc.createElement("span"),i.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",j.appendChild(i.span),k.cssText=a.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",f,d),c==1?(a._g.doc.body.appendChild(j),k.left=g+"px",k.top=h+"px",k.position="absolute"):c.firstChild?c.insertBefore(j,c.firstChild):c.appendChild(j),i.renderfix=function(){};return i},a.prototype.clear=function(){a.eve("raphael.clear",this),this.canvas.innerHTML=o,this.span=a._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},a.prototype.remove=function(){a.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var b in this)this[b]=typeof this[b]=="function"?a._removedFactory(b):null;return!0};var G=a.st;for(var H in E)E[b](H)&&!G[b](H)&&(G[H]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(H))}(window.Raphael);(function($,window,undefined){var iView=function(el,options){var iv=this;iv.options=options;iv.sliderContent=el,iv.sliderInner=iv.sliderContent.html();iv.sliderContent.html("<div class='iviewSlider'>"+iv.sliderInner+"</div>");iv.slider=$('.iviewSlider',iv.sliderContent);iv.slider.css('position','relative');iv.slider.css('height',options.height+'px');iv.defs={slide:0,total:0,image:'',images:[],width:iv.sliderContent.width(),height:iv.sliderContent.height(),timer:options.timer.toLowerCase(),lock:!1,paused:(options.autoAdvance)?!1:!0,time:options.pauseTime,easing:options.easing};iv.disableSelection(iv.slider[0]);iv.slides=iv.slider.children();iv.slides.each(function(i){var slide=$(this);iv.defs.images.push(slide.data("leo_image"));if(slide.data("leo_thumbnail"))iv.defs.images.push(slide.data("leo_thumbnail"));slide.css('display','none');if(slide.data("leo_type")=="video"){var element=slide.children().eq(0),video=$('<div class="iview-video-show"><div class="iview-video-container"><a class="iview-video-close" title="'+options.closeLabel+'">&#735;</a></div></div>');slide.append(video);element.appendTo($('div.iview-video-container',video));video.css({width:'100%',height:iv.defs.height,top:'-'+iv.defs.height+'px'}).hide();slide.addClass('iview-video').css({'cursor':'pointer'})}
iv.defs.total++}).css({width:iv.defs.width,height:iv.defs.height});iv.sliderContent.append('<div class="iview-preloader"><div></div></div>');var iviewPreloader=$('.iview-preloader',iv.sliderContent);var preloaderBar=$('div',iviewPreloader);iviewPreloader.css({top:((iv.defs.height/2)-(iviewPreloader.height()/2))+'px',left:((iv.defs.width/2)-(iviewPreloader.width()/2))+'px'});iv.sliderContent.append('<div class="iview-timer"><div></div></div>');iv.iviewTimer=$('.iview-timer',iv.sliderContent);iv.iviewTimer.hide();$('.tp-caption',iv.slider).each(function(i){var caption=$(this);caption.html('<div class="caption-contain">'+caption.html()+'</div>')});options.startSlide=(options.randomStart)?Math.floor(Math.random()*iv.defs.total):options.startSlide;options.startSlide=(options.startSlide>0&&options.startSlide>=iv.defs.total)?iv.defs.total-1:options.startSlide;iv.defs.slide=options.startSlide;iv.defs.image=iv.slides.eq(iv.defs.slide);iv.defs.time=(options.pauseTime&&options.pauseTime!=0)?options.pauseTime:5000;iv.defs.easing=(iv.defs.image.data('leo_easing'))?iv.defs.image.data('leo_easing'):options.easing;iv.pieDegree=0;var padding=options.timerPadding,diameter=options.timerDiameter,stroke=options.timerStroke;if(iv.defs.total>1&&iv.defs.timer!="bar"){stroke=(iv.defs.timer=="360bar")?options.timerStroke:0;var width=(diameter+(padding*2)+(stroke*2)),height=width,r=Raphael(iv.iviewTimer[0],width,height);iv.R=(diameter/2);var param={stroke:options.timerBg,"stroke-width":(stroke+(padding*2))},param2={stroke:options.timerColor,"stroke-width":stroke,"stroke-linecap":"round"},param3={fill:options.timerColor,stroke:'none',"stroke-width":0},bgParam={fill:options.timerBg,stroke:'none',"stroke-width":0};r.customAttributes.arc=function(value,R){var total=360,alpha=360/total*value,a=(90-alpha)*Math.PI/180,cx=((diameter/2)+padding+stroke),cy=((diameter/2)+padding+stroke),x=cx+R*Math.cos(a),y=cy-R*Math.sin(a),path;if(total==value){path=[["M",cx,cy-R],["A",R,R,0,1,1,299.99,cy-R]]}else{path=[["M",cx,cy-R],["A",R,R,0,+(alpha>180),1,x,y]]}
return{path:path}};r.customAttributes.segment=function(angle,R){var a1=-90;R=R-1;angle=(a1+angle);var flag=(angle-a1)>180,x=((diameter/2)+padding),y=((diameter/2)+padding);a1=(a1%360)*Math.PI/180;angle=(angle%360)*Math.PI/180;return{path:[["M",x,y],["l",R*Math.cos(a1),R*Math.sin(a1)],["A",R,R,0,+flag,1,x+R*Math.cos(angle),y+R*Math.sin(angle)],["z"]]}};if(iv.defs.total>1&&iv.defs.timer=="pie"){r.circle(iv.R+padding,iv.R+padding,iv.R+padding-1).attr(bgParam)}
iv.timerBgPath=r.path().attr(param),iv.timerPath=r.path().attr(param2),iv.pieTimer=r.path().attr(param3)}
iv.barTimer=$('div',iv.iviewTimer);if(iv.defs.total>1&&iv.defs.timer=="360bar"){iv.timerBgPath.attr({arc:[359.9,iv.R]})}
if(iv.defs.timer=="bar"){iv.iviewTimer.css({opacity:options.timerOpacity,width:diameter,height:stroke,border:options.timerBarStroke+'px '+options.timerBarStrokeColor+' '+options.timerBarStrokeStyle,padding:padding,background:options.timerBg});iv.barTimer.css({width:0,height:stroke,background:options.timerColor,'float':'left'})}else{iv.iviewTimer.css({opacity:options.timerOpacity,width:width,height:height})}
iv.setTimerPosition();new ImagePreload(iv.defs.images,function(i){var percent=(i*10);preloaderBar.stop().animate({width:percent+'%'})},function(){preloaderBar.stop().animate({width:'100%'},function(){iviewPreloader.remove();iv.startSlider();options.onAfterLoad.call(this)})});iv.sliderContent.bind('swipeleft',function(){if(iv.defs.lock)return!1;iv.cleanTimer();iv.goTo('next')}).bind('swiperight',function(){if(iv.defs.lock)return!1;iv.cleanTimer();iv.defs.slide-=2;iv.goTo('prev')});if(options.keyboardNav){$(document).bind('keyup.iView',function(event){if(event.keyCode=='37'){if(iv.defs.lock)return!1;iv.cleanTimer();iv.defs.slide-=2;iv.goTo('prev')}
if(event.keyCode=='39'){if(iv.defs.lock)return!1;iv.cleanTimer();iv.goTo('next')}})}
iv.iviewTimer.on('click',function(){if(iv.iviewTimer.hasClass('paused')){iv.playSlider()}else{iv.stopSlider()}});iv.sliderContent.bind('leo_pause',function(){iv.stopSlider()});iv.sliderContent.bind('leo_play',function(){iv.playSlider()});iv.sliderContent.bind('leo_previous',function(){if(iv.defs.lock)return!1;iv.cleanTimer();iv.defs.slide-=2;iv.goTo('prev')});iv.sliderContent.bind('leo_next',function(){if(iv.defs.lock)return!1;iv.cleanTimer();iv.goTo('next')});iv.sliderContent.bind('leo_goSlide',function(event,slide){if(iv.defs.lock||iv.defs.slide==slide)return!1;if($(this).hasClass('active'))return!1;iv.cleanTimer();if(iv.defs.image.data('leo_background')=='image'){iv.slider.css('background','url("'+iv.defs.image.data('leo_image')+'") no-repeat');iv.slider.css('background-size','100%')}
if(iv.defs.image.data('leo_background')=='color'){if(iv.defs.image.data('leo_background_color')!=undefined){iv.slider.css('background-color',iv.defs.image.data('leo_background_color'))}}
iv.defs.slide=slide-1;iv.goTo('control')});iv.sliderContent.bind('resize',function(){t=$(this),tW=t.width(),tH=t.height(),width=iv.slider.width(),height=iv.slider.height();if(iv.defs.width!=tW){iv.options.customWidth
if(width<=iv.options.customWidth){width=iv.options.customWidth;$('.iviewSlider').width(iv.options.customWidth)}
if(tW>iv.options.customWidth+5){$('.iviewSlider').css('width','100%')}
var ratio=(tW/width);if(ratio>0.985){ratio=1}
newHeight=Math.round(iv.defs.height*ratio);if(iv.options.rtl==!0){iv.slider.css({'-webkit-transform-origin':'100% 0','-moz-transform-origin':'100% 0','-o-transform-origin':'100% 0','-ms-transform-origin':'100% 0','transform-origin':'100% 0','-webkit-transform':'scale('+ratio+')','-moz-transform':'scale('+ratio+')','-o-transform':'scale('+ratio+')','-ms-transform':'scale('+ratio+')','transform':'scale('+ratio+')'})}else{iv.slider.css({'-webkit-transform-origin':'0 0','-moz-transform-origin':'0 0','-o-transform-origin':'0 0','-ms-transform-origin':'0 0','transform-origin':'0 0','-webkit-transform':'scale('+ratio+')','-moz-transform':'scale('+ratio+')','-o-transform':'scale('+ratio+')','-ms-transform':'scale('+ratio+')','transform':'scale('+ratio+')'})}
t.css({height:newHeight});iv.defs.width=tW;iv.setTimerPosition()}});$('.iview-video',iv.slider).click(function(e){var t=$(this),video=$('.iview-video-show',t);if(!$(e.target).hasClass('iview-video-close')&&!$(e.target).hasClass('tp-caption')&&!$(e.target).parents().hasClass('tp-caption')){video.show().animate({top:0},1000,'easeOutBounce');iv.sliderContent.trigger('leo_pause')}});$('.iview-video-close',iv.slider).click(function(){var video=$(this).parents('.iview-video-show'),iframe=$('iframe',video),src=iframe.attr('src');iframe.removeAttr('src').attr('src',src);video.animate({top:'-'+iv.defs.height+'px'},1000,'easeOutBounce',function(){video.hide();iv.sliderContent.trigger('leo_play')})})};iView.prototype={timer:null,startSlider:function(){var iv=this;var img=new Image();img.src=iv.slides.eq(0).data('leo_image');imgWidth=img.width;if(imgWidth!=iv.defs.width){iv.defs.width=imgWidth;iv.sliderContent.trigger('resize')}
iv.iviewTimer.show();iv.slides.eq(iv.defs.slide).css('display','block');if(iv.defs.image.data('leo_background')=='image'){iv.slider.css('background','url("'+iv.defs.image.data('leo_image')+'") no-repeat');iv.slider.css('background-size','100%')}
if(iv.defs.image.data('leo_background')=='color'){if(iv.defs.image.data('leo_background_color')!=undefined){iv.slider.css('background-color',iv.defs.image.data('leo_background_color'))}}
iv.setCaption(iv.options);iv.iviewTimer.addClass('paused').attr('title',iv.options.playLabel);if(iv.options.autoAdvance&&iv.defs.total>1){iv.iviewTimer.removeClass('paused').attr('title',iv.options.pauseLabel);iv.setTimer()}
if(iv.options.directionNav){iv.sliderContent.append('<div class="iview-directionNav"><a class="iview-prevNav" title="'+iv.options.previousLabel+'">'+iv.options.previousLabel+'</a><a class="iview-nextNav" title="'+iv.options.nextLabel+'">'+iv.options.nextLabel+'</a></div>');$('.iview-directionNav',iv.sliderContent).css({opacity:iv.options.directionNavHoverOpacity});iv.sliderContent.hover(function(){$('.iview-directionNav',iv.sliderContent).stop().animate({opacity:1},300)},function(){$('.iview-directionNav',iv.sliderContent).stop().animate({opacity:iv.options.directionNavHoverOpacity},300)});$('a.iview-prevNav',iv.sliderContent).on('click',function(){if(iv.defs.lock)return!1;iv.cleanTimer();iv.defs.slide-=2;iv.goTo('prev')});$('a.iview-nextNav',iv.sliderContent).on('click',function(){if(iv.defs.lock)return!1;iv.cleanTimer();iv.goTo('next')})}
if(iv.options.controlNav){if(iv.options.controlNavThumbs){var class_navigation='iview-thumbnail'}else{var class_navigation='iview-bullet'}
var iviewControl='<div class="iview-controlNav '+class_navigation+'">',iviewTooltip='';if(!iv.options.directionNav&&iv.options.controlNavNextPrev)iviewControl+='<a class="iview-controlPrevNav" title="'+iv.options.previousLabel+'">'+iv.options.previousLabel+'</a>';if(iv.options.customHtmlBullet){iviewControl+='<div class="iview-items customHtmlBullet"><ul>'}else{iviewControl+='<div class="iview-items"><ul>'}
for(var i=0;i<iv.defs.total;i++){var slide=iv.slides.eq(i);iviewControl+='<li>';if(iv.options.controlNavThumbs){var thumb=(slide.data('leo_thumbnail'))?slide.data('leo_thumbnail'):slide.data('leo_image');iviewControl+='<a class="iview-control" rel="'+i+'"><img src="'+thumb+'" /></a>'}else{var thumb=(slide.data('leo_thumbnail'))?slide.data('leo_thumbnail'):slide.data('leo_image');var bullet_number='<span>'+(i+1)+'</span>';var bullet_class=iv.getSlideData(slide,'leo_bullet_class');var bullet_description=iv.getSlideData(slide,'leo_bullet_description');iviewControl+='<a class="iview-control '+bullet_class+'" rel="'+i+'">'+bullet_number+' '+bullet_description+'</a>';if(iv.options.controlNavTooltip)iviewTooltip+='<div rel="'+i+'"><img src="'+thumb+'" /></div>'}
iviewControl+='</li>'}
iviewControl+='</ul></div>';if(!iv.options.directionNav&&iv.options.controlNavNextPrev)iviewControl+='<a class="iview-controlNextNav" title="'+iv.options.nextLabel+'">'+iv.options.nextLabel+'</a>';iviewControl+='</div>';if(!iv.options.controlNavThumbs&&iv.options.controlNavTooltip)iviewControl+='<div class="iview-tooltip"><div class="holder"><div class="container">'+iviewTooltip+'</div></div></div>';iv.sliderContent.append(iviewControl);$('.iview-controlNav a.iview-control:eq('+iv.defs.slide+')',iv.sliderContent).addClass('active');$('a.iview-controlPrevNav',iv.sliderContent).one('click',function(){if(iv.defs.lock)return!1;iv.cleanTimer();iv.defs.slide-=2;iv.goTo('prev')});$('a.iview-controlNextNav',iv.sliderContent).on('click',function(){if(iv.defs.lock)return!1;iv.cleanTimer();iv.goTo('next')});$('.iview-controlNav a.iview-control',iv.sliderContent).on('click',function(){if(iv.defs.lock)return!1;if($(this).hasClass('active'))return!1;iv.cleanTimer();if(iv.defs.image.data('leo_background')=='image'){iv.slider.css('background','url("'+iv.defs.image.data('leo_image')+'") no-repeat');iv.slider.css('background-size','100%')}
if(iv.defs.image.data('leo_background')=='color'){if(iv.defs.image.data('leo_background_color')!=undefined){iv.slider.css('background-color',iv.defs.image.data('leo_background_color'))}}
iv.defs.slide=$(this).attr('rel')-1;iv.goTo('control')});$('.iview-controlNav',iv.sliderContent).css({opacity:iv.options.controlNavHoverOpacity});iv.sliderContent.hover(function(){$('.iview-controlNav',iv.sliderContent).stop().animate({opacity:1},300);iv.sliderContent.addClass('iview-hover')},function(){$('.iview-controlNav',iv.sliderContent).stop().animate({opacity:iv.options.controlNavHoverOpacity},300);iv.sliderContent.removeClass('iview-hover')});var tooltipTimer=null;$('.iview-controlNav a.iview-control',iv.sliderContent).hover(function(e){var t=$(this),i=t.attr('rel'),tooltip=$('.iview-tooltip',iv.sliderContent),holder=$('div.holder',tooltip),x=t.offset().left-iv.sliderContent.offset().left-(tooltip.outerWidth()/2)+iv.options.tooltipX,y=t.offset().top-iv.sliderContent.offset().top-tooltip.outerHeight()+iv.options.tooltipY,imD=$('div[rel='+i+']')
scrollLeft=(i*imD.width());tooltip.stop().animate({left:x,top:y,opacity:1},300);if(tooltip.not(':visible'))tooltip.fadeIn(300);holder.stop().animate({scrollLeft:scrollLeft},300);clearTimeout(tooltipTimer)},function(e){var tooltip=$('.iview-tooltip',iv.sliderContent);tooltipTimer=setTimeout(function(){tooltip.animate({opacity:0},300,function(){tooltip.hide()})},200)})}
iv.sliderContent.bind('mouseover.iView mousemove.iView',function(){if(iv.options.pauseOnHover&&!iv.defs.paused)iv.cleanTimer();iv.sliderContent.addClass('iview-hover')}).bind('mouseout.iView',function(){if(iv.options.pauseOnHover&&!iv.defs.paused&&iv.timer==null&&iv.pieDegree<=359&&iv.options.autoAdvance)iv.setTimer();iv.sliderContent.removeClass('iview-hover')})},getSlideData:function(slide,param){var result='';if(slide.data(param)!==undefined){return slide.data(param)}
return result},setCaption:function(){var iv=this,slide=iv.slides.eq(iv.defs.slide),captions=$('.tp-caption',slide),timeEx=0;captions.each(function(i){var caption=$(this),fx=(caption.data('transition'))?$.trim(caption.data('transition').toLowerCase()):"fade",speed=(caption.data('speed'))?caption.data('speed'):iv.options.captionSpeed,easing=(caption.data('easing'))?caption.data('easing'):iv.options.captionEasing,x=(caption.data('x')!="undefined")?caption.data('x'):"center",y=(caption.data('y')!="undefined")?caption.data('y'):"center",w=(caption.data('width'))?caption.data('width'):caption.outerWidth(),h=(caption.data('height'))?caption.data('height'):caption.outerHeight(),oW=caption.outerWidth(),oH=caption.outerHeight();if(x=="center")x=((iv.defs.width/2)-(oW/2));if(y=="center")y=((iv.defs.height/2)-(oH/2));var captionContain=$('.caption-contain',caption);caption.css({opacity:0});captionContain.css({opacity:0,position:'relative',width:w,height:h});switch(fx){case "wipedown":caption.css({top:(y-h),left:x});captionContain.css({top:(h+(h*3)),left:0});break;case "wipeup":caption.css({top:(y+h),left:x});captionContain.css({top:(h-(h*3)),left:0});break;case "wiperight":caption.css({top:y,left:(x-w)});captionContain.css({top:0,left:(w+(w*2))});break;case "wipeleft":caption.css({top:y,left:(x+w)});captionContain.css({top:0,left:(w-(w*2))});break;case "fade":caption.css({top:y,left:x});captionContain.css({top:0,left:0});break;case "expanddown":caption.css({top:y,left:x,height:0});captionContain.css({top:(h+(h*3)),left:0});break;case "expandup":caption.css({top:(y+h),left:x,height:0});captionContain.css({top:(h-(h*3)),left:0});break;case "expandright":caption.css({top:y,left:x,width:0});captionContain.css({top:0,left:(w+(w*2))});break;case "expandleft":caption.css({top:y,left:(x+w),width:0});captionContain.css({top:0,left:(w-(w*2))});break}
setTimeout(function(){caption.animate({opacity:iv.options.captionOpacity,top:y,left:x,width:w,height:h},speed,easing,function(){})},timeEx);setTimeout(function(){captionContain.animate({opacity:iv.options.captionOpacity,top:0,left:0},speed,easing)},(timeEx+100));timeEx+=250})},processTimer:function(){var iv=this;if(iv.defs.timer=="360bar"){var degree=(iv.pieDegree==0)?0:iv.pieDegree+.9;if(iv.timerPath!=undefined){iv.timerPath.attr({arc:[degree,iv.R]})}}else if(iv.defs.timer=="pie"){var degree=(iv.pieDegree==0)?0:iv.pieDegree+.9;if(iv.timerPath!=undefined){iv.pieTimer.attr({segment:[degree,iv.R]})}}else{iv.barTimer.css({width:((iv.pieDegree/360)*100)+'%'})}
iv.pieDegree+=3},transitionEnd:function(iv){iv.options.onAfterChange.call(this);iv.defs.lock=!1;iv.slides.css('display','none');iv.slides.eq(iv.defs.slide).show();if(iv.defs.image.data('leo_background')=='image'){iv.slider.css('background','url("'+iv.defs.image.data('leo_image')+'") no-repeat');iv.slider.css('background-size','100%')}
if(iv.defs.image.data('leo_background')=='color'){if(iv.defs.image.data('leo_background_color')!=undefined){iv.slider.css('background-color',iv.defs.image.data('leo_background_color'))}}
$('.iview-strip, .iview-block','.iviewSlider').remove();iv.defs.time=(iv.options.pauseTime&&iv.options.pauseTime!=0)?iv.options.pauseTime:5000;iv.iviewTimer.animate({opacity:iv.options.timerOpacity});iv.pieDegree=0;iv.processTimer();iv.setCaption(iv.options);if(iv.timer==null&&!iv.defs.paused)iv.timer=setInterval(function(){iv.timerCall(iv)},(iv.defs.time/120))},addStrips:function(vertical,opts){var iv=this;opts=(opts)?opts:iv.options;for(var i=0;i<opts.strips;i++){var stripWidth=Math.round(iv.slider.width()/opts.strips),stripHeight=Math.round(iv.slider.height()/opts.strips),bgPosition='-'+((stripWidth+(i*stripWidth))-stripWidth)+'px 0%',top=((vertical)?(stripHeight*i)+'px':'0px'),left=((vertical)?'0px':(stripWidth*i)+'px');if(vertical)bgPosition='0% -'+((stripHeight+(i*stripHeight))-stripHeight)+'px';if(i==opts.strips-1){var width=((vertical)?'0px':(iv.slider.width()-(stripWidth*i))+'px'),height=((vertical)?(iv.slider.height()-(stripHeight*i))+'px':'0px')}else{var width=((vertical)?'0px':stripWidth+'px'),height=((vertical)?stripHeight+'px':'0px')}
if(iv.defs.image.data('leo_background')=='image'){var strip=$('<div class="iview-strip"></div>').css({width:width,height:height,top:top,left:left,background:'url("'+iv.defs.image.data('leo_image')+'") no-repeat '+bgPosition,"background-size":"100%",opacity:0})}
if(iv.defs.image.data('leo_background')=='color'){var strip=$('<div class="iview-strip"></div>').css({width:width,height:height,top:top,left:left,"background-size":"100%",opacity:0})}
iv.slider.append(strip)}},addBlocks:function(){var iv=this,blockWidth=Math.round(iv.slider.width()/iv.options.blockCols),blockHeight=Math.round(iv.slider.height()/iv.options.blockRows);for(var rows=0;rows<iv.options.blockRows;rows++){for(var columns=0;columns<iv.options.blockCols;columns++){var top=(rows*blockHeight)+'px',left=(columns*blockWidth)+'px',width=blockWidth+'px',height=blockHeight+'px',bgPosition='-'+((blockWidth+(columns*blockWidth))-blockWidth)+'px -'+((blockHeight+(rows*blockHeight))-blockHeight)+'px';if(columns==iv.options.blockCols-1)width=(iv.slider.width()-(blockWidth*columns))+'px';if(iv.defs.image.data('leo_background')=='image'){var block=$('<div class="iview-block"></div>').css({width:blockWidth+'px',height:blockHeight+'px',top:(rows*blockHeight)+'px',left:(columns*blockWidth)+'px',background:'url("'+iv.defs.image.data('leo_image')+'") no-repeat '+bgPosition,"background-size":"100%",opacity:0})}
if(iv.defs.image.data('leo_background')=='color'){var block=$('<div class="iview-block"></div>').css({width:blockWidth+'px',height:blockHeight+'px',top:(rows*blockHeight)+'px',left:(columns*blockWidth)+'px',background:'url("'+iv.defs.image.data('leo_image')+'") no-repeat '+bgPosition,"background-size":"100%",opacity:0})}
iv.slider.append(block)}}},runTransition:function(fx){var iv=this;switch(fx){case 'strip-up-right':case 'strip-up-left':iv.addStrips();var timeDelay=0;i=0,strips=$('.iview-strip',iv.slider);if(fx=='strip-up-left')strips=$('.iview-strip',iv.slider).reverse();strips.each(function(){var strip=$(this);strip.css({top:'',bottom:'0px'});setTimeout(function(){strip.animate({height:'100%',opacity:'1.0'},iv.options.animationSpeed,iv.defs.easing,function(){if(i==iv.options.strips-1)iv.transitionEnd(iv);i++})},(100+timeDelay));timeDelay+=50});break;case 'strip-down':case 'strip-down-right':case 'strip-down-left':iv.addStrips();var timeDelay=0,i=0,strips=$('.iview-strip',iv.slider);if(fx=='strip-down-left')strips=$('.iview-strip',iv.slider).reverse();strips.each(function(){var strip=$(this);strip.css({bottom:'',top:'0px'});setTimeout(function(){strip.animate({height:'100%',opacity:'1.0'},iv.options.animationSpeed,iv.defs.easing,function(){if(i==iv.options.strips-1)iv.transitionEnd(iv);i++})},(100+timeDelay));timeDelay+=50});break;case 'strip-left-right':case 'strip-left-right-up':case 'strip-left-right-down':iv.addStrips(!0);var timeDelay=0,i=0,v=0,strips=$('.iview-strip',iv.slider);if(fx=='strip-left-right-down')strips=$('.iview-strip',iv.slider).reverse();strips.each(function(){var strip=$(this);if(i==0){strip.css({right:'',left:'0px'});i++}else{strip.css({left:'',right:'0px'});i=0}
setTimeout(function(){strip.animate({width:'100%',opacity:'1.0'},iv.options.animationSpeed,iv.defs.easing,function(){if(v==iv.options.strips-1)iv.transitionEnd(iv);v++})},(100+timeDelay));timeDelay+=50});break;case 'strip-up-down':case 'strip-up-down-right':case 'strip-up-down-left':iv.addStrips();var timeDelay=0,i=0,v=0,strips=$('.iview-strip',iv.slider);if(fx=='strip-up-down-left')strips=$('.iview-strip',iv.slider).reverse();strips.each(function(){var strip=$(this);if(i==0){strip.css({bottom:'',top:'0px'});i++}else{strip.css({top:'',bottom:'0px'});i=0}
setTimeout(function(){strip.animate({height:'100%',opacity:'1.0'},iv.options.animationSpeed,iv.defs.easing,function(){if(v==iv.options.strips-1)iv.transitionEnd(iv);v++})},(100+timeDelay));timeDelay+=50});break;case 'left-curtain':case 'right-curtain':case 'top-curtain':case 'bottom-curtain':if(fx=='left-curtain'||fx=='right-curtain')iv.addStrips();else iv.addStrips(!0);var timeDelay=0,i=0,strips=$('.iview-strip',iv.slider);if(fx=='right-curtain'||fx=='bottom-curtain')strips=$('.iview-strip',iv.slider).reverse();strips.each(function(){var strip=$(this);var width=strip.width();var height=strip.height();if(fx=='left-curtain'||fx=='right-curtain')strip.css({top:'0px',height:'100%',width:'0px'});else strip.css({left:'0px',height:'0px',width:'100%'});setTimeout(function(){if(fx=='left-curtain'||fx=='right-curtain')strip.animate({width:width,opacity:'1.0'},iv.options.animationSpeed,iv.defs.easing,function(){if(i==iv.options.strips-1)iv.transitionEnd(iv);i++});else strip.animate({height:height,opacity:'1.0'},iv.options.animationSpeed,iv.defs.easing,function(){if(i==iv.options.strips-1)iv.transitionEnd(iv);i++})},(100+timeDelay));timeDelay+=50});break;case 'strip-up-right':case 'strip-up-left':iv.addStrips();var timeDelay=0,i=0,strips=$('.iview-strip',iv.slider);if(fx=='strip-up-left')strips=$('.iview-strip',iv.slider).reverse();strips.each(function(){var strip=$(this);strip.css({'bottom':'0px'});setTimeout(function(){strip.animate({height:'100%',opacity:'1.0'},iv.options.animationSpeed,iv.defs.easing,function(){if(i==iv.options.strips-1)iv.transitionEnd(iv);i++})},(100+timeDelay));timeDelay+=50});break;case 'strip-left-fade':case 'strip-right-fade':case 'strip-top-fade':case 'strip-bottom-fade':if(fx=='strip-left-fade'||fx=='strip-right-fade')iv.addStrips();else iv.addStrips(!0);var timeDelay=0,i=0,strips=$('.iview-strip',iv.slider);if(fx=='strip-right-fade'||fx=='strip-bottom-fade')strips=$('.iview-strip',iv.slider).reverse();strips.each(function(){var strip=$(this);var width=strip.width();var height=strip.height();if(fx=='strip-left-fade'||fx=='strip-right-fade')strip.css({top:'0px',height:'100%',width:width});else strip.css({left:'0px',height:height,width:'100%'});setTimeout(function(){strip.animate({opacity:'1.0'},iv.options.animationSpeed*1.7,iv.defs.easing,function(){if(i==iv.options.strips-1)iv.transitionEnd(iv);i++})},(100+timeDelay));timeDelay+=35});break;case 'slide-in-up':case 'slide-in-down':opts={strips:1};iv.addStrips(!1,opts);var strip=$('.iview-strip:first',iv.slider),top=0;if(fx=='slide-in-up')top='-'+iv.defs.height+'px';else top=iv.defs.height+'px';strip.css({top:top,'height':'100%','width':'100%',});strip.animate({'top':'0px',opacity:1},(iv.options.animationSpeed*2),iv.defs.easing,function(){iv.transitionEnd(iv)});break;case 'zigzag-top':case 'zigzag-bottom':case 'zigzag-grow-top':case 'zigzag-grow-bottom':case 'zigzag-drop-top':case 'zigzag-drop-bottom':iv.addBlocks();var totalBlocks=(iv.options.blockCols*iv.options.blockRows),timeDelay=0,blockToArr=new Array(),blocks=$('.iview-block',iv.slider);for(var rows=0;rows<iv.options.blockRows;rows++){var odd=(rows%2),start=(rows*iv.options.blockCols),end=((rows+1)*iv.options.blockCols);if(odd==1){for(var columns=end-1;columns>=start;columns--){blockToArr.push($(blocks[columns]))}}else{for(var columns=start;columns<end;columns++){blockToArr.push($(blocks[columns]))}}}
if(fx=='zigzag-bottom'||fx=='zigzag-grow-bottom'||fx=='zigzag-drop-bottom')blockToArr.reverse();blocks.each(function(i){var block=$(blockToArr[i]),h=block.height(),w=block.width(),top=block.css('top');if(fx=='zigzag-grow-top'||fx=='zigzag-grow-bottom')block.width(0).height(0);else if(fx=='zigzag-drop-top'||fx=='zigzag-drop-bottom')block.css({top:'-=50'});setTimeout(function(){if(fx=='zigzag-grow-top'||fx=='zigzag-grow-bottom')block.animate({opacity:'1',height:h,width:w},iv.options.animationSpeed,iv.defs.easing,function(){if(i==totalBlocks-1)iv.transitionEnd(iv)});else if(fx=='zigzag-drop-top'||fx=='zigzag-drop-bottom')block.animate({top:top,opacity:'1'},iv.options.animationSpeed,iv.defs.easing,function(){if(i==totalBlocks-1)iv.transitionEnd(iv)});else block.animate({opacity:'1'},(iv.options.animationSpeed*2),'easeInOutExpo',function(){if(i==totalBlocks-1)iv.transitionEnd(iv)})},(100+timeDelay));timeDelay+=20});break;case 'block-fade':case 'block-fade-reverse':case 'block-expand':case 'block-expand-reverse':iv.addBlocks();var totalBlocks=(iv.options.blockCols*iv.options.blockRows),i=0,timeDelay=0;var rowIndex=0;var colIndex=0;var blockToArr=new Array();blockToArr[rowIndex]=new Array();var blocks=$('.iview-block',iv.slider);if(fx=='block-fade-reverse'||fx=='block-expand-reverse'){blocks=$('.iview-block',iv.slider).reverse()}
blocks.each(function(){blockToArr[rowIndex][colIndex]=$(this);colIndex++;if(colIndex==iv.options.blockCols){rowIndex++;colIndex=0;blockToArr[rowIndex]=new Array()}});for(var columns=0;columns<(iv.options.blockCols*2);columns++){var Col=columns;for(var rows=0;rows<iv.options.blockRows;rows++){if(Col>=0&&Col<iv.options.blockCols){(function(){var block=$(blockToArr[rows][Col]);var w=block.width();var h=block.height();if(fx=='block-expand'||fx=='block-expand-reverse'){block.width(0).height(0)}
setTimeout(function(){block.animate({opacity:'1',width:w,height:h},iv.options.animationSpeed/1.3,iv.defs.easing,function(){if(i==totalBlocks-1)iv.transitionEnd(iv);i++})},(100+timeDelay))})()}
Col--}
timeDelay+=100}
break;case 'block-random':case 'block-expand-random':case 'block-drop-random':iv.addBlocks();var totalBlocks=(iv.options.blockCols*iv.options.blockRows),timeDelay=0;var blocks=iv.shuffle($('.iview-block',iv.slider));blocks.each(function(i){var block=$(this),h=block.height(),w=block.width(),top=block.css('top');if(fx=='block-expand-random')block.width(0).height(0);if(fx=='block-drop-random')block.css({top:'-=50'});setTimeout(function(){block.animate({top:top,opacity:'1',height:h,width:w},iv.options.animationSpeed,iv.defs.easing,function(){if(i==totalBlocks-1)iv.transitionEnd(iv)})},(100+timeDelay));timeDelay+=20});break;case 'slide-in-right':case 'slide-in-left':case 'fade':default:opts={strips:1};iv.addStrips(!1,opts);var strip=$('.iview-strip:first',iv.slider);strip.css({'height':'100%','width':'100%',});if(fx=='slide-in-right')strip.css({'height':'100%','width':'100%','left':iv.defs.width+'px','right':''});else if(fx=='slide-in-left')strip.css({'left':'-'+iv.defs.width+'px'});strip.animate({left:'0px',opacity:1},(iv.options.animationSpeed*2),iv.defs.easing,function(){iv.transitionEnd(iv)});break}},shuffle:function(oldArray){var newArray=oldArray.slice();var len=newArray.length;var i=len;while(i--){var p=parseInt(Math.random()*len);var t=newArray[i];newArray[i]=newArray[p];newArray[p]=t}
return newArray},timerCall:function(iv){iv.processTimer();if(iv.pieDegree>=360){iv.cleanTimer();iv.goTo(!1)}},setTimer:function(){var iv=this;iv.timer=setInterval(function(){iv.timerCall(iv)},(iv.defs.time/120))},cleanTimer:function(){var iv=this;clearInterval(iv.timer);iv.timer=null},goTo:function(action){var iv=this;if(iv.defs&&(iv.defs.slide==iv.defs.total-1)){iv.options.onLastSlide.call(this)}
iv.cleanTimer();iv.iviewTimer.animate({opacity:0});iv.options.onBeforeChange.call(this);if(!action){if(iv.defs.image.data('leo_background')=='image'){iv.slider.css('background','url("'+iv.defs.image.data('leo_image')+'") no-repeat');iv.slider.css('background-size','100%')}
if(iv.defs.image.data('leo_background')=='color'){if(iv.defs.image.data('leo_background_color')!=undefined){iv.slider.css('background-color',iv.defs.image.data('leo_background_color'))}}}else{if(action=='prev'||action=='next'){if(iv.defs.image.data('leo_background')=='image'){iv.slider.css('background','url("'+iv.defs.image.data('leo_image')+'") no-repeat');iv.slider.css('background-size','100%')}
if(iv.defs.image.data('leo_background')=='color'){if(iv.defs.image.data('leo_background_color')!=undefined){iv.slider.css('background-color',iv.defs.image.data('leo_background_color'))}}}}
iv.defs.slide++;if(iv.defs.slide==iv.defs.total){iv.defs.slide=0;iv.options.onSlideShowEnd.call(this)}
if(iv.defs.slide<0)iv.defs.slide=(iv.defs.total-1);iv.defs.image=iv.slides.eq(iv.defs.slide);if(iv.options.timer_show==1){iv.playSlider();$('.iview-timer').hide()}
if(iv.options.timer_show==2){iv.stopSlider();$('.iview-timer').hide()}
if(iv.options.timer_show==3){$('.iview-timer').show();iv.playSlider()}
if(iv.defs.image.data('leo_type')=="video"){$('.iview-video',iv.slider).trigger('click');$('.iview-video-close').hide();$('.iview-timer').hide()}
if(iv.defs.image.data('autoplay')==!0){var current_video=$('.iviewSlider').children().eq(iv.defs.slide);var video_src=$("iframe",current_video).attr('src');$("iframe",current_video).attr('src',video_src+'&autoplay=1&loop=1&playlist='+iv.defs.image.data('videoid'))}
if(iv.options.controlNav){$('.iview-controlNav a.iview-control',iv.sliderContent).removeClass('active');$('.iview-controlNav a.iview-control:eq('+iv.defs.slide+')',iv.sliderContent).addClass('active')}
var fx=iv.options.fx;if(iv.options.fx.toLowerCase()=='random'){var transitions=new Array('left-curtain','right-curtain','top-curtain','bottom-curtain','strip-down-right','strip-down-left','strip-up-right','strip-up-left','strip-up-down','strip-up-down-left','strip-left-right','strip-left-right-down','slide-in-right','slide-in-left','slide-in-up','slide-in-down','fade','strip-left-fade','strip-right-fade','strip-top-fade','strip-bottom-fade');fx=transitions[Math.floor(Math.random()*(transitions.length+1))];if(fx==undefined)fx='fade';fx=$.trim(fx.toLowerCase())}
if(iv.options.fx.indexOf(',')!=-1){var transitions=iv.options.fx.split(',');fx=transitions[Math.floor(Math.random()*(transitions.length))];if(fx==undefined)fx='fade';fx=$.trim(fx.toLowerCase())}
if(iv.defs.image.data('leo_transition')){var transitions=iv.defs.image.data('leo_transition').split(',');fx=transitions[Math.floor(Math.random()*(transitions.length))];fx=$.trim(fx.toLowerCase())}
iv.defs.easing=(iv.defs.image.data('leo_easing'))?iv.defs.image.data('leo_easing'):iv.options.easing;iv.defs.lock=!0;iv.runTransition(fx)},playSlider:function(){var iv=this;if(iv.timer==null&&iv.defs.paused){iv.iviewTimer.removeClass('paused').attr('title',iv.options.pauseLabel);iv.setTimer();iv.defs.paused=!1;iv.options.onPlay.call(this)}},stopSlider:function(){var iv=this;iv.iviewTimer.addClass('paused').attr('title',iv.options.playLabel);iv.cleanTimer();iv.defs.paused=!0;iv.options.onPause.call(this)},setTimerPosition:function(){var iv=this,position=iv.options.timerPosition.toLowerCase().split('-');for(var i=0;i<position.length;i++){if(position[i]=='top'){iv.iviewTimer.css({top:iv.options.timerY+'px',bottom:''})}else if(position[i]=='middle'){iv.iviewTimer.css({top:(iv.options.timerY+(iv.defs.height/2)-(iv.options.timerDiameter/2))+'px',bottom:''})}else if(position[i]=='bottom'){iv.iviewTimer.css({bottom:iv.options.timerY+'px',top:''})}else if(position[i]=='left'){iv.iviewTimer.css({left:iv.options.timerX+'px',right:''})}else if(position[i]=='center'){iv.iviewTimer.css({left:(iv.options.timerX+(iv.defs.width/2)-(iv.options.timerDiameter/2))+'px',right:''})}else if(position[i]=='right'){iv.iviewTimer.css({right:iv.options.timerX+'px',left:''})}}},disableSelection:function(target){if(typeof target.onselectstart!="undefined")target.onselectstart=function(){return!1};else if(typeof target.style.MozUserSelect!="undefined")target.style.MozUserSelect="none";else if(typeof target.style.webkitUserSelect!="undefined")target.style.webkitUserSelect="none";else if(typeof target.style.userSelect!="undefined")target.style.userSelect="none";else target.onmousedown=function(){return!1};target.unselectable="on"},isTouch:function(){return!!('ontouchstart' in window)}};var ImagePreload=function(p_aImages,p_pfnPercent,p_pfnFinished){this.m_pfnPercent=p_pfnPercent;this.m_pfnFinished=p_pfnFinished;this.m_nLoaded=0;this.m_nProcessed=0;this.m_aImages=new Array;this.m_nICount=p_aImages.length;for(var i=0;i<p_aImages.length;i++)this.Preload(p_aImages[i])};ImagePreload.prototype={Preload:function(p_oImage){var oImage=new Image;this.m_aImages.push(oImage);oImage.onload=ImagePreload.prototype.OnLoad;oImage.onerror=ImagePreload.prototype.OnError;oImage.onabort=ImagePreload.prototype.OnAbort;oImage.oImagePreload=this;oImage.bLoaded=!1;oImage.source=p_oImage;oImage.src=p_oImage},OnComplete:function(){this.m_nProcessed++;if(this.m_nProcessed==this.m_nICount)this.m_pfnFinished();else this.m_pfnPercent(Math.round((this.m_nProcessed/this.m_nICount)*10))},OnLoad:function(){this.bLoaded=!0;this.oImagePreload.m_nLoaded++;this.oImagePreload.OnComplete()},OnError:function(){this.bError=!0;this.oImagePreload.OnComplete()},OnAbort:function(){this.bAbort=!0;this.oImagePreload.OnComplete()}}
$.fn.iView=function(options){options=jQuery.extend({fx:'random',easing:'easeOutQuad',strips:20,blockCols:10,blockRows:5,animationSpeed:500,pauseTime:5000,startSlide:0,directionNav:!0,directionNavHoverOpacity:0.6,controlNav:!1,controlNavNextPrev:!0,controlNavHoverOpacity:0.6,controlNavThumbs:!1,controlNavTooltip:!0,captionSpeed:500,captionEasing:'easeInOutSine',captionOpacity:1,autoAdvance:!0,keyboardNav:!0,touchNav:!0,pauseOnHover:!1,nextLabel:"Next",previousLabel:"Previous",playLabel:"Play",pauseLabel:"Pause",closeLabel:"Close",randomStart:!1,timer:'Pie',timerBg:'#000',timerColor:'#EEE',timerOpacity:0.5,timerDiameter:30,timerPadding:4,timerStroke:3,timerBarStroke:1,timerBarStrokeColor:'#EEE',timerBarStrokeStyle:'solid',timerPosition:'top-right',timerX:10,timerY:10,tooltipX:5,tooltipY:-5,onBeforeChange:function(){},onAfterChange:function(){},onAfterLoad:function(){},onLastSlide:function(){},onSlideShowEnd:function(){},onPause:function(){},onPlay:function(){}},options);$(this).each(function(){var el=$(this);new iView(el,options)})};$.fn.reverse=[].reverse;var elems=$([]),jq_resize=$.resize=$.extend($.resize,{}),timeout_id,str_setTimeout="setTimeout",str_resize="resize",str_data=str_resize+"-special-event",str_delay="delay",str_throttle="throttleWindow";jq_resize[str_delay]=250;jq_resize[str_throttle]=!0;$.event.special[str_resize]={setup:function(){if(!jq_resize[str_throttle]&&this[str_setTimeout]){return!1}
var elem=$(this);elems=elems.add(elem);$.data(this,str_data,{w:elem.width(),h:elem.height()});if(elems.length===1){loopy()}},teardown:function(){if(!jq_resize[str_throttle]&&this[str_setTimeout]){return!1}
var elem=$(this);elems=elems.not(elem);elem.removeData(str_data);if(!elems.length){clearTimeout(timeout_id)}},add:function(handleObj){if(!jq_resize[str_throttle]&&this[str_setTimeout]){return!1}
var old_handler;function new_handler(e,w,h){var elem=$(this),data=$.data(this,str_data);if(data!==undefined){data.w=w!==undefined?w:elem.width();data.h=h!==undefined?h:elem.height()}
old_handler.apply(this,arguments)}
if($.isFunction(handleObj)){old_handler=handleObj;return new_handler}else{old_handler=handleObj.handler;handleObj.handler=new_handler}}};function loopy(){timeout_id=window[str_setTimeout](function(){elems.each(function(){var elem=$(this),width=elem.width(),height=elem.height(),data=$.data(this,str_data);if(width!==data.w||height!==data.h){elem.trigger(str_resize,[data.w=width,data.h=height])}});loopy()},jq_resize[str_delay])}
var supportTouch=!!('ontouchstart' in window),touchStartEvent=supportTouch?"touchstart":"mousedown",touchStopEvent=supportTouch?"touchend":"mouseup",touchMoveEvent=supportTouch?"touchmove":"mousemove";$.event.special.swipe={scrollSupressionThreshold:10,durationThreshold:1000,horizontalDistanceThreshold:30,verticalDistanceThreshold:75,setup:function(){var thisObject=this,$this=$(thisObject);$this.bind(touchStartEvent,function(event){var data=event.originalEvent.touches?event.originalEvent.touches[0]:event,start={time:(new Date()).getTime(),coords:[data.pageX,data.pageY],origin:$(event.target)},stop;function moveHandler(event){if(!start){return}
var data=event.originalEvent.touches?event.originalEvent.touches[0]:event;stop={time:(new Date()).getTime(),coords:[data.pageX,data.pageY]};if(Math.abs(start.coords[0]-stop.coords[0])>$.event.special.swipe.scrollSupressionThreshold){event.preventDefault()}}
$this.bind(touchMoveEvent,moveHandler).one(touchStopEvent,function(event){$this.unbind(touchMoveEvent,moveHandler);if(start&&stop){if(stop.time-start.time<$.event.special.swipe.durationThreshold&&Math.abs(start.coords[0]-stop.coords[0])>$.event.special.swipe.horizontalDistanceThreshold&&Math.abs(start.coords[1]-stop.coords[1])<$.event.special.swipe.verticalDistanceThreshold){start.origin.trigger("swipe").trigger(start.coords[0]>stop.coords[0]?"swipeleft":"swiperight")}}
start=stop=undefined})})}};$.each({swipeleft:"swipe",swiperight:"swipe"},function(event,sourceEvent){$.event.special[event]={setup:function(){$(this).bind(sourceEvent,$.noop)}}})})(jQuery,this);$(document).ready(function(){if(typeof(leoslideshow_list_functions)!='undefined'){for(var i=0;i<leoslideshow_list_functions.length;i++){leoslideshow_list_functions[i]()}}});/**
 * 2007-2017 Leotheme
 *
 * NOTICE OF LICENSE
 *
 * Leo Quick Login And Social Login For Prestashop 1.7 
 *
 * DISCLAIMER
 *
 *  @Module Name: Leo Quick Login
 *  @author    leotheme <leotheme@gmail.com>
 *  @copyright Leotheme
 *  @license   http://leotheme.com - prestashop template provider
 */
$(document).ready(function(){if($('.leoquicklogin-slidebar').length){for(var i=0;i<3;i++){$('.leoquicklogin-slidebar').first().clone().insertAfter('.leoquicklogin-slidebar:last');var slidebar_class='';if(leo_push==1){slidebar_class='push_'}
switch(i){case 0:slidebar_class+='slidebar_right';break;case 1:slidebar_class+='slidebar_top';break;case 2:slidebar_class+='slidebar_bottom';break}
$('.leoquicklogin-slidebar').last().addClass(slidebar_class)}
if(leo_push==1){$('.leoquicklogin-slidebar').first().addClass('push_slidebar_left')}else{$('.leoquicklogin-slidebar').first().addClass('slidebar_left')}}
$('.leo-quicklogin').click(function(){if(!$(this).hasClass('leo-dropdown')){if(!$(this).hasClass('active')){$(this).addClass('active');var type=$(this).data('type');var layout=$(this).data('layout');var enable_sociallogin=$(this).data('enable-sociallogin');if(type=='popup'){if(enable_sociallogin==''||enable_sociallogin=='enable'){$('.leo-quicklogin-modal .lql-social-login').show()}else{$('.leo-quicklogin-modal .lql-social-login').hide()}
if(layout!='both'){$('.leo-quicklogin-modal .lql-bt').removeClass('lql-active');$('.leo-quicklogin-modal .lql-bt-'+layout).addClass('lql-active');$('.leo-quicklogin-modal .lql-action').show();$('.leo-quicklogin-modal .leo-form').removeClass('leo-form-active full-width').addClass('leo-form-inactive full-width');$('.leo-quicklogin-modal .leo-'+layout+'-form').removeClass('leo-form-inactive').addClass('leo-form-active full-width')}else{$('.leo-quicklogin-modal .lql-action').hide();$('.leo-quicklogin-modal .leo-form').removeClass('leo-form-inactive full-width').addClass('leo-form-active')}
$('.leo-quicklogin-modal').modal('show')}
if(type=='slidebar_left'||type=='slidebar_right'||type=='slidebar_top'||type=='slidebar_bottom'){if(enable_sociallogin==''||enable_sociallogin=='enable'){$('.leoquicklogin-slidebar .lql-social-login').show()}else{$('.leoquicklogin-slidebar .lql-social-login').hide()}
var prefix_class=type;if(leo_push==1){prefix_class='push_'+prefix_class}
if(layout!='both'){$('.leoquicklogin-slidebar .lql-bt').removeClass('lql-active');$('.leoquicklogin-slidebar .lql-bt-'+layout).addClass('lql-active');$('.leoquicklogin-slidebar .lql-action').show();$('.leoquicklogin-slidebar.'+prefix_class+' .leo-form').removeClass('leo-form-active full-width').addClass('leo-form-inactive full-width');$('.leoquicklogin-slidebar.'+prefix_class+' .leo-'+layout+'-form').removeClass('leo-form-inactive').addClass('leo-form-active full-width')}else{$('.leoquicklogin-slidebar .lql-action').hide();$('.leoquicklogin-slidebar.'+prefix_class+' .leo-form').removeClass('leo-form-inactive full-width').addClass('leo-form-active')}
$('.leoquicklogin-slidebar.'+prefix_class).addClass('active');$('.leoquicklogin-mask').addClass('active');$('body').addClass('leoquicklogin-active-slidebar');if(lql_is_gen_rtl&&prestashop.language.is_rtl==1){$('body').addClass('lql_is_gen_rtl')}
if(leo_push==1){$('body').addClass('leoquicklogin-active-push');var push_value;var push_type;if(type=='slidebar_left'||type=='slidebar_right'){push_type="X";if(type=='slidebar_left'){push_value=$('.leoquicklogin-slidebar.'+prefix_class).outerWidth()}
if(type=='slidebar_right'){push_value=-$('.leoquicklogin-slidebar.'+prefix_class).outerWidth()}}
if(type=='slidebar_top'||type=='slidebar_bottom'){push_type="Y";if(type=='slidebar_top'){push_value=$('.leoquicklogin-slidebar.'+prefix_class).outerHeight()}
if(type=='slidebar_bottom'){push_value=-$('.leoquicklogin-slidebar.'+prefix_class).outerHeight()}}
$('body.leoquicklogin-active-push main').css({"-moz-transform":"translate"+push_type+"("+push_value+"px)","-webkit-transform":"translate"+push_type+"("+push_value+"px)","-o-transform":"translate"+push_type+"("+push_value+"px)","-ms-transform":"translate"+push_type+"("+push_value+"px)","transform":"translate"+push_type+"("+push_value+"px)",})}}}}});activeEventModalLeoQuickLogin();activeEventSlidebarLeoQuickLogin();$('.leo-dropdown-wrapper').click(function(e){e.stopPropagation()});$('.leoquicklogin-forgotpass').click(function(){var parent_obj=$(this).parents('.leo-login-form');if(!$(this).hasClass('active')){$(this).addClass('active');parent_obj.find('.leo-resetpass-form').slideDown('fast',function(){})}else{$(this).removeClass('active');parent_obj.find('.leo-resetpass-form').slideUp('fast',function(){})}
return!1});$('.lql-calllogin-action').click(function(){callLoginForm($(this));return!1})
$('.lql-callregister-action').click(function(){callRegisterForm($(this));return!1});$('.lql-bt').click(function(){if(!$(this).hasClass('active')){if($(this).hasClass('lql-bt-login')){callLoginForm($(this))}
if($(this).hasClass('lql-bt-register')){callRegisterForm($(this))}}});$('.leo-resetpass-form-content').submit(function(){if($(this).find('.leoquicklogin-reset-pass-bt').hasClass('validate-ok')||$(this).find('.leo-has-error').length){return!1}});$('.leoquicklogin-reset-pass-bt').click(function(){if(!$(this).hasClass('active')&&!$(this).hasClass('success')){var object_e=$(this);var parent_obj=object_e.parents('.leo-resetpass-form-content');parent_obj.find('.lql-form-mesg.has-danger').fadeOut();parent_obj.find('.lql-form-mesg.has-success').fadeOut();object_e.addClass('active');object_e.find('.lql-bt-txt').hide();object_e.find('.leoquicklogin-loading').css({'display':'block'});parent_obj.find('input').each(function(){if(!$(this).val()){$(this).parent('.form-group').addClass('leo-has-error');object_e.removeClass('active');object_e.find('.lql-bt-txt').show();object_e.find('.leoquicklogin-loading').hide();return!1}else{if(!validateEmail($(this).val())){$(this).parent('.form-group').addClass('leo-has-error');object_e.removeClass('active');object_e.find('.lql-bt-txt').show();object_e.find('.leoquicklogin-loading').hide();return!1}else{$(this).parent('.form-group').removeClass('leo-has-error')}}});if(!parent_obj.find('.leo-has-error').length){parent_obj.find('.leoquicklogin-reset-pass-bt').addClass('validate-ok');var lql_email_reset=$.trim(parent_obj.find('.lql-email-reset').val());$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:lql_ajax_url,async:!0,cache:!1,data:{"ajax":1,"action":"reset-pass","lql-email-reset":lql_email_reset,},success:function(result){parent_obj.find('.lql-form-mesg.has-danger').empty();parent_obj.find('.lql-form-mesg.has-success').empty();var object_result=$.parseJSON(result);object_e.removeClass('active');object_e.find('.leoquicklogin-loading').hide();if(object_result.errors.length){$.each(object_result.errors,function(key,val){parent_obj.find('.lql-form-mesg.has-danger').append('<label class="form-control-label">'+val+'</label>')})
parent_obj.find('.lql-form-mesg.has-danger').fadeIn();object_e.find('.lql-bt-txt').show()}else{parent_obj.find('.lql-form-content-element').slideUp(function(){$(this).remove()});parent_obj.find('.lql-form-mesg.has-success').append('<label class="form-control-label">'+object_result.success[0]+'<strong>'+lql_email_reset+'</strong></label>');parent_obj.find('.lql-form-mesg.has-success').fadeIn();object_e.find('.leoquicklogin-success-icon').fadeIn();object_e.addClass('success')}},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}}})
$('.leo-login-form-content').submit(function(){if($(this).find('.lql-login-bt').hasClass('validate-ok')||$(this).find('.leo-has-error').length){return!1}});$('.lql-login-bt').click(function(){if(!$(this).hasClass('active')&&!$(this).hasClass('success')){var object_e=$(this);var parent_obj=object_e.parents('.leo-login-form-content');parent_obj.find('.lql-form-mesg.has-danger').fadeOut();parent_obj.find('.lql-form-mesg.has-success').fadeOut();object_e.addClass('active');object_e.find('.lql-bt-txt').hide();object_e.find('.leoquicklogin-loading').css({'display':'block'});parent_obj.find('input').each(function(){if(!$(this).val()){$(this).parent('.form-group').addClass('leo-has-error')}else{if($(this).hasClass('lql-email-login')&&!validateEmail($(this).val())){$(this).parent('.form-group').addClass('leo-has-error')}else{$(this).parent('.form-group').removeClass('leo-has-error')}}});if(!parent_obj.find('.leo-has-error').length){parent_obj.find('.lql-login-bt').addClass('validate-ok');var lql_email_login=$.trim(parent_obj.find('.lql-email-login').val());var lql_pass_login=$.trim(parent_obj.find('.lql-pass-login').val());var data_send={};data_send.ajax=1;data_send.action="customer-login";data_send.lql_email_login=lql_email_login;data_send.lql_pass_login=lql_pass_login;if(parent_obj.find('.lql-rememberme').length){if(parent_obj.find('.lql-rememberme').is(":checked")){var lql_remember_login=1}else{var lql_remember_login=0}
data_send.lql_remember_login=lql_remember_login}
$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:lql_ajax_url,async:!0,cache:!1,data:data_send,success:function(result){parent_obj.find('.lql-form-mesg.has-danger').empty();parent_obj.find('.lql-form-mesg.has-success').empty();var object_result=$.parseJSON(result);object_e.removeClass('active');object_e.find('.leoquicklogin-loading').hide();if(object_result.errors.length){$.each(object_result.errors,function(key,val){parent_obj.find('.lql-form-mesg.has-danger').append('<label class="form-control-label">'+val+'</label>')})
parent_obj.find('.lql-form-mesg.has-danger').fadeIn();object_e.find('.lql-bt-txt').show()}else{parent_obj.find('.lql-form-content-element').slideUp(function(){$(this).remove()});parent_obj.find('.lql-form-mesg.has-success').append('<label class="form-control-label"><strong>'+object_result.success[0]+'</strong></label>');parent_obj.find('.lql-form-mesg.has-success').fadeIn();object_e.find('.leoquicklogin-success-icon').show();object_e.addClass('success');if(lql_redirect){window.location.replace(lql_myaccount_url)}else{location.reload()}}},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}else{object_e.removeClass('active');object_e.find('.lql-bt-txt').show();object_e.find('.leoquicklogin-loading').hide()}}})
$('.leo-register-form-content').submit(function(){if($(this).find('.lql-register-bt').hasClass('validate-ok')||$(this).find('.leo-has-error').length){return!1}});$('.lql-register-bt').click(function(){if(!$(this).hasClass('active')&&!$(this).hasClass('success')){var object_e=$(this);var parent_obj=object_e.parents('.leo-register-form-content');parent_obj.find('.lql-form-mesg.has-danger').fadeOut();parent_obj.find('.lql-form-mesg.has-success').fadeOut();object_e.addClass('active');object_e.find('.lql-bt-txt').hide();object_e.find('.leoquicklogin-loading').css({'display':'block'});parent_obj.find('input').each(function(){if(!$(this).val()){$(this).parent('.form-group').addClass('leo-has-error')}else{if($(this).hasClass('lql-register-check')&&!$(this).is(':checked')){$(this).parents('.form-group').addClass('leo-has-error')}else{$(this).parents('.form-group').removeClass('leo-has-error')}
if($(this).hasClass('lql-register-email')){if(!validateEmail($(this).val())){$(this).parent('.form-group').addClass('leo-has-error')}else{$(this).parent('.form-group').removeClass('leo-has-error')}}}});if(!parent_obj.find('.leo-has-error').length){parent_obj.find('.lql-register-bt').addClass('validate-ok');var lql_register_firstname=$.trim(parent_obj.find('.lql-register-firstname').val());var lql_register_lastname=$.trim(parent_obj.find('.lql-register-lastname').val());var lql_register_email=$.trim(parent_obj.find('.lql-register-email').val());var lql_register_pass=$.trim(parent_obj.find('.lql-register-pass').val());var lql_gender=$.trim(parent_obj.find('.id_gender:checked').val());var lql_newsletter=$.trim(parent_obj.find('.newsletter:checked').val());$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:lql_ajax_url,async:!0,cache:!1,data:{"ajax":1,"action":"create-account","lql-register-firstname":lql_register_firstname,"lql-register-lastname":lql_register_lastname,"lql-register-email":lql_register_email,"lql-register-pass":lql_register_pass,"lql-gender":lql_gender,"lql-newsletter":lql_newsletter?1:0,},success:function(result){parent_obj.find('.lql-form-mesg.has-danger').empty();parent_obj.find('.lql-form-mesg.has-success').empty();var object_result=$.parseJSON(result);object_e.removeClass('active');object_e.find('.leoquicklogin-loading').hide();if(object_result.errors.length){$.each(object_result.errors,function(key,val){parent_obj.find('.lql-form-mesg.has-danger').append('<label class="form-control-label">'+val+'</label><br/>')})
parent_obj.find('.lql-form-mesg.has-danger').fadeIn();object_e.find('.lql-bt-txt').show()}else{parent_obj.find('.lql-form-content-element').slideUp(function(){$(this).remove()});parent_obj.find('.lql-form-mesg.has-success').append('<label class="form-control-label"><strong>'+object_result.success[0]+'</strong></label>');parent_obj.find('.lql-form-mesg.has-success').fadeIn();object_e.find('.leoquicklogin-success-icon').show();object_e.addClass('success');if(lql_redirect){window.location.replace(lql_myaccount_url)}else{location.reload()}}},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}else{object_e.removeClass('active');object_e.find('.lql-bt-txt').show();object_e.find('.leoquicklogin-loading').hide()}}})
if(typeof google_client_id!='undefined'&&google_client_id.length){gapi.load('auth2',function(){auth2=gapi.auth2.init({client_id:google_client_id,cookiepolicy:'single_host_origin',scope:'profile email'});attachGoogleSignin()})}
$('.twitter-login-bt').click(function(){window.open(lql_module_dir+'twitter.php?request=twitter&lang='+prestashop.language.iso_code,'_blank','toolbar=yes, scrollbars=yes, resizable=yes, top=100, left=300, width=700, height=600')})});function callLoginForm($element){var parent_obj=$element.parents('.leo-quicklogin-form');if($element.hasClass('lql-callreset-action')&&!parent_obj.find('.leoquicklogin-forgotpass').hasClass('active')){parent_obj.find('.leoquicklogin-forgotpass').trigger('click')}
parent_obj.find('.leo-login-form').removeClass('leo-form-inactive').addClass('leo-form-active');parent_obj.find('.leo-register-form').removeClass('leo-form-active').addClass('leo-form-inactive');parent_obj.find('.lql-bt.lql-active').removeClass('lql-active');parent_obj.find('.lql-bt-login').addClass('lql-active')}
function callRegisterForm($element){var parent_obj=$element.parents('.leo-quicklogin-form');parent_obj.find('.leo-register-form').removeClass('leo-form-inactive').addClass('leo-form-active');parent_obj.find('.leo-login-form').removeClass('leo-form-active').addClass('leo-form-inactive');parent_obj.find('.lql-bt.lql-active').removeClass('lql-active');parent_obj.find('.lql-bt-register').addClass('lql-active')}
function activeEventSlidebarLeoQuickLogin(){$('.leoquicklogin-mask, .leoquicklogin-slidebar-close').click(function(){$('.leoquicklogin-mask.active').removeClass('active');$('.leo-quicklogin.active').removeClass('active');$('body.leoquicklogin-active-push main').css({"-moz-transform":"translateX(0px)","-webkit-transform":"translateX(0px)","-o-transform":"translateX(0px)","-ms-transform":"translateX(0px)","transform":"translateX(0px)","-moz-transform":"translateY(0px)","-webkit-transform":"translateY(0px)","-o-transform":"translateY(0px)","-ms-transform":"translateY(0px)","transform":"translateY(0px)",});setTimeout(function(){$('body').removeClass('leoquicklogin-active-slidebar leoquicklogin-active-push');if(lql_is_gen_rtl&&prestashop.language.is_rtl==1){$('body').removeClass('lql_is_gen_rtl')}},300);$('.leoquicklogin-slidebar.active').removeClass('active')})}
function activeEventModalLeoQuickLogin(){$('.leo-quicklogin-modal').on('hide.bs.modal',function(e){$('.leo-quicklogin.active').removeClass('active')})}
function validateEmail(email){var reg=/^[a-z\p{L}0-9!#$%&'*+\/=?^`{}|~_-]+[.a-z\p{L}0-9!#$%&'*+\/=?^`{}|~_-]*@[a-z\p{L}0-9]+[._a-z\p{L}0-9-]*\.[a-z\p{L}0-9]+$/i;return reg.test(email)}
function doFbLogin(){FB.login(function(response){if(response.status==='connected'){processFbAPI()}else{console.log('Please log '+'into this app.')}},{scope:'public_profile,email'})}
function processFbAPI(){$('.leo-quicklogin-modal').modal('hide');$('.leoquicklogin-mask').trigger('click');setTimeout(function(){FB.api('/me?fields=email,birthday,first_name,last_name,name,gender',function(response){if(response.email){$('.lql-social-modal .lql-social-modal-mesg').removeClass('active');$('.lql-social-modal .lql-social-modal-mesg.lql-social-loading').addClass('active');$('.lql-social-modal').modal('show');$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:lql_ajax_url,async:!0,cache:!1,data:{"ajax":1,"action":"social-login","email":response.email,"first_name":response.first_name,"last_name":response.last_name,},success:function(result){$('.lql-social-modal .lql-social-modal-mesg').removeClass('active');var object_result=$.parseJSON(result);if(object_result.errors.length){$('.lql-social-modal .lql-social-modal-mesg.error-login').addClass('active')}else{$('.lql-social-modal .lql-social-modal-mesg.success').addClass('active');if(lql_redirect){window.location.replace(lql_myaccount_url)}else{location.reload()}}},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}else{$('.lql-social-modal .lql-social-modal-mesg').removeClass('active');$('.lql-social-modal .lql-social-modal-mesg.error-email').addClass('active');$('.lql-social-modal').modal('show');FB.api('/me/permissions','delete',function(response){})}})},300)}
function attachGoogleSignin(){$('.google-login-bt').each(function(){auth2.attachClickHandler(this,{},function(googleUser){var profile=googleUser.getBasicProfile();$('.leo-quicklogin-modal').modal('hide');$('.leoquicklogin-mask').trigger('click');setTimeout(function(){if(profile.getEmail()){$('.lql-social-modal .lql-social-modal-mesg').removeClass('active');$('.lql-social-modal .lql-social-modal-mesg.lql-social-loading').addClass('active');$('.lql-social-modal').modal('show');$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:lql_ajax_url,async:!0,cache:!1,data:{"ajax":1,"action":"social-login","email":profile.getEmail(),"first_name":profile.getGivenName(),"last_name":profile.getFamilyName(),},success:function(result){$('.lql-social-modal .lql-social-modal-mesg').removeClass('active');var object_result=$.parseJSON(result);if(object_result.errors.length){$('.lql-social-modal .lql-social-modal-mesg.error-login').addClass('active')}else{$('.lql-social-modal .lql-social-modal-mesg.success').addClass('active');if(lql_redirect){window.location.replace(lql_myaccount_url)}else{location.reload()}}},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}else{$('.lql-social-modal .lql-social-modal-mesg').removeClass('active');$('.lql-social-modal .lql-social-modal-mesg.error-email').addClass('active');$('.lql-social-modal').modal('show');auth2.disconnect()}},300)},function(error){console.log(error)})})}
function showHidePassword(){var selector=document.getElementById("lql-pass-login");if(selector.type==="password"){selector.type="text";$('#lql-pass-login').parent().find('i').removeClass('fa-eye-slash').addClass('fa-eye')}else{selector.type="password";$('#lql-pass-login').parent().find('i').removeClass('fa-eye').addClass('fa-eye-slash')}}
function twitterLogin(first_name,last_name,email){$('.leo-quicklogin-modal').modal('hide');$('.leoquicklogin-mask').trigger('click');setTimeout(function(){if(email.length){if(last_name==''){last_name='Mr/Ms'}
$('.lql-social-modal .lql-social-modal-mesg').removeClass('active');$('.lql-social-modal .lql-social-modal-mesg.lql-social-loading').addClass('active');$('.lql-social-modal').modal('show');$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:lql_ajax_url,async:!0,cache:!1,data:{"ajax":1,"action":"social-login","email":email,"first_name":first_name,"last_name":last_name,},success:function(result){$('.lql-social-modal .lql-social-modal-mesg').removeClass('active');var object_result=$.parseJSON(result);if(object_result.errors.length){$('.lql-social-modal .lql-social-modal-mesg.error-login').addClass('active')}else{$('.lql-social-modal .lql-social-modal-mesg.success').addClass('active');if(lql_redirect){window.location.replace(lql_myaccount_url)}else{location.reload()}}},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}else{$('.lql-social-modal .lql-social-modal-mesg').removeClass('active');$('.lql-social-modal .lql-social-modal-mesg.error-email').addClass('active');$('.lql-social-modal').modal('show')}},300)};/**
 * 2007-2017 Leotheme
 *
 * NOTICE OF LICENSE
 *
 * Leo feature for prestashop 1.7: ajax cart, review, compare, wishlist at product list 
 *
 * DISCLAIMER
 *
 *  @Module Name: Leo Feature
 *  @author    leotheme <leotheme@gmail.com>
 *  @copyright 2007-2018 Leotheme
 *  @license   http://leotheme.com - prestashop template provider
 */
$(document).ready(function(){if(typeof leo_allow_ajax!=="undefined"&&!leo_allow_ajax){return}
var is_safari=!1;if(navigator.userAgent.toLowerCase().indexOf("chrome/")!==-1){is_safari=!1}else if(navigator.userAgent.toLowerCase().indexOf("safari/")!==-1){is_safari=!0}
if(navigator.appVersion.indexOf("Win")!=-1&&is_safari){$('html').addClass('safari-win')}
if(typeof show_popup!='undefined'&&!show_popup){$(".blockcart.cart-preview").addClass('leo-blockcart').removeClass('blockcart')}
createModalAndDropdown(0,0);leoSelectAttr();leoChooseAttr();leoBtCart();prestashop.on('updateProductList',function(){leoSelectAttr();leoChooseAttr();leoBtCart()});prestashop.on('updateCart',function(event){if(typeof show_popup!='undefined'&&!show_popup){if($('.leo-blockcart.cart-preview .cssload-piano').length){$('.leo-blockcart.cart-preview .cssload-piano').show()}
var refresh_url=$('.leo-blockcart').data('refresh-url');$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:refresh_url,async:!0,cache:!1,success:function(resp){$('.leo-blockcart').replaceWith($(resp.preview).find('.blockcart'));$(".blockcart.cart-preview").addClass('leo-blockcart').removeClass('blockcart');if(event.reason.linkAction=='add-to-cart'&&event.resp.success){prestashop.emit('updateProduct',{reason:''})}},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}
if(event.reason.linkAction=='add-to-cart'&&event.resp.success){if(typeof enable_flycart_effect!='undefined'&&enable_flycart_effect){if($('.leo-bt-cart.active').length){flyCartEffect($('.leo-bt-cart.active'))}else if(prestashop.page.page_name=='product'||$('.product-add-to-cart .add-to-cart').length){flyCartEffect($('.product-add-to-cart .add-to-cart'))}}
if($('.leo-notification').length&&typeof enable_notification!='undefined'&&enable_notification){var id_product=event.resp.id_product;var product_name=!1;$.each(event.resp.cart.products,function(key,value){if(id_product==value.id_product){product_name=value.name;return!1}})
showLeoNotification('success','add',product_name)}}
if(typeof show_popup!='undefined'&&show_popup){check_active_modal_cart=setInterval(function(){if($('.leo-bt-cart.active').length&&$('#blockcart-modal').length&&$('#blockcart-modal').hasClass('modal fade in')){$('.leo-bt-cart.active').find('.leo-bt-cart-content').fadeIn('fast');$('.leo-bt-cart.active').find('.leo-loading').hide();$('.leo-bt-cart.active').removeClass('active reset');clearInterval(check_active_modal_cart)}},200)}
if(typeof show_popup!='undefined'&&!show_popup){if($('.leo-bt-cart.active').length){$('.leo-bt-cart.active').find('.leo-bt-cart-content').fadeIn('fast');$('.leo-bt-cart.active').find('.leo-loading').hide();$('.leo-bt-cart.active').removeClass('active reset')}}
if($('.leo-fly-cart .leo-fly-cart-cssload-loader').length){$('.leo-fly-cart .leo-fly-cart-cssload-loader').show()}
if($('.leo-dropdown-cart-item.deleting').length){$('.leo-dropdown-cart-item.deleting .leo-dropdown-overlay').hide();$('.leo-dropdown-cart-item.deleting .leo-dropdown-cssload-speeding-wheel').hide();$('.leo-dropdown-cart-item.deleting').fadeOut(function(){$('.leo-dropdown-cart-item.deleting').remove();updateClassCartItem()})
showLeoNotification('success','delete',!1)}
if($('.leo-dropdown-cart-item.updating').length){$('.leo-dropdown-cart-item.updating .leo-dropdown-overlay').hide();$('.leo-dropdown-cart-item.updating .leo-dropdown-cssload-speeding-wheel').hide();$('.leo-dropdown-cart-item.updating').removeClass('updating');showLeoNotification('success','update',!1)}
$('.leo-dropdown-cart.dropdown').removeClass('disable-close');$('.leo-dropdown-cart.dropup').removeClass('disable-close');createModalAndDropdown(1,0)});activeEventFlyCartSlideBar();$('.leo-fly-cart.enable-slidebar .leo-fly-cart-icon-wrapper').click(function(){$('.leo-fly-cart.enable-slidebar .leo-fly-cart-icon').trigger('click')});$('.leo-fly-cart.enable-slidebar .leo-fly-cart-icon').click(function(){showSlideBarCart($(this));return!1});$('.leo-fly-cart.enable-dropdown .leo-fly-cart-icon-wrapper , .leo-fly-cart.enable-dropdown .leo-fly-cart-icon').click(function(){showDropDownCart($(this),'flycart');return!1});$(document).click(function(e){e.stopPropagation();var container=$(".leo-dropdown-cart.dropdown.show");if(container.length&&container.has(e.target).length===0){if(!container.hasClass('disable-close')){container.removeClass('show')}}
var container1=$(".leo-dropdown-cart.dropup.show");if(container1.length&&container1.has(e.target).length===0){if(!container1.hasClass('disable-close')){container1.removeClass('show')}}})
getOffsetFlycartIcon();$(window).resize(function(){$('.leo-dropdown-list-item').each(function(){if($(this).parents('.leo-fly-cart-slidebar').length){checkFlyCartScrollBar($(this))}
if($(this).parents('.leo-fly-cart.type-fixed.enable-dropdown').length){checkFlyCartScrollBarDropDown($(this))}})
getOffsetFlycartIcon()})});function leoBtCart(){$('.leo-bt-cart').each(function(){if(!$(this).hasClass('leo-enable')){$(this).addClass('leo-enable');$(this).click(function(event){if($(this).hasClass('active')||$(this).hasClass('reset')||$('.leo-bt-cart.active').length||$(this).hasClass('disabled')){return!1}
$(this).find('.leo-bt-cart-content').hide();$(this).find('.leo-loading').css({'display':'block'});$(this).addClass('active');var object_button_container=$(this).parents('.product-miniature');if(object_button_container.find('.leo_cart_quantity').length){object_button_container.find('.qty_product').val(object_button_container.find('.leo_cart_quantity').val())}
var qty_product=object_button_container.find('.qty_product').val();var min_qty=object_button_container.find('.minimal_quantity').val();var quantity_product=object_button_container.find('.quantity_product').val();if(Math.floor(qty_product)==qty_product&&$.isNumeric(qty_product)&&qty_product>0){}else{$(this).addClass('reset');$('.leo-modal-cart .modal-header').addClass('warning-mess');$('.leo-modal-cart .leo-warning').show();$('.leo-modal-cart').modal('show');return!1}
if(parseInt(qty_product)<parseInt(min_qty)){$(this).addClass('reset');$('.leo-modal-cart .modal-header').addClass('info-mess');$('.leo-modal-cart .leo-info .alert-min-qty').text(min_qty);$('.leo-modal-cart .leo-info').show();$('.leo-modal-cart').modal('show');return!1}
var id_product=object_button_container.find('.id_product').val();var id_product_attribute=object_button_container.find('.id_product_attribute').val();var id_customization=object_button_container.find('.id_customization').val();var $element=$(this);$(this).removeData('check-outstock');checkProductOutStock(id_product,id_product_attribute,id_customization,qty_product,$element,!0);check_data_outstock=setInterval(function(){if(typeof $element.data('check-outstock')!='undefined'){clearInterval(check_data_outstock);if(!$element.data('check-outstock')){$element.addClass('reset');$('.leo-modal-cart .modal-header').addClass('block-mess');$('.leo-modal-cart .leo-block').show();$('.leo-modal-cart').modal('show');if($('.leo-bt-cart.active').length){$('.leo-bt-cart.active').find('.leo-bt-cart-content').fadeIn('fast');$('.leo-bt-cart.active').find('.leo-loading').hide();$('.leo-bt-cart.active').removeClass('active reset')}
showLeoNotification('warning','max',!1);event.preventDefault();event.stopPropagation()}else{var $form=$element.closest('form');var query=$form.serialize()+'&add=1&action=update';var actionURL=$form.attr('action');$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:actionURL,async:!0,cache:!1,data:query,dataType:'json',success:function(result){if(result.success){if($('.leo-notification').length&&typeof enable_notification!='undefined'&&enable_notification){var id_product=result.id_product;var product_name=!1;$.each(result.cart.products,function(key,value){if(id_product==value.id_product){product_name=value.name;return!1}})
showLeoNotification('success','add',product_name)}
if(typeof enable_flycart_effect!='undefined'&&enable_flycart_effect){if($('.leo-bt-cart.active').length){flyCartEffect($('.leo-bt-cart.active'))}}
if($('.leo-fly-cart .leo-fly-cart-cssload-loader').length){$('.leo-fly-cart .leo-fly-cart-cssload-loader').show()}
if($('.leo-blockcart.cart-preview .cssload-piano').length){$('.leo-blockcart.cart-preview .cssload-piano').show()}
if(typeof show_popup!='undefined'&&!show_popup){if($('.leo-bt-cart.active').length){$('.leo-bt-cart.active').find('.leo-bt-cart-content').fadeIn('fast');$('.leo-bt-cart.active').find('.leo-loading').hide();$('.leo-bt-cart.active').removeClass('active reset')}
var refresh_url=$('.leo-blockcart').data('refresh-url');$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:refresh_url,async:!0,cache:!1,success:function(resp){$('.leo-blockcart').replaceWith($(resp.preview).find('.blockcart'));$(".blockcart.cart-preview").addClass('leo-blockcart').removeClass('blockcart');createModalAndDropdown(1,0)},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}
if(typeof show_popup!='undefined'&&show_popup){var refreshURL=$('.blockcart').data('refresh-url');var requestData={};requestData={id_product_attribute:result.id_product_attribute,id_product:result.id_product,action:'add-to-cart'};$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:refreshURL,async:!0,cache:!1,data:requestData,dataType:'json',success:function(resp){if($('.leo-bt-cart.active').length){$('.leo-bt-cart.active').find('.leo-bt-cart-content').fadeIn('fast');$('.leo-bt-cart.active').find('.leo-loading').hide();$('.leo-bt-cart.active').removeClass('active reset')}
$('.blockcart').replaceWith($(resp.preview).find('.blockcart'));if(resp.modal){showModalPopupCart(resp.modal)}
createModalAndDropdown(1,0)},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}}else{showLeoNotification('error','add',!1)}},error:function(XMLHttpRequest,textStatus,errorThrown){showLeoNotification('error','add',!1)}})}}},10);return!1})}});$('.leo_cart_quantity').each(function(){if($(this).parents('.product-miniature').find('.qty_product').val()){$(this).val($(this).parents('.product-miniature').find('.qty_product').val())}else{$(this).hide()}})}
function leoSelectAttr(){$('.leo-select-attr').click(function(e){e.preventDefault();var id_product=$(this).data('id-product');var attr_txt=$(this).text();var id_attr=$(this).data('id-attr');var qty_attr=$(this).data('qty-attr');var min_qty_attr=$(this).data('min-qty-attr');var parent_e=$(this).parents('.product-miniature');if(!$(this).hasClass('selected')){$(this).siblings().removeClass('selected');$(this).addClass('selected');parent_e.find('.dropdownListAttrButton_'+id_product).text(attr_txt);if($(this).hasClass('disable')){if(!parent_e.find('.leo-bt-cart_'+id_product).hasClass('disabled')){parent_e.find('.leo-bt-cart_'+id_product).addClass('disabled')}}else{if(parent_e.find('.leo-bt-cart_'+id_product).hasClass('disabled')){parent_e.find('.leo-bt-cart_'+id_product).removeClass('disabled')}};var $product_article_e=$(this).parents('.product-miniature[data-id-product='+id_product+']');$product_article_e.find('.leo-bt-cart .leo-bt-cart-content').hide();$product_article_e.find('.leo-bt-cart .leo-loading').css({'display':'block'});$product_article_e.find('.leo-bt-cart').addClass('active');$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:prestashop.urls.base_url+'modules/leofeature/psajax.php?rand='+new Date().getTime(),async:!0,cache:!1,data:{"action":"get-attribute-data","id_product":id_product,"id_product_attribute":id_attr,"token":leo_token},success:function(result){if(result!=''){var obj=$.parseJSON(result);$product_article_e.find('.product-thumbnail img').attr('src',obj.product_cover.bySize.home_default.url).attr('alt',obj.product_cover.legend);$product_article_e.find('.product-thumbnail').attr('href',obj.product_url);$product_article_e.find('.product-price-and-shipping').empty().append(obj.price_attribute)}else{alert(add_cart_error)}
$('.leo-bt-cart.active').find('.leo-bt-cart-content').fadeIn('fast');$('.leo-bt-cart.active').find('.leo-loading').hide();$('.leo-bt-cart.active').removeClass('active reset')},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}
parent_e.find('.quantity_product_'+id_product).val(qty_attr);parent_e.find('.id_product_attribute_'+id_product).val(id_attr);parent_e.find('.minimal_quantity_'+id_product).val(min_qty_attr);parent_e.find('.qty_product_'+id_product).val(min_qty_attr).data('min',min_qty_attr);parent_e.find('.leo_cart_quantity').val(min_qty_attr);parent_e.find('.dropdownListAttrButton_'+id_product).trigger('click')})}
function activeEventModal(){$('.leo-modal-cart').on('hide.bs.modal',function(e){$('.leo-modal-cart .modal-header').removeClass('block-mess info-mess warning-mess');$('.leo-modal-cart .modal-title').hide();var min_qty=$('.leo-bt-cart.reset').parents('.button-container').find('.minimal_quantity').val();$('.leo-bt-cart.reset').parents('.button-container').find('.qty_product').val(min_qty);$('.leo-bt-cart.reset').parents('.product-miniature').find('.leo_cart_quantity').val(min_qty);$('.leo-bt-cart.active').find('.leo-bt-cart-content').fadeIn('fast');$('.leo-bt-cart.active').find('.leo-loading').hide();$('.leo-bt-cart.active').removeClass('active reset')})}
function updatePostionLabel($parent){var FLAG_MARGIN=10;var $percent=$parent.find('.discount-percentage');var $onsale=$parent.find('.on-sale');var $new=$parent.find('.new');if($percent.length){$new.css('top',$percent.height()*2+FLAG_MARGIN);$percent.css('top',-$parent.find('.thumbnail-container').height()+$parent.find('.product-description').height()+FLAG_MARGIN)}
if($onsale.length){$percent.css('top',parseFloat($percent.css('top'))+$onsale.height()+FLAG_MARGIN);$new.css('top',($percent.height()*2+$onsale.height())+FLAG_MARGIN*2)}}
function showDropDownCart($element,$type){if($element.parent().find('.leo-dropdown-cart-item').length||$('.leo-fly-cart-slidebar').find('.leo-dropdown-cart-item').length){var object_element='';if($type=='defaultcart'){object_element=$element.siblings('.leo-dropdown-cart')}
if($type=='flycart'){object_element=$element.parents('.leo-fly-cart').find('.leo-dropdown-cart')}
if(!object_element.hasClass('show')){object_element.addClass('show')}else{object_element.removeClass('show')}}}
function showSlideBarCart($element){if(!$('.leo-fly-cart-slidebar.disable').length&&($element.parent().find('.leo-dropdown-cart-item').length||$('.leo-fly-cart-slidebar').find('.leo-dropdown-cart-item').length)){if(!$element.hasClass('active-slidebarcart')){var type=$element.data('type');var pusheffect=$element.data('pusheffect');$element.addClass('active-slidebarcart');$('.leo-fly-cart-slidebar.'+type).addClass('active');if($('.leo-fly-cart-mask').length){$('.leo-fly-cart-mask').first().addClass('active');$('body').addClass('leoflycart-active-slidebar')}
if($('html').hasClass('safari-win')){$('.leo-fly-cart-slidebar .leo-dropdown-list-item').each(function(){checkFlyCartScrollBar($(this))})};if(pusheffect){$('.leo-fly-cart-slidebar.'+type).addClass('push');$('body').addClass('leoflycart-active-push');var push_value;var push_type;if(type=='slidebar_top'||type=='slidebar_bottom'){push_type="Y";if(type=='slidebar_top'){push_value=$('.leo-fly-cart-slidebar.push.'+type).outerHeight()}
if(type=='slidebar_bottom'){push_value=-$('.leo-fly-cart-slidebar.push.'+type).outerHeight()}}
if(type=='slidebar_right'||type=='slidebar_left'){push_type="X";if(type=='slidebar_left'){push_value=$('.leo-fly-cart-slidebar.push.'+type).outerWidth()}
if(type=='slidebar_right'){push_value=-$('.leo-fly-cart-slidebar.push.'+type).outerWidth()}}
$('body.leoflycart-active-push main').css({"-moz-transform":"translate"+push_type+"("+push_value+"px)","-webkit-transform":"translate"+push_type+"("+push_value+"px)","-o-transform":"translate"+push_type+"("+push_value+"px)","-ms-transform":"translate"+push_type+"("+push_value+"px)","transform":"translate"+push_type+"("+push_value+"px)",})}}else{$('.leo-fly-cart-slidebar .leo-fly-cart-icon').trigger('click')}}}
function activeDropdownEvent(){$('.leo-dropdown-list-item').each(function(){var check_number_cartitem=3;if(typeof number_cartitem_display!='undefined'){check_number_cartitem=number_cartitem_display}
if(!$(this).parents('.leo-fly-cart-slidebar').length){checkFlyCartScrollBarDropDown($(this))}
if($(this).parents('.leo-fly-cart-slidebar').length){checkFlyCartScrollBar($(this))}})
$('.leo-remove-from-cart, .view-leo-dropdown-additional').hover(function(){if($(this).hasClass('leo-remove-from-cart')){$(this).parents('.leo-dropdown-cart-item').addClass('high-light')}},function(){if($(this).hasClass('leo-remove-from-cart')){$(this).parents('.leo-dropdown-cart-item').removeClass('high-light')}})
$('.view-leo-dropdown-additional').click(function(){var parent_obj=$(this).parents('.leo-dropdown-cart-item');var wrapper_parent_obj=$(this).parents('.leo-dropdown-list-item');if(!$(this).hasClass('show')){if(wrapper_parent_obj.find('.leo-dropdown-cart-item.show-additional')){wrapper_parent_obj.find('.leo-dropdown-cart-item.show-additional').removeClass('show-additional');wrapper_parent_obj.find('.view-leo-dropdown-additional.show').removeClass('show');wrapper_parent_obj.find('.fake-element').fadeOut('200',function(){$(this).remove()});wrapper_parent_obj.mCustomScrollbar("update");setTimeout(function(){wrapper_parent_obj.parents('.leo-dropdown-list-item-warpper').mCustomScrollbar("update")},500)}
$(this).addClass('show');if(wrapper_parent_obj.hasClass('active-scrollbar')&&parent_obj.hasClass('last')){var height_clone_obj=parent_obj.find('.leo-dropdown-additional').height();wrapper_parent_obj.find('.mCSB_container').append('<p class="fake-element" style="height:'+height_clone_obj+'px"></p>');wrapper_parent_obj.mCustomScrollbar("update");wrapper_parent_obj.mCustomScrollbar("scrollTo","bottom",{callbacks:parent_obj.addClass('show-additional')})}else if(wrapper_parent_obj.parents('.leo-dropdown-list-item-warpper').hasClass('active-scrollbar')&&parent_obj.hasClass('last')&&parent_obj.hasClass('first')){wrapper_parent_obj.append('<li class="leo-dropdown-cart-item clearfix has-view-additional fake-element" style="width:'+width_cart_item+'px; height:'+height_cart_item+'px"></p>');wrapper_parent_obj.parents('.leo-dropdown-list-item-warpper').mCustomScrollbar("update");wrapper_parent_obj.parents('.leo-dropdown-list-item-warpper').mCustomScrollbar("scrollTo","last",{callbacks:parent_obj.addClass('show-additional')})}else{parent_obj.addClass('show-additional')}}else{parent_obj.removeClass('show-additional');if(wrapper_parent_obj.hasClass('active-scrollbar')&&parent_obj.hasClass('last')){wrapper_parent_obj.find('.fake-element').fadeOut('200',function(){$(this).remove()});wrapper_parent_obj.mCustomScrollbar("update")}else if(wrapper_parent_obj.parents('.leo-dropdown-list-item-warpper').hasClass('active-scrollbar')&&parent_obj.hasClass('last')&&parent_obj.hasClass('first')){wrapper_parent_obj.find('.fake-element').fadeOut('200',function(){$(this).remove()});parent_obj.removeClass('show-additional');$(this).removeClass('show');setTimeout(function(){wrapper_parent_obj.parents('.leo-dropdown-list-item-warpper').mCustomScrollbar("update")},500)}
parent_obj.removeClass('show-additional');$(this).removeClass('show')}
return!1})
$('.leo-remove-from-cart').click(function(){var id_product=$(this).data('id-product');var id_product_attribute=$(this).data('id-product-attribute');var id_customization=$(this).data('id-customization');var parent_obj=$(this).parents('.leo-dropdown-cart-item');parent_obj.addClass('deleting');if(parent_obj.hasClass('show-additional')){parent_obj.find('.view-leo-dropdown-additional').trigger('click')}
parent_obj.find('.leo-dropdown-overlay').show();parent_obj.find('.leo-dropdown-cssload-speeding-wheel').show();if($('.remove-from-cart').length){$('.leo-dropdown-cart.dropdown').addClass('disable-close');$('.leo-dropdown-cart.dropup').addClass('disable-close');$('.remove-from-cart[data-id-product="'+id_product+'"][data-id-product-attribute="'+id_product_attribute+'"][data-id-customization="'+id_customization+'"]').trigger('click')}else{var link_url=$(this).data('link-url');var refresh_url=$('.leo-blockcart.cart-preview').data('refresh-url');$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:link_url,async:!0,cache:!1,data:{"ajax":1,"action":"update",},success:function(result){var obj=$.parseJSON(result);parent_obj.find('.leo-dropdown-overlay').hide();parent_obj.find('.leo-dropdown-cssload-speeding-wheel').hide();if(obj.success){parent_obj.fadeOut(function(){parent_obj.remove();$('.leo-remove-from-cart[data-id-product="'+id_product+'"][data-id-product-attribute="'+id_product_attribute+'"][data-id-customization="'+id_customization+'"]').parents('.leo-dropdown-cart-item').remove();updateClassCartItem()});showLeoNotification('success','delete',!1);if(!obj.cart.products_count){parent_obj.parents('.active').removeClass('active');$('.leo-fly-cart-mask').removeClass('active')}
$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:refresh_url,async:!0,cache:!1,success:function(resp){$('.leo-blockcart').replaceWith($(resp.preview).find('.blockcart'));$(".blockcart.cart-preview").addClass('leo-blockcart');if(typeof show_popup!='undefined'&&!show_popup){$(".blockcart.cart-preview").removeClass('blockcart')}
createModalAndDropdown(1,1)},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}else{showLeoNotification('error','delete',!1)}},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}
return!1})
$('.leo-input-product-quantity').focusout(function(){updateQuantityProductDropDown($(this))})
$('.leo-input-product-quantity').keyup(function(event){if(event.keyCode==13){updateQuantityProductDropDown($(this))}})
var timer;var flag=!1;$('.leo-bt-product-quantity-down, .leo-bt-product-quantity-up').on('touchstart click',function(){if(flag==!0){flag=!1;clearTimeout(timer)}
flag=!0;var action='up';var input_target=$(this).parents('.leo-dropdown-cart-item').find('.leo-input-product-quantity');var input_quantity=parseInt(input_target.val());var quantity_update;if($(this).hasClass('leo-bt-product-quantity-down')){action='down'}
if(action=='up'){quantity_update=input_quantity+1}
if(action=='down'){quantity_update=input_quantity-1}
input_target.val(quantity_update);timer=setTimeout(function(){flag=!1;updateQuantityProductDropDown(input_target)},800);return!1})}
function updateQuantityProductDropDown($element){var $this=$element;var product_quantity=$this.data('product-quantity');var min_quantity=$this.data('min-quantity');var max_quantity=$this.data('quantity-available');var input_quantity=$this.val();if(Math.floor(input_quantity)==input_quantity&&$.isNumeric(input_quantity)&&input_quantity>0){}else{showLeoNotification('normal','check',!1);$this.val(product_quantity);return}
if(parseInt(input_quantity)<parseInt(min_quantity)){showLeoNotification('warning','min',min_quantity);$this.val(product_quantity);return!1}
var qty=parseInt(input_quantity)-parseInt(product_quantity);if(qty==0){return}
var id_product=$this.data('id-product');var id_product_attribute=$this.data('id-product-attribute');var id_customization=$this.data('id-customization');$this.removeData('check-outstock');var check_product_outstock=!0;var parent_obj=$this.parents('.leo-dropdown-cart-item');parent_obj.addClass('updating');parent_obj.find('.leo-dropdown-overlay').show();parent_obj.find('.leo-dropdown-cssload-speeding-wheel').show();checkProductOutStock(id_product,id_product_attribute,id_customization,input_quantity,$this,!1);check_data_outstock=setInterval(function(){if(typeof $element.data('check-outstock')!='undefined'){clearInterval(check_data_outstock);if(!$this.data('check-outstock')){showLeoNotification('warning','max',!1);$this.val(product_quantity);check_product_outstock=!1;parent_obj.find('.leo-dropdown-overlay').hide();parent_obj.find('.leo-dropdown-cssload-speeding-wheel').hide();parent_obj.removeClass('updating')}
if(!check_product_outstock){return!1}
if($('.js-cart-line-product-quantity').length){var e=$.Event("keyup");e.keyCode=13;$('.remove-from-cart[data-id-product="'+id_product+'"][data-id-product-attribute="'+id_product_attribute+'"][data-id-customization="'+id_customization+'"]').parents('.cart-item').find('.js-cart-line-product-quantity').val(input_quantity).trigger(e)}else{var link_url=$this.data('update-url');var refresh_url=$('.leo-blockcart.cart-preview').data('refresh-url');var op='';if(qty>0){op='up'}else{op='down'}
$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:link_url,async:!0,cache:!1,data:{"ajax":1,"action":"update","qty":Math.abs(qty),"op":op,},success:function(result){var obj=$.parseJSON(result);parent_obj.find('.leo-dropdown-overlay').hide();parent_obj.find('.leo-dropdown-cssload-speeding-wheel').hide();parent_obj.removeClass('updating');if(obj.success){$('.leo-input-product-quantity[data-id-product="'+id_product+'"][data-id-product-attribute="'+id_product_attribute+'"][data-id-customization="'+id_customization+'"]').val(input_quantity).data('product-quantity',input_quantity);showLeoNotification('success','update',!1);$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:refresh_url,async:!0,cache:!1,success:function(resp){$('.leo-blockcart').replaceWith($(resp.preview).find('.blockcart'));$(".blockcart.cart-preview").addClass('leo-blockcart');if(typeof show_popup!='undefined'&&!show_popup){$(".blockcart.cart-preview").removeClass('blockcart')}
createModalAndDropdown(1,1)},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}else{showLeoNotification('error','update',!1)}},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}}},10)}
function createModalAndDropdown($only_dropdown,$only_total){if(typeof enable_dropdown_defaultcart!='undefined'){if(enable_dropdown_defaultcart){if($('.blockcart.cart-preview').length){$('.blockcart.cart-preview').addClass('leo-blockcart show-leo-loading').append('<div class="cssload-piano"><div class="cssload-rect1"></div><div class="cssload-rect2"></div><div class="cssload-rect3"></div></div>')}else{$('.leo-blockcart.cart-preview').addClass('show-leo-loading').append('<div class="cssload-piano"><div class="cssload-rect1"></div><div class="cssload-rect2"></div><div class="cssload-rect3"></div></div>')}
$('.leo-blockcart.cart-preview .cssload-piano').show();$('.leo-blockcart.cart-preview.show-leo-loading').data('type',type_dropdown_defaultcart);if(typeof type_dropdown_defaultcart!='undefined'){if(type_dropdown_defaultcart=='dropdown'||type_dropdown_defaultcart=='dropup'){$('.leo-blockcart.cart-preview.show-leo-loading').click(function(){showDropDownCart($(this),'defaultcart');return!1})}
if(type_dropdown_defaultcart=='slidebar_left'||type_dropdown_defaultcart=='slidebar_right'||type_dropdown_defaultcart=='slidebar_top'||type_dropdown_defaultcart=='slidebar_bottom'){$('.leo-blockcart.cart-preview.show-leo-loading').click(function(){showSlideBarCart($(this));return!1})}}}else{$('.blockcart.cart-preview').addClass('leo-blockcart')}}
if($('.leo-fly-cart .leo-fly-cart-cssload-loader').length){$('.leo-fly-cart .leo-fly-cart-cssload-loader').show()}
$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:prestashop.urls.base_url+'modules/leofeature/psajax.php?rand='+new Date().getTime(),async:!0,cache:!1,data:{"action":"render-modal","only_dropdown":$only_dropdown,"only_total":$only_total,"token":leo_token},success:function(result){if(result!=''){$('.leo-blockcart.cart-preview .cssload-piano').hide();if($('.leo-fly-cart .leo-fly-cart-cssload-loader').length){setTimeout(function(){$('.leo-fly-cart .leo-fly-cart-cssload-loader').hide()},2000)}
if(result.dropdown!=''){if($('.leo-fly-cart-slidebar.disable').length){$('.leo-fly-cart-slidebar').removeClass('disable')}
if(!$('.leo-dropdown-cart').length){if(typeof type_dropdown_defaultcart!='undefined'&&(type_dropdown_defaultcart=='dropdown'||type_dropdown_defaultcart=='dropup')){$('.leo-blockcart.cart-preview.show-leo-loading').after('<div class="leo-dropdown-cart defaultcart '+type_dropdown_defaultcart+'"></div>')}
if($('.leo-fly-cart.enable-dropdown').length){$('.leo-fly-cart.enable-dropdown').append('<div class="leo-dropdown-cart flycart '+$('.leo-fly-cart.enable-dropdown').data('type')+'"></div>')}
if($('.leo-fly-cart-slidebar').length){$('.leo-fly-cart-slidebar').append('<div class="leo-dropdown-cart"></div>')}}else{$('.leo-dropdown-cart').addClass('update')}
if($('.leo-dropdown-cart-content').length){if($only_total==1){$('.leo-dropdown-cart-content .leo-dropdown-total').replaceWith(JSON.parse(result).dropdown);var check_number_cartitem=3;if(typeof number_cartitem_display!='undefined'){check_number_cartitem=number_cartitem_display}
$('.leo-dropdown-list-item').each(function(){if(!$(this).parents('.leo-fly-cart-slidebar').length){checkFlyCartScrollBarDropDown($(this))}
if($(this).parents('.leo-fly-cart-slidebar').length&&$(this).parents('.leo-fly-cart-slidebar').find('.active-scrollbar')){checkFlyCartScrollBar($(this))}})}else{$('.leo-dropdown-cart-content').replaceWith(JSON.parse(result).dropdown);activeDropdownEvent()}}else{$('.leo-dropdown-cart').append(JSON.parse(result).dropdown);activeDropdownEvent()}}else{if($('.leo-dropdown-cart').length){$('.leo-dropdown-cart').remove()}
$('.leo-fly-cart-slidebar').addClass('disable');if($('.leo-fly-cart-slidebar.active').length){$('.leo-fly-cart-slidebar.active').find('.leo-fly-cart-icon').trigger('click')}}
if(result.modal!=''){$('body').append(JSON.parse(result).modal);activeEventModal()}
if(result.notification!=''){$('body').append(JSON.parse(result).notification)}
if($('.leo-fly-cart-total').length){if($('.leo-dropdown-total').length){$('.leo-fly-cart-total').text($('.leo-dropdown-total').data('cart-total'))}else{$('.leo-fly-cart-total').text("0")}}}else{alert(add_cart_error)}},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}
function activeEventNotification(){$(".leo-notification .notification").click(function(){$(this).removeClass('show').addClass("closed").parent().addClass('disable')})}
function showLeoNotification($status,$action,$special_parameter){if(!$('.leo-notification').hasClass('active')){$('.leo-notification').addClass('active')}
var clone_obj='';clone_obj=$('.leo-temp-'+$status+'>div').clone();clone_obj.find('.noti-'+$action).addClass('active');if($special_parameter&&$special_parameter!=''){clone_obj.find('.noti-'+$action).find('.noti-special').text($special_parameter)}
$('.leo-notification').append(clone_obj);setTimeout(function(){clone_obj.find('.notification').addClass('show')},100);activeEventNotification();setTimeout(function(){clone_obj.find('.notification').removeClass('show').addClass("closed").parent().addClass('disable')},5000)}
function checkProductOutStock($id_product,$id_product_attribute,$id_customization,$quantity,$element,$check_product_in_cart){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:prestashop.urls.base_url+'modules/leofeature/psajax.php?rand='+new Date().getTime(),async:!0,cache:!1,data:{"action":"check-product-outstock","id_product":$id_product,"id_product_attribute":$id_product_attribute,"id_customization":$id_customization,"quantity":$quantity,"check_product_in_cart":$check_product_in_cart,"token":leo_token},success:function(result){if(result!=''){var obj=$.parseJSON(result);$element.data('check-outstock',obj.success)}else{alert(add_cart_error)}},error:function(XMLHttpRequest,textStatus,errorThrown){console.log("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}
function updateClassCartItem(){$('.leo-dropdown-list-item').each(function(){$(this).find('.leo-dropdown-cart-item').first().addClass('first');$(this).find('.leo-dropdown-cart-item').last().addClass('last')})}
function flyCartEffect($element){if($element.hasClass('leo-bt-cart')){var parent_e=$element.parents('.product-miniature');var product_img=parent_e.find('.product-thumbnail').find("img").eq(0)}else{var product_img='';if($('.quickview .product-cover').length){product_img=$('.quickview .product-cover').find("img").eq(0)}else{product_img=$('.product-cover').find("img").eq(0)}}
if(typeof product_img!='undefined'&&product_img.length){var obj_element='';if($('.leo-fly-cart-slidebar.active .leo-fly-cart-icon').length){obj_element=$('.leo-fly-cart-slidebar.active .leo-fly-cart-icon')}else if($('.leo-fly-cart.solo .leo-fly-cart-icon').length){obj_element=$('.leo-fly-cart.solo .leo-fly-cart-icon')}else if($('.leo-blockcart.cart-preview').length){obj_element=$('.leo-blockcart.cart-preview')}else if($('.blockcart.cart-preview').length){obj_element=$('.blockcart.cart-preview')}else{return}
$('body').addClass('enable-leo-fly-cart');var divider=4;var flyerClone=product_img.clone();var clone_offset_top=product_img.offset().top;var clone_offset_left=product_img.offset().left;if($('body').offset().left!=0){clone_offset_left=clone_offset_left-$('body').offset().left}
flyerClone.css({position:'absolute',top:clone_offset_top+"px",left:clone_offset_left+"px",opacity:1,'z-index':1000,width:product_img.width(),height:product_img.height()});$('body').append(flyerClone);var gotoX=obj_element.offset().left+(obj_element.width()/2)-(product_img.width()/divider)/2;if($('body').offset().left!=0){gotoX=gotoX-$('body').offset().left}
if($('html').hasClass('safari-win')&&$('.leo-fly-cart-slidebar.active .leo-fly-cart-icon').length){var gotoY=$(window).scrollTop()+obj_element.offset().top+(obj_element.height()/2)-(product_img.height()/divider)/2}else{var gotoY=obj_element.offset().top+(obj_element.height()/2)-(product_img.height()/divider)/2}
flyerClone.animate({opacity:0.4,left:gotoX,top:gotoY,width:product_img.width()/divider,height:product_img.height()/divider},1000,function(){flyerClone.fadeOut('fast',function(){flyerClone.remove();$('body').removeClass('enable-leo-fly-cart')});if(typeof type_flycart_effect!='undefined'){if(type_flycart_effect=='shake'){obj_element.parents('.leo-fly-cart').find('.leo-fly-cart-total').css({'opacity':0});setTimeout(function(){obj_element.effect("shake",{times:2},200,function(){obj_element.parents('.leo-fly-cart').find('.leo-fly-cart-total').css({'opacity':1})})},500)}
if(type_flycart_effect=='fade'){obj_element.fadeOut('fast',function(){obj_element.fadeIn('fast',function(){})})}}})}}
function activeEventFlyCartSlideBar(){$('.leo-fly-cart-mask, .leo-fly-cart-slidebar .leo-fly-cart-icon, .leo-fly-cart-slidebar .leo-fly-cart-icon-wrapper, .leo-fly-cart-slidebar .leo-fly-cart').click(function(){$('.leo-fly-cart-mask.active').removeClass('active');$('.leo-fly-cart-icon.active-slidebarcart').removeClass('active-slidebarcart');$('.leo-blockcart.cart-preview.active-slidebarcart').removeClass('active-slidebarcart');$('body.leoflycart-active-push main').css({"-moz-transform":"translateX(0px)","-webkit-transform":"translateX(0px)","-o-transform":"translateX(0px)","-ms-transform":"translateX(0px)","transform":"translateX(0px)","-moz-transform":"translateY(0px)","-webkit-transform":"translateY(0px)","-o-transform":"translateY(0px)","-ms-transform":"translateY(0px)","transform":"translateY(0px)",});setTimeout(function(){$('body').removeClass('leoflycart-active-slidebar leoflycart-active-push')},300);$('.leo-fly-cart-slidebar.active').removeClass('active')});$(document).keyup(function(e){if(e.keyCode==27){if($('.leo-fly-cart-mask').hasClass('active')){$('.leo-fly-cart-mask.active').trigger('click')}else if($('.leo-fly-cart-slidebar.active .leo-fly-cart-icon').length){$('.leo-fly-cart-slidebar .leo-fly-cart-icon').trigger('click')}}})}
function checkFlyCartScrollBar($element){var object_parent=$element.parents('.leo-fly-cart-slidebar');if(object_parent.hasClass('slidebar_top')||object_parent.hasClass('slidebar_bottom')){var width_bottom=object_parent.find('.leo-dropdown-bottom').outerWidth();var window_width=$(window).width();var element_width='';if(typeof width_cart_item!='undefined'){element_width=$element.find('.leo-dropdown-cart-item').length*width_cart_item}else{element_width=$element.find('.leo-dropdown-cart-item').length*$element.find('.leo-dropdown-cart-item').outerWidth()}
if(element_width+width_bottom>window_width){object_parent.addClass('active-scroll');object_parent.find('.leo-dropdown-list-item-warpper').addClass('active-scrollbar');object_parent.find('.leo-dropdown-list-item-warpper').css({'width':window_width-width_bottom});object_parent.find('.leo-dropdown-list-item-warpper').mCustomScrollbar({theme:"dark",axis:"x",scrollInertia:200,callbacks:{onInit:function(){}},advanced:{autoExpandHorizontalScroll:!0},keyboard:{enable:!0,}});object_parent.find('.leo-dropdown-list-item-warpper').mCustomScrollbar('update')}else{object_parent.removeClass('active-scroll');object_parent.find('.leo-dropdown-list-item-warpper').removeClass("active-scrollbar").css({'width':'auto'});object_parent.find('.leo-dropdown-list-item-warpper').mCustomScrollbar("destroy")}}
if(object_parent.hasClass('slidebar_left')||object_parent.hasClass('slidebar_right')){var height_bottom=object_parent.find('.leo-dropdown-bottom').outerHeight();var window_height=$(window).height();var element_height='';if(typeof height_cart_item!='undefined'){element_height=$element.find('.leo-dropdown-cart-item').length*height_cart_item}else{element_height=$element.find('.leo-dropdown-cart-item').length*$element.find('.leo-dropdown-cart-item').outerHeight()}
if(element_height+height_bottom>window_height){object_parent.addClass('active-scroll');$element.addClass('active-scrollbar');$element.css({'max-height':window_height-height_bottom});$element.mCustomScrollbar({theme:"dark",scrollInertia:200,callbacks:{onInit:function(){}},keyboard:{enable:!0,}});$element.mCustomScrollbar('update')}else{object_parent.removeClass('active-scroll');$element.removeClass("active-scrollbar").css({'max-height':'none'});$element.mCustomScrollbar("destroy")}}}
function checkFlyCartScrollBarDropDown($element){var object_parent=$element.parents('.leo-fly-cart.type-fixed.enable-dropdown');var type=object_parent.data('type');var height_bottom=object_parent.find('.leo-dropdown-bottom').outerHeight();var height_real=height_cart_item*$element.find('.leo-dropdown-cart-item').length;var height_icon=object_parent.find('.leo-fly-cart-icon-wrapper').outerHeight();var window_height=$(window).height();var check_number_cartitem=3;if(typeof number_cartitem_display!='undefined'){check_number_cartitem=number_cartitem_display}
var height_default=height_cart_item*number_cartitem_display;if(object_parent.length>0&&type=='dropup'&&height_real+height_bottom>object_parent.position().top&&height_default+height_bottom>object_parent.position().top){$element.addClass('active-scrollbar').css({'max-height':object_parent.position().top-height_icon-height_bottom});$element.mCustomScrollbar({theme:"dark",scrollInertia:200,callbacks:{onInit:function(){}},keyboard:{enable:!0,}});$element.mCustomScrollbar('update')}else if(object_parent.length>0&&type=='dropdown'&&height_real+height_bottom>$(window).height()-object_parent.position().top&&height_default+height_bottom>$(window).height()-object_parent.position().top){$element.addClass('active-scrollbar').css({'max-height':$(window).height()-object_parent.position().top-height_icon-height_bottom});$element.mCustomScrollbar({theme:"dark",scrollInertia:200,callbacks:{onInit:function(){}},keyboard:{enable:!0,}});$element.mCustomScrollbar('update')}else if($element.find('.leo-dropdown-cart-item').length>check_number_cartitem){if(typeof height_cart_item!='undefined'){$element.addClass('active-scrollbar').css({'max-height':height_cart_item*number_cartitem_display})}else{$element.addClass('active-scrollbar').css({'max-height':$element.find('.leo-dropdown-cart-item').outerHeight()*check_number_cartitem})}
$element.mCustomScrollbar({theme:"dark",scrollInertia:200,callbacks:{onInit:function(){}},keyboard:{enable:!0,}})}else{$element.removeClass("active-scrollbar").css({'max-height':'none'});$element.mCustomScrollbar("destroy")}}
function getOffsetFlycartIcon(){if($('.leo-fly-cart.solo .leo-fly-cart-icon').length){var offset_top=$('.leo-fly-cart.solo .leo-fly-cart-icon').offset().top;var offset_left=$('.leo-fly-cart.solo .leo-fly-cart-icon').offset().left;var window_width=$(window).width();if(offset_left<=window_width/2){$('.leo-fly-cart.solo').removeClass('offset-right').addClass('offset-left')}else{$('.leo-fly-cart.solo').removeClass('offset-left').addClass('offset-right')}
if(lf_is_gen_rtl&&prestashop.language.is_rtl==1){if($('.leo-fly-cart.solo').hasClass('offset-right')){$('.leo-fly-cart.solo').removeClass('offset-right').addClass('offset-left')}else if($('.leo-fly-cart.solo').hasClass('offset-left')){$('.leo-fly-cart.solo').removeClass('offset-left').addClass('offset-right')}}}}
function showModalPopupCart(modal){if($('#blockcart-modal').length){$('#blockcart-modal').remove()}
$('body').append(modal);$('#blockcart-modal').modal('show')}
function leoChooseAttr(){$(document).on('change','.variants-product [data-product-attribute]',function(e){var id_product=parseInt($(this).parents('.addToCartFormWrapper:eq(0)').attr('data-product-id'));var group_value=$(this).parents('.addToCartFormWrapper:eq(0)').find('.addToCartForm').serialize();var parent_e=$(this).parents('.product-miniature');var multiple_image=parent_e.find('.product-list-images-mobile').children().length<2?0:1;var $product_article_e=$(this).parents('.product-miniature[data-id-product='+id_product+']');$product_article_e.find('.leo-bt-cart .leo-bt-cart-content').hide();$product_article_e.find('.leo-bt-cart .leo-loading').css({'display':'block'});$product_article_e.find('.leo-bt-cart').addClass('active');$.ajax({type:'GET',headers:{"cache-control":"no-cache"},url:url_leoproductattribute+(url_leoproductattribute.indexOf('?')=='-1'?'?':'&')+group_value,async:!0,cache:!1,data:{'ajax':'1','action':'getproductattribute',"id_product":id_product,'input_color':$(this).hasClass('input-color'),'image2':parent_e.find('.product-thumbnail .product-additional').length,'multiple_image':multiple_image},success:function(result){if(result!=''){var obj=$.parseJSON(result);if(typeof obj.product_cover!=="undefined"&&obj.product_cover!==null&&!multiple_image){$product_article_e.find('.product-thumbnail img').attr('src',obj.product_cover.bySize.home_default.url).attr('alt',obj.product_cover.legend);$product_article_e.find('.product-thumbnail').attr('href',obj.product_url)}
if(!obj.minimal_quantity){$product_article_e.find('[name="qty"]').val('1').data('min','1');$product_article_e.find('.minimal_quantity').val('1')}else{$product_article_e.find('.minimal_quantity').val(obj.minimal_quantity);$product_article_e.find('[name="qty"]').val(obj.minimal_quantity).data('min',obj.minimal_quantity)}
$product_article_e.find('.product-price-and-shipping').empty().append(obj.price_attribute);parent_e.find('.id_product_attribute_'+id_product).val(obj.id_attr);if(!obj.add_to_cart_url){parent_e.find('.leo-bt-cart_'+id_product).addClass('disabled')}else{parent_e.find('.leo-bt-cart_'+id_product).removeClass('disabled')}
if(typeof obj.refresh_attr!=="undefined"&&obj.refresh_attr!=''){parent_e.find('.variants-product').replaceWith(obj.refresh_attr)}
if(!multiple_image){parent_e.find('.product-thumbnail').children('img').attr('src',obj.image);if(obj.image2){parent_e.find('.product-thumbnail .product-additional img').attr('src',obj.image2)}
parent_e.find('.product-thumbnail .product-additional').hide()}else{if(obj.image){var img=parent_e.find('.product-list-images-mobile').find('img');for(var i=0;i<obj.image.length;i++){img.eq(i).attr('src',obj.image[i].image)}}}}else{alert(add_cart_error)}
$('.leo-bt-cart.active').find('.leo-bt-cart-content').fadeIn('fast');$('.leo-bt-cart.active').find('.leo-loading').hide();$('.leo-bt-cart.active').removeClass('active reset')},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})})};/**
 * 2007-2017 Leotheme
 *
 * NOTICE OF LICENSE
 *
 * Leo feature for prestashop 1.7: ajax cart, review, compare, wishlist at product list 
 *
 * DISCLAIMER
 *
 *  @Module Name: Leo Feature
 *  @author    leotheme <leotheme@gmail.com>
 *  @copyright 2007-2018 Leotheme
 *  @license   http://leotheme.com - prestashop template provider
 */
/*!
 * jQuery Mousewheel 3.1.13
 *
 * Copyright 2015 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});/**
 * 2007-2017 Leotheme
 *
 * NOTICE OF LICENSE
 *
 * Leo feature for prestashop 1.7: ajax cart, review, compare, wishlist at product list 
 *
 * DISCLAIMER
 *
 *  @Module Name: Leo Feature
 *  @author    leotheme <leotheme@gmail.com>
 *  @copyright 2007-2018 Leotheme
 *  @license   http://leotheme.com - prestashop template provider
 */
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else if(typeof module!=="undefined"&&module.exports){module.exports=factory}else{factory(jQuery,window,document)}}(function($){(function(init){var _rjs=typeof define==="function"&&define.amd,_njs=typeof module!=="undefined"&&module.exports,_dlp=("https:"==document.location.protocol)?"https:":"http:",_url="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";if(!_rjs){if(_njs){require("jquery-mousewheel")($)}else{$.event.special.mousewheel||$("head").append(decodeURI("%3Cscript src="+_dlp+"//"+_url+"%3E%3C/script%3E"))}}
init()}(function(){var pluginNS="mCustomScrollbar",pluginPfx="mCS",defaultSelector=".mCustomScrollbar",defaults={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},totalInstances=0,liveTimers={},oldIE=(window.attachEvent&&!window.addEventListener)?1:0,touchActive=!1,touchable,classes=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],methods={init:function(options){var options=$.extend(!0,{},defaults,options),selector=_selector.call(this);if(options.live){var liveSelector=options.liveSelector||this.selector||defaultSelector,$liveSelector=$(liveSelector);if(options.live==="off"){removeLiveTimers(liveSelector);return}
liveTimers[liveSelector]=setTimeout(function(){$liveSelector.mCustomScrollbar(options);if(options.live==="once"&&$liveSelector.length){removeLiveTimers(liveSelector)}},500)}else{removeLiveTimers(liveSelector)}
options.setWidth=(options.set_width)?options.set_width:options.setWidth;options.setHeight=(options.set_height)?options.set_height:options.setHeight;options.axis=(options.horizontalScroll)?"x":_findAxis(options.axis);options.scrollInertia=options.scrollInertia>0&&options.scrollInertia<17?17:options.scrollInertia;if(typeof options.mouseWheel!=="object"&&options.mouseWheel==!0){options.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}}
options.mouseWheel.scrollAmount=!options.mouseWheelPixels?options.mouseWheel.scrollAmount:options.mouseWheelPixels;options.mouseWheel.normalizeDelta=!options.advanced.normalizeMouseWheelDelta?options.mouseWheel.normalizeDelta:options.advanced.normalizeMouseWheelDelta;options.scrollButtons.scrollType=_findScrollButtonsType(options.scrollButtons.scrollType);_theme(options);return $(selector).each(function(){var $this=$(this);if(!$this.data(pluginPfx)){$this.data(pluginPfx,{idx:++totalInstances,opt:options,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:$this.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var d=$this.data(pluginPfx),o=d.opt,htmlDataAxis=$this.data("mcs-axis"),htmlDataSbPos=$this.data("mcs-scrollbar-position"),htmlDataTheme=$this.data("mcs-theme");if(htmlDataAxis){o.axis=htmlDataAxis}
if(htmlDataSbPos){o.scrollbarPosition=htmlDataSbPos}
if(htmlDataTheme){o.theme=htmlDataTheme;_theme(o)}
_pluginMarkup.call(this);if(d&&o.callbacks.onCreate&&typeof o.callbacks.onCreate==="function"){o.callbacks.onCreate.call(this)}
$("#mCSB_"+d.idx+"_container img:not(."+classes[2]+")").addClass(classes[2]);methods.update.call(null,$this)}})},update:function(el,cb){var selector=el||_selector.call(this);return $(selector).each(function(){var $this=$(this);if($this.data(pluginPfx)){var d=$this.data(pluginPfx),o=d.opt,mCSB_container=$("#mCSB_"+d.idx+"_container"),mCustomScrollBox=$("#mCSB_"+d.idx),mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")];if(!mCSB_container.length){return}
if(d.tweenRunning){_stop($this)}
if(cb&&d&&o.callbacks.onBeforeUpdate&&typeof o.callbacks.onBeforeUpdate==="function"){o.callbacks.onBeforeUpdate.call(this)}
if($this.hasClass(classes[3])){$this.removeClass(classes[3])}
if($this.hasClass(classes[4])){$this.removeClass(classes[4])}
mCustomScrollBox.css("max-height","none");if(mCustomScrollBox.height()!==$this.height()){mCustomScrollBox.css("max-height",$this.height())}
_expandContentHorizontally.call(this);if(o.axis!=="y"&&!o.advanced.autoExpandHorizontalScroll){mCSB_container.css("width",_contentWidth(mCSB_container))}
d.overflowed=_overflowed.call(this);_scrollbarVisibility.call(this);if(o.autoDraggerLength){_setDraggerLength.call(this)}
_scrollRatio.call(this);_bindEvents.call(this);var to=[Math.abs(mCSB_container[0].offsetTop),Math.abs(mCSB_container[0].offsetLeft)];if(o.axis!=="x"){if(!d.overflowed[0]){_resetContentPosition.call(this);if(o.axis==="y"){_unbindEvents.call(this)}else if(o.axis==="yx"&&d.overflowed[1]){_scrollTo($this,to[1].toString(),{dir:"x",dur:0,overwrite:"none"})}}else if(mCSB_dragger[0].height()>mCSB_dragger[0].parent().height()){_resetContentPosition.call(this)}else{_scrollTo($this,to[0].toString(),{dir:"y",dur:0,overwrite:"none"});d.contentReset.y=null}}
if(o.axis!=="y"){if(!d.overflowed[1]){_resetContentPosition.call(this);if(o.axis==="x"){_unbindEvents.call(this)}else if(o.axis==="yx"&&d.overflowed[0]){_scrollTo($this,to[0].toString(),{dir:"y",dur:0,overwrite:"none"})}}else if(mCSB_dragger[1].width()>mCSB_dragger[1].parent().width()){_resetContentPosition.call(this)}else{_scrollTo($this,to[1].toString(),{dir:"x",dur:0,overwrite:"none"});d.contentReset.x=null}}
if(cb&&d){if(cb===2&&o.callbacks.onImageLoad&&typeof o.callbacks.onImageLoad==="function"){o.callbacks.onImageLoad.call(this)}else if(cb===3&&o.callbacks.onSelectorChange&&typeof o.callbacks.onSelectorChange==="function"){o.callbacks.onSelectorChange.call(this)}else if(o.callbacks.onUpdate&&typeof o.callbacks.onUpdate==="function"){o.callbacks.onUpdate.call(this)}}
_autoUpdate.call(this)}})},scrollTo:function(val,options){if(typeof val=="undefined"||val==null){return}
var selector=_selector.call(this);return $(selector).each(function(){var $this=$(this);if($this.data(pluginPfx)){var d=$this.data(pluginPfx),o=d.opt,methodDefaults={trigger:"external",scrollInertia:o.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},methodOptions=$.extend(!0,{},methodDefaults,options),to=_arr.call(this,val),dur=methodOptions.scrollInertia>0&&methodOptions.scrollInertia<17?17:methodOptions.scrollInertia;to[0]=_to.call(this,to[0],"y");to[1]=_to.call(this,to[1],"x");if(methodOptions.moveDragger){to[0]*=d.scrollRatio.y;to[1]*=d.scrollRatio.x}
methodOptions.dur=_isTabHidden()?0:dur;setTimeout(function(){if(to[0]!==null&&typeof to[0]!=="undefined"&&o.axis!=="x"&&d.overflowed[0]){methodOptions.dir="y";methodOptions.overwrite="all";_scrollTo($this,to[0].toString(),methodOptions)}
if(to[1]!==null&&typeof to[1]!=="undefined"&&o.axis!=="y"&&d.overflowed[1]){methodOptions.dir="x";methodOptions.overwrite="none";_scrollTo($this,to[1].toString(),methodOptions)}},methodOptions.timeout)}})},stop:function(){var selector=_selector.call(this);return $(selector).each(function(){var $this=$(this);if($this.data(pluginPfx)){_stop($this)}})},disable:function(r){var selector=_selector.call(this);return $(selector).each(function(){var $this=$(this);if($this.data(pluginPfx)){var d=$this.data(pluginPfx);_autoUpdate.call(this,"remove");_unbindEvents.call(this);if(r){_resetContentPosition.call(this)}
_scrollbarVisibility.call(this,!0);$this.addClass(classes[3])}})},destroy:function(){var selector=_selector.call(this);return $(selector).each(function(){var $this=$(this);if($this.data(pluginPfx)){var d=$this.data(pluginPfx),o=d.opt,mCustomScrollBox=$("#mCSB_"+d.idx),mCSB_container=$("#mCSB_"+d.idx+"_container"),scrollbar=$(".mCSB_"+d.idx+"_scrollbar");if(o.live){removeLiveTimers(o.liveSelector||$(selector).selector)}
_autoUpdate.call(this,"remove");_unbindEvents.call(this);_resetContentPosition.call(this);$this.removeData(pluginPfx);_delete(this,"mcs");scrollbar.remove();mCSB_container.find("img."+classes[2]).removeClass(classes[2]);mCustomScrollBox.replaceWith(mCSB_container.contents());$this.removeClass(pluginNS+" _"+pluginPfx+"_"+d.idx+" "+classes[6]+" "+classes[7]+" "+classes[5]+" "+classes[3]).addClass(classes[4])}})}},_selector=function(){return(typeof $(this)!=="object"||$(this).length<1)?defaultSelector:this},_theme=function(obj){var fixedSizeScrollbarThemes=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],nonExpandedScrollbarThemes=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],disabledScrollButtonsThemes=["minimal","minimal-dark"],enabledAutoHideScrollbarThemes=["minimal","minimal-dark"],scrollbarPositionOutsideThemes=["minimal","minimal-dark"];obj.autoDraggerLength=$.inArray(obj.theme,fixedSizeScrollbarThemes)>-1?!1:obj.autoDraggerLength;obj.autoExpandScrollbar=$.inArray(obj.theme,nonExpandedScrollbarThemes)>-1?!1:obj.autoExpandScrollbar;obj.scrollButtons.enable=$.inArray(obj.theme,disabledScrollButtonsThemes)>-1?!1:obj.scrollButtons.enable;obj.autoHideScrollbar=$.inArray(obj.theme,enabledAutoHideScrollbarThemes)>-1?!0:obj.autoHideScrollbar;obj.scrollbarPosition=$.inArray(obj.theme,scrollbarPositionOutsideThemes)>-1?"outside":obj.scrollbarPosition},removeLiveTimers=function(selector){if(liveTimers[selector]){clearTimeout(liveTimers[selector]);_delete(liveTimers,selector)}},_findAxis=function(val){return(val==="yx"||val==="xy"||val==="auto")?"yx":(val==="x"||val==="horizontal")?"x":"y"},_findScrollButtonsType=function(val){return(val==="stepped"||val==="pixels"||val==="step"||val==="click")?"stepped":"stepless"},_pluginMarkup=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,expandClass=o.autoExpandScrollbar?" "+classes[1]+"_expand":"",scrollbar=["<div id='mCSB_"+d.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+d.idx+"_scrollbar mCS-"+o.theme+" mCSB_scrollTools_vertical"+expandClass+"'><div class='"+classes[12]+"'><div id='mCSB_"+d.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+d.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+d.idx+"_scrollbar mCS-"+o.theme+" mCSB_scrollTools_horizontal"+expandClass+"'><div class='"+classes[12]+"'><div id='mCSB_"+d.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],wrapperClass=o.axis==="yx"?"mCSB_vertical_horizontal":o.axis==="x"?"mCSB_horizontal":"mCSB_vertical",scrollbars=o.axis==="yx"?scrollbar[0]+scrollbar[1]:o.axis==="x"?scrollbar[1]:scrollbar[0],contentWrapper=o.axis==="yx"?"<div id='mCSB_"+d.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",autoHideClass=o.autoHideScrollbar?" "+classes[6]:"",scrollbarDirClass=(o.axis!=="x"&&d.langDir==="rtl")?" "+classes[7]:"";if(o.setWidth){$this.css("width",o.setWidth)}
if(o.setHeight){$this.css("height",o.setHeight)}
o.setLeft=(o.axis!=="y"&&d.langDir==="rtl")?"989999px":o.setLeft;$this.addClass(pluginNS+" _"+pluginPfx+"_"+d.idx+autoHideClass+scrollbarDirClass).wrapInner("<div id='mCSB_"+d.idx+"' class='mCustomScrollBox mCS-"+o.theme+" "+wrapperClass+"'><div id='mCSB_"+d.idx+"_container' class='mCSB_container' style='position:relative; top:"+o.setTop+"; left:"+o.setLeft+";' dir='"+d.langDir+"' /></div>");var mCustomScrollBox=$("#mCSB_"+d.idx),mCSB_container=$("#mCSB_"+d.idx+"_container");if(o.axis!=="y"&&!o.advanced.autoExpandHorizontalScroll){mCSB_container.css("width",_contentWidth(mCSB_container))}
if(o.scrollbarPosition==="outside"){if($this.css("position")==="static"){$this.css("position","relative")}
$this.css("overflow","visible");mCustomScrollBox.addClass("mCSB_outside").after(scrollbars)}else{mCustomScrollBox.addClass("mCSB_inside").append(scrollbars);mCSB_container.wrap(contentWrapper)}
_scrollButtons.call(this);var mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")];mCSB_dragger[0].css("min-height",mCSB_dragger[0].height());mCSB_dragger[1].css("min-width",mCSB_dragger[1].width())},_contentWidth=function(el){var val=[el[0].scrollWidth,Math.max.apply(Math,el.children().map(function(){return $(this).outerWidth(!0)}).get())],w=el.parent().width();return val[0]>w?val[0]:val[1]>w?val[1]:"100%"},_expandContentHorizontally=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,mCSB_container=$("#mCSB_"+d.idx+"_container");if(o.advanced.autoExpandHorizontalScroll&&o.axis!=="y"){mCSB_container.css({"width":"auto","min-width":0,"overflow-x":"scroll"});var w=Math.ceil(mCSB_container[0].scrollWidth);if(o.advanced.autoExpandHorizontalScroll===3||(o.advanced.autoExpandHorizontalScroll!==2&&w>mCSB_container.parent().width())){mCSB_container.css({"width":w,"min-width":"100%","overflow-x":"inherit"})}else{mCSB_container.css({"overflow-x":"inherit","position":"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({"width":(Math.ceil(mCSB_container[0].getBoundingClientRect().right+0.4)-Math.floor(mCSB_container[0].getBoundingClientRect().left)),"min-width":"100%","position":"relative"}).unwrap()}}},_scrollButtons=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,mCSB_scrollTools=$(".mCSB_"+d.idx+"_scrollbar:first"),tabindex=!_isNumeric(o.scrollButtons.tabindex)?"":"tabindex='"+o.scrollButtons.tabindex+"'",btnHTML=["<a href='#' class='"+classes[13]+"' "+tabindex+" />","<a href='#' class='"+classes[14]+"' "+tabindex+" />","<a href='#' class='"+classes[15]+"' "+tabindex+" />","<a href='#' class='"+classes[16]+"' "+tabindex+" />"],btn=[(o.axis==="x"?btnHTML[2]:btnHTML[0]),(o.axis==="x"?btnHTML[3]:btnHTML[1]),btnHTML[2],btnHTML[3]];if(o.scrollButtons.enable){mCSB_scrollTools.prepend(btn[0]).append(btn[1]).next(".mCSB_scrollTools").prepend(btn[2]).append(btn[3])}},_setDraggerLength=function(){var $this=$(this),d=$this.data(pluginPfx),mCustomScrollBox=$("#mCSB_"+d.idx),mCSB_container=$("#mCSB_"+d.idx+"_container"),mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")],ratio=[mCustomScrollBox.height()/mCSB_container.outerHeight(!1),mCustomScrollBox.width()/mCSB_container.outerWidth(!1)],l=[parseInt(mCSB_dragger[0].css("min-height")),Math.round(ratio[0]*mCSB_dragger[0].parent().height()),parseInt(mCSB_dragger[1].css("min-width")),Math.round(ratio[1]*mCSB_dragger[1].parent().width())],h=oldIE&&(l[1]<l[0])?l[0]:l[1],w=oldIE&&(l[3]<l[2])?l[2]:l[3];mCSB_dragger[0].css({"height":h,"max-height":(mCSB_dragger[0].parent().height()-10)}).find(".mCSB_dragger_bar").css({"line-height":l[0]+"px"});mCSB_dragger[1].css({"width":w,"max-width":(mCSB_dragger[1].parent().width()-10)})},_scrollRatio=function(){var $this=$(this),d=$this.data(pluginPfx),mCustomScrollBox=$("#mCSB_"+d.idx),mCSB_container=$("#mCSB_"+d.idx+"_container"),mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")],scrollAmount=[mCSB_container.outerHeight(!1)-mCustomScrollBox.height(),mCSB_container.outerWidth(!1)-mCustomScrollBox.width()],ratio=[scrollAmount[0]/(mCSB_dragger[0].parent().height()-mCSB_dragger[0].height()),scrollAmount[1]/(mCSB_dragger[1].parent().width()-mCSB_dragger[1].width())];d.scrollRatio={y:ratio[0],x:ratio[1]}},_onDragClasses=function(el,action,xpnd){var expandClass=xpnd?classes[0]+"_expanded":"",scrollbar=el.closest(".mCSB_scrollTools");if(action==="active"){el.toggleClass(classes[0]+" "+expandClass);scrollbar.toggleClass(classes[1]);el[0]._draggable=el[0]._draggable?0:1}else{if(!el[0]._draggable){if(action==="hide"){el.removeClass(classes[0]);scrollbar.removeClass(classes[1])}else{el.addClass(classes[0]);scrollbar.addClass(classes[1])}}}},_overflowed=function(){var $this=$(this),d=$this.data(pluginPfx),mCustomScrollBox=$("#mCSB_"+d.idx),mCSB_container=$("#mCSB_"+d.idx+"_container"),contentHeight=d.overflowed==null?mCSB_container.height():mCSB_container.outerHeight(!1),contentWidth=d.overflowed==null?mCSB_container.width():mCSB_container.outerWidth(!1),h=mCSB_container[0].scrollHeight,w=mCSB_container[0].scrollWidth;if(h>contentHeight){contentHeight=h}
if(w>contentWidth){contentWidth=w}
return[contentHeight>mCustomScrollBox.height(),contentWidth>mCustomScrollBox.width()]},_resetContentPosition=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,mCustomScrollBox=$("#mCSB_"+d.idx),mCSB_container=$("#mCSB_"+d.idx+"_container"),mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")];_stop($this);if((o.axis!=="x"&&!d.overflowed[0])||(o.axis==="y"&&d.overflowed[0])){mCSB_dragger[0].add(mCSB_container).css("top",0);_scrollTo($this,"_resetY")}
if((o.axis!=="y"&&!d.overflowed[1])||(o.axis==="x"&&d.overflowed[1])){var cx=dx=0;if(d.langDir==="rtl"){cx=mCustomScrollBox.width()-mCSB_container.outerWidth(!1);dx=Math.abs(cx/d.scrollRatio.x)}
mCSB_container.css("left",cx);mCSB_dragger[1].css("left",dx);_scrollTo($this,"_resetX")}},_bindEvents=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt;if(!d.bindEvents){_draggable.call(this);if(o.contentTouchScroll){_contentDraggable.call(this)}
_selectable.call(this);if(o.mouseWheel.enable){function _mwt(){mousewheelTimeout=setTimeout(function(){if(!$.event.special.mousewheel){_mwt()}else{clearTimeout(mousewheelTimeout);_mousewheel.call($this[0])}},100)}
var mousewheelTimeout;_mwt()}
_draggerRail.call(this);_wrapperScroll.call(this);if(o.advanced.autoScrollOnFocus){_focus.call(this)}
if(o.scrollButtons.enable){_buttons.call(this)}
if(o.keyboard.enable){_keyboard.call(this)}
d.bindEvents=!0}},_unbindEvents=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,namespace=pluginPfx+"_"+d.idx,sb=".mCSB_"+d.idx+"_scrollbar",sel=$("#mCSB_"+d.idx+",#mCSB_"+d.idx+"_container,#mCSB_"+d.idx+"_container_wrapper,"+sb+" ."+classes[12]+",#mCSB_"+d.idx+"_dragger_vertical,#mCSB_"+d.idx+"_dragger_horizontal,"+sb+">a"),mCSB_container=$("#mCSB_"+d.idx+"_container");if(o.advanced.releaseDraggableSelectors){sel.add($(o.advanced.releaseDraggableSelectors))}
if(o.advanced.extraDraggableSelectors){sel.add($(o.advanced.extraDraggableSelectors))}
if(d.bindEvents){$(document).add($(!_canAccessIFrame()||top.document)).unbind("."+namespace);sel.each(function(){$(this).unbind("."+namespace)});clearTimeout($this[0]._focusTimeout);_delete($this[0],"_focusTimeout");clearTimeout(d.sequential.step);_delete(d.sequential,"step");clearTimeout(mCSB_container[0].onCompleteTimeout);_delete(mCSB_container[0],"onCompleteTimeout");d.bindEvents=!1}},_scrollbarVisibility=function(disabled){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,contentWrapper=$("#mCSB_"+d.idx+"_container_wrapper"),content=contentWrapper.length?contentWrapper:$("#mCSB_"+d.idx+"_container"),scrollbar=[$("#mCSB_"+d.idx+"_scrollbar_vertical"),$("#mCSB_"+d.idx+"_scrollbar_horizontal")],mCSB_dragger=[scrollbar[0].find(".mCSB_dragger"),scrollbar[1].find(".mCSB_dragger")];if(o.axis!=="x"){if(d.overflowed[0]&&!disabled){scrollbar[0].add(mCSB_dragger[0]).add(scrollbar[0].children("a")).css("display","block");content.removeClass(classes[8]+" "+classes[10])}else{if(o.alwaysShowScrollbar){if(o.alwaysShowScrollbar!==2){mCSB_dragger[0].css("display","none")}
content.removeClass(classes[10])}else{scrollbar[0].css("display","none");content.addClass(classes[10])}
content.addClass(classes[8])}}
if(o.axis!=="y"){if(d.overflowed[1]&&!disabled){scrollbar[1].add(mCSB_dragger[1]).add(scrollbar[1].children("a")).css("display","block");content.removeClass(classes[9]+" "+classes[11])}else{if(o.alwaysShowScrollbar){if(o.alwaysShowScrollbar!==2){mCSB_dragger[1].css("display","none")}
content.removeClass(classes[11])}else{scrollbar[1].css("display","none");content.addClass(classes[11])}
content.addClass(classes[9])}}
if(!d.overflowed[0]&&!d.overflowed[1]){$this.addClass(classes[5])}else{$this.removeClass(classes[5])}},_coordinates=function(e){var t=e.type,o=e.target.ownerDocument!==document&&frameElement!==null?[$(frameElement).offset().top,$(frameElement).offset().left]:null,io=_canAccessIFrame()&&e.target.ownerDocument!==top.document&&frameElement!==null?[$(e.view.frameElement).offset().top,$(e.view.frameElement).offset().left]:[0,0];switch(t){case "pointerdown":case "MSPointerDown":case "pointermove":case "MSPointerMove":case "pointerup":case "MSPointerUp":return o?[e.originalEvent.pageY-o[0]+io[0],e.originalEvent.pageX-o[1]+io[1],!1]:[e.originalEvent.pageY,e.originalEvent.pageX,!1];break;case "touchstart":case "touchmove":case "touchend":var touch=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],touches=e.originalEvent.touches.length||e.originalEvent.changedTouches.length;return e.target.ownerDocument!==document?[touch.screenY,touch.screenX,touches>1]:[touch.pageY,touch.pageX,touches>1];break;default:return o?[e.pageY-o[0]+io[0],e.pageX-o[1]+io[1],!1]:[e.pageY,e.pageX,!1]}},_draggable=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,namespace=pluginPfx+"_"+d.idx,draggerId=["mCSB_"+d.idx+"_dragger_vertical","mCSB_"+d.idx+"_dragger_horizontal"],mCSB_container=$("#mCSB_"+d.idx+"_container"),mCSB_dragger=$("#"+draggerId[0]+",#"+draggerId[1]),draggable,dragY,dragX,rds=o.advanced.releaseDraggableSelectors?mCSB_dragger.add($(o.advanced.releaseDraggableSelectors)):mCSB_dragger,eds=o.advanced.extraDraggableSelectors?$(!_canAccessIFrame()||top.document).add($(o.advanced.extraDraggableSelectors)):$(!_canAccessIFrame()||top.document);mCSB_dragger.bind("contextmenu."+namespace,function(e){e.preventDefault()}).bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace,function(e){e.stopImmediatePropagation();e.preventDefault();if(!_mouseBtnLeft(e)){return}
touchActive=!0;if(oldIE){document.onselectstart=function(){return!1}}
_iframe.call(mCSB_container,!1);_stop($this);draggable=$(this);var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left,h=draggable.height()+offset.top,w=draggable.width()+offset.left;if(y<h&&y>0&&x<w&&x>0){dragY=y;dragX=x}
_onDragClasses(draggable,"active",o.autoExpandScrollbar)}).bind("touchmove."+namespace,function(e){e.stopImmediatePropagation();e.preventDefault();var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left;_drag(dragY,dragX,y,x)});$(document).add(eds).bind("mousemove."+namespace+" pointermove."+namespace+" MSPointerMove."+namespace,function(e){if(draggable){var offset=draggable.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left;if(dragY===y&&dragX===x){return}
_drag(dragY,dragX,y,x)}}).add(rds).bind("mouseup."+namespace+" touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace,function(e){if(draggable){_onDragClasses(draggable,"active",o.autoExpandScrollbar);draggable=null}
touchActive=!1;if(oldIE){document.onselectstart=null}
_iframe.call(mCSB_container,!0)});function _drag(dragY,dragX,y,x){mCSB_container[0].idleTimer=o.scrollInertia<233?250:0;if(draggable.attr("id")===draggerId[1]){var dir="x",to=((draggable[0].offsetLeft-dragX)+x)*d.scrollRatio.x}else{var dir="y",to=((draggable[0].offsetTop-dragY)+y)*d.scrollRatio.y}
_scrollTo($this,to.toString(),{dir:dir,drag:!0})}},_contentDraggable=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,namespace=pluginPfx+"_"+d.idx,mCustomScrollBox=$("#mCSB_"+d.idx),mCSB_container=$("#mCSB_"+d.idx+"_container"),mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")],draggable,dragY,dragX,touchStartY,touchStartX,touchMoveY=[],touchMoveX=[],startTime,runningTime,endTime,distance,speed,amount,durA=0,durB,overwrite=o.axis==="yx"?"none":"all",touchIntent=[],touchDrag,docDrag,iframe=mCSB_container.find("iframe"),events=["touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace,"touchmove."+namespace+" pointermove."+namespace+" MSPointerMove."+namespace,"touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace],touchAction=document.body.style.touchAction!==undefined&&document.body.style.touchAction!=="";mCSB_container.bind(events[0],function(e){_onTouchstart(e)}).bind(events[1],function(e){_onTouchmove(e)});mCustomScrollBox.bind(events[0],function(e){_onTouchstart2(e)}).bind(events[2],function(e){_onTouchend(e)});if(iframe.length){iframe.each(function(){$(this).bind("load",function(){if(_canAccessIFrame(this)){$(this.contentDocument||this.contentWindow.document).bind(events[0],function(e){_onTouchstart(e);_onTouchstart2(e)}).bind(events[1],function(e){_onTouchmove(e)}).bind(events[2],function(e){_onTouchend(e)})}})})}
function _onTouchstart(e){if(!_pointerTouch(e)||touchActive||_coordinates(e)[2]){touchable=0;return}
touchable=1;touchDrag=0;docDrag=0;draggable=1;$this.removeClass("mCS_touch_action");var offset=mCSB_container.offset();dragY=_coordinates(e)[0]-offset.top;dragX=_coordinates(e)[1]-offset.left;touchIntent=[_coordinates(e)[0],_coordinates(e)[1]]}
function _onTouchmove(e){if(!_pointerTouch(e)||touchActive||_coordinates(e)[2]){return}
if(!o.documentTouchScroll){e.preventDefault()}
e.stopImmediatePropagation();if(docDrag&&!touchDrag){return}
if(draggable){runningTime=_getTime();var offset=mCustomScrollBox.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left,easing="mcsLinearOut";touchMoveY.push(y);touchMoveX.push(x);touchIntent[2]=Math.abs(_coordinates(e)[0]-touchIntent[0]);touchIntent[3]=Math.abs(_coordinates(e)[1]-touchIntent[1]);if(d.overflowed[0]){var limit=mCSB_dragger[0].parent().height()-mCSB_dragger[0].height(),prevent=((dragY-y)>0&&(y-dragY)>-(limit*d.scrollRatio.y)&&(touchIntent[3]*2<touchIntent[2]||o.axis==="yx"))}
if(d.overflowed[1]){var limitX=mCSB_dragger[1].parent().width()-mCSB_dragger[1].width(),preventX=((dragX-x)>0&&(x-dragX)>-(limitX*d.scrollRatio.x)&&(touchIntent[2]*2<touchIntent[3]||o.axis==="yx"))}
if(prevent||preventX){if(!touchAction){e.preventDefault()}
touchDrag=1}else{docDrag=1;$this.addClass("mCS_touch_action")}
if(touchAction){e.preventDefault()}
amount=o.axis==="yx"?[(dragY-y),(dragX-x)]:o.axis==="x"?[null,(dragX-x)]:[(dragY-y),null];mCSB_container[0].idleTimer=250;if(d.overflowed[0]){_drag(amount[0],durA,easing,"y","all",!0)}
if(d.overflowed[1]){_drag(amount[1],durA,easing,"x",overwrite,!0)}}}
function _onTouchstart2(e){if(!_pointerTouch(e)||touchActive||_coordinates(e)[2]){touchable=0;return}
touchable=1;e.stopImmediatePropagation();_stop($this);startTime=_getTime();var offset=mCustomScrollBox.offset();touchStartY=_coordinates(e)[0]-offset.top;touchStartX=_coordinates(e)[1]-offset.left;touchMoveY=[];touchMoveX=[]}
function _onTouchend(e){if(!_pointerTouch(e)||touchActive||_coordinates(e)[2]){return}
draggable=0;e.stopImmediatePropagation();touchDrag=0;docDrag=0;endTime=_getTime();var offset=mCustomScrollBox.offset(),y=_coordinates(e)[0]-offset.top,x=_coordinates(e)[1]-offset.left;if((endTime-runningTime)>30){return}
speed=1000/(endTime-startTime);var easing="mcsEaseOut",slow=speed<2.5,diff=slow?[touchMoveY[touchMoveY.length-2],touchMoveX[touchMoveX.length-2]]:[0,0];distance=slow?[(y-diff[0]),(x-diff[1])]:[y-touchStartY,x-touchStartX];var absDistance=[Math.abs(distance[0]),Math.abs(distance[1])];speed=slow?[Math.abs(distance[0]/4),Math.abs(distance[1]/4)]:[speed,speed];var a=[Math.abs(mCSB_container[0].offsetTop)-(distance[0]*_m((absDistance[0]/speed[0]),speed[0])),Math.abs(mCSB_container[0].offsetLeft)-(distance[1]*_m((absDistance[1]/speed[1]),speed[1]))];amount=o.axis==="yx"?[a[0],a[1]]:o.axis==="x"?[null,a[1]]:[a[0],null];durB=[(absDistance[0]*4)+o.scrollInertia,(absDistance[1]*4)+o.scrollInertia];var md=parseInt(o.contentTouchScroll)||0;amount[0]=absDistance[0]>md?amount[0]:0;amount[1]=absDistance[1]>md?amount[1]:0;if(d.overflowed[0]){_drag(amount[0],durB[0],easing,"y",overwrite,!1)}
if(d.overflowed[1]){_drag(amount[1],durB[1],easing,"x",overwrite,!1)}}
function _m(ds,s){var r=[s*1.5,s*2,s/1.5,s/2];if(ds>90){return s>4?r[0]:r[3]}else if(ds>60){return s>3?r[3]:r[2]}else if(ds>30){return s>8?r[1]:s>6?r[0]:s>4?s:r[2]}else{return s>8?s:r[3]}}
function _drag(amount,dur,easing,dir,overwrite,drag){if(!amount){return}
_scrollTo($this,amount.toString(),{dur:dur,scrollEasing:easing,dir:dir,overwrite:overwrite,drag:drag})}},_selectable=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,seq=d.sequential,namespace=pluginPfx+"_"+d.idx,mCSB_container=$("#mCSB_"+d.idx+"_container"),wrapper=mCSB_container.parent(),action;mCSB_container.bind("mousedown."+namespace,function(e){if(touchable){return}
if(!action){action=1;touchActive=!0}}).add(document).bind("mousemove."+namespace,function(e){if(!touchable&&action&&_sel()){var offset=mCSB_container.offset(),y=_coordinates(e)[0]-offset.top+mCSB_container[0].offsetTop,x=_coordinates(e)[1]-offset.left+mCSB_container[0].offsetLeft;if(y>0&&y<wrapper.height()&&x>0&&x<wrapper.width()){if(seq.step){_seq("off",null,"stepped")}}else{if(o.axis!=="x"&&d.overflowed[0]){if(y<0){_seq("on",38)}else if(y>wrapper.height()){_seq("on",40)}}
if(o.axis!=="y"&&d.overflowed[1]){if(x<0){_seq("on",37)}else if(x>wrapper.width()){_seq("on",39)}}}}}).bind("mouseup."+namespace+" dragend."+namespace,function(e){if(touchable){return}
if(action){action=0;_seq("off",null)}
touchActive=!1});function _sel(){return window.getSelection?window.getSelection().toString():document.selection&&document.selection.type!="Control"?document.selection.createRange().text:0}
function _seq(a,c,s){seq.type=s&&action?"stepped":"stepless";seq.scrollAmount=10;_sequentialScroll($this,a,c,"mcsLinearOut",s?60:null)}},_mousewheel=function(){if(!$(this).data(pluginPfx)){return}
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,namespace=pluginPfx+"_"+d.idx,mCustomScrollBox=$("#mCSB_"+d.idx),mCSB_dragger=[$("#mCSB_"+d.idx+"_dragger_vertical"),$("#mCSB_"+d.idx+"_dragger_horizontal")],iframe=$("#mCSB_"+d.idx+"_container").find("iframe");if(iframe.length){iframe.each(function(){$(this).bind("load",function(){if(_canAccessIFrame(this)){$(this.contentDocument||this.contentWindow.document).bind("mousewheel."+namespace,function(e,delta){_onMousewheel(e,delta)})}})})}
mCustomScrollBox.bind("mousewheel."+namespace,function(e,delta){_onMousewheel(e,delta)});function _onMousewheel(e,delta){_stop($this);if(_disableMousewheel($this,e.target)){return}
var deltaFactor=o.mouseWheel.deltaFactor!=="auto"?parseInt(o.mouseWheel.deltaFactor):(oldIE&&e.deltaFactor<100)?100:e.deltaFactor||100,dur=o.scrollInertia;if(o.axis==="x"||o.mouseWheel.axis==="x"){var dir="x",px=[Math.round(deltaFactor*d.scrollRatio.x),parseInt(o.mouseWheel.scrollAmount)],amount=o.mouseWheel.scrollAmount!=="auto"?px[1]:px[0]>=mCustomScrollBox.width()?mCustomScrollBox.width()*0.9:px[0],contentPos=Math.abs($("#mCSB_"+d.idx+"_container")[0].offsetLeft),draggerPos=mCSB_dragger[1][0].offsetLeft,limit=mCSB_dragger[1].parent().width()-mCSB_dragger[1].width(),dlt=o.mouseWheel.axis==="y"?(e.deltaY||delta):e.deltaX}else{var dir="y",px=[Math.round(deltaFactor*d.scrollRatio.y),parseInt(o.mouseWheel.scrollAmount)],amount=o.mouseWheel.scrollAmount!=="auto"?px[1]:px[0]>=mCustomScrollBox.height()?mCustomScrollBox.height()*0.9:px[0],contentPos=Math.abs($("#mCSB_"+d.idx+"_container")[0].offsetTop),draggerPos=mCSB_dragger[0][0].offsetTop,limit=mCSB_dragger[0].parent().height()-mCSB_dragger[0].height(),dlt=e.deltaY||delta}
if((dir==="y"&&!d.overflowed[0])||(dir==="x"&&!d.overflowed[1])){return}
if(o.mouseWheel.invert||e.webkitDirectionInvertedFromDevice){dlt=-dlt}
if(o.mouseWheel.normalizeDelta){dlt=dlt<0?-1:1}
if((dlt>0&&draggerPos!==0)||(dlt<0&&draggerPos!==limit)||o.mouseWheel.preventDefault){e.stopImmediatePropagation();e.preventDefault()}
if(e.deltaFactor<5&&!o.mouseWheel.normalizeDelta){amount=e.deltaFactor;dur=17}
_scrollTo($this,(contentPos-(dlt*amount)).toString(),{dir:dir,dur:dur})}},_canAccessIFrameCache=new Object(),_canAccessIFrame=function(iframe){var result=!1,cacheKey=!1,html=null;if(iframe===undefined){cacheKey="#empty"}else if($(iframe).attr("id")!==undefined){cacheKey=$(iframe).attr("id")}
if(cacheKey!==!1&&_canAccessIFrameCache[cacheKey]!==undefined){return _canAccessIFrameCache[cacheKey]}
if(!iframe){try{var doc=top.document;html=doc.body.innerHTML}catch(err){}
result=(html!==null)}else{try{var doc=iframe.contentDocument||iframe.contentWindow.document;html=doc.body.innerHTML}catch(err){}
result=(html!==null)}
if(cacheKey!==!1){_canAccessIFrameCache[cacheKey]=result}
return result},_iframe=function(evt){var el=this.find("iframe");if(!el.length){return}
var val=!evt?"none":"auto";el.css("pointer-events",val)},_disableMousewheel=function(el,target){var tag=target.nodeName.toLowerCase(),tags=el.data(pluginPfx).opt.mouseWheel.disableOver,focusTags=["select","textarea"];return $.inArray(tag,tags)>-1&&!($.inArray(tag,focusTags)>-1&&!$(target).is(":focus"))},_draggerRail=function(){var $this=$(this),d=$this.data(pluginPfx),namespace=pluginPfx+"_"+d.idx,mCSB_container=$("#mCSB_"+d.idx+"_container"),wrapper=mCSB_container.parent(),mCSB_draggerContainer=$(".mCSB_"+d.idx+"_scrollbar ."+classes[12]),clickable;mCSB_draggerContainer.bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace,function(e){touchActive=!0;if(!$(e.target).hasClass("mCSB_dragger")){clickable=1}}).bind("touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace,function(e){touchActive=!1}).bind("click."+namespace,function(e){if(!clickable){return}
clickable=0;if($(e.target).hasClass(classes[12])||$(e.target).hasClass("mCSB_draggerRail")){_stop($this);var el=$(this),mCSB_dragger=el.find(".mCSB_dragger");if(el.parent(".mCSB_scrollTools_horizontal").length>0){if(!d.overflowed[1]){return}
var dir="x",clickDir=e.pageX>mCSB_dragger.offset().left?-1:1,to=Math.abs(mCSB_container[0].offsetLeft)-(clickDir*(wrapper.width()*0.9))}else{if(!d.overflowed[0]){return}
var dir="y",clickDir=e.pageY>mCSB_dragger.offset().top?-1:1,to=Math.abs(mCSB_container[0].offsetTop)-(clickDir*(wrapper.height()*0.9))}
_scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"})}})},_focus=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,namespace=pluginPfx+"_"+d.idx,mCSB_container=$("#mCSB_"+d.idx+"_container"),wrapper=mCSB_container.parent();mCSB_container.bind("focusin."+namespace,function(e){var el=$(document.activeElement),nested=mCSB_container.find(".mCustomScrollBox").length,dur=0;if(!el.is(o.advanced.autoScrollOnFocus)){return}
_stop($this);clearTimeout($this[0]._focusTimeout);$this[0]._focusTimer=nested?(dur+17)*nested:0;$this[0]._focusTimeout=setTimeout(function(){var to=[_childPos(el)[0],_childPos(el)[1]],contentPos=[mCSB_container[0].offsetTop,mCSB_container[0].offsetLeft],isVisible=[(contentPos[0]+to[0]>=0&&contentPos[0]+to[0]<wrapper.height()-el.outerHeight(!1)),(contentPos[1]+to[1]>=0&&contentPos[0]+to[1]<wrapper.width()-el.outerWidth(!1))],overwrite=(o.axis==="yx"&&!isVisible[0]&&!isVisible[1])?"none":"all";if(o.axis!=="x"&&!isVisible[0]){_scrollTo($this,to[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:overwrite,dur:dur})}
if(o.axis!=="y"&&!isVisible[1]){_scrollTo($this,to[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:overwrite,dur:dur})}},$this[0]._focusTimer)})},_wrapperScroll=function(){var $this=$(this),d=$this.data(pluginPfx),namespace=pluginPfx+"_"+d.idx,wrapper=$("#mCSB_"+d.idx+"_container").parent();wrapper.bind("scroll."+namespace,function(e){if(wrapper.scrollTop()!==0||wrapper.scrollLeft()!==0){$(".mCSB_"+d.idx+"_scrollbar").css("visibility","hidden")}})},_buttons=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,seq=d.sequential,namespace=pluginPfx+"_"+d.idx,sel=".mCSB_"+d.idx+"_scrollbar",btn=$(sel+">a");btn.bind("contextmenu."+namespace,function(e){e.preventDefault()}).bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace+" mouseup."+namespace+" touchend."+namespace+" pointerup."+namespace+" MSPointerUp."+namespace+" mouseout."+namespace+" pointerout."+namespace+" MSPointerOut."+namespace+" click."+namespace,function(e){e.preventDefault();if(!_mouseBtnLeft(e)){return}
var btnClass=$(this).attr("class");seq.type=o.scrollButtons.scrollType;switch(e.type){case "mousedown":case "touchstart":case "pointerdown":case "MSPointerDown":if(seq.type==="stepped"){return}
touchActive=!0;d.tweenRunning=!1;_seq("on",btnClass);break;case "mouseup":case "touchend":case "pointerup":case "MSPointerUp":case "mouseout":case "pointerout":case "MSPointerOut":if(seq.type==="stepped"){return}
touchActive=!1;if(seq.dir){_seq("off",btnClass)}
break;case "click":if(seq.type!=="stepped"||d.tweenRunning){return}
_seq("on",btnClass);break}
function _seq(a,c){seq.scrollAmount=o.scrollButtons.scrollAmount;_sequentialScroll($this,a,c)}})},_keyboard=function(){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,seq=d.sequential,namespace=pluginPfx+"_"+d.idx,mCustomScrollBox=$("#mCSB_"+d.idx),mCSB_container=$("#mCSB_"+d.idx+"_container"),wrapper=mCSB_container.parent(),editables="input,textarea,select,datalist,keygen,[contenteditable='true']",iframe=mCSB_container.find("iframe"),events=["blur."+namespace+" keydown."+namespace+" keyup."+namespace];if(iframe.length){iframe.each(function(){$(this).bind("load",function(){if(_canAccessIFrame(this)){$(this.contentDocument||this.contentWindow.document).bind(events[0],function(e){_onKeyboard(e)})}})})}
mCustomScrollBox.attr("tabindex","0").bind(events[0],function(e){_onKeyboard(e)});function _onKeyboard(e){switch(e.type){case "blur":if(d.tweenRunning&&seq.dir){_seq("off",null)}
break;case "keydown":case "keyup":var code=e.keyCode?e.keyCode:e.which,action="on";if((o.axis!=="x"&&(code===38||code===40))||(o.axis!=="y"&&(code===37||code===39))){if(((code===38||code===40)&&!d.overflowed[0])||((code===37||code===39)&&!d.overflowed[1])){return}
if(e.type==="keyup"){action="off"}
if(!$(document.activeElement).is(editables)){e.preventDefault();e.stopImmediatePropagation();_seq(action,code)}}else if(code===33||code===34){if(d.overflowed[0]||d.overflowed[1]){e.preventDefault();e.stopImmediatePropagation()}
if(e.type==="keyup"){_stop($this);var keyboardDir=code===34?-1:1;if(o.axis==="x"||(o.axis==="yx"&&d.overflowed[1]&&!d.overflowed[0])){var dir="x",to=Math.abs(mCSB_container[0].offsetLeft)-(keyboardDir*(wrapper.width()*0.9))}else{var dir="y",to=Math.abs(mCSB_container[0].offsetTop)-(keyboardDir*(wrapper.height()*0.9))}
_scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"})}}else if(code===35||code===36){if(!$(document.activeElement).is(editables)){if(d.overflowed[0]||d.overflowed[1]){e.preventDefault();e.stopImmediatePropagation()}
if(e.type==="keyup"){if(o.axis==="x"||(o.axis==="yx"&&d.overflowed[1]&&!d.overflowed[0])){var dir="x",to=code===35?Math.abs(wrapper.width()-mCSB_container.outerWidth(!1)):0}else{var dir="y",to=code===35?Math.abs(wrapper.height()-mCSB_container.outerHeight(!1)):0}
_scrollTo($this,to.toString(),{dir:dir,scrollEasing:"mcsEaseInOut"})}}}
break}
function _seq(a,c){seq.type=o.keyboard.scrollType;seq.scrollAmount=o.keyboard.scrollAmount;if(seq.type==="stepped"&&d.tweenRunning){return}
_sequentialScroll($this,a,c)}}},_sequentialScroll=function(el,action,trigger,e,s){var d=el.data(pluginPfx),o=d.opt,seq=d.sequential,mCSB_container=$("#mCSB_"+d.idx+"_container"),once=seq.type==="stepped"?!0:!1,steplessSpeed=o.scrollInertia<26?26:o.scrollInertia,steppedSpeed=o.scrollInertia<1?17:o.scrollInertia;switch(action){case "on":seq.dir=[(trigger===classes[16]||trigger===classes[15]||trigger===39||trigger===37?"x":"y"),(trigger===classes[13]||trigger===classes[15]||trigger===38||trigger===37?-1:1)];_stop(el);if(_isNumeric(trigger)&&seq.type==="stepped"){return}
_on(once);break;case "off":_off();if(once||(d.tweenRunning&&seq.dir)){_on(!0)}
break}
function _on(once){if(o.snapAmount){seq.scrollAmount=!(o.snapAmount instanceof Array)?o.snapAmount:seq.dir[0]==="x"?o.snapAmount[1]:o.snapAmount[0]}
var c=seq.type!=="stepped",t=s?s:!once?1000/60:c?steplessSpeed/1.5:steppedSpeed,m=!once?2.5:c?7.5:40,contentPos=[Math.abs(mCSB_container[0].offsetTop),Math.abs(mCSB_container[0].offsetLeft)],ratio=[d.scrollRatio.y>10?10:d.scrollRatio.y,d.scrollRatio.x>10?10:d.scrollRatio.x],amount=seq.dir[0]==="x"?contentPos[1]+(seq.dir[1]*(ratio[1]*m)):contentPos[0]+(seq.dir[1]*(ratio[0]*m)),px=seq.dir[0]==="x"?contentPos[1]+(seq.dir[1]*parseInt(seq.scrollAmount)):contentPos[0]+(seq.dir[1]*parseInt(seq.scrollAmount)),to=seq.scrollAmount!=="auto"?px:amount,easing=e?e:!once?"mcsLinear":c?"mcsLinearOut":"mcsEaseInOut",onComplete=!once?!1:!0;if(once&&t<17){to=seq.dir[0]==="x"?contentPos[1]:contentPos[0]}
_scrollTo(el,to.toString(),{dir:seq.dir[0],scrollEasing:easing,dur:t,onComplete:onComplete});if(once){seq.dir=!1;return}
clearTimeout(seq.step);seq.step=setTimeout(function(){_on()},t)}
function _off(){clearTimeout(seq.step);_delete(seq,"step");_stop(el)}},_arr=function(val){var o=$(this).data(pluginPfx).opt,vals=[];if(typeof val==="function"){val=val()}
if(!(val instanceof Array)){vals[0]=val.y?val.y:val.x||o.axis==="x"?null:val;vals[1]=val.x?val.x:val.y||o.axis==="y"?null:val}else{vals=val.length>1?[val[0],val[1]]:o.axis==="x"?[null,val[0]]:[val[0],null]}
if(typeof vals[0]==="function"){vals[0]=vals[0]()}
if(typeof vals[1]==="function"){vals[1]=vals[1]()}
return vals},_to=function(val,dir){if(val==null||typeof val=="undefined"){return}
var $this=$(this),d=$this.data(pluginPfx),o=d.opt,mCSB_container=$("#mCSB_"+d.idx+"_container"),wrapper=mCSB_container.parent(),t=typeof val;if(!dir){dir=o.axis==="x"?"x":"y"}
var contentLength=dir==="x"?mCSB_container.outerWidth(!1)-wrapper.width():mCSB_container.outerHeight(!1)-wrapper.height(),contentPos=dir==="x"?mCSB_container[0].offsetLeft:mCSB_container[0].offsetTop,cssProp=dir==="x"?"left":"top";switch(t){case "function":return val();break;case "object":var obj=val.jquery?val:$(val);if(!obj.length){return}
return dir==="x"?_childPos(obj)[1]:_childPos(obj)[0];break;case "string":case "number":if(_isNumeric(val)){return Math.abs(val)}else if(val.indexOf("%")!==-1){return Math.abs(contentLength*parseInt(val)/100)}else if(val.indexOf("-=")!==-1){return Math.abs(contentPos-parseInt(val.split("-=")[1]))}else if(val.indexOf("+=")!==-1){var p=(contentPos+parseInt(val.split("+=")[1]));return p>=0?0:Math.abs(p)}else if(val.indexOf("px")!==-1&&_isNumeric(val.split("px")[0])){return Math.abs(val.split("px")[0])}else{if(val==="top"||val==="left"){return 0}else if(val==="bottom"){return Math.abs(wrapper.height()-mCSB_container.outerHeight(!1))}else if(val==="right"){return Math.abs(wrapper.width()-mCSB_container.outerWidth(!1))}else if(val==="first"||val==="last"){var obj=mCSB_container.find(":"+val);return dir==="x"?_childPos(obj)[1]:_childPos(obj)[0]}else{if($(val).length){return dir==="x"?_childPos($(val))[1]:_childPos($(val))[0]}else{mCSB_container.css(cssProp,val);methods.update.call(null,$this[0]);return}}}
break}},_autoUpdate=function(rem){var $this=$(this),d=$this.data(pluginPfx),o=d.opt,mCSB_container=$("#mCSB_"+d.idx+"_container");if(rem){clearTimeout(mCSB_container[0].autoUpdate);_delete(mCSB_container[0],"autoUpdate");return}
upd();function upd(){clearTimeout(mCSB_container[0].autoUpdate);if($this.parents("html").length===0){$this=null;return}
mCSB_container[0].autoUpdate=setTimeout(function(){if(o.advanced.updateOnSelectorChange){d.poll.change.n=sizesSum();if(d.poll.change.n!==d.poll.change.o){d.poll.change.o=d.poll.change.n;doUpd(3);return}}
if(o.advanced.updateOnContentResize){d.poll.size.n=$this[0].scrollHeight+$this[0].scrollWidth+mCSB_container[0].offsetHeight+$this[0].offsetHeight+$this[0].offsetWidth;if(d.poll.size.n!==d.poll.size.o){d.poll.size.o=d.poll.size.n;doUpd(1);return}}
if(o.advanced.updateOnImageLoad){if(!(o.advanced.updateOnImageLoad==="auto"&&o.axis==="y")){d.poll.img.n=mCSB_container.find("img").length;if(d.poll.img.n!==d.poll.img.o){d.poll.img.o=d.poll.img.n;mCSB_container.find("img").each(function(){imgLoader(this)});return}}}
if(o.advanced.updateOnSelectorChange||o.advanced.updateOnContentResize||o.advanced.updateOnImageLoad){upd()}},o.advanced.autoUpdateTimeout)}
function imgLoader(el){if($(el).hasClass(classes[2])){doUpd();return}
var img=new Image();function createDelegate(contextObject,delegateMethod){return function(){return delegateMethod.apply(contextObject,arguments)}}
function imgOnLoad(){this.onload=null;$(el).addClass(classes[2]);doUpd(2)}
img.onload=createDelegate(img,imgOnLoad);img.src=el.src}
function sizesSum(){if(o.advanced.updateOnSelectorChange===!0){o.advanced.updateOnSelectorChange="*"}
var total=0,sel=mCSB_container.find(o.advanced.updateOnSelectorChange);if(o.advanced.updateOnSelectorChange&&sel.length>0){sel.each(function(){total+=this.offsetHeight+this.offsetWidth})}
return total}
function doUpd(cb){clearTimeout(mCSB_container[0].autoUpdate);methods.update.call(null,$this[0],cb)}},_snapAmount=function(to,amount,offset){return(Math.round(to/amount)*amount-offset)},_stop=function(el){var d=el.data(pluginPfx),sel=$("#mCSB_"+d.idx+"_container,#mCSB_"+d.idx+"_container_wrapper,#mCSB_"+d.idx+"_dragger_vertical,#mCSB_"+d.idx+"_dragger_horizontal");sel.each(function(){_stopTween.call(this)})},_scrollTo=function(el,to,options){var d=el.data(pluginPfx),o=d.opt,defaults={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:o.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},options=$.extend(defaults,options),dur=[options.dur,(options.drag?0:options.dur)],mCustomScrollBox=$("#mCSB_"+d.idx),mCSB_container=$("#mCSB_"+d.idx+"_container"),wrapper=mCSB_container.parent(),totalScrollOffsets=o.callbacks.onTotalScrollOffset?_arr.call(el,o.callbacks.onTotalScrollOffset):[0,0],totalScrollBackOffsets=o.callbacks.onTotalScrollBackOffset?_arr.call(el,o.callbacks.onTotalScrollBackOffset):[0,0];d.trigger=options.trigger;if(wrapper.scrollTop()!==0||wrapper.scrollLeft()!==0){$(".mCSB_"+d.idx+"_scrollbar").css("visibility","visible");wrapper.scrollTop(0).scrollLeft(0)}
if(to==="_resetY"&&!d.contentReset.y){if(_cb("onOverflowYNone")){o.callbacks.onOverflowYNone.call(el[0])}
d.contentReset.y=1}
if(to==="_resetX"&&!d.contentReset.x){if(_cb("onOverflowXNone")){o.callbacks.onOverflowXNone.call(el[0])}
d.contentReset.x=1}
if(to==="_resetY"||to==="_resetX"){return}
if((d.contentReset.y||!el[0].mcs)&&d.overflowed[0]){if(_cb("onOverflowY")){o.callbacks.onOverflowY.call(el[0])}
d.contentReset.x=null}
if((d.contentReset.x||!el[0].mcs)&&d.overflowed[1]){if(_cb("onOverflowX")){o.callbacks.onOverflowX.call(el[0])}
d.contentReset.x=null}
if(o.snapAmount){var snapAmount=!(o.snapAmount instanceof Array)?o.snapAmount:options.dir==="x"?o.snapAmount[1]:o.snapAmount[0];to=_snapAmount(to,snapAmount,o.snapOffset)}
switch(options.dir){case "x":var mCSB_dragger=$("#mCSB_"+d.idx+"_dragger_horizontal"),property="left",contentPos=mCSB_container[0].offsetLeft,limit=[mCustomScrollBox.width()-mCSB_container.outerWidth(!1),mCSB_dragger.parent().width()-mCSB_dragger.width()],scrollTo=[to,to===0?0:(to/d.scrollRatio.x)],tso=totalScrollOffsets[1],tsbo=totalScrollBackOffsets[1],totalScrollOffset=tso>0?tso/d.scrollRatio.x:0,totalScrollBackOffset=tsbo>0?tsbo/d.scrollRatio.x:0;break;case "y":var mCSB_dragger=$("#mCSB_"+d.idx+"_dragger_vertical"),property="top",contentPos=mCSB_container[0].offsetTop,limit=[mCustomScrollBox.height()-mCSB_container.outerHeight(!1),mCSB_dragger.parent().height()-mCSB_dragger.height()],scrollTo=[to,to===0?0:(to/d.scrollRatio.y)],tso=totalScrollOffsets[0],tsbo=totalScrollBackOffsets[0],totalScrollOffset=tso>0?tso/d.scrollRatio.y:0,totalScrollBackOffset=tsbo>0?tsbo/d.scrollRatio.y:0;break}
if(scrollTo[1]<0||(scrollTo[0]===0&&scrollTo[1]===0)){scrollTo=[0,0]}else if(scrollTo[1]>=limit[1]){scrollTo=[limit[0],limit[1]]}else{scrollTo[0]=-scrollTo[0]}
if(!el[0].mcs){_mcs();if(_cb("onInit")){o.callbacks.onInit.call(el[0])}}
clearTimeout(mCSB_container[0].onCompleteTimeout);_tweenTo(mCSB_dragger[0],property,Math.round(scrollTo[1]),dur[1],options.scrollEasing);if(!d.tweenRunning&&((contentPos===0&&scrollTo[0]>=0)||(contentPos===limit[0]&&scrollTo[0]<=limit[0]))){return}
_tweenTo(mCSB_container[0],property,Math.round(scrollTo[0]),dur[0],options.scrollEasing,options.overwrite,{onStart:function(){if(options.callbacks&&options.onStart&&!d.tweenRunning){if(_cb("onScrollStart")){_mcs();o.callbacks.onScrollStart.call(el[0])}
d.tweenRunning=!0;_onDragClasses(mCSB_dragger);d.cbOffsets=_cbOffsets()}},onUpdate:function(){if(options.callbacks&&options.onUpdate){if(_cb("whileScrolling")){_mcs();o.callbacks.whileScrolling.call(el[0])}}},onComplete:function(){if(options.callbacks&&options.onComplete){if(o.axis==="yx"){clearTimeout(mCSB_container[0].onCompleteTimeout)}
var t=mCSB_container[0].idleTimer||0;mCSB_container[0].onCompleteTimeout=setTimeout(function(){if(_cb("onScroll")){_mcs();o.callbacks.onScroll.call(el[0])}
if(_cb("onTotalScroll")&&scrollTo[1]>=limit[1]-totalScrollOffset&&d.cbOffsets[0]){_mcs();o.callbacks.onTotalScroll.call(el[0])}
if(_cb("onTotalScrollBack")&&scrollTo[1]<=totalScrollBackOffset&&d.cbOffsets[1]){_mcs();o.callbacks.onTotalScrollBack.call(el[0])}
d.tweenRunning=!1;mCSB_container[0].idleTimer=0;_onDragClasses(mCSB_dragger,"hide")},t)}}});function _cb(cb){return d&&o.callbacks[cb]&&typeof o.callbacks[cb]==="function"}
function _cbOffsets(){return[o.callbacks.alwaysTriggerOffsets||contentPos>=limit[0]+tso,o.callbacks.alwaysTriggerOffsets||contentPos<=-tsbo]}
function _mcs(){var cp=[mCSB_container[0].offsetTop,mCSB_container[0].offsetLeft],dp=[mCSB_dragger[0].offsetTop,mCSB_dragger[0].offsetLeft],cl=[mCSB_container.outerHeight(!1),mCSB_container.outerWidth(!1)],pl=[mCustomScrollBox.height(),mCustomScrollBox.width()];el[0].mcs={content:mCSB_container,top:cp[0],left:cp[1],draggerTop:dp[0],draggerLeft:dp[1],topPct:Math.round((100*Math.abs(cp[0]))/(Math.abs(cl[0])-pl[0])),leftPct:Math.round((100*Math.abs(cp[1]))/(Math.abs(cl[1])-pl[1])),direction:options.dir}}},_tweenTo=function(el,prop,to,duration,easing,overwrite,callbacks){if(!el._mTween){el._mTween={top:{},left:{}}}
var callbacks=callbacks||{},onStart=callbacks.onStart||function(){},onUpdate=callbacks.onUpdate||function(){},onComplete=callbacks.onComplete||function(){},startTime=_getTime(),_delay,progress=0,from=el.offsetTop,elStyle=el.style,_request,tobj=el._mTween[prop];if(prop==="left"){from=el.offsetLeft}
var diff=to-from;tobj.stop=0;if(overwrite!=="none"){_cancelTween()}
_startTween();function _step(){if(tobj.stop){return}
if(!progress){onStart.call()}
progress=_getTime()-startTime;_tween();if(progress>=tobj.time){tobj.time=(progress>tobj.time)?progress+_delay-(progress-tobj.time):progress+_delay-1;if(tobj.time<progress+1){tobj.time=progress+1}}
if(tobj.time<duration){tobj.id=_request(_step)}else{onComplete.call()}}
function _tween(){if(duration>0){tobj.currVal=_ease(tobj.time,from,diff,duration,easing);elStyle[prop]=Math.round(tobj.currVal)+"px"}else{elStyle[prop]=to+"px"}
onUpdate.call()}
function _startTween(){_delay=1000/60;tobj.time=progress+_delay;_request=(!window.requestAnimationFrame)?function(f){_tween();return setTimeout(f,0.01)}:window.requestAnimationFrame;tobj.id=_request(_step)}
function _cancelTween(){if(tobj.id==null){return}
if(!window.requestAnimationFrame){clearTimeout(tobj.id)}else{window.cancelAnimationFrame(tobj.id)}
tobj.id=null}
function _ease(t,b,c,d,type){switch(type){case "linear":case "mcsLinear":return c*t/d+b;break;case "mcsLinearOut":t/=d;t--;return c*Math.sqrt(1-t*t)+b;break;case "easeInOutSmooth":t/=d/2;if(t<1)return c/2*t*t+b;t--;return-c/2*(t*(t-2)-1)+b;break;case "easeInOutStrong":t/=d/2;if(t<1)return c/2*Math.pow(2,10*(t-1))+b;t--;return c/2*(-Math.pow(2,-10*t)+2)+b;break;case "easeInOut":case "mcsEaseInOut":t/=d/2;if(t<1)return c/2*t*t*t+b;t-=2;return c/2*(t*t*t+2)+b;break;case "easeOutSmooth":t/=d;t--;return-c*(t*t*t*t-1)+b;break;case "easeOutStrong":return c*(-Math.pow(2,-10*t/d)+1)+b;break;case "easeOut":case "mcsEaseOut":default:var ts=(t/=d)*t,tc=ts*t;return b+c*(0.499999999999997*tc*ts+ -2.5*ts*ts+5.5*tc+ -6.5*ts+4*t)}}},_getTime=function(){if(window.performance&&window.performance.now){return window.performance.now()}else{if(window.performance&&window.performance.webkitNow){return window.performance.webkitNow()}else{if(Date.now){return Date.now()}else{return new Date().getTime()}}}},_stopTween=function(){var el=this;if(!el._mTween){el._mTween={top:{},left:{}}}
var props=["top","left"];for(var i=0;i<props.length;i++){var prop=props[i];if(el._mTween[prop].id){if(!window.requestAnimationFrame){clearTimeout(el._mTween[prop].id)}else{window.cancelAnimationFrame(el._mTween[prop].id)}
el._mTween[prop].id=null;el._mTween[prop].stop=1}}},_delete=function(c,m){try{delete c[m]}catch(e){c[m]=null}},_mouseBtnLeft=function(e){return!(e.which&&e.which!==1)},_pointerTouch=function(e){var t=e.originalEvent.pointerType;return!(t&&t!=="touch"&&t!==2)},_isNumeric=function(val){return!isNaN(parseFloat(val))&&isFinite(val)},_childPos=function(el){var p=el.parents(".mCSB_container");return[el.offset().top-p.offset().top,el.offset().left-p.offset().left]},_isTabHidden=function(){var prop=_getHiddenProp();if(!prop)return!1;return document[prop];function _getHiddenProp(){var pfx=["webkit","moz","ms","o"];if("hidden" in document)return"hidden";for(var i=0;i<pfx.length;i++){if((pfx[i]+"Hidden")in document)
return pfx[i]+"Hidden"}
return null}};$.fn[pluginNS]=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1))}else if(typeof method==="object"||!method){return methods.init.apply(this,arguments)}else{$.error("Method "+method+" does not exist")}};$[pluginNS]=function(method){if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1))}else if(typeof method==="object"||!method){return methods.init.apply(this,arguments)}else{$.error("Method "+method+" does not exist")}};$[pluginNS].defaults=defaults;window[pluginNS]=!0;$(window).bind("load",function(){$(defaultSelector)[pluginNS]();$.extend($.expr[":"],{mcsInView:$.expr[":"].mcsInView||function(el){var $el=$(el),content=$el.parents(".mCSB_container"),wrapper,cPos;if(!content.length){return}
wrapper=content.parent();cPos=[content[0].offsetTop,content[0].offsetLeft];return cPos[0]+_childPos($el)[0]>=0&&cPos[0]+_childPos($el)[0]<wrapper.height()-$el.outerHeight(!1)&&cPos[1]+_childPos($el)[1]>=0&&cPos[1]+_childPos($el)[1]<wrapper.width()-$el.outerWidth(!1)},mcsInSight:$.expr[":"].mcsInSight||function(el,i,m){var $el=$(el),elD,content=$el.parents(".mCSB_container"),wrapperView,pos,wrapperViewPct,pctVals=m[3]==="exact"?[[1,0],[1,0]]:[[0.9,0.1],[0.6,0.4]];if(!content.length){return}
elD=[$el.outerHeight(!1),$el.outerWidth(!1)];pos=[content[0].offsetTop+_childPos($el)[0],content[0].offsetLeft+_childPos($el)[1]];wrapperView=[content.parent()[0].offsetHeight,content.parent()[0].offsetWidth];wrapperViewPct=[elD[0]<wrapperView[0]?pctVals[0]:pctVals[1],elD[1]<wrapperView[1]?pctVals[0]:pctVals[1]];return pos[0]-(wrapperView[0]*wrapperViewPct[0][0])<0&&pos[0]+elD[0]-(wrapperView[0]*wrapperViewPct[0][1])>=0&&pos[1]-(wrapperView[1]*wrapperViewPct[1][0])<0&&pos[1]+elD[1]-(wrapperView[1]*wrapperViewPct[1][1])>=0},mcsOverflow:$.expr[":"].mcsOverflow||function(el){var d=$(el).data(pluginPfx);if(!d){return}
return d.overflowed[0]||d.overflowed[1]}})})}))}));/**
 * 2007-2017 Leotheme
 *
 * NOTICE OF LICENSE
 *
 * Leo feature for prestashop 1.7: ajax cart, review, compare, wishlist at product list 
 *
 * DISCLAIMER
 *
 *  @Module Name: Leo Feature
 *  @author    leotheme <leotheme@gmail.com>
 *  @copyright 2007-2018 Leotheme
 *  @license   http://leotheme.com - prestashop template provider
 */
$(document).ready(function(){createLeoCompareModalPopup();LeoCompareButtonAction();prestashop.on('updateProductList',function(){LeoCompareButtonAction()});prestashop.on('updatedProduct',function(){LeoCompareButtonAction()});prestashop.on('clickQuickView',function(){check_active_compare=setInterval(function(){if($('.quickview.modal').length){$('.quickview.modal').on('shown.bs.modal',function(e){LeoCompareButtonAction()})
clearInterval(check_active_compare)}},300)});activeEventModalCompare()});function createLeoCompareModalPopup(){var leoCompareModalPopup='';leoCompareModalPopup+='<div class="modal leo-modal leo-modal-compare fade" tabindex="-1" role="dialog" aria-hidden="true">';leoCompareModalPopup+='<div class="modal-dialog" role="document">';leoCompareModalPopup+='<div class="modal-content">';leoCompareModalPopup+='<div class="modal-header">';leoCompareModalPopup+='<button type="button" class="close" data-dismiss="modal" aria-label="Close">';leoCompareModalPopup+='<span aria-hidden="true">&times;</span>';leoCompareModalPopup+='</button>';leoCompareModalPopup+='<h5 class="modal-title text-xs-center">';leoCompareModalPopup+='</h5>';leoCompareModalPopup+='</div>';leoCompareModalPopup+='</div>';leoCompareModalPopup+='</div>';leoCompareModalPopup+='</div>';$('body').append(leoCompareModalPopup)}
function LeoCompareButtonAction(){$('.leo-compare-button').click(function(){if(!$('.leo-compare-button.active').length){var total_product_compare=compared_products.length;var id_product=$(this).data('id-product');var content_product_compare_mess_remove=productcompare_remove+'. <a href="'+productcompare_url+'" target="_blank"><strong>'+productcompare_viewlistcompare+'.</strong></a>';var content_product_compare_mess_add=productcompare_add+'. <a href="'+productcompare_url+'" target="_blank"><strong>'+productcompare_viewlistcompare+'.</strong></a>';var content_product_compare_mess_max=productcompare_max_item+'. <a href="'+productcompare_url+'" target="_blank"><strong>'+productcompare_viewlistcompare+'.</strong></a>';$(this).addClass('active');$(this).find('.leo-compare-bt-loading').css({'display':'block'});$(this).find('.leo-compare-bt-content').hide();var object_e=$(this);if($(this).hasClass('added')||$(this).hasClass('delete')){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:productcompare_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"remove","id_product":id_product,"token":leo_token},success:function(result){if(result==1){if($('.ap-btn-compare .ap-total-compare').length){var old_num_compare=parseInt($('.ap-btn-compare .ap-total-compare').data('compare-total'));var new_num_compare=old_num_compare-1;$('.ap-btn-compare .ap-total-compare').data('compare-total',new_num_compare);$('.ap-btn-compare .ap-total-compare').text(new_num_compare)}
compared_products.splice($.inArray(parseInt(id_product),compared_products),1);if(object_e.hasClass('delete')){if($('.leo-productscompare-item').length==1){window.location.replace(productcompare_url)}else{$('td.product-'+id_product).fadeOut(function(){$(this).remove()})}}else{$('.leo-modal-compare .modal-title').html(content_product_compare_mess_remove);$('.leo-modal-compare').modal('show');$('.leo-compare-button[data-id-product='+id_product+']').removeClass('added');$('.leo-compare-button[data-id-product='+id_product+']').attr('title',buttoncompare_title_add);$('.leo-compare-button[data-id-product='+id_product+'] .name-btn-product').html(buttoncompare_title_add)}}else{$('.leo-modal-compare .modal-title').html(productcompare_remove_error);$('.leo-modal-compare').modal('show')}
object_e.find('.leo-compare-bt-loading').hide();object_e.find('.leo-compare-bt-content').show()},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}else{if(total_product_compare<comparator_max_item){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:productcompare_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"add","id_product":id_product,"token":leo_token,},success:function(result){if(result==1){$('.leo-modal-compare .modal-title').html(content_product_compare_mess_add);$('.leo-modal-compare').modal('show');if($('.ap-btn-compare .ap-total-compare').length){var old_num_compare=parseInt($('.ap-btn-compare .ap-total-compare').data('compare-total'));var new_num_compare=old_num_compare+1;$('.ap-btn-compare .ap-total-compare').data('compare-total',new_num_compare);$('.ap-btn-compare .ap-total-compare').text(new_num_compare)}
compared_products.push(id_product);$('.leo-compare-button[data-id-product='+id_product+']').addClass('added');$('.leo-compare-button[data-id-product='+id_product+']').attr('title',buttoncompare_title_remove);$('.leo-compare-button[data-id-product='+id_product+'] .name-btn-product').html(buttoncompare_title_remove)}else{$('.leo-modal-compare .modal-title').html(productcompare_add_error);$('.leo-modal-compare').modal('show')}
object_e.find('.leo-compare-bt-loading').hide();object_e.find('.leo-compare-bt-content').show()},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}else{$('.leo-modal-compare .modal-title').html(content_product_compare_mess_max);$('.leo-modal-compare').modal('show');object_e.find('.leo-compare-bt-loading').hide();object_e.find('.leo-compare-bt-content').show()}}}
return!1})}
function activeEventModalCompare(){$('.leo-modal-compare').on('hide.bs.modal',function(e){if($('.leo-compare-button.active').length){$('.leo-compare-button.active').removeClass('active')}})
$('.leo-modal-compare').on('hidden.bs.modal',function(e){$('body').css('padding-right','')})
$('.leo-modal-compare').on('shown.bs.modal',function(e){if($('.quickview.modal').length){$('.quickview.modal').modal('hide')}})};/**
 * 2007-2017 Leotheme
 *
 * NOTICE OF LICENSE
 *
 * Leo feature for prestashop 1.7: ajax cart, review, compare, wishlist at product list 
 *
 * DISCLAIMER
 *
 *  @Module Name: Leo Feature
 *  @author    leotheme <leotheme@gmail.com>
 *  @copyright 2007-2018 Leotheme
 *  @license   http://leotheme.com - prestashop template provider
 */
$(document).ready(function(){createLeoWishlistModalPopup();LeoWishlistButtonAction();prestashop.on('updateProductList',function(){LeoWishlistButtonAction()});prestashop.on('updatedProduct',function(){LeoWishlistButtonAction()});prestashop.on('clickQuickView',function(){check_active_wishlist=setInterval(function(){if($('.quickview.modal').length){$('.quickview.modal').on('shown.bs.modal',function(e){LeoWishlistButtonAction()})
clearInterval(check_active_wishlist)}},300)});activeEventModalWishlist();LeoListWishlistAction();$('.leo-save-wishlist-bt').click(function(){if(!$(this).hasClass('active')){$(this).addClass('active');$('.new-wishlist .has-danger .form-control-feedback').html('');$('.new-wishlist .has-success .form-control-feedback').html('');var name_wishlist=$.trim($('#wishlist_name').val());if(!name_wishlist){$('#wishlist_name').parent().addClass('has-error');$(this).removeClass('active')}else{var object_e=$(this);$('#wishlist_name').parent().removeClass('has-error');$('.leo-save-wishlist-bt-text').hide();$('.leo-save-wishlist-loading').css({'display':'block'});$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"add-wishlist","name_wishlist":name_wishlist,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.new-wishlist .has-success .form-control-feedback').html('');$('.new-wishlist .has-danger .form-control-feedback').html(object_result.errors).fadeIn()}else{$('.new-wishlist .has-danger .form-control-feedback').html('');$('.new-wishlist .has-success .form-control-feedback').html(object_result.result.message).fadeIn();setTimeout(function(){$('.new-wishlist .has-success .form-control-feedback').fadeOut()},3000);$('#wishlist_name').val('');$('.list-wishlist table tbody').append(object_result.result.wishlist);$('html, body').animate({scrollTop:$('.list-wishlist table tr.new').offset().top},500,function(){$('.list-wishlist table tr.new').removeClass('new')});LeoListWishlistAction();$('.list-wishlist tr.show .view-wishlist-product').trigger('click')}
$('.leo-save-wishlist-bt-text').show();$('.leo-save-wishlist-loading').hide();object_e.removeClass('active')},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}}
return!1})});function createLeoWishlistModalPopup(){var leoWishlistModalPopup='';leoWishlistModalPopup+='<div class="modal leo-modal leo-modal-wishlist fade" tabindex="-1" role="dialog" aria-hidden="true">';leoWishlistModalPopup+='<div class="modal-dialog" role="document">';leoWishlistModalPopup+='<div class="modal-content">';leoWishlistModalPopup+='<div class="modal-header">';leoWishlistModalPopup+='<button type="button" class="close" data-dismiss="modal" aria-label="Close">';leoWishlistModalPopup+='<span aria-hidden="true">&times;</span>';leoWishlistModalPopup+='</button>';leoWishlistModalPopup+='<h5 class="modal-title text-xs-center">';leoWishlistModalPopup+='</h5>';leoWishlistModalPopup+='</div>';leoWishlistModalPopup+='<div class="modal-footer">';leoWishlistModalPopup+='<button type="button" class="btn btn-secondary" data-dismiss="modal">'+wishlist_cancel_txt+'</button>';leoWishlistModalPopup+='<button type="button" class="leo-modal-wishlist-bt btn btn-primary">';leoWishlistModalPopup+='<span class="leo-modal-wishlist-loading cssload-speeding-wheel"></span>';leoWishlistModalPopup+='<span class="leo-modal-wishlist-bt-text">';leoWishlistModalPopup+=wishlist_ok_txt;leoWishlistModalPopup+='</span>';leoWishlistModalPopup+='</button>';leoWishlistModalPopup+='</div>';leoWishlistModalPopup+='</div>';leoWishlistModalPopup+='</div>';leoWishlistModalPopup+='</div>';$('body').append(leoWishlistModalPopup)}
function LeoWishlistButtonAction(){if(!$('.leo-wishlist-button').hasClass('show-list')){$('.leo-wishlist-button').click(function(){if(!$('.leo-wishlist-button.active').length){var id_product=$(this).data('id-product');var id_wishlist=$(this).data('id-wishlist');var id_product_attribute=$(this).data('id-product-attribute');var content_wishlist_mess_remove=wishlist_remove+'. <a href="'+wishlist_url+'" target="_blank"><strong>'+wishlist_viewwishlist+'.</strong></a>';var content_wishlist_mess_add=wishlist_add+'. <a href="'+wishlist_url+'" target="_blank"><strong>'+wishlist_viewwishlist+'.</strong></a>';$(this).addClass('active');if(!isLogged){$('.leo-modal-wishlist .modal-title').html(wishlist_loggin_required);$('.leo-modal-wishlist').modal('show');return!1}
var object_e=$(this);object_e.find('.leo-wishlist-bt-loading').css({'display':'block'});object_e.find('.leo-wishlist-bt-content').hide();if($(this).hasClass('added')||$(this).hasClass('delete')){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"remove","id_product":id_product,"id_wishlist":id_wishlist,"id_product_attribute":id_product_attribute,"quantity":1,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.leo-modal-wishlist .modal-title').html(object_result.errors);$('.leo-modal-wishlist').modal('show')}else{if($('.ap-btn-wishlist .ap-total-wishlist').length){var old_num_wishlist=parseInt($('.ap-btn-wishlist .ap-total-wishlist').data('wishlist-total'));var new_num_wishlist=old_num_wishlist-1;$('.ap-btn-wishlist .ap-total-wishlist').data('wishlist-total',new_num_wishlist);$('.ap-btn-wishlist .ap-total-wishlist').text(new_num_wishlist)}
if(object_e.hasClass('delete')){$('td.product-'+id_product).fadeOut(function(){$(this).remove()})}else{$('.leo-modal-wishlist .modal-title').html(content_wishlist_mess_remove);$('.leo-modal-wishlist').modal('show');$('.leo-wishlist-button[data-id-product='+id_product+']').removeClass('added');$('.leo-wishlist-button[data-id-product='+id_product+']').attr('title',buttonwishlist_title_add);object_e.find('.leo-wishlist-bt-loading').hide();object_e.find('.leo-wishlist-bt-content').show()}}},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}else{$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"add","id_product":id_product,"id_wishlist":id_wishlist,"id_product_attribute":id_product_attribute,"quantity":1,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.leo-modal-wishlist .modal-title').html(object_result.errors);$('.leo-modal-wishlist').modal('show')}else{$('.leo-modal-wishlist .modal-title').html(content_wishlist_mess_add);$('.leo-modal-wishlist').modal('show');if($('.ap-btn-wishlist .ap-total-wishlist').length){var old_num_wishlist=parseInt($('.ap-btn-wishlist .ap-total-wishlist').data('wishlist-total'));var new_num_wishlist=old_num_wishlist+1;$('.ap-btn-wishlist .ap-total-wishlist').data('wishlist-total',new_num_wishlist);$('.ap-btn-wishlist .ap-total-wishlist').text(new_num_wishlist)}
if(id_wishlist==''){$('.leo-wishlist-button').data('id-wishlist',object_result.result.id_wishlist)}
$('.leo-wishlist-button[data-id-product='+id_product+']').addClass('added');$('.leo-wishlist-button[data-id-product='+id_product+']').attr('title',buttonwishlist_title_remove);object_e.find('.leo-wishlist-bt-loading').hide();object_e.find('.leo-wishlist-bt-content').show()}},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}}
return!1})}else{$('.wishlist-item').click(function(){if(!$('.wishlist-item.active-add').length){var id_product=$(this).data('id-product');var id_wishlist=$(this).data('id-wishlist');var id_product_attribute=$(this).data('id-product-attribute');var content_wishlist_mess_remove=wishlist_remove+'. <a href="'+wishlist_url+'" target="_blank"><strong>'+wishlist_viewwishlist+'.</strong></a>';var content_wishlist_mess_add=wishlist_add+'. <a href="'+wishlist_url+'" target="_blank"><strong>'+wishlist_viewwishlist+'.</strong></a>';$(this).addClass('active-add');if(!isLogged){$('.leo-modal-wishlist .modal-title').html(wishlist_loggin_required);$('.leo-modal-wishlist').modal('show');return!1}
var object_e=$(this);var parents_e=object_e.parents('.leo-wishlist-button-dropdown');parents_e.find('.leo-wishlist-button').addClass('active');parents_e.find('.leo-wishlist-bt-loading').css({'display':'block'});parents_e.find('.leo-wishlist-bt-content').hide();if($(this).hasClass('added')||$(this).hasClass('delete')){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"remove","id_product":id_product,"id_wishlist":id_wishlist,"id_product_attribute":id_product_attribute,"quantity":1,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.leo-modal-wishlist .modal-title').html(object_result.errors);$('.leo-modal-wishlist').modal('show')}else{if($('.ap-btn-wishlist .ap-total-wishlist').length){var old_num_wishlist=parseInt($('.ap-btn-wishlist .ap-total-wishlist').data('wishlist-total'));var new_num_wishlist=old_num_wishlist-1;$('.ap-btn-wishlist .ap-total-wishlist').data('wishlist-total',new_num_wishlist);$('.ap-btn-wishlist .ap-total-wishlist').text(new_num_wishlist)}
if(object_e.hasClass('delete')){$('td.product-'+id_product).fadeOut(function(){$(this).remove()})}else{$('.leo-modal-wishlist .modal-title').html(content_wishlist_mess_remove);$('.leo-modal-wishlist').modal('show');$('.wishlist-item[data-id-wishlist='+id_wishlist+'][data-id-product='+id_product+']').removeClass('added');$('.wishlist-item[data-id-wishlist='+id_wishlist+'][data-id-product='+id_product+']').attr('title',buttonwishlist_title_add);if(!$('.wishlist-item[data-id-product='+id_product+']').hasClass('added')){$('.leo-wishlist-button[data-id-product='+id_product+']').removeClass('added')}
parents_e.find('.leo-wishlist-bt-loading').hide();parents_e.find('.leo-wishlist-bt-content').show();parents_e.find('.leo-wishlist-button').removeClass('active')}}},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}else{$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"add","id_product":id_product,"id_wishlist":id_wishlist,"id_product_attribute":id_product_attribute,"quantity":1,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.leo-modal-wishlist .modal-title').html(object_result.errors);$('.leo-modal-wishlist').modal('show')}else{$('.leo-modal-wishlist .modal-title').html(content_wishlist_mess_add);$('.leo-modal-wishlist').modal('show');if($('.ap-btn-wishlist .ap-total-wishlist').length){var old_num_wishlist=parseInt($('.ap-btn-wishlist .ap-total-wishlist').data('wishlist-total'));var new_num_wishlist=old_num_wishlist+1;$('.ap-btn-wishlist .ap-total-wishlist').data('wishlist-total',new_num_wishlist);$('.ap-btn-wishlist .ap-total-wishlist').text(new_num_wishlist)}
$('.wishlist-item[data-id-wishlist='+id_wishlist+'][data-id-product='+id_product+']').addClass('added');$('.wishlist-item[data-id-wishlist='+id_wishlist+'][data-id-product='+id_product+']').attr('title',buttonwishlist_title_remove);if(!$('.leo-wishlist-button[data-id-product='+id_product+']').hasClass('added')){$('.leo-wishlist-button[data-id-product='+id_product+']').addClass('added')}
parents_e.find('.leo-wishlist-bt-loading').hide();parents_e.find('.leo-wishlist-bt-content').show();parents_e.find('.leo-wishlist-button').removeClass('active')}},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}}
return!1})}}
function LeoListWishlistAction(){$('.delete-wishlist').click(function(){if(!$(this).hasClass('active')){$(this).addClass('active');$(this).parents('tr').addClass('active');if($('.list-wishlist tr.active .default-wishlist').is(":checked")){$('.leo-modal-wishlist .modal-title').html(wishlist_del_default_txt);$('.leo-modal-wishlist').removeClass('enable-action').modal('show')}else{$('.leo-modal-wishlist .modal-title').html(wishlist_confirm_del_txt);$('.leo-modal-wishlist').addClass('enable-action').modal('show')}}
return!1});$('.leo-modal-wishlist-bt').click(function(){if(!$(this).hasClass('active')){$(this).addClass('active');var object_e=$(this);var id_wishlist=$('.delete-wishlist.active').data('id-wishlist');$('.leo-modal-wishlist-bt-text').hide();$('.leo-modal-wishlist-loading').css({'display':'block'});$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"delete-wishlist","id_wishlist":id_wishlist,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.leo-modal-wishlist .modal-title').html(object_result.errors);$('.leo-modal-wishlist').removeClass('enable-action').modal('show')}else{var object_delete=$('.list-wishlist tr.active');$('.leo-modal-wishlist').modal('hide');object_delete.fadeOut(function(){if($(this).hasClass('show')){$('.leo-wishlist-product').fadeOut().html('')}else{$('.list-wishlist tr.show .view-wishlist-product').trigger('click')}
$(this).remove()})}
$('.leo-modal-wishlist-loading').hide();$('.leo-modal-wishlist-bt-text').show();object_e.removeClass('active')},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}})
$('.default-wishlist').click(function(){if($(this).is(":checked")){if(!$('.default-wishlist.active').length){$(this).addClass('active');var object_e=$(this);var id_wishlist=$('.default-wishlist.active').data('id-wishlist');$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"default-wishlist","id_wishlist":id_wishlist,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.leo-modal-wishlist .modal-title').html(object_result.errors);$('.leo-modal-wishlist').removeClass('enable-action').modal('show')}else{$('.default-wishlist:checked').removeAttr('checked');object_e.prop('checked',!0)}
object_e.removeClass('active')},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}}
return!1})
$('.view-wishlist-product').click(function(){if(!$('.view-wishlist-product.active').length){$(this).addClass('active');$(this).next('.leo-view-wishlist-product-loading').show();$('.list-wishlist tr.show').removeClass('show');$(this).parents('tr').addClass('show');var object_e=$(this);var id_wishlist=$(this).data('id-wishlist');$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"show-wishlist-product","id_wishlist":id_wishlist,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.leo-modal-wishlist .modal-title').html(object_result.errors);$('.leo-modal-wishlist').removeClass('enable-action').modal('show')}else{$('.leo-wishlist-product').hide();$('.leo-wishlist-product').html(object_result.result.html).fadeIn();if(object_result.result.show_send_wishlist){$('.send-wishlist').fadeIn();if(!$('.leo-modal-send-wishlist').length){createLeoSendWishlistModalPopup();LeoListWishlistProductModalAction()}else{$('.leo-modal-reset-send-wishlist-bt').trigger('click')}
LeoListWishlistProductAction()}else{$('.send-wishlist').hide()}
refeshWishlist(id_wishlist)}
object_e.removeClass('active');object_e.next('.leo-view-wishlist-product-loading').hide()},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}
return!1})}
function LeoListWishlistProductModalAction(){$('.leo-send-wishlist-button').click(function(){var name_wishlist=$('.list-wishlist tr.show .view-wishlist-product').data('name-wishlist');$('.leo-modal-send-wishlist .modal-title').html(wishlist_send_wishlist_txt+' "'+name_wishlist+'"');$('.leo-modal-send-wishlist').modal('show');return!1})
$('.leo-modal-send-wishlist').submit(function(){if($('.leo-fake-send-wishlist-button').hasClass('validate-ok')){return!1}});$('.leo-modal-send-wishlist-bt').click(function(){if(!$(this).hasClass('active')){var check_submit_wishlist=!0;var list_email=[];$(this).addClass('active');var object_e=$(this);$('.leo-modal-reset-send-wishlist-bt').fadeOut();$('.wishlist_email').each(function(key,val){if($(this).val()!==''&&!$(this).parents('.form-group').hasClass('has-success')&&!$(this).parents('.form-group').hasClass('has-warning')){if(!validateEmail($(this).val())){$(this).parents('.form-group').addClass('leo-has-error');check_submit_wishlist=!1}else{$(this).parents('.form-group').removeClass('leo-has-error');list_email.push(key)}}})
if(check_submit_wishlist){if(list_email.length==0){$('.wishlist_email').each(function(key,val){if($(this).val()==''){$(this).parents('.form-group').addClass('leo-has-error');$(this).attr("required","");return!1}})
object_e.removeClass('active');$('.leo-modal-reset-send-wishlist-bt').fadeIn()}else{$('.leo-fake-send-wishlist-button').addClass('validate-ok');var id_wishlist=$('.list-wishlist tr.show .view-wishlist-product').data('id-wishlist');$('.leo-modal-send-wishlist-bt-text').hide();$('.leo-modal-send-wishlist-loading').css({'display':'block'});$.each(list_email,function(key,val){var index_wishlist_email=val+1;var email=$('#wishlist_email_'+index_wishlist_email).val();var object_parent_e=$('#wishlist_email_'+index_wishlist_email).parents('.form-group');object_parent_e.find('.wishlist_email_status_loading').show();$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"send-wishlist","id_wishlist":id_wishlist,"email":email,"token":leo_token},success:function(result){object_parent_e.find('.wishlist_email_status_loading').hide();var object_result=$.parseJSON(result);if(object_result.errors.length){object_parent_e.addClass('has-warning').find('.send_wishlist_error').fadeIn()}else{object_parent_e.addClass('has-success').find('.send_wishlist_success').fadeIn()}},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})});$(document).ajaxStop(function(){$('.leo-modal-send-wishlist-loading').hide();$('.leo-modal-send-wishlist-bt-text').show();$('.leo-fake-send-wishlist-button').removeClass('validate-ok');object_e.removeClass('active');$('.leo-modal-reset-send-wishlist-bt').fadeIn()})}
if($('.form-send-wishlist .form-group.leo-has-error').length){$('.leo-fake-send-wishlist-button').trigger('click')}}else{object_e.removeClass('active');$('.leo-modal-reset-send-wishlist-bt').fadeIn();$('.leo-fake-send-wishlist-button').trigger('click')}}})
$('.leo-modal-reset-send-wishlist-bt').click(function(){$('.wishlist_email').val('').removeAttr('required');$('.send_wishlist_form_content .form-group').removeClass('leo-has-error has-success has-warning');$('.wishlist_email_status_loading').fadeOut();$('.send_wishlist_msg').fadeOut()})}
function LeoListWishlistProductAction(){$('.leo-wishlist-button-delete').click(function(){if(!$(this).hasClass('active')){$(this).addClass('active');var object_e=$(this);var object_parent_e=object_e.parents('.leo-wishlist-product');var id_wishlist_product=$(this).data('id-wishlist-product');var id_wishlist=$(this).data('id-wishlist');$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"delete-wishlist-product","id_wishlist":id_wishlist,"id_wishlist_product":id_wishlist_product,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.leo-modal-wishlist .modal-title').html(object_result.errors);$('.leo-modal-wishlist').removeClass('enable-action').modal('show')}else{object_e.parents('.leo-wishlistproduct-item').fadeOut(function(){$(this).remove();if(!object_parent_e.find('.leo-wishlistproduct-item').length){$('.send-wishlist').hide();$('.list-wishlist tr.show .view-wishlist-product').trigger('click')}})
refeshWishlist(id_wishlist)}
object_e.removeClass('active')},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}
return!1})
$('.leo-wishlist-product-save-button').click(function(){if(!$(this).hasClass('active')){$(this).addClass('active');var object_e=$(this);var id_wishlist_product=$(this).data('id-wishlist-product');var id_wishlist=$(this).data('id-wishlist');var quantity=$('.wishlist-product-quantity-'+id_wishlist_product).val();var priority=$('.wishlist-product-priority-'+id_wishlist_product).val();if(Math.floor(quantity)==quantity&&$.isNumeric(quantity)&&quantity>0){$('.wishlist-product-quantity-'+id_wishlist_product).parents('.form-group').removeClass('has-error');$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"update-wishlist-product","id_wishlist":id_wishlist,"id_wishlist_product":id_wishlist_product,"quantity":quantity,"priority":priority,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.leo-modal-wishlist .modal-title').html(object_result.errors);$('.leo-modal-wishlist').removeClass('enable-action').modal('show')}else{$('.leo-wishlistproduct-item-'+id_wishlist_product).hide();$('.leo-wishlistproduct-item-'+id_wishlist_product).fadeIn();refeshWishlist(id_wishlist)}
object_e.removeClass('active')},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}else{$('.wishlist-product-quantity-'+id_wishlist_product).parents('.form-group').addClass('has-error');$('.leo-modal-wishlist .modal-title').html(wishlist_quantity_required);$('.leo-modal-wishlist').removeClass('enable-action').modal('show');object_e.removeClass('active')}}
return!1})
$('.move-wishlist-item').click(function(){if(!$(this).hasClass('active')){$(this).addClass('active');var object_e=$(this);var object_parent_e=object_e.parents('.leo-wishlist-product');var id_wishlist_product=$(this).data('id-wishlist-product');var id_product=$(this).data('id-product');var id_product_attribute=$(this).data('id-product-attribute');var id_old_wishlist=$('.list-wishlist tr.show .view-wishlist-product').data('id-wishlist');var id_new_wishlist=$(this).data('id-wishlist');var priority=$('.wishlist-product-priority-'+id_wishlist_product).val();var quantity=$('.wishlist-product-quantity-'+id_wishlist_product).val();$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"move-wishlist-product","id_new_wishlist":id_new_wishlist,"id_wishlist_product":id_wishlist_product,"id_old_wishlist":id_old_wishlist,"id_product":id_product,"id_product_attribute":id_product_attribute,"quantity":quantity,"priority":priority,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.leo-modal-wishlist .modal-title').html(object_result.errors);$('.leo-modal-wishlist').removeClass('enable-action').modal('show')}else{object_e.parents('.leo-wishlistproduct-item').fadeOut(function(){$(this).remove();if(!object_parent_e.find('.leo-wishlistproduct-item').length){$('.send-wishlist').hide();$('.list-wishlist tr.show .view-wishlist-product').trigger('click')}});refeshWishlist(id_new_wishlist);refeshWishlist(id_old_wishlist)}
object_e.removeClass('active')},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})}
return!1})}
function activeEventModalWishlist(){$('.leo-modal-wishlist').on('hide.bs.modal',function(e){resetButtonAction()})
$('.leo-modal-wishlist').on('hidden.bs.modal',function(e){$('body').css('padding-right','')})
$('.leo-modal-wishlist').on('show.bs.modal',function(e){if($('.quickview.modal').length){$('.quickview.modal').modal('hide')}})}
function resetButtonAction(){if($('.leo-wishlist-button.active').length){$('.leo-wishlist-button.active').removeClass('active')}
if($('.wishlist-item.active-add').length){$('.wishlist-item.active-add').removeClass('active-add')}
$('.default-wishlist.active').removeClass('active');$('.delete-wishlist.active').removeClass('active');$('.list-wishlist tr.active').removeClass('active')}
function createLeoSendWishlistModalPopup(){var leoSendWishlistModalPopup='';leoSendWishlistModalPopup+='<div class="modal leo-modal leo-modal-send-wishlist fade" tabindex="-1" role="dialog" aria-hidden="true">';leoSendWishlistModalPopup+='<div class="modal-dialog" role="document">';leoSendWishlistModalPopup+='<div class="modal-content">';leoSendWishlistModalPopup+='<div class="modal-header">';leoSendWishlistModalPopup+='<button type="button" class="close" data-dismiss="modal" aria-label="Close">';leoSendWishlistModalPopup+='<span aria-hidden="true">&times;</span>';leoSendWishlistModalPopup+='</button>';leoSendWishlistModalPopup+='<h5 class="modal-title text-xs-center">';leoSendWishlistModalPopup+='</h5>';leoSendWishlistModalPopup+='</div>';leoSendWishlistModalPopup+='<div class="modal-body">';leoSendWishlistModalPopup+='<div class="send_wishlist_form_content">';leoSendWishlistModalPopup+='<form class="form-send-wishlist" action="#" method="post">'
for(var $i=1;$i<=10;$i++){leoSendWishlistModalPopup+='<div class="form-group row">';leoSendWishlistModalPopup+='<label class="col-form-label col-sm-2 text-sm-left" for="wishlist_email_'+$i+'">'+wishlist_email_txt+' '+$i+'</label>';leoSendWishlistModalPopup+='<div class="wishlist_email_status col-sm-1">';leoSendWishlistModalPopup+='<div class="wishlist_email_status_loading cssload-speeding-wheel">';leoSendWishlistModalPopup+='</div>';leoSendWishlistModalPopup+='<i class="send_wishlist_msg send_wishlist_success material-icons">&#xE876;</i>';leoSendWishlistModalPopup+='<i class="send_wishlist_msg send_wishlist_error material-icons">&#xE033;</i>';leoSendWishlistModalPopup+='</div>';leoSendWishlistModalPopup+='<div class="col-sm-9">';leoSendWishlistModalPopup+='<input class="form-control wishlist_email" id="wishlist_email_'+$i+'" name="wishlist_email_'+$i+'" type="email">';leoSendWishlistModalPopup+='</div>';leoSendWishlistModalPopup+='</div>'}
leoSendWishlistModalPopup+='<button class="btn btn-primary form-control-submit leo-fake-send-wishlist-button pull-xs-right" type="submit"></button>';leoSendWishlistModalPopup+='</form>';leoSendWishlistModalPopup+='</div>';leoSendWishlistModalPopup+='</div>';leoSendWishlistModalPopup+='<div class="modal-footer">';leoSendWishlistModalPopup+='<button type="button" class="btn btn-primary leo-modal-reset-send-wishlist-bt">'+wishlist_reset_txt+'</button>';leoSendWishlistModalPopup+='<button type="button" class="btn btn-secondary" data-dismiss="modal">'+wishlist_cancel_txt+'</button>';leoSendWishlistModalPopup+='<button type="button" class="leo-modal-send-wishlist-bt btn btn-primary">';leoSendWishlistModalPopup+='<span class="leo-modal-send-wishlist-loading cssload-speeding-wheel"></span>';leoSendWishlistModalPopup+='<span class="leo-modal-send-wishlist-bt-text">';leoSendWishlistModalPopup+=wishlist_send_txt;leoSendWishlistModalPopup+='</span>';leoSendWishlistModalPopup+='</button>';leoSendWishlistModalPopup+='</div>';leoSendWishlistModalPopup+='</div>';leoSendWishlistModalPopup+='</div>';leoSendWishlistModalPopup+='</div>';$('body').append(leoSendWishlistModalPopup)}
function validateEmail(email){var reg=/^[a-z\p{L}0-9!#$%&'*+\/=?^`{}|~_-]+[.a-z\p{L}0-9!#$%&'*+\/=?^`{}|~_-]*@[a-z\p{L}0-9]+[._a-z\p{L}0-9-]*\.[a-z\p{L}0-9]+$/i;return reg.test(email)}
function refeshWishlist(id_wishlist){$('.leo-view-wishlist-product-loading-'+id_wishlist).show();$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:wishlist_url+'?rand='+new Date().getTime(),async:!0,cache:!1,data:{"ajax":1,"action":"get-wishlist-info","id_wishlist":id_wishlist,"token":leo_token},success:function(result){var object_result=$.parseJSON(result);if(object_result.errors.length){$('.leo-modal-wishlist .modal-title').html(object_result.errors);$('.leo-modal-wishlist').removeClass('enable-action').modal('show')}else{$('.wishlist-numberproduct-'+id_wishlist).html(object_result.result.number_product)}
$('.leo-view-wishlist-product-loading-'+id_wishlist).hide()},error:function(XMLHttpRequest,textStatus,errorThrown){alert("TECHNICAL ERROR: \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}})};/* unicode_hack.js
 *    Copyright (C) 2010-2021  Marcelo Gibson de Castro GonÃ§alves. All rights reserved.
 *
 *    Copying and distribution of this file, with or without modification,
 *    are permitted in any medium without royalty provided the copyright
 *    notice and this notice are preserved.  This file is offered as-is,
 *    without any warranty.
 */
var unicode_hack = (function() {
    /* Regexps to match characters in the BMP according to their Unicode category.
       Extracted from Unicode specification, version 5.0.0, source:
       http://unicode.org/versions/Unicode5.0.0/
    */
    var unicodeCategories = {
        Pi: '[\u00ab\u2018\u201b\u201c\u201f\u2039\u2e02\u2e04\u2e09\u2e0c\u2e1c]',
        Sk: '[\u005e\u0060\u00a8\u00af\u00b4\u00b8\u02c2-\u02c5\u02d2-\u02df\u02e5-\u02ed\u02ef-\u02ff\u0374\u0375\u0384\u0385\u1fbd\u1fbf-\u1fc1\u1fcd-\u1fcf\u1fdd-\u1fdf\u1fed-\u1fef\u1ffd\u1ffe\u309b\u309c\ua700-\ua716\ua720\ua721\uff3e\uff40\uffe3]',
        Sm: '[\u002b\u003c-\u003e\u007c\u007e\u00ac\u00b1\u00d7\u00f7\u03f6\u2044\u2052\u207a-\u207c\u208a-\u208c\u2140-\u2144\u214b\u2190-\u2194\u219a\u219b\u21a0\u21a3\u21a6\u21ae\u21ce\u21cf\u21d2\u21d4\u21f4-\u22ff\u2308-\u230b\u2320\u2321\u237c\u239b-\u23b3\u23dc-\u23e1\u25b7\u25c1\u25f8-\u25ff\u266f\u27c0-\u27c4\u27c7-\u27ca\u27d0-\u27e5\u27f0-\u27ff\u2900-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2aff\ufb29\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe9-\uffec]',
        So: '[\u00a6\u00a7\u00a9\u00ae\u00b0\u00b6\u0482\u060e\u060f\u06e9\u06fd\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0cf1\u0cf2\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcc\u0fcf\u1360\u1390-\u1399\u1940\u19e0-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a\u213b\u214a\u214c\u214d\u2195-\u2199\u219c-\u219f\u21a1\u21a2\u21a4\u21a5\u21a7-\u21ad\u21af-\u21cd\u21d0\u21d1\u21d3\u21d5-\u21f3\u2300-\u2307\u230c-\u231f\u2322-\u2328\u232b-\u237b\u237d-\u239a\u23b4-\u23db\u23e2-\u23e7\u2400-\u2426\u2440-\u244a\u249c-\u24e9\u2500-\u25b6\u25b8-\u25c0\u25c2-\u25f7\u2600-\u266e\u2670-\u269c\u26a0-\u26b2\u2701-\u2704\u2706-\u2709\u270c-\u2727\u2729-\u274b\u274d\u274f-\u2752\u2756\u2758-\u275e\u2761-\u2767\u2794\u2798-\u27af\u27b1-\u27be\u2800-\u28ff\u2b00-\u2b1a\u2b20-\u2b23\u2ce5-\u2cea\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u2ffb\u3004\u3012\u3013\u3020\u3036\u3037\u303e\u303f\u3190\u3191\u3196-\u319f\u31c0-\u31cf\u3200-\u321e\u322a-\u3243\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u32fe\u3300-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ufdfd\uffe4\uffe8\uffed\uffee\ufffc\ufffd]',
        Po: '[\u0021-\u0023\u0025-\u0027\u002a\u002c\u002e\u002f\u003a\u003b\u003f\u0040\u005c\u00a1\u00b7\u00bf\u037e\u0387\u055a-\u055f\u0589\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0964\u0965\u0970\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f85\u0fd0\u0fd1\u104a-\u104f\u10fb\u1361-\u1368\u166d\u166e\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u1805\u1807-\u180a\u1944\u1945\u19de\u19df\u1a1e\u1a1f\u1b5a-\u1b60\u2016\u2017\u2020-\u2027\u2030-\u2038\u203b-\u203e\u2041-\u2043\u2047-\u2051\u2053\u2055-\u205e\u2cf9-\u2cfc\u2cfe\u2cff\u2e00\u2e01\u2e06-\u2e08\u2e0b\u2e0e-\u2e16\u3001-\u3003\u303d\u30fb\ua874-\ua877\ufe10-\ufe16\ufe19\ufe30\ufe45\ufe46\ufe49-\ufe4c\ufe50-\ufe52\ufe54-\ufe57\ufe5f-\ufe61\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff07\uff0a\uff0c\uff0e\uff0f\uff1a\uff1b\uff1f\uff20\uff3c\uff61\uff64\uff65]',
        Mn: '[\u0300-\u036f\u0483-\u0486\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u0615\u064b-\u065e\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0901\u0902\u093c\u0941-\u0948\u094d\u0951-\u0954\u0962\u0963\u0981\u09bc\u09c1-\u09c4\u09cd\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a70\u0a71\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3f\u0b41-\u0b43\u0b4d\u0b56\u0b82\u0bc0\u0bcd\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0cbc\u0cbf\u0cc6\u0ccc\u0ccd\u0ce2\u0ce3\u0d41-\u0d43\u0d4d\u0dca\u0dd2-\u0dd4\u0dd6\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032\u1036\u1037\u1039\u1058\u1059\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1dc0-\u1dca\u1dfe\u1dff\u20d0-\u20dc\u20e1\u20e5-\u20ef\u302a-\u302f\u3099\u309a\ua806\ua80b\ua825\ua826\ufb1e\ufe00-\ufe0f\ufe20-\ufe23]',
        Ps: '[\u0028\u005b\u007b\u0f3a\u0f3c\u169b\u201a\u201e\u2045\u207d\u208d\u2329\u2768\u276a\u276c\u276e\u2770\u2772\u2774\u27c5\u27e6\u27e8\u27ea\u2983\u2985\u2987\u2989\u298b\u298d\u298f\u2991\u2993\u2995\u2997\u29d8\u29da\u29fc\u3008\u300a\u300c\u300e\u3010\u3014\u3016\u3018\u301a\u301d\ufd3e\ufe17\ufe35\ufe37\ufe39\ufe3b\ufe3d\ufe3f\ufe41\ufe43\ufe47\ufe59\ufe5b\ufe5d\uff08\uff3b\uff5b\uff5f\uff62]',
        Cc: '[\u0000-\u001f\u007f-\u009f]',
        Cf: '[\u00ad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u202a-\u202e\u2060-\u2063\u206a-\u206f\ufeff\ufff9-\ufffb]',
        Ll: '[\u0061-\u007a\u00aa\u00b5\u00ba\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u037b-\u037d\u0390\u03ac-\u03ce\u03d0\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0561-\u0587\u1d00-\u1d2b\u1d62-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9b\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1f00-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6\u1fc7\u1fd0-\u1fd3\u1fd6\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6\u1ff7\u2071\u207f\u210a\u210e\u210f\u2113\u212f\u2134\u2139\u213c\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65\u2c66\u2c68\u2c6a\u2c6c\u2c74\u2c76\u2c77\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3\u2ce4\u2d00-\u2d25\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a]',
        Lm: '[\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ee\u037a\u0559\u0640\u06e5\u06e6\u07f4\u07f5\u07fa\u0e46\u0ec6\u10fc\u17d7\u1843\u1d2c-\u1d61\u1d78\u1d9b-\u1dbf\u2090-\u2094\u2d6f\u3005\u3031-\u3035\u303b\u309d\u309e\u30fc-\u30fe\ua015\ua717-\ua71a\uff70\uff9e\uff9f]',
        Lo: '[\u01bb\u01c0-\u01c3\u0294\u05d0-\u05ea\u05f0-\u05f2\u0621-\u063a\u0641-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u076d\u0780-\u07a5\u07b1\u07ca-\u07ea\u0904-\u0939\u093d\u0950\u0958-\u0961\u097b-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d28\u0d2a-\u0d39\u0d60\u0d61\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e45\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0edc\u0edd\u0f00\u0f40-\u0f47\u0f49-\u0f6a\u0f88-\u0f8b\u1000-\u1021\u1023-\u1027\u1029\u102a\u1050-\u1055\u10d0-\u10fa\u1100-\u1159\u115f-\u11a2\u11a8-\u11f9\u1200-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u1676\u1681-\u169a\u16a0-\u16ea\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u1877\u1880-\u18a8\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19a9\u19c1-\u19c7\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u2135-\u2138\u2d30-\u2d65\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3006\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff\u3105-\u312c\u3131-\u318e\u31a0-\u31b7\u31f0-\u31ff\u3400\u4db5\u4e00\u9fbb\ua000-\ua014\ua016-\ua48c\ua800\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\uac00\ud7a3\uf900-\ufa2d\ufa30-\ufa6a\ufa70-\ufad9\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff66-\uff6f\uff71-\uff9d\uffa0-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]',
        Co: '[\ue000\uf8ff]',
        Nd: '[\u0030-\u0039\u0660-\u0669\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1b50-\u1b59\uff10-\uff19]',
        Lt: '[\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc]',
        Lu: '[\u0041-\u005a\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178\u0179\u017b\u017d\u0181\u0182\u0184\u0186\u0187\u0189-\u018b\u018e-\u0191\u0193\u0194\u0196-\u0198\u019c\u019d\u019f\u01a0\u01a2\u01a4\u01a6\u01a7\u01a9\u01ac\u01ae\u01af\u01b1-\u01b3\u01b5\u01b7\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a\u023b\u023d\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0386\u0388-\u038a\u038c\u038e\u038f\u0391-\u03a1\u03a3-\u03ab\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0531-\u0556\u10a0-\u10c5\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c75\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\uff21-\uff3a]',
        Cs: '[\ud800\udb7f\udb80\udbff\udc00\udfff]',
        Zl: '[\u2028]',
        Nl: '[\u16ee-\u16f0\u2160-\u2182\u3007\u3021-\u3029\u3038-\u303a]',
        Zp: '[\u2029]',
        No: '[\u00b2\u00b3\u00b9\u00bc-\u00be\u09f4-\u09f9\u0bf0-\u0bf2\u0f2a-\u0f33\u1369-\u137c\u17f0-\u17f9\u2070\u2074-\u2079\u2080-\u2089\u2153-\u215f\u2460-\u249b\u24ea-\u24ff\u2776-\u2793\u2cfd\u3192-\u3195\u3220-\u3229\u3251-\u325f\u3280-\u3289\u32b1-\u32bf]',
        Zs: '[\u0020\u00a0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000]',
        Sc: '[\u0024\u00a2-\u00a5\u060b\u09f2\u09f3\u0af1\u0bf9\u0e3f\u17db\u20a0-\u20b5\ufdfc\ufe69\uff04\uffe0\uffe1\uffe5\uffe6]',
        Pc: '[\u005f\u203f\u2040\u2054\ufe33\ufe34\ufe4d-\ufe4f\uff3f]',
        Pd: '[\u002d\u058a\u1806\u2010-\u2015\u2e17\u301c\u3030\u30a0\ufe31\ufe32\ufe58\ufe63\uff0d]',
        Pe: '[\u0029\u005d\u007d\u0f3b\u0f3d\u169c\u2046\u207e\u208e\u232a\u2769\u276b\u276d\u276f\u2771\u2773\u2775\u27c6\u27e7\u27e9\u27eb\u2984\u2986\u2988\u298a\u298c\u298e\u2990\u2992\u2994\u2996\u2998\u29d9\u29db\u29fd\u3009\u300b\u300d\u300f\u3011\u3015\u3017\u3019\u301b\u301e\u301f\ufd3f\ufe18\ufe36\ufe38\ufe3a\ufe3c\ufe3e\ufe40\ufe42\ufe44\ufe48\ufe5a\ufe5c\ufe5e\uff09\uff3d\uff5d\uff60\uff63]',
        Pf: '[\u00bb\u2019\u201d\u203a\u2e03\u2e05\u2e0a\u2e0d\u2e1d]',
        Me: '[\u0488\u0489\u06de\u20dd-\u20e0\u20e2-\u20e4]',
        Mc: '[\u0903\u093e-\u0940\u0949-\u094c\u0982\u0983\u09be-\u09c0\u09c7\u09c8\u09cb\u09cc\u09d7\u0a03\u0a3e-\u0a40\u0a83\u0abe-\u0ac0\u0ac9\u0acb\u0acc\u0b02\u0b03\u0b3e\u0b40\u0b47\u0b48\u0b4b\u0b4c\u0b57\u0bbe\u0bbf\u0bc1\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd7\u0c01-\u0c03\u0c41-\u0c44\u0c82\u0c83\u0cbe\u0cc0-\u0cc4\u0cc7\u0cc8\u0cca\u0ccb\u0cd5\u0cd6\u0d02\u0d03\u0d3e-\u0d40\u0d46-\u0d48\u0d4a-\u0d4c\u0d57\u0d82\u0d83\u0dcf-\u0dd1\u0dd8-\u0ddf\u0df2\u0df3\u0f3e\u0f3f\u0f7f\u102c\u1031\u1038\u1056\u1057\u17b6\u17be-\u17c5\u17c7\u17c8\u1923-\u1926\u1929-\u192b\u1930\u1931\u1933-\u1938\u19b0-\u19c0\u19c8\u19c9\u1a19-\u1a1b\u1b04\u1b35\u1b3b\u1b3d-\u1b41\u1b43\u1b44\ua802\ua823\ua824\ua827]'
    };
    /* Also supports the general category (only the first letter) */
    var firstLetters = {};
    for (var p in unicodeCategories) {
        if (firstLetters[p[0]])
            firstLetters[p[0]] = unicodeCategories[p].substring(0, unicodeCategories[p].length - 1) + firstLetters[p[0]].substring(1);
        else
            firstLetters[p[0]] = unicodeCategories[p];
    }
    for (var p in firstLetters)
        unicodeCategories[p] = firstLetters[p];

    /* Gets a regex written in a dialect that supports unicode categories and
       translates it to a dialect supported by JavaScript. */
    return function(regexpString, classes) {
        var modifiers = "";
        if (regexpString instanceof RegExp) {
            modifiers = (regexpString.global ? "g" : "") +
                (regexpString.ignoreCase ? "i" : "") +
                (regexpString.multiline ? "m" : "");
            regexpString = regexpString.source;
        }
        regexpString = regexpString.replace(/\\p\{(..?)\}/g, function(match, group) {
            var unicode_categorie = unicodeCategories[group];
            if (!classes)
                unicode_category = unicode_categorie.replace(/\[(.*?)\]/g, "$1")
            return unicode_category || match;
        });
        return new RegExp(regexpString, modifiers);
    };

})();
/*
 * 2007-2021 PrestaShop
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 *  @author PrestaShop SA <contact@prestashop.com>
 *  @copyright  2007-2021 PrestaShop SA
 *  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 *  International Registered Trademark & Property of PrestaShop SA
 */
function validate_isName(s){var reg=/^[^0-9!<>,;?=+()@#"°{}_$%:]+$/;return reg.test(s)}
function validate_isGenericName(s){var reg=/^[^<>={}]+$/;return reg.test(s)}
function validate_isAddress(s){var reg=/^[^!<>?=+@{}_$%]+$/;return reg.test(s)}
function validate_isPostCode(s,pattern,iso_code){if(typeof iso_code==='undefined'||iso_code=='')
iso_code='[A-Z]{2}';if(typeof(pattern)=='undefined'||pattern.length==0)
pattern='[a-zA-Z 0-9-]+';else{var replacements={' ':'(?:\ |)','-':'(?:-|)','N':'[0-9]','L':'[a-zA-Z]','C':iso_code};for(var new_value in replacements)
pattern=pattern.split(new_value).join(replacements[new_value]);}
var reg=new RegExp('^'+pattern+'$');return reg.test(s);}
function validate_isCityName(s){var reg=/^[^!<>;?=+@#"°{}_$%]+$/;return reg.test(s)}
function validate_isMessage(s){var reg=/^[^<>{}]+$/;return reg.test(s)}
function validate_isPhoneNumber(s){var reg=/^[+0-9. ()-]+$/;return reg.test(s)}
function validate_isDniLite(s){var reg=/^[0-9a-z-.]{1,16}$/i;return reg.test(s)}
function validate_isEmail(s){var reg=unicode_hack(/^[a-z\p{L}0-9!#$%&'*+\/=?^`{}|~_-]+[.a-z\p{L}0-9!#$%&'*+\/=?^`{}|~_-]*@[a-z\p{L}0-9]+[._a-z\p{L}0-9-]*\.[a-z\p{L}0-9]+$/i,!1);return reg.test(s)}
function validate_isPasswd(s){return(s.length>=5&&s.length<255)}
function validate_field(that){if($(that).hasClass('is_required')||$(that).val().length){if($(that).attr('data-validate')=='isPostCode'){var selector='#id_country';if($(that).attr('name')=='postcode_invoice')
selector+='_invoice';var id_country=$(selector+' option:selected').val();if(typeof(countriesNeedZipCode[id_country])!='undefined'&&typeof(countries[id_country])!='undefined')
var result=window['validate_'+$(that).attr('data-validate')]($(that).val(),countriesNeedZipCode[id_country],countries[id_country].iso_code)}else if($(that).attr('data-validate'))
var result=window['validate_'+$(that).attr('data-validate')]($(that).val());if(result)
$(that).parent().removeClass('form-error').addClass('form-ok');else $(that).parent().addClass('form-error').removeClass('form-ok')}}
$(document).on('focusout','input.validate, textarea.validate',function(){validate_field(this)});/*!
 * fancyBox - jQuery Plugin
 * version: 2.1.5 (Fri, 14 Jun 2013)
 * @requires jQuery v1.6 or later
 *
 * Examples at http://fancyapps.com/fancybox/
 * License: www.fancyapps.com/fancybox/#license
 *
 * Copyright 2021 Janis Skarnelis - janis@fancyapps.com
 *
 */
(function(window,document,$,undefined){"use strict";var H=$("html"),W=$(window),D=$(document),F=$.fancybox=function(){F.open.apply(this,arguments)},IE=navigator.userAgent.match(/msie/i),didUpdate=null,isTouch=document.createTouch!==undefined,isQuery=function(obj){return obj&&obj.hasOwnProperty&&obj instanceof $},isString=function(str){return str&&$.type(str)==="string"},isPercentage=function(str){return isString(str)&&str.indexOf('%')>0},isScrollable=function(el){return(el&&!(el.style.overflow&&el.style.overflow==='hidden')&&((el.clientWidth&&el.scrollWidth>el.clientWidth)||(el.clientHeight&&el.scrollHeight>el.clientHeight)))},getScalar=function(orig,dim){var value=parseInt(orig,10)||0;if(dim&&isPercentage(orig)){value=F.getViewport()[dim]/100*value}
return Math.ceil(value)},getValue=function(value,dim){return getScalar(value,dim)+'px'};$.extend(F,{version:'2.1.5',defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!isTouch,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:'auto',wrapCSS:'',arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3000,preload:3,modal:!1,loop:!0,ajax:{dataType:'html',headers:{'X-fancyBox':!0}},iframe:{scrolling:'auto',preload:!0},swf:{wmode:'transparent',allowfullscreen:'true',allowscriptaccess:'always'},keys:{next:{13:'left',34:'up',39:'left',40:'up'},prev:{8:'right',33:'down',37:'right',38:'down'},close:[27],play:[32],toggle:[70]},direction:{next:'left',prev:'right'},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+(IE?' allowtransparency="true"':'')+'></iframe>',error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:'fade',openSpeed:250,openEasing:'swing',openOpacity:!0,openMethod:'zoomIn',closeEffect:'fade',closeSpeed:250,closeEasing:'swing',closeOpacity:!0,closeMethod:'zoomOut',nextEffect:'elastic',nextSpeed:250,nextEasing:'swing',nextMethod:'changeIn',prevEffect:'elastic',prevSpeed:250,prevEasing:'swing',prevMethod:'changeOut',helpers:{overlay:!0,title:!0},onCancel:$.noop,beforeLoad:$.noop,afterLoad:$.noop,beforeShow:$.noop,afterShow:$.noop,beforeChange:$.noop,beforeClose:$.noop,afterClose:$.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(group,opts){if(!group){return}
if(!$.isPlainObject(opts)){opts={}}
if(!1===F.close(!0)){return}
if(!$.isArray(group)){group=isQuery(group)?$(group).get():[group]}
$.each(group,function(i,element){var obj={},href,title,content,type,rez,hrefParts,selector;if($.type(element)==="object"){if(element.nodeType){element=$(element)}
if(isQuery(element)){obj={href:element.data('fancybox-href')||element.attr('href'),title:element.data('fancybox-title')||element.attr('title'),isDom:!0,element:element};if($.metadata){$.extend(!0,obj,element.metadata())}}else{obj=element}}
href=opts.href||obj.href||(isString(element)?element:null);title=opts.title!==undefined?opts.title:obj.title||'';content=opts.content||obj.content;type=content?'html':(opts.type||obj.type);if(!type&&obj.isDom){type=element.data('fancybox-type');if(!type){rez=element.prop('class').match(/fancybox\.(\w+)/);type=rez?rez[1]:null}}
if(isString(href)){if(!type){if(F.isImage(href)){type='image'}else if(F.isSWF(href)){type='swf'}else if(href.charAt(0)==='#'){type='inline'}else if(isString(element)){type='html';content=element}}
if(type==='ajax'){hrefParts=href.split(/\s+/,2);href=hrefParts.shift();selector=hrefParts.shift()}}
if(!content){if(type==='inline'){if(href){content=$(isString(href)?href.replace(/.*(?=#[^\s]+$)/,''):href)}else if(obj.isDom){content=element}}else if(type==='html'){content=href}else if(!type&&!href&&obj.isDom){type='inline';content=element}}
$.extend(obj,{href:href,type:type,content:content,title:title,selector:selector});group[i]=obj});F.opts=$.extend(!0,{},F.defaults,opts);if(opts.keys!==undefined){F.opts.keys=opts.keys?$.extend({},F.defaults.keys,opts.keys):!1}
F.group=group;return F._start(F.opts.index)},cancel:function(){var coming=F.coming;if(!coming||!1===F.trigger('onCancel')){return}
F.hideLoading();if(F.ajaxLoad){F.ajaxLoad.abort()}
F.ajaxLoad=null;if(F.imgPreload){F.imgPreload.onload=F.imgPreload.onerror=null}
if(coming.wrap){coming.wrap.stop(!0,!0).trigger('onReset').remove()}
F.coming=null;if(!F.current){F._afterZoomOut(coming)}},close:function(event){F.cancel();if(!1===F.trigger('beforeClose')){return}
F.unbindEvents();if(!F.isActive){return}
if(!F.isOpen||event===!0){$('.fancybox-wrap').stop(!0).trigger('onReset').remove();F._afterZoomOut()}else{F.isOpen=F.isOpened=!1;F.isClosing=!0;$('.fancybox-item, .fancybox-nav').remove();F.wrap.stop(!0,!0).removeClass('fancybox-opened');F.transitions[F.current.closeMethod]()}},play:function(action){var clear=function(){clearTimeout(F.player.timer)},set=function(){clear();if(F.current&&F.player.isActive){F.player.timer=setTimeout(F.next,F.current.playSpeed)}},stop=function(){clear();D.unbind('.player');F.player.isActive=!1;F.trigger('onPlayEnd')},start=function(){if(F.current&&(F.current.loop||F.current.index<F.group.length-1)){F.player.isActive=!0;D.bind({'onCancel.player beforeClose.player':stop,'onUpdate.player':set,'beforeLoad.player':clear});set();F.trigger('onPlayStart')}};if(action===!0||(!F.player.isActive&&action!==!1)){start()}else{stop()}},next:function(direction){var current=F.current;if(current){if(!isString(direction)){direction=current.direction.next}
F.jumpto(current.index+1,direction,'next')}},prev:function(direction){var current=F.current;if(current){if(!isString(direction)){direction=current.direction.prev}
F.jumpto(current.index-1,direction,'prev')}},jumpto:function(index,direction,router){var current=F.current;if(!current){return}
index=getScalar(index);F.direction=direction||current.direction[(index>=current.index?'next':'prev')];F.router=router||'jumpto';if(current.loop){if(index<0){index=current.group.length+(index%current.group.length)}
index=index%current.group.length}
if(current.group[index]!==undefined){F.cancel();F._start(index)}},reposition:function(e,onlyAbsolute){var current=F.current,wrap=current?current.wrap:null,pos;if(wrap){pos=F._getPosition(onlyAbsolute);if(e&&e.type==='scroll'){delete pos.position;wrap.stop(!0,!0).animate(pos,200)}else{wrap.css(pos);current.pos=$.extend({},current.dim,pos)}}},update:function(e){var type=(e&&e.type),anyway=!type||type==='orientationchange';if(anyway){clearTimeout(didUpdate);didUpdate=null}
if(!F.isOpen||didUpdate){return}
didUpdate=setTimeout(function(){var current=F.current;if(!current||F.isClosing){return}
F.wrap.removeClass('fancybox-tmp');if(anyway||type==='load'||(type==='resize'&&current.autoResize)){F._setDimension()}
if(!(type==='scroll'&&current.canShrink)){F.reposition(e)}
F.trigger('onUpdate');didUpdate=null},(anyway&&!isTouch?0:300))},toggle:function(action){if(F.isOpen){F.current.fitToView=$.type(action)==="boolean"?action:!F.current.fitToView;if(isTouch){F.wrap.removeAttr('style').addClass('fancybox-tmp');F.trigger('onUpdate')}
F.update()}},hideLoading:function(){D.unbind('.loading');$('#fancybox-loading').remove()},showLoading:function(){var el,viewport;F.hideLoading();el=$('<div id="fancybox-loading"><div></div></div>').click(F.cancel).appendTo('body');D.bind('keydown.loading',function(e){if((e.which||e.keyCode)===27){e.preventDefault();F.cancel()}});if(!F.defaults.fixed){viewport=F.getViewport();el.css({position:'absolute',top:(viewport.h*0.5)+viewport.y,left:(viewport.w*0.5)+viewport.x})}},getViewport:function(){var locked=(F.current&&F.current.locked)||!1,rez={x:W.scrollLeft(),y:W.scrollTop()};if(locked){rez.w=locked[0].clientWidth;rez.h=locked[0].clientHeight}else{rez.w=isTouch&&window.innerWidth?window.innerWidth:W.width();rez.h=isTouch&&window.innerHeight?window.innerHeight:W.height()}
return rez},unbindEvents:function(){if(F.wrap&&isQuery(F.wrap)){F.wrap.unbind('.fb')}
D.unbind('.fb');W.unbind('.fb')},bindEvents:function(){var current=F.current,keys;if(!current){return}
W.bind('orientationchange.fb'+(isTouch?'':' resize.fb')+(current.autoCenter&&!current.locked?' scroll.fb':''),F.update);keys=current.keys;if(keys){D.bind('keydown.fb',function(e){var code=e.which||e.keyCode,target=e.target||e.srcElement;if(code===27&&F.coming){return!1}
if(!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey&&!(target&&(target.type||$(target).is('[contenteditable]')))){$.each(keys,function(i,val){if(current.group.length>1&&val[code]!==undefined){F[i](val[code]);e.preventDefault();return!1}
if($.inArray(code,val)>-1){F[i]();e.preventDefault();return!1}})}})}
if($.fn.mousewheel&&current.mouseWheel){F.wrap.bind('mousewheel.fb',function(e,delta,deltaX,deltaY){var target=e.target||null,parent=$(target),canScroll=!1;while(parent.length){if(canScroll||parent.is('.fancybox-skin')||parent.is('.fancybox-wrap')){break}
canScroll=isScrollable(parent[0]);parent=$(parent).parent()}
if(delta!==0&&!canScroll){if(F.group.length>1&&!current.canShrink){if(deltaY>0||deltaX>0){F.prev(deltaY>0?'down':'left')}else if(deltaY<0||deltaX<0){F.next(deltaY<0?'up':'right')}
e.preventDefault()}}})}},trigger:function(event,o){var ret,obj=o||F.coming||F.current;if(!obj){return}
if($.isFunction(obj[event])){ret=obj[event].apply(obj,Array.prototype.slice.call(arguments,1))}
if(ret===!1){return!1}
if(obj.helpers){$.each(obj.helpers,function(helper,opts){if(opts&&F.helpers[helper]&&$.isFunction(F.helpers[helper][event])){F.helpers[helper][event]($.extend(!0,{},F.helpers[helper].defaults,opts),obj)}})}
D.trigger(event)},isImage:function(str){return isString(str)&&str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(str){return isString(str)&&str.match(/\.(swf)((\?|#).*)?$/i)},_start:function(index){var coming={},obj,href,type,margin,padding;index=getScalar(index);obj=F.group[index]||null;if(!obj){return!1}
coming=$.extend(!0,{},F.opts,obj);margin=coming.margin;padding=coming.padding;if($.type(margin)==='number'){coming.margin=[margin,margin,margin,margin]}
if($.type(padding)==='number'){coming.padding=[padding,padding,padding,padding]}
if(coming.modal){$.extend(!0,coming,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}})}
if(coming.autoSize){coming.autoWidth=coming.autoHeight=!0}
if(coming.width==='auto'){coming.autoWidth=!0}
if(coming.height==='auto'){coming.autoHeight=!0}
coming.group=F.group;coming.index=index;F.coming=coming;if(!1===F.trigger('beforeLoad')){F.coming=null;return}
type=coming.type;href=coming.href;if(!type){F.coming=null;if(F.current&&F.router&&F.router!=='jumpto'){F.current.index=index;return F[F.router](F.direction)}
return!1}
F.isActive=!0;if(type==='image'||type==='swf'){coming.autoHeight=coming.autoWidth=!1;coming.scrolling='visible'}
if(type==='image'){coming.aspectRatio=!0}
if(type==='iframe'&&isTouch){coming.scrolling='scroll'}
coming.wrap=$(coming.tpl.wrap).addClass('fancybox-'+(isTouch?'mobile':'desktop')+' fancybox-type-'+type+' fancybox-tmp '+coming.wrapCSS).appendTo(coming.parent||'body');$.extend(coming,{skin:$('.fancybox-skin',coming.wrap),outer:$('.fancybox-outer',coming.wrap),inner:$('.fancybox-inner',coming.wrap)});$.each(["Top","Right","Bottom","Left"],function(i,v){coming.skin.css('padding'+v,getValue(coming.padding[i]))});F.trigger('onReady');if(type==='inline'||type==='html'){if(!coming.content||!coming.content.length){return F._error('content')}}else if(!href){return F._error('href')}
if(type==='image'){F._loadImage()}else if(type==='ajax'){F._loadAjax()}else if(type==='iframe'){F._loadIframe()}else{F._afterLoad()}},_error:function(type){$.extend(F.coming,{type:'html',autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:'no',hasError:type,content:F.coming.tpl.error});F._afterLoad()},_loadImage:function(){var img=F.imgPreload=new Image();img.onload=function(){this.onload=this.onerror=null;F.coming.width=this.width/F.opts.pixelRatio;F.coming.height=this.height/F.opts.pixelRatio;F._afterLoad()};img.onerror=function(){this.onload=this.onerror=null;F._error('image')};img.src=F.coming.href;if(img.complete!==!0){F.showLoading()}},_loadAjax:function(){var coming=F.coming;F.showLoading();F.ajaxLoad=$.ajax($.extend({},coming.ajax,{url:coming.href,error:function(jqXHR,textStatus){if(F.coming&&textStatus!=='abort'){F._error('ajax',jqXHR)}else{F.hideLoading()}},success:function(data,textStatus){if(textStatus==='success'){coming.content=data;F._afterLoad()}}}))},_loadIframe:function(){var coming=F.coming,iframe=$(coming.tpl.iframe.replace(/\{rnd\}/g,new Date().getTime())).attr('scrolling',isTouch?'auto':coming.iframe.scrolling).attr('src',coming.href);$(coming.wrap).bind('onReset',function(){try{$(this).find('iframe').hide().attr('src','//about:blank').end().empty()}catch(e){}});if(coming.iframe.preload){F.showLoading();iframe.one('load',function(){$(this).data('ready',1);if(!isTouch){$(this).bind('load.fb',F.update)}
$(this).parents('.fancybox-wrap').width('100%').removeClass('fancybox-tmp').show();F._afterLoad()})}
coming.content=iframe.appendTo(coming.inner);if(!coming.iframe.preload){F._afterLoad()}},_preloadImages:function(){var group=F.group,current=F.current,len=group.length,cnt=current.preload?Math.min(current.preload,len-1):0,item,i;for(i=1;i<=cnt;i+=1){item=group[(current.index+i)%len];if(item.type==='image'&&item.href){new Image().src=item.href}}},_afterLoad:function(){var coming=F.coming,previous=F.current,placeholder='fancybox-placeholder',current,content,type,scrolling,href,embed;F.hideLoading();if(!coming||F.isActive===!1){return}
if(!1===F.trigger('afterLoad',coming,previous)){coming.wrap.stop(!0).trigger('onReset').remove();F.coming=null;return}
if(previous){F.trigger('beforeChange',previous);previous.wrap.stop(!0).removeClass('fancybox-opened').find('.fancybox-item, .fancybox-nav').remove()}
F.unbindEvents();current=coming;content=coming.content;type=coming.type;scrolling=coming.scrolling;$.extend(F,{wrap:current.wrap,skin:current.skin,outer:current.outer,inner:current.inner,current:current,previous:previous});href=current.href;switch(type){case 'inline':case 'ajax':case 'html':if(current.selector){content=$('<div>').html(content).find(current.selector)}else if(isQuery(content)){if(!content.data(placeholder)){content.data(placeholder,$('<div class="'+placeholder+'"></div>').insertAfter(content).hide())}
content=content.show().detach();current.wrap.bind('onReset',function(){if($(this).find(content).length){content.hide().replaceAll(content.data(placeholder)).data(placeholder,!1)}})}
break;case 'image':content=current.tpl.image.replace('{href}',href);break;case 'swf':content='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+href+'"></param>';embed='';$.each(current.swf,function(name,val){content+='<param name="'+name+'" value="'+val+'"></param>';embed+=' '+name+'="'+val+'"'});content+='<embed src="'+href+'" type="application/x-shockwave-flash" width="100%" height="100%"'+embed+'></embed></object>';break}
if(!(isQuery(content)&&content.parent().is(current.inner))){current.inner.append(content)}
F.trigger('beforeShow');current.inner.css('overflow',scrolling==='yes'?'scroll':(scrolling==='no'?'hidden':scrolling));F._setDimension();F.reposition();F.isOpen=!1;F.coming=null;F.bindEvents();if(!F.isOpened){$('.fancybox-wrap').not(current.wrap).stop(!0).trigger('onReset').remove()}else if(previous.prevMethod){F.transitions[previous.prevMethod]()}
F.transitions[F.isOpened?current.nextMethod:current.openMethod]();F._preloadImages()},_setDimension:function(){var viewport=F.getViewport(),steps=0,canShrink=!1,canExpand=!1,wrap=F.wrap,skin=F.skin,inner=F.inner,current=F.current,width=current.width,height=current.height,minWidth=current.minWidth,minHeight=current.minHeight,maxWidth=current.maxWidth,maxHeight=current.maxHeight,scrolling=current.scrolling,scrollOut=current.scrollOutside?current.scrollbarWidth:0,margin=current.margin,wMargin=getScalar(margin[1]+margin[3]),hMargin=getScalar(margin[0]+margin[2]),wPadding,hPadding,wSpace,hSpace,origWidth,origHeight,origMaxWidth,origMaxHeight,ratio,width_,height_,maxWidth_,maxHeight_,iframe,body;wrap.add(skin).add(inner).width('auto').height('auto').removeClass('fancybox-tmp');wPadding=getScalar(skin.outerWidth(!0)-skin.width());hPadding=getScalar(skin.outerHeight(!0)-skin.height());wSpace=wMargin+wPadding;hSpace=hMargin+hPadding;origWidth=isPercentage(width)?(viewport.w-wSpace)*getScalar(width)/100:width;origHeight=isPercentage(height)?(viewport.h-hSpace)*getScalar(height)/100:height;if(current.type==='iframe'){iframe=current.content;if(current.autoHeight&&iframe.data('ready')===1){try{if(iframe[0].contentWindow.document.location){inner.width(origWidth).height(9999);body=iframe.contents().find('body');if(scrollOut){body.css('overflow-x','hidden')}
origHeight=body.outerHeight(!0)}}catch(e){}}}else if(current.autoWidth||current.autoHeight){inner.addClass('fancybox-tmp');if(!current.autoWidth){inner.width(origWidth)}
if(!current.autoHeight){inner.height(origHeight)}
if(current.autoWidth){origWidth=inner.width()}
if(current.autoHeight){origHeight=inner.height()}
inner.removeClass('fancybox-tmp')}
width=getScalar(origWidth);height=getScalar(origHeight);ratio=origWidth/origHeight;minWidth=getScalar(isPercentage(minWidth)?getScalar(minWidth,'w')-wSpace:minWidth);maxWidth=getScalar(isPercentage(maxWidth)?getScalar(maxWidth,'w')-wSpace:maxWidth);minHeight=getScalar(isPercentage(minHeight)?getScalar(minHeight,'h')-hSpace:minHeight);maxHeight=getScalar(isPercentage(maxHeight)?getScalar(maxHeight,'h')-hSpace:maxHeight);origMaxWidth=maxWidth;origMaxHeight=maxHeight;if(current.fitToView){maxWidth=Math.min(viewport.w-wSpace,maxWidth);maxHeight=Math.min(viewport.h-hSpace,maxHeight)}
maxWidth_=viewport.w-wMargin;maxHeight_=viewport.h-hMargin;if(current.aspectRatio){if(width>maxWidth){width=maxWidth;height=getScalar(width/ratio)}
if(height>maxHeight){height=maxHeight;width=getScalar(height*ratio)}
if(width<minWidth){width=minWidth;height=getScalar(width/ratio)}
if(height<minHeight){height=minHeight;width=getScalar(height*ratio)}}else{width=Math.max(minWidth,Math.min(width,maxWidth));if(current.autoHeight&&current.type!=='iframe'){inner.width(width);height=inner.height()}
height=Math.max(minHeight,Math.min(height,maxHeight))}
if(current.fitToView){inner.width(width).height(height);wrap.width(width+wPadding);width_=wrap.width();height_=wrap.height();if(current.aspectRatio){while((width_>maxWidth_||height_>maxHeight_)&&width>minWidth&&height>minHeight){if(steps++>19){break}
height=Math.max(minHeight,Math.min(maxHeight,height-10));width=getScalar(height*ratio);if(width<minWidth){width=minWidth;height=getScalar(width/ratio)}
if(width>maxWidth){width=maxWidth;height=getScalar(width/ratio)}
inner.width(width).height(height);wrap.width(width+wPadding);width_=wrap.width();height_=wrap.height()}}else{width=Math.max(minWidth,Math.min(width,width-(width_-maxWidth_)));height=Math.max(minHeight,Math.min(height,height-(height_-maxHeight_)))}}
if(scrollOut&&scrolling==='auto'&&height<origHeight&&(width+wPadding+scrollOut)<maxWidth_){width+=scrollOut}
inner.width(width).height(height);wrap.width(width+wPadding);width_=wrap.width();height_=wrap.height();canShrink=(width_>maxWidth_||height_>maxHeight_)&&width>minWidth&&height>minHeight;canExpand=current.aspectRatio?(width<origMaxWidth&&height<origMaxHeight&&width<origWidth&&height<origHeight):((width<origMaxWidth||height<origMaxHeight)&&(width<origWidth||height<origHeight));$.extend(current,{dim:{width:getValue(width_),height:getValue(height_)},origWidth:origWidth,origHeight:origHeight,canShrink:canShrink,canExpand:canExpand,wPadding:wPadding,hPadding:hPadding,wrapSpace:height_-skin.outerHeight(!0),skinSpace:skin.height()-height});if(!iframe&&current.autoHeight&&height>minHeight&&height<maxHeight&&!canExpand){inner.height('auto')}},_getPosition:function(onlyAbsolute){var current=F.current,viewport=F.getViewport(),margin=current.margin,width=F.wrap.width()+margin[1]+margin[3],height=F.wrap.height()+margin[0]+margin[2],rez={position:'absolute',top:margin[0],left:margin[3]};if(current.autoCenter&&current.fixed&&!onlyAbsolute&&height<=viewport.h&&width<=viewport.w){rez.position='fixed'}else if(!current.locked){rez.top+=viewport.y;rez.left+=viewport.x}
rez.top=getValue(Math.max(rez.top,rez.top+((viewport.h-height)*current.topRatio)));rez.left=getValue(Math.max(rez.left,rez.left+((viewport.w-width)*current.leftRatio)));return rez},_afterZoomIn:function(){var current=F.current;if(!current){return}
F.isOpen=F.isOpened=!0;F.wrap.css('overflow','visible').addClass('fancybox-opened');F.update();if(current.closeClick||(current.nextClick&&F.group.length>1)){F.inner.css('cursor','pointer').bind('click.fb',function(e){if(!$(e.target).is('a')&&!$(e.target).parent().is('a')){e.preventDefault();F[current.closeClick?'close':'next']()}})}
if(current.closeBtn){$(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb',function(e){e.preventDefault();F.close()})}
if(current.arrows&&F.group.length>1){if(current.loop||current.index>0){$(current.tpl.prev).appendTo(F.outer).bind('click.fb',F.prev)}
if(current.loop||current.index<F.group.length-1){$(current.tpl.next).appendTo(F.outer).bind('click.fb',F.next)}}
F.trigger('afterShow');if(!current.loop&&current.index===current.group.length-1){F.play(!1)}else if(F.opts.autoPlay&&!F.player.isActive){F.opts.autoPlay=!1;F.play()}},_afterZoomOut:function(obj){obj=obj||F.current;$('.fancybox-wrap').trigger('onReset').remove();$.extend(F,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});F.trigger('afterClose',obj)}});F.transitions={getOrigPosition:function(){var current=F.current,element=current.element,orig=current.orig,pos={},width=50,height=50,hPadding=current.hPadding,wPadding=current.wPadding,viewport=F.getViewport();if(!orig&&current.isDom&&element.is(':visible')){orig=element.find('img:first');if(!orig.length){orig=element}}
if(isQuery(orig)){pos=orig.offset();if(orig.is('img')){width=orig.outerWidth();height=orig.outerHeight()}}else{pos.top=viewport.y+(viewport.h-height)*current.topRatio;pos.left=viewport.x+(viewport.w-width)*current.leftRatio}
if(F.wrap.css('position')==='fixed'||current.locked){pos.top-=viewport.y;pos.left-=viewport.x}
pos={top:getValue(pos.top-hPadding*current.topRatio),left:getValue(pos.left-wPadding*current.leftRatio),width:getValue(width+wPadding),height:getValue(height+hPadding)};return pos},step:function(now,fx){var ratio,padding,value,prop=fx.prop,current=F.current,wrapSpace=current.wrapSpace,skinSpace=current.skinSpace;if(prop==='width'||prop==='height'){ratio=fx.end===fx.start?1:(now-fx.start)/(fx.end-fx.start);if(F.isClosing){ratio=1-ratio}
padding=prop==='width'?current.wPadding:current.hPadding;value=now-padding;F.skin[prop](getScalar(prop==='width'?value:value-(wrapSpace*ratio)));F.inner[prop](getScalar(prop==='width'?value:value-(wrapSpace*ratio)-(skinSpace*ratio)))}},zoomIn:function(){var current=F.current,startPos=current.pos,effect=current.openEffect,elastic=effect==='elastic',endPos=$.extend({opacity:1},startPos);delete endPos.position;if(elastic){startPos=this.getOrigPosition();if(current.openOpacity){startPos.opacity=0.1}}else if(effect==='fade'){startPos.opacity=0.1}
F.wrap.css(startPos).animate(endPos,{duration:effect==='none'?0:current.openSpeed,easing:current.openEasing,step:elastic?this.step:null,complete:F._afterZoomIn})},zoomOut:function(){var current=F.current,effect=current.closeEffect,elastic=effect==='elastic',endPos={opacity:0.1};if(elastic){endPos=this.getOrigPosition();if(current.closeOpacity){endPos.opacity=0.1}}
F.wrap.animate(endPos,{duration:effect==='none'?0:current.closeSpeed,easing:current.closeEasing,step:elastic?this.step:null,complete:F._afterZoomOut})},changeIn:function(){var current=F.current,effect=current.nextEffect,startPos=current.pos,endPos={opacity:1},direction=F.direction,distance=200,field;startPos.opacity=0.1;if(effect==='elastic'){field=direction==='down'||direction==='up'?'top':'left';if(direction==='down'||direction==='right'){startPos[field]=getValue(getScalar(startPos[field])-distance);endPos[field]='+='+distance+'px'}else{startPos[field]=getValue(getScalar(startPos[field])+distance);endPos[field]='-='+distance+'px'}}
if(effect==='none'){F._afterZoomIn()}else{F.wrap.css(startPos).animate(endPos,{duration:current.nextSpeed,easing:current.nextEasing,complete:F._afterZoomIn})}},changeOut:function(){var previous=F.previous,effect=previous.prevEffect,endPos={opacity:0.1},direction=F.direction,distance=200;if(effect==='elastic'){endPos[direction==='down'||direction==='up'?'top':'left']=(direction==='up'||direction==='left'?'-':'+')+'='+distance+'px'}
previous.wrap.animate(endPos,{duration:effect==='none'?0:previous.prevSpeed,easing:previous.prevEasing,complete:function(){$(this).trigger('onReset').remove()}})}};F.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!isTouch,fixed:!0},overlay:null,fixed:!1,el:$('html'),create:function(opts){opts=$.extend({},this.defaults,opts);if(this.overlay){this.close()}
this.overlay=$('<div class="fancybox-overlay"></div>').appendTo(F.coming?F.coming.parent:opts.parent);this.fixed=!1;if(opts.fixed&&F.defaults.fixed){this.overlay.addClass('fancybox-overlay-fixed');this.fixed=!0}},open:function(opts){var that=this;opts=$.extend({},this.defaults,opts);if(this.overlay){this.overlay.unbind('.overlay').width('auto').height('auto')}else{this.create(opts)}
if(!this.fixed){W.bind('resize.overlay',$.proxy(this.update,this));this.update()}
if(opts.closeClick){this.overlay.bind('click.overlay',function(e){if($(e.target).hasClass('fancybox-overlay')){if(F.isActive){F.close()}else{that.close()}
return!1}})}
this.overlay.css(opts.css).show()},close:function(){var scrollV,scrollH;W.unbind('resize.overlay');if(this.el.hasClass('fancybox-lock')){$('.fancybox-margin').removeClass('fancybox-margin');scrollV=W.scrollTop();scrollH=W.scrollLeft();this.el.removeClass('fancybox-lock');W.scrollTop(scrollV).scrollLeft(scrollH)}
$('.fancybox-overlay').remove().hide();$.extend(this,{overlay:null,fixed:!1})},update:function(){var width='100%',offsetWidth;this.overlay.width(width).height('100%');if(IE){offsetWidth=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(D.width()>offsetWidth){width=D.width()}}else if(D.width()>W.width()){width=D.width()}
this.overlay.width(width).height(D.height())},onReady:function(opts,obj){var overlay=this.overlay;$('.fancybox-overlay').stop(!0,!0);if(!overlay){this.create(opts)}
if(opts.locked&&this.fixed&&obj.fixed){if(!overlay){this.margin=D.height()>W.height()?$('html').css('margin-right').replace("px",""):!1}
obj.locked=this.overlay.append(obj.wrap);obj.fixed=!1}
if(opts.showEarly===!0){this.beforeShow.apply(this,arguments)}},beforeShow:function(opts,obj){var scrollV,scrollH;if(obj.locked){if(this.margin!==!1){$('*').filter(function(){return($(this).css('position')==='fixed'&&!$(this).hasClass("fancybox-overlay")&&!$(this).hasClass("fancybox-wrap"))}).addClass('fancybox-margin');this.el.addClass('fancybox-margin')}
scrollV=W.scrollTop();scrollH=W.scrollLeft();this.el.addClass('fancybox-lock');W.scrollTop(scrollV).scrollLeft(scrollH)}
this.open(opts)},onUpdate:function(){if(!this.fixed){this.update()}},afterClose:function(opts){if(this.overlay&&!F.coming){this.overlay.fadeOut(opts.speedOut,$.proxy(this.close,this))}}};F.helpers.title={defaults:{type:'float',position:'bottom'},beforeShow:function(opts){var current=F.current,text=current.title,type=opts.type,title,target;if($.isFunction(text)){text=text.call(current.element,current)}
if(!isString(text)||$.trim(text)===''){return}
title=$('<div class="fancybox-title fancybox-title-'+type+'-wrap">'+text+'</div>');switch(type){case 'inside':target=F.skin;break;case 'outside':target=F.wrap;break;case 'over':target=F.inner;break;default:target=F.skin;title.appendTo('body');if(IE){title.width(title.width())}
title.wrapInner('<span class="child"></span>');F.current.margin[2]+=Math.abs(getScalar(title.css('margin-bottom')));break}
title[(opts.position==='top'?'prependTo':'appendTo')](target)}};$.fn.fancybox=function(options){var index,that=$(this),selector=this.selector||'',run=function(e){var what=$(this).blur(),idx=index,relType,relVal;if(!(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&!what.is('.fancybox-wrap')){relType=options.groupAttr||'data-fancybox-group';relVal=what.attr(relType);if(!relVal){relType='rel';relVal=what.get(0)[relType]}
if(relVal&&relVal!==''&&relVal!=='nofollow'){what=selector.length?$(selector):that;what=what.filter('['+relType+'="'+relVal+'"]');idx=what.index(this)}
options.index=idx;if(F.open(what,options)!==!1){e.preventDefault()}}};options=options||{};index=options.index||0;if(!selector||options.live===!1){that.unbind('click.fb-start').bind('click.fb-start',run)}else{D.undelegate(selector,'click.fb-start').delegate(selector+":not('.fancybox-item, .fancybox-nav')",'click.fb-start',run)}
this.filter('[data-fancybox-start=1]').trigger('click');return this};D.ready(function(){var w1,w2;if($.scrollbarWidth===undefined){$.scrollbarWidth=function(){var parent=$('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo('body'),child=parent.children(),width=child.innerWidth()-child.height(99).innerWidth();parent.remove();return width}}
if($.support.fixedPosition===undefined){$.support.fixedPosition=(function(){var elem=$('<div style="position:fixed;top:20px;"></div>').appendTo('body'),fixed=(elem[0].offsetTop===20||elem[0].offsetTop===15);elem.remove();return fixed}())}
$.extend(F.defaults,{scrollbarWidth:$.scrollbarWidth(),fixed:$.support.fixedPosition,parent:$('body')});w1=$(window).width();H.addClass('fancybox-lock-test');w2=$(window).width();H.removeClass('fancybox-lock-test');$("<style type='text/css'>.fancybox-margin{margin-right:"+(w2-w1)+"px;}</style>").appendTo("head")})}(window,document,jQuery));/**
 * 2007-2021 PrestaShop
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 *  @author    PrestaShop SA <contact@prestashop.com>
 *  @copyright 2007-2021 PrestaShop SA
 *  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 *  International Registered Trademark & Property of PrestaShop SA
 *
 * Don't forget to prefix your containers with your own identifier
 * to avoid any conflicts with others containers.
 */
$(document).on('click','#contact_products',function(event){var id_product=$('#id_product').val();var id_module=$('#id_module').val();event.preventDefault();$.fancybox.open({'width':900,'autoSize':!1,beforeLoad:function(){if($('.modal').hasClass('in')){$('.modal').modal('toggle')}
if(site_key!=''&&site_key){$('#submit_cont').hide()}},closeClick:!1,href:controller_link,type:"ajax",openEffect:'none',closeEffect:'none',helpers:{overlay:{closeClick:!1}},ajax:{type:"POST",dataType:"json",data:{ajax:!0,id_module:id_module,id_product:id_product,action:'openThemeOneForm',}}})});$(document).on('submit','form#formproductcontact',function(e){e.preventDefault();var flag=!1;var fname=$('#first_name').val();var lname=$('#last_name').val();var email=$('#email').val();var phone=$('#phone').val();var comment=$('#comment').val();if((!fname||!validate_isName(fname))&&(enable_first)){$('#send_request_form_error').text(fname_error).slideDown()}else if((!lname||!validate_isName(lname))&&enable_last){$('#send_request_form_error').text(lname_error).slideDown()}else if((!email||!validate_isEmail(email))&&(enable_email)){$('#send_request_form_error').text(email_error).slideDown()}else if((enable_phone)&&(phone==""&&!isPhoneNumber(phone))){$('#send_request_form_error').text(phn_error).slideDown()}else if((!comment||!validate_isMessage(comment))&&(enable_message)){$('#send_request_form_error').text(msg_error).slideDown()}else{flag=!0}
if(flag==!0){var post_url=$(this).attr("action");var request_method=$(this).attr("method");var form_data=new FormData(this);$('.contact_loader').show();$.ajax({url:post_url,type:request_method,dataType:"json",data:form_data,contentType:!1,cache:!1,processData:!1}).done(function(result){(result);$('.contact_loader').hide();var ok='<div class="alert alert-success success">'+submit_success+'</div>';var notOk='<div class="alert alert-danger error">'+submit_error+'</div>';var msg=result?ok:notOk;if(result.res==!0){fancyCloseBox(msg)}
if(result.res==!1&&result.error=='not_supported'){$('.contact_loader').hide();$('#send_request_form_error').text(not_supported).slideDown()}else if(result.res==!1&&result.error=='file_size'){$('.contact_loader').hide();$('#send_request_form_error').text(file_size+''+result.values+'MB').slideDown()}else{$('.contact_loader').hide();var msg='<div class="alert alert-success success">'+mail_error+'</div>';if(result.res==!1){fancyCloseBox(msg)}}})}});function isPhoneNumber(phone){var phoneno=/^\(?([0-9]{2,3})\)?[-. ]?([0-9]{2,3})[-. ]?([0-9]{4,10})$/;if(phone.match(phoneno))
return!0;else return!1}
function VerifyCallback(response){$('#submit_cont').slideDown()}
var onloadCallback=function(){grecaptcha.render('Gcaptcha',{'sitekey':site_key,'callback':VerifyCallback})}
function fancyCloseBox(html){var ok_btn='<p style="text-align:right; padding-bottom: 0" class="submit"><input type="button" onclick="closeBox();" value="'+ok_label+'" class="button btn btn-warning" id="ok-btn"></p>'
$('.fancybox-inner #contact_product').html(html);$.fancybox({content:html+ok_btn})}
function closeBox(){$.fancybox.close();location.reload()}
function loadThemePlaceHolders(){if(form_theme==1){$('input[placeholder]').placeholderLabel();$('textarea[placeholder]').placeholderLabel();$('input[placeholder]').placeholderLabel({placeholderColor:"#898989",labelColor:"#4AA2CC",labelSize:"14px",useBorderColor:!0,inInput:!0,timeMove:200,});var fnames=$('#first_name').val();var lnames=$('#last_name').val();var ee=$('#email').val();if(ee!=''||fnames!=''||lnames!=''){$('.ff').css('padding','.5rem 7rem')}}};/*
* Product Contact
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* @category  FMM Modules
* @package   productcontact
* @author    FMM Modules
* @copyright Copyright 2021 © fmemodules All right reserved
* @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*/
(function($){$.fn.placeholderLabel=function(options){var settings=$.extend({placeholderColor:"#898989",labelColor:"#4AA2CC",labelSize:this.css('font-size'),fontStyle:"normal",useBorderColor:!0,inInput:!0,timeMove:200},options);var BindOnData=function(label,input,pt){var lh=label.height();var mtm=Number(pt.replace('px',''))+(lh/2);if(!settings.inInput){mtm+=lh/2;label.css('background-color','')}
label.animate({marginTop:"-="+mtm,fontSize:settings.labelSize,},settings.timeMove);input.keyup()}
$(this).each(function(i,e){var self=$(e);if(self.attr('bind-placeholder-label')!=undefined){var pt=self.css('padding-top');BindOnData(self.prev(),self,pt)}
var currentBorderColor=self.css('border-color');var currentPlaceholderSize=self.css('font-size');if(self.attr('placeholder')){var label=$('<label></label>');label.css('position','absolute');label.css('cursor','initial');label.css('font-style',settings.fontStyle);label.css('color',settings.placeholderColor);label.css('font-size',currentPlaceholderSize);var text=self.attr('placeholder');self.removeAttr('placeholder');label.text(text);var ep=self.position().left;var pt=self.css('padding-top');var pl=self.css('padding-left');var mt=self.css('margin-top');var ml=self.css('margin-left');label.css('margin-top',(Number(pt.replace('px','')))+Number(mt.replace('px','')));label.css('margin-left',(Number(pl.replace('px',''))-5)+Number(ml.replace('px','')));label.css('padding-left','5px');label.css('padding-right','5px');label.css('background-color',self.css('background-color'));var self=self;label.click(function(){self.focus()});self.focus(function(){if(settings.useBorderColor){self.css('border-color',settings.labelColor)}
label.css('color',settings.labelColor);if(!self.val().length){var lh=label.height();var mtm=Number(pt.replace('px',''))+(lh/2);if(!settings.inInput){mtm+=lh/2;label.css('background-color','')}
label.animate({marginTop:"-="+mtm,fontSize:settings.labelSize,},settings.timeMove)}});self.blur(function(){if(settings.useBorderColor){self.css('border-color',currentBorderColor)}
label.css('color',settings.placeholderColor);if(!self.val().length){var lh=label.height();var mtm=Number(pt.replace('px',''))+(lh/2);if(!settings.inInput){mtm+=lh/2;label.css('background-color','')}
label.animate({marginTop:"+="+mtm,fontSize:currentPlaceholderSize},settings.timeMove)}});if(self.attr('alt')){var textLabel=self.attr('alt');var textLabelOld=label.text();self.removeAttr('alt');self.keyup(function(){if(self.val().length){label.text(textLabel)}else{label.text(textLabelOld)}})}
self.before(label);if(self.val().length){BindOnData(label,self,pt)}
return self.attr('bind-placeholder-label','true')}else{return null}})}}(jQuery));!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";function e(e){var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){return t.reject(n)})})}function t(e){return new this(function(t,n){function o(e,n){if(n&&("object"==typeof n||"function"==typeof n)){var f=n.then;if("function"==typeof f)return void f.call(n,function(t){o(e,t)},function(n){r[e]={status:"rejected",reason:n},0==--i&&t(r)})}r[e]={status:"fulfilled",value:n},0==--i&&t(r)}if(!e||"undefined"==typeof e.length)return n(new TypeError(typeof e+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var r=Array.prototype.slice.call(e);if(0===r.length)return t([]);for(var i=r.length,f=0;r.length>f;f++)o(f,r[f])})}function n(e){return!(!e||"undefined"==typeof e.length)}function o(){}function r(e){if(!(this instanceof r))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],l(e,this)}function i(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,r._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var o;try{o=n(e._value)}catch(r){return void u(t.promise,r)}f(t.promise,o)}else(1===e._state?f:u)(t.promise,e._value)})):e._deferreds.push(t)}function f(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof r)return e._state=3,e._value=t,void c(e);if("function"==typeof n)return void l(function(e,t){return function(){e.apply(t,arguments)}}(n,t),e)}e._state=1,e._value=t,c(e)}catch(o){u(e,o)}}function u(e,t){e._state=2,e._value=t,c(e)}function c(e){2===e._state&&0===e._deferreds.length&&r._immediateFn(function(){e._handled||r._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;n>t;t++)i(e,e._deferreds[t]);e._deferreds=null}function l(e,t){var n=!1;try{e(function(e){n||(n=!0,f(t,e))},function(e){n||(n=!0,u(t,e))})}catch(o){if(n)return;n=!0,u(t,o)}}var a=setTimeout;r.prototype["catch"]=function(e){return this.then(null,e)},r.prototype.then=function(e,t){var n=new this.constructor(o);return i(this,new function(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}(e,t,n)),n},r.prototype["finally"]=e,r.all=function(e){return new r(function(t,o){function r(e,n){try{if(n&&("object"==typeof n||"function"==typeof n)){var u=n.then;if("function"==typeof u)return void u.call(n,function(t){r(e,t)},o)}i[e]=n,0==--f&&t(i)}catch(c){o(c)}}if(!n(e))return o(new TypeError("Promise.all accepts an array"));var i=Array.prototype.slice.call(e);if(0===i.length)return t([]);for(var f=i.length,u=0;i.length>u;u++)r(u,i[u])})},r.allSettled=t,r.resolve=function(e){return e&&"object"==typeof e&&e.constructor===r?e:new r(function(t){t(e)})},r.reject=function(e){return new r(function(t,n){n(e)})},r.race=function(e){return new r(function(t,o){if(!n(e))return o(new TypeError("Promise.race accepts an array"));for(var i=0,f=e.length;f>i;i++)r.resolve(e[i]).then(t,o)})},r._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){a(e,0)},r._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var s=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}();"function"!=typeof s.Promise?s.Promise=r:(s.Promise.prototype["finally"]||(s.Promise.prototype["finally"]=e),s.Promise.allSettled||(s.Promise.allSettled=t))});(function(t,e){typeof exports==="object"&&typeof module!=="undefined"?module.exports=e():typeof define==="function"&&define.amd?define(e):t.mapboxgl=e()})(this,(function(){"use strict";var t,e,r;function i(i,n){if(!t){t=n}else if(!e){e=n}else{var o="var sharedChunk = {}; ("+t+")(sharedChunk); ("+e+")(sharedChunk);";var a={};t(a);r=n(a);r.workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"}))}}i(["exports"],(function(t){"use strict";function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t["default"]:t}function r(t,e){return t(e={exports:{}},e.exports),e.exports}var i=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),n=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,o=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,a={now:i,frame:function(t){var e=n(t);return{cancel:function(){return o(e)}}},getImageData:function(t){var e=self.document.createElement("canvas"),r=e.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0,t.width,t.height),r.getImageData(0,0,t.width,t.height)},resolveURL:function(t){var e=self.document.createElement("a");return e.href=t,e.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},supportsWebp:!1};if(self.document){var s=self.document.createElement("img");s.onload=function(){a.supportsWebp=!0},s.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="}var l=u;function u(t,e,r,i){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(i-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=i,this.p2x=r,this.p2y=i}u.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},u.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},u.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},u.prototype.solveCurveX=function(t,e){var r,i,n,o,a;for(void 0===e&&(e=1e-6),n=t,a=0;a<8;a++){if(o=this.sampleCurveX(n)-t,Math.abs(o)<e)return n;var s=this.sampleCurveDerivativeX(n);if(Math.abs(s)<1e-6)break;n-=o/s}if((n=t)<(r=0))return r;if(n>(i=1))return i;for(;r<i;){if(o=this.sampleCurveX(n),Math.abs(o-t)<e)return n;t>o?r=n:i=n,n=.5*(i-r)+r}return n},u.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var c=function(t,e,r){this.column=t,this.row=e,this.zoom=r};c.prototype.clone=function(){return new c(this.column,this.row,this.zoom)},c.prototype.zoomTo=function(t){return this.clone()._zoomTo(t)},c.prototype.sub=function(t){return this.clone()._sub(t)},c.prototype._zoomTo=function(t){var e=Math.pow(2,t-this.zoom);return this.column*=e,this.row*=e,this.zoom=t,this},c.prototype._sub=function(t){return t=t.zoomTo(this.zoom),this.column-=t.column,this.row-=t.row,this};var h=p;function p(t,e){this.x=t,this.y=e}function f(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(!f(t[r],e[r]))return!1;return!0}if("object"==typeof t&&null!==t&&null!==e){if("object"!=typeof e)return!1;if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var i in t)if(!f(t[i],e[i]))return!1;return!0}return t===e}function d(t,e,r,i){var n=new l(t,e,r,i);return function(t){return n.solve(t)}}p.prototype={clone:function(){return new p(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),i=e*this.x-r*this.y,n=r*this.x+e*this.y;return this.x=i,this.y=n,this},_rotateAround:function(t,e){var r=Math.cos(t),i=Math.sin(t),n=e.x+r*(this.x-e.x)-i*(this.y-e.y),o=e.y+i*(this.x-e.x)+r*(this.y-e.y);return this.x=n,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},p.convert=function(t){return t instanceof p?t:Array.isArray(t)?new p(t[0],t[1]):t};var m=d(.25,.1,.25,1);function y(t,e,r){return Math.min(r,Math.max(e,t))}function v(t){for(var e=[],r=arguments.length-1;r-->0;)e[r]=arguments[r+1];for(var i=0,n=e;i<n.length;i+=1){var o=n[i];for(var a in o)t[a]=o[a]}return t}var g=1;function _(){return g++}function x(t,e){t.forEach((function(t){e[t]&&(e[t]=e[t].bind(e))}))}function b(t,e){return-1!==t.indexOf(e,t.length-e.length)}function w(t,e,r){var i={};for(var n in t)i[n]=e.call(r||this,t[n],n,t);return i}function E(t,e,r){var i={};for(var n in t)e.call(r||this,t[n],n,t)&&(i[n]=t[n]);return i}function S(t){return Array.isArray(t)?t.map(S):"object"==typeof t&&t?w(t,S):t}var T={};function A(t){T[t]||("undefined"!=typeof console&&console.warn(t),T[t]=!0)}function z(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function I(t){for(var e=0,r=0,i=t.length,n=i-1,o=void 0,a=void 0;r<i;n=r++)o=t[r],e+=((a=t[n]).x-o.x)*(o.y+a.y);return e}var k={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(k);var M=function(t){function e(e,r,i){t.call(this,e),this.status=r,this.url=i,this.name=this.constructor.name,this.message=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},e}(Error);function C(t){var e=new self.XMLHttpRequest;for(var r in e.open("GET",t.url,!0),t.headers)e.setRequestHeader(r,t.headers[r]);return e.withCredentials="include"===t.credentials,e}var P=function(t,e){var r=C(t);return r.responseType="arraybuffer",r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){var i=r.response;if(0===i.byteLength&&200===r.status)return e(new Error("http status 200 returned without content."));r.status>=200&&r.status<300&&r.response?e(null,{data:i,cacheControl:r.getResponseHeader("Cache-Control"),expires:r.getResponseHeader("Expires")}):e(new M(r.statusText,r.status,t.url))},r.send(),{cancel:function(){return r.abort()}}};function L(t,e,r){r[t]&&-1!==r[t].indexOf(e)||(r[t]=r[t]||[],r[t].push(e))}function D(t,e,r){if(r&&r[t]){var i=r[t].indexOf(e);-1!==i&&r[t].splice(i,1)}}var R=function(t,e){void 0===e&&(e={}),v(this,e),this.type=t},B=function(t){function e(e,r){void 0===r&&(r={}),t.call(this,"error",v({error:e},r))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(R),O=function(){};O.prototype.on=function(t,e){return this._listeners=this._listeners||{},L(t,e,this._listeners),this},O.prototype.off=function(t,e){return D(t,e,this._listeners),D(t,e,this._oneTimeListeners),this},O.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},L(t,e,this._oneTimeListeners),this},O.prototype.fire=function(t){"string"==typeof t&&(t=new R(t,arguments[1]||{}));var e=t.type;if(this.listens(e)){t.target=this;for(var r=0,i=this._listeners&&this._listeners[e]?this._listeners[e].slice():[];r<i.length;r+=1){i[r].call(this,t)}for(var n=0,o=this._oneTimeListeners&&this._oneTimeListeners[e]?this._oneTimeListeners[e].slice():[];n<o.length;n+=1){var a=o[n];D(e,a,this._oneTimeListeners),a.call(this,t)}var s=this._eventedParent;s&&(v(t,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),s.fire(t))}else t instanceof B&&console.error(t.error);return this},O.prototype.listens=function(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},O.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var F={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number","default":0,period:360,units:"degrees"},pitch:{type:"number","default":0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,"default":[-180,-85.0511,180,85.0511]},scheme:{type:"enum",values:{xyz:{},tms:{}},"default":"xyz"},minzoom:{type:"number","default":0},maxzoom:{type:"number","default":22},attribution:{type:"string"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,"default":[-180,-85.0511,180,85.0511]},minzoom:{type:"number","default":0},maxzoom:{type:"number","default":22},tileSize:{type:"number","default":512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},"default":"xyz"},attribution:{type:"string"},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,"default":[-180,-85.0511,180,85.0511]},minzoom:{type:"number","default":0},maxzoom:{type:"number","default":22},tileSize:{type:"number","default":512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},"default":"mapbox"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number","default":18},attribution:{type:"string"},buffer:{type:"number","default":128,maximum:512,minimum:0},tolerance:{type:"number","default":.375},cluster:{type:"boolean","default":!1},clusterRadius:{type:"number","default":50,minimum:0},clusterMaxZoom:{type:"number"},lineMetrics:{type:"boolean","default":!1}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},"default":"visible","property-type":"constant"}},layout_fill:{visibility:{type:"enum",values:{visible:{},none:{}},"default":"visible","property-type":"constant"}},layout_circle:{visibility:{type:"enum",values:{visible:{},none:{}},"default":"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},"default":"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},"default":"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},"default":"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number","default":2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number","default":1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},"default":"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},"default":"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number","default":250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean","default":!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean","default":!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean","default":!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean","default":!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},"default":"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number","default":1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},"default":"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,"default":[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"string",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number","default":0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number","default":2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean","default":!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,"default":[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},"default":"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},"default":"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},"default":"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"string","default":"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string","default":["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number","default":16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number","default":10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number","default":1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number","default":0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{left:{},center:{},right:{}},"default":"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number","default":45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number","default":0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number","default":2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean","default":!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},"default":"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,"default":[0,0],requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean","default":!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean","default":!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean","default":!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},"default":"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},"default":"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},"default":"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},"in":{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{"let":{group:"Variable binding"},"var":{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},"case":{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},"typeof":{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Heatmap"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum","default":"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array","default":[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant","default":"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant","default":.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean","default":!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number","default":1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color","default":"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,"default":[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},"default":"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"}},paint_line:{"line-opacity":{type:"number","default":1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color","default":"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,"default":[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},"default":"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number","default":1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number","default":0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number","default":0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number","default":0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number","default":5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color","default":"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number","default":0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number","default":1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,"default":[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},"default":"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},"default":"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},"default":"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number","default":0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color","default":"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number","default":1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number","default":30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number","default":1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number","default":1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color","default":["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number","default":1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number","default":1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color","default":"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color","default":"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number","default":0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number","default":0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,"default":[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},"default":"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number","default":1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color","default":"#000000",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color","default":"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number","default":0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number","default":0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,"default":[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},"default":"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number","default":1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number","default":0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number","default":0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number","default":1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number","default":0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number","default":0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},"default":"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number","default":300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number","default":335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},"default":"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number","default":.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color","default":"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color","default":"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color","default":"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color","default":"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number","default":1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number","default":300,minimum:0,units:"milliseconds"},delay:{type:"number","default":0,minimum:0,units:"milliseconds"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},"default":"visible","property-type":"constant"}},"function":{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number","default":1,minimum:0},property:{type:"string","default":"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},"default":"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},"default":"rgb"},"default":{type:"*",required:!1}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number","default":1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color","default":"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,"default":[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},"default":"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"fill-extrusion-height":{type:"number","default":0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number","default":0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}}},V=function(t,e,r,i){this.message=(t?t+": ":"")+r,i&&(this.identifier=i),null!=e&&e.__line__&&(this.line=e.__line__)};function N(t){var e=t.key,r=t.value;return r?[new V(e,r,"constants have been deprecated as of v8")]:[]}function j(t){for(var e=[],r=arguments.length-1;r-->0;)e[r]=arguments[r+1];for(var i=0,n=e;i<n.length;i+=1){var o=n[i];for(var a in o)t[a]=o[a]}return t}function U(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function q(t){return Array.isArray(t)?t.map(q):U(t)}var $=function(t){function e(e,r){t.call(this,r),this.message=r,this.key=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),Z=function(t,e){void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var r=0,i=e;r<i.length;r+=1){var n=i[r],o=n[0],a=n[1];this.bindings[o]=a}};Z.prototype.concat=function(t){return new Z(this,t)},Z.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+" not found in scope.")},Z.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var G={kind:"null"},W={kind:"number"},X={kind:"string"},H={kind:"boolean"},K={kind:"color"},J={kind:"object"},Y={kind:"value"},Q={kind:"collator"};function tt(t,e){return{kind:"array",itemType:t,N:e}}function et(t){if("array"===t.kind){var e=et(t.itemType);return"number"==typeof t.N?"array<"+e+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var rt=[G,W,X,H,K,J,tt(Y)];function it(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&!it(t.itemType,e.itemType)&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var r=0,i=rt;r<i.length;r+=1){if(!it(i[r],e))return null}}return"Expected "+et(t)+" but found "+et(e)+" instead."}var nt=r((function(t,e){var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function i(t){return(t=Math.round(t))<0?0:t>255?255:t}function n(t){return t<0?0:t>1?1:t}function o(t){return"%"===t[t.length-1]?i(parseFloat(t)/100*255):i(parseInt(t))}function a(t){return"%"===t[t.length-1]?n(parseFloat(t)/100):n(parseFloat(t))}function s(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}try{e.parseCSSColor=function(t){var e,n=t.replace(/ /g,"").toLowerCase();if(n in r)return r[n].slice();if("#"===n[0])return 4===n.length?(e=parseInt(n.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===n.length&&(e=parseInt(n.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=n.indexOf("("),u=n.indexOf(")");if(-1!==l&&u+1===n.length){var c=n.substr(0,l),h=n.substr(l+1,u-(l+1)).split(","),p=1;switch(c){case"rgba":if(4!==h.length)return null;p=a(h.pop());case"rgb":return 3!==h.length?null:[o(h[0]),o(h[1]),o(h[2]),p];case"hsla":if(4!==h.length)return null;p=a(h.pop());case"hsl":if(3!==h.length)return null;var f=(parseFloat(h[0])%360+360)%360/360,d=a(h[1]),m=a(h[2]),y=m<=.5?m*(d+1):m+d-m*d,v=2*m-y;return[i(255*s(v,y,f+1/3)),i(255*s(v,y,f)),i(255*s(v,y,f-1/3)),p];default:return null}}return null}}catch(t){}})).parseCSSColor,ot=function(t,e,r,i){void 0===i&&(i=1),this.r=t,this.g=e,this.b=r,this.a=i};ot.parse=function(t){if(t){if(t instanceof ot)return t;if("string"==typeof t){var e=nt(t);if(e)return new ot(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},ot.prototype.toString=function(){var t=this.toArray(),e=t[0],r=t[1],i=t[2],n=t[3];return"rgba("+Math.round(e)+","+Math.round(r)+","+Math.round(i)+","+n+")"},ot.prototype.toArray=function(){var t=this.r,e=this.g,r=this.b,i=this.a;return 0===i?[0,0,0,0]:[255*t/i,255*e/i,255*r/i,i]},ot.black=new ot(0,0,0,1),ot.white=new ot(1,1,1,1),ot.transparent=new ot(0,0,0,0);var at=function(t,e,r){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};at.prototype.compare=function(t,e){return this.collator.compare(t,e)},at.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var st=function(t,e,r){this.type=Q,this.locale=r,this.caseSensitive=t,this.diacriticSensitive=e};function lt(t,e,r,i){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===i||"number"==typeof i&&i>=0&&i<=1?null:"Invalid rgba value ["+[t,e,r,i].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof i?[t,e,r,i]:[t,e,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function ut(t){if(null===t)return G;if("string"==typeof t)return X;if("boolean"==typeof t)return H;if("number"==typeof t)return W;if(t instanceof ot)return K;if(t instanceof at)return Q;if(Array.isArray(t)){for(var e,r=t.length,i=0,n=t;i<n.length;i+=1){var o=ut(n[i]);if(e){if(e===o)continue;e=Y;break}e=o}return tt(e||Y,r)}return J}st.parse=function(t,e){if(2!==t.length)return e.error("Expected one argument.");var r=t[1];if("object"!=typeof r||Array.isArray(r))return e.error("Collator options argument must be an object.");var i=e.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,H);if(!i)return null;var n=e.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,H);if(!n)return null;var o=null;return r.locale&&!(o=e.parse(r.locale,1,X))?null:new st(i,n,o)},st.prototype.evaluate=function(t){return new at(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},st.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},st.prototype.possibleOutputs=function(){return[void 0]},st.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var ct=function(t,e){this.type=t,this.value=e};ct.parse=function(t,e){if(2!==t.length)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!function o(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof ot)return!0;if(t instanceof at)return!0;if(Array.isArray(t)){for(var e=0,r=t;e<r.length;e+=1)if(!o(r[e]))return!1;return!0}if("object"==typeof t){for(var i in t)if(!o(t[i]))return!1;return!0}return!1}(t[1]))return e.error("invalid value");var r=t[1],i=ut(r),n=e.expectedType;return"array"!==i.kind||0!==i.N||!n||"array"!==n.kind||"number"==typeof n.N&&0!==n.N||(i=n),new ct(i,r)},ct.prototype.evaluate=function(){return this.value},ct.prototype.eachChild=function(){},ct.prototype.possibleOutputs=function(){return[this.value]},ct.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof ot?["rgba"].concat(this.value.toArray()):this.value};var ht=function(t){this.name="ExpressionEvaluationError",this.message=t};ht.prototype.toJSON=function(){return this.message};var pt={string:X,number:W,boolean:H,object:J},ft=function(t,e){this.type=t,this.args=e};ft.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");for(var r=t[0],i=pt[r],n=[],o=1;o<t.length;o++){var a=e.parse(t[o],o,Y);if(!a)return null;n.push(a)}return new ft(i,n)},ft.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var r=this.args[e].evaluate(t);if(!it(this.type,ut(r)))return r;if(e===this.args.length-1)throw new ht("Expected value to be of type "+et(this.type)+", but found "+et(ut(r))+" instead.")}return null},ft.prototype.eachChild=function(t){this.args.forEach(t)},ft.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map((function(t){return t.possibleOutputs()})));var t},ft.prototype.serialize=function(){return[this.type.kind].concat(this.args.map((function(t){return t.serialize()})))};var dt={string:X,number:W,boolean:H},mt=function(t,e){this.type=t,this.input=e};mt.parse=function(t,e){if(t.length<2||t.length>4)return e.error("Expected 1, 2, or 3 arguments, but found "+(t.length-1)+" instead.");var r,i;if(t.length>2){var n=t[1];if("string"!=typeof n||!(n in dt))return e.error('The item type argument of "array" must be one of string, number, boolean',1);r=dt[n]}else r=Y;if(t.length>3){if("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2]))return e.error('The length argument to "array" must be a positive integer literal',2);i=t[2]}var o=tt(r,i),a=e.parse(t[t.length-1],t.length-1,Y);return a?new mt(o,a):null},mt.prototype.evaluate=function(t){var e=this.input.evaluate(t);if(it(this.type,ut(e)))throw new ht("Expected value to be of type "+et(this.type)+", but found "+et(ut(e))+" instead.");return e},mt.prototype.eachChild=function(t){t(this.input)},mt.prototype.possibleOutputs=function(){return this.input.possibleOutputs()},mt.prototype.serialize=function(){var t=["array"],e=this.type.itemType;if("string"===e.kind||"number"===e.kind||"boolean"===e.kind){t.push(e.kind);var r=this.type.N;"number"==typeof r&&t.push(r)}return t.push(this.input.serialize()),t};var yt={"to-number":W,"to-color":K},vt=function(t,e){this.type=t,this.args=e};vt.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");for(var r=t[0],i=yt[r],n=[],o=1;o<t.length;o++){var a=e.parse(t[o],o,Y);if(!a)return null;n.push(a)}return new vt(i,n)},vt.prototype.evaluate=function(t){if("color"===this.type.kind){for(var e,r,i=0,n=this.args;i<n.length;i+=1){if(r=null,"string"==typeof(e=n[i].evaluate(t))){var o=t.parseColor(e);if(o)return o}else if(Array.isArray(e)&&!(r=e.length<3||e.length>4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":lt(e[0],e[1],e[2],e[3])))return new ot(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new ht(r||"Could not parse color from value '"+("string"==typeof e?e:JSON.stringify(e))+"'")}for(var a=null,s=0,l=this.args;s<l.length;s+=1){if(null!==(a=l[s].evaluate(t))){var u=Number(a);if(!isNaN(u))return u}}throw new ht("Could not convert "+JSON.stringify(a)+" to number.")},vt.prototype.eachChild=function(t){this.args.forEach(t)},vt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map((function(t){return t.possibleOutputs()})));var t},vt.prototype.serialize=function(){var t=["to-"+this.type.kind];return this.eachChild((function(e){t.push(e.serialize())})),t};var gt=["Unknown","Point","LineString","Polygon"],_t=function(){this._parseColorCache={}};_t.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},_t.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?gt[this.feature.type]:this.feature.type:null},_t.prototype.properties=function(){return this.feature&&this.feature.properties||{}},_t.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=ot.parse(t)),e};var xt=function(t,e,r,i){this.name=t,this.type=e,this._evaluate=r,this.args=i};function bt(t){if(t instanceof xt){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}var e=!0;return t.eachChild((function(t){e&&!bt(t)&&(e=!1)})),e}function wt(t){if(t instanceof xt&&"feature-state"===t.name)return!1;var e=!0;return t.eachChild((function(t){e&&!wt(t)&&(e=!1)})),e}function Et(t,e){if(t instanceof xt&&e.indexOf(t.name)>=0)return!1;var r=!0;return t.eachChild((function(t){r&&!Et(t,e)&&(r=!1)})),r}xt.prototype.evaluate=function(t){return this._evaluate(t,this.args)},xt.prototype.eachChild=function(t){this.args.forEach(t)},xt.prototype.possibleOutputs=function(){return[void 0]},xt.prototype.serialize=function(){return[this.name].concat(this.args.map((function(t){return t.serialize()})))},xt.parse=function(t,e){var r=t[0],i=xt.definitions[r];if(!i)return e.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0);for(var n=Array.isArray(i)?i[0]:i.type,o=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,a=o.filter((function(e){var r=e[0];return!Array.isArray(r)||r.length===t.length-1})),s=[],l=1;l<t.length;l++){var u=t[l],c=void 0;if(1===a.length){var h=a[0][0];c=Array.isArray(h)?h[l-1]:h.type}var p=e.parse(u,1+s.length,c);if(!p)return null;s.push(p)}for(var f=null,d=0,m=a;d<m.length;d+=1){var y=m[d],v=y[0],g=y[1];if(f=new Tt(e.registry,e.path,null,e.scope),Array.isArray(v)&&v.length!==s.length)f.error("Expected "+v.length+" arguments, but found "+s.length+" instead.");else{for(var _=0;_<s.length;_++){var x=Array.isArray(v)?v[_]:v.type,b=s[_];f.concat(_+1).checkSubtype(x,b.type)}if(0===f.errors.length)return new xt(r,n,g,s)}}if(1===a.length)e.errors.push.apply(e.errors,f.errors);else{var w=(a.length?a:o).map((function(t){var e,r=t[0];return e=r,Array.isArray(e)?"("+e.map(et).join(", ")+")":"("+et(e.type)+"...)"})).join(" | "),E=s.map((function(t){return et(t.type)})).join(", ");e.error("Expected arguments of type "+w+", but found ("+E+") instead.")}return null},xt.register=function(t,e){for(var r in xt.definitions=e,e)t[r]=xt};var St=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};St.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var r=t[1];return e.scope.has(r)?new St(r,e.scope.get(r)):e.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},St.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},St.prototype.eachChild=function(){},St.prototype.possibleOutputs=function(){return[void 0]},St.prototype.serialize=function(){return["var",this.name]};var Tt=function(t,e,r,i,n){void 0===e&&(e=[]),void 0===i&&(i=new Z),void 0===n&&(n=[]),this.registry=t,this.path=e,this.key=e.map((function(t){return"["+t+"]"})).join(""),this.scope=i,this.errors=n,this.expectedType=r};function At(t,e){for(var r,i,n=0,o=t.length-1,a=0;n<=o;){if(r=t[a=Math.floor((n+o)/2)],i=t[a+1],e===r||e>r&&e<i)return a;if(r<e)n=a+1;else{if(!(r>e))throw new ht("Input is not a number.");o=a-1}}return Math.max(a-1,0)}Tt.prototype.parse=function(t,e,r,i,n){return void 0===n&&(n={}),e?this.concat(e,r,i)._parse(t,n):this._parse(t,n)},Tt.prototype._parse=function(t,e){if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var r=t[0];if("string"!=typeof r)return this.error("Expression name must be a string, but found "+typeof r+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[r];if(i){var n=i.parse(t,this);if(!n)return null;if(this.expectedType){var o=this.expectedType,a=n.type;if("string"!==o.kind&&"number"!==o.kind&&"boolean"!==o.kind&&"object"!==o.kind||"value"!==a.kind)if("array"===o.kind&&"value"===a.kind)e.omitTypeAnnotations||(n=new mt(o,n));else if("color"!==o.kind||"value"!==a.kind&&"string"!==a.kind){if(this.checkSubtype(this.expectedType,n.type))return null}else e.omitTypeAnnotations||(n=new vt(o,[n]));else e.omitTypeAnnotations||(n=new ft(o,[n]))}if(!(n instanceof ct)&&function r(t){if(t instanceof St)return r(t.boundExpression);if(t instanceof xt&&"error"===t.name)return!1;if(t instanceof st)return!1;var e=t instanceof vt||t instanceof ft||t instanceof mt;var i=!0;t.eachChild((function(t){i=e?i&&r(t):i&&t instanceof ct}));if(!i)return!1;return bt(t)&&Et(t,["zoom","heatmap-density","line-progress","is-supported-script"])}(n)){var s=new _t;try{n=new ct(n.type,n.evaluate(s))}catch(t){return this.error(t.message),null}}return n}return this.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},Tt.prototype.concat=function(t,e,r){var i="number"==typeof t?this.path.concat(t):this.path,n=r?this.scope.concat(r):this.scope;return new Tt(this.registry,i,e||null,n,this.errors)},Tt.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-->0;)e[r]=arguments[r+1];var i=""+this.key+e.map((function(t){return"["+t+"]"})).join("");this.errors.push(new $(i,t))},Tt.prototype.checkSubtype=function(t,e){var r=it(t,e);return r&&this.error(r),r};var zt=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var i=0,n=r;i<n.length;i+=1){var o=n[i],a=o[0],s=o[1];this.labels.push(a),this.outputs.push(s)}};function It(t,e,r){return t*(1-r)+e*r}zt.parse=function(t,e){var r=t[1],i=t.slice(2);if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(r=e.parse(r,1,W)))return null;var n=[],o=null;e.expectedType&&"value"!==e.expectedType.kind&&(o=e.expectedType),i.unshift(-1/0);for(var a=0;a<i.length;a+=2){var s=i[a],l=i[a+1],u=a+1,c=a+2;if("number"!=typeof s)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',u);if(n.length&&n[n.length-1][0]>=s)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);var h=e.parse(l,c,o);if(!h)return null;o=o||h.type,n.push([s,h])}return new zt(o,r,n)},zt.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var i=this.input.evaluate(t);if(i<=e[0])return r[0].evaluate(t);var n=e.length;return i>=e[n-1]?r[n-1].evaluate(t):r[At(e,i)].evaluate(t)},zt.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1){t(r[e])}},zt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map((function(t){return t.possibleOutputs()})));var t},zt.prototype.serialize=function(){for(var t=["step",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var kt=Object.freeze({number:It,color:function(t,e,r){return new ot(It(t.r,e.r,r),It(t.g,e.g,r),It(t.b,e.b,r),It(t.a,e.a,r))},array:function(t,e,r){return t.map((function(t,i){return It(t,e[i],r)}))}}),Mt=function(t,e,r,i){this.type=t,this.interpolation=e,this.input=r,this.labels=[],this.outputs=[];for(var n=0,o=i;n<o.length;n+=1){var a=o[n],s=a[0],l=a[1];this.labels.push(s),this.outputs.push(l)}};function Ct(t,e,r,i){var n=i-r,o=t-r;return 0===n?0:1===e?o/n:(Math.pow(e,o)-1)/(Math.pow(e,n)-1)}Mt.interpolationFactor=function(t,e,r,i){var n=0;if("exponential"===t.name)n=Ct(e,t.base,r,i);else if("linear"===t.name)n=Ct(e,1,r,i);else if("cubic-bezier"===t.name){var o=t.controlPoints;n=new l(o[0],o[1],o[2],o[3]).solve(Ct(e,1,r,i))}return n},Mt.parse=function(t,e){var r=t[1],i=t[2],n=t.slice(3);if(!Array.isArray(r)||0===r.length)return e.error("Expected an interpolation type expression.",1);if("linear"===r[0])r={name:"linear"};else if("exponential"===r[0]){var o=r[1];if("number"!=typeof o)return e.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:o}}else{if("cubic-bezier"!==r[0])return e.error("Unknown interpolation type "+String(r[0]),1,0);var a=r.slice(1);if(4!==a.length||a.some((function(t){return"number"!=typeof t||t<0||t>1})))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:a}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(i=e.parse(i,2,W)))return null;var s=[],l=null;e.expectedType&&"value"!==e.expectedType.kind&&(l=e.expectedType);for(var u=0;u<n.length;u+=2){var c=n[u],h=n[u+1],p=u+3,f=u+4;if("number"!=typeof c)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',p);if(s.length&&s[s.length-1][0]>=c)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',p);var d=e.parse(h,f,l);if(!d)return null;l=l||d.type,s.push([c,d])}return"number"===l.kind||"color"===l.kind||"array"===l.kind&&"number"===l.itemType.kind&&"number"==typeof l.N?new Mt(l,r,i,s):e.error("Type "+et(l)+" is not interpolatable.")},Mt.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var i=this.input.evaluate(t);if(i<=e[0])return r[0].evaluate(t);var n=e.length;if(i>=e[n-1])return r[n-1].evaluate(t);var o=At(e,i),a=e[o],s=e[o+1],l=Mt.interpolationFactor(this.interpolation,i,a,s),u=r[o].evaluate(t),c=r[o+1].evaluate(t);return kt[this.type.kind.toLowerCase()](u,c,l)},Mt.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1){t(r[e])}},Mt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map((function(t){return t.possibleOutputs()})));var t},Mt.prototype.serialize=function(){for(var t=["interpolate","linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints),this.input.serialize()],e=0;e<this.labels.length;e++)t.push(this.labels[e],this.outputs[e].serialize());return t};var Pt=function(t,e){this.type=t,this.args=e};Pt.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var r=null,i=e.expectedType;i&&"value"!==i.kind&&(r=i);for(var n=[],o=0,a=t.slice(1);o<a.length;o+=1){var s=a[o],l=e.parse(s,1+n.length,r,void 0,{omitTypeAnnotations:!0});if(!l)return null;r=r||l.type,n.push(l)}var u=i&&n.some((function(t){return it(i,t.type)}));return new Pt(u?Y:r,n)},Pt.prototype.evaluate=function(t){for(var e=null,r=0,i=this.args;r<i.length;r+=1){if(null!==(e=i[r].evaluate(t)))break}return e},Pt.prototype.eachChild=function(t){this.args.forEach(t)},Pt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.args.map((function(t){return t.possibleOutputs()})));var t},Pt.prototype.serialize=function(){var t=["coalesce"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Lt=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};Lt.prototype.evaluate=function(t){return this.result.evaluate(t)},Lt.prototype.eachChild=function(t){for(var e=0,r=this.bindings;e<r.length;e+=1){t(r[e][1])}t(this.result)},Lt.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var r=[],i=1;i<t.length-1;i+=2){var n=t[i];if("string"!=typeof n)return e.error("Expected string, but found "+typeof n+" instead.",i);if(/[^a-zA-Z0-9_]/.test(n))return e.error("Variable names must contain only alphanumeric characters or '_'.",i);var o=e.parse(t[i+1],i+1);if(!o)return null;r.push([n,o])}var a=e.parse(t[t.length-1],t.length-1,void 0,r);return a?new Lt(r,a):null},Lt.prototype.possibleOutputs=function(){return this.result.possibleOutputs()},Lt.prototype.serialize=function(){for(var t=["let"],e=0,r=this.bindings;e<r.length;e+=1){var i=r[e],n=i[0],o=i[1];t.push(n,o.serialize())}return t.push(this.result.serialize()),t};var Dt=function(t,e,r){this.type=t,this.index=e,this.input=r};Dt.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,W),i=e.parse(t[2],2,tt(e.expectedType||Y));if(!r||!i)return null;var n=i.type;return new Dt(n.itemType,r,i)},Dt.prototype.evaluate=function(t){var e=this.index.evaluate(t),r=this.input.evaluate(t);if(e<0)throw new ht("Array index out of bounds: "+e+" < 0.");if(e>=r.length)throw new ht("Array index out of bounds: "+e+" > "+(r.length-1)+".");if(e!==Math.floor(e))throw new ht("Array index must be an integer, but found "+e+" instead.");return r[e]},Dt.prototype.eachChild=function(t){t(this.index),t(this.input)},Dt.prototype.possibleOutputs=function(){return[void 0]},Dt.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Rt=function(t,e,r,i,n,o){this.inputType=t,this.type=e,this.input=r,this.cases=i,this.outputs=n,this.otherwise=o};Rt.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var r,i;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(var n={},o=[],a=2;a<t.length-1;a+=2){var s=t[a],l=t[a+1];Array.isArray(s)||(s=[s]);var u=e.concat(a);if(0===s.length)return u.error("Expected at least one branch label.");for(var c=0,h=s;c<h.length;c+=1){var p=h[c];if("number"!=typeof p&&"string"!=typeof p)return u.error("Branch labels must be numbers or strings.");if("number"==typeof p&&Math.abs(p)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof p&&Math.floor(p)!==p)return u.error("Numeric branch labels must be integer values.");if(r){if(u.checkSubtype(r,ut(p)))return null}else r=ut(p);if(void 0!==n[String(p)])return u.error("Branch labels must be unique.");n[String(p)]=o.length}var f=e.parse(l,a,i);if(!f)return null;i=i||f.type,o.push(f)}var d=e.parse(t[1],1,Y);if(!d)return null;var m=e.parse(t[t.length-1],t.length-1,i);return m?"value"!==d.type.kind&&e.concat(1).checkSubtype(r,d.type)?null:new Rt(r,i,d,n,o,m):null},Rt.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(ut(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},Rt.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},Rt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.outputs.map((function(t){return t.possibleOutputs()}))).concat(this.otherwise.possibleOutputs());var t},Rt.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],r=[],i={},n=0,o=Object.keys(this.cases).sort();n<o.length;n+=1){var a=o[n],s=i[t.cases[a]];void 0===s?(i[t.cases[a]]=r.length,r.push([t.cases[a],[a]])):r[s][1].push(a)}for(var l=function(e){return"number"===t.inputType.kind?Number(e):e},u=0,c=r;u<c.length;u+=1){var h=c[u],p=h[0],f=h[1];1===f.length?e.push(l(f[0])):e.push(f.map(l)),e.push(t.outputs[p].serialize())}return e.push(this.otherwise.serialize()),e};var Bt=function(t,e,r){this.type=t,this.branches=e,this.otherwise=r};function Ot(t){return"string"===t.kind||"number"===t.kind||"boolean"===t.kind||"null"===t.kind}function Ft(t,e){return function(){function r(t,e,r){this.type=H,this.lhs=t,this.rhs=e,this.collator=r}return r.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");var i=e.parse(t[1],1,Y);if(!i)return null;var n=e.parse(t[2],2,Y);if(!n)return null;if(!Ot(i.type)&&!Ot(n.type))return e.error("Expected at least one argument to be a string, number, boolean, or null, but found ("+et(i.type)+", "+et(n.type)+") instead.");if(i.type.kind!==n.type.kind&&"value"!==i.type.kind&&"value"!==n.type.kind)return e.error("Cannot compare "+et(i.type)+" and "+et(n.type)+".");var o=null;if(4===t.length){if("string"!==i.type.kind&&"string"!==n.type.kind)return e.error("Cannot use collator to compare non-string types.");if(!(o=e.parse(t[3],3,Q)))return null}return new r(i,n,o)},r.prototype.evaluate=function(t){var r=this.collator?0===this.collator.evaluate(t).compare(this.lhs.evaluate(t),this.rhs.evaluate(t)):this.lhs.evaluate(t)===this.rhs.evaluate(t);return e?!r:r},r.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},r.prototype.possibleOutputs=function(){return[!0,!1]},r.prototype.serialize=function(){var e=[t];return this.eachChild((function(t){e.push(t.serialize())})),e},r}()}Bt.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!=0)return e.error("Expected an odd number of arguments.");var r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var i=[],n=1;n<t.length-1;n+=2){var o=e.parse(t[n],n,H);if(!o)return null;var a=e.parse(t[n+1],n+1,r);if(!a)return null;i.push([o,a]),r=r||a.type}var s=e.parse(t[t.length-1],t.length-1,r);return s?new Bt(r,i,s):null},Bt.prototype.evaluate=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var i=r[e],n=i[0],o=i[1];if(n.evaluate(t))return o.evaluate(t)}return this.otherwise.evaluate(t)},Bt.prototype.eachChild=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var i=r[e],n=i[0],o=i[1];t(n),t(o)}t(this.otherwise)},Bt.prototype.possibleOutputs=function(){return(t=[]).concat.apply(t,this.branches.map((function(t){t[0];return t[1].possibleOutputs()}))).concat(this.otherwise.possibleOutputs());var t},Bt.prototype.serialize=function(){var t=["case"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Vt=Ft("==",!1),Nt=Ft("!=",!0),jt=function(t){this.type=W,this.input=t};jt.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error("Expected argument of type string or array, but found "+et(r.type)+" instead."):new jt(r):null},jt.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new ht("Expected value to be of type string or array, but found "+et(ut(e))+" instead.")},jt.prototype.eachChild=function(t){t(this.input)},jt.prototype.possibleOutputs=function(){return[void 0]},jt.prototype.serialize=function(){var t=["length"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Ut={"==":Vt,"!=":Nt,array:mt,at:Dt,boolean:ft,"case":Bt,coalesce:Pt,collator:st,interpolate:Mt,length:jt,"let":Lt,literal:ct,match:Rt,number:ft,object:ft,step:zt,string:ft,"to-color":vt,"to-number":vt,"var":St};function qt(t,e){var r=e[0],i=e[1],n=e[2],o=e[3];r=r.evaluate(t),i=i.evaluate(t),n=n.evaluate(t);var a=o?o.evaluate(t):1,s=lt(r,i,n,a);if(s)throw new ht(s);return new ot(r/255*a,i/255*a,n/255*a,a)}function $t(t,e){return t in e}function Zt(t,e){var r=e[t];return void 0===r?null:r}function Gt(t,e){var r=e[0],i=e[1];return r.evaluate(t)<i.evaluate(t)}function Wt(t,e){var r=e[0],i=e[1];return r.evaluate(t)>i.evaluate(t)}function Xt(t,e){var r=e[0],i=e[1];return r.evaluate(t)<=i.evaluate(t)}function Ht(t,e){var r=e[0],i=e[1];return r.evaluate(t)>=i.evaluate(t)}function Kt(t){return{type:t}}function Jt(t){return{result:"success",value:t}}function Yt(t){return{result:"error",value:t}}function Qt(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function te(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function ee(t){return!!t.expression&&t.expression.interpolated}xt.register(Ut,{error:[{kind:"error"},[X],function(t,e){var r=e[0];throw new ht(r.evaluate(t))}],"typeof":[X,[Y],function(t,e){return et(ut(e[0].evaluate(t)))}],"to-string":[X,[Y],function(t,e){var r=e[0],i=typeof(r=r.evaluate(t));return null===r?"":"string"===i||"number"===i||"boolean"===i?String(r):r instanceof ot?r.toString():JSON.stringify(r)}],"to-boolean":[H,[Y],function(t,e){var r=e[0];return Boolean(r.evaluate(t))}],"to-rgba":[tt(W,4),[K],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[K,[W,W,W],qt],rgba:[K,[W,W,W,W],qt],has:{type:H,overloads:[[[X],function(t,e){return $t(e[0].evaluate(t),t.properties())}],[[X,J],function(t,e){var r=e[0],i=e[1];return $t(r.evaluate(t),i.evaluate(t))}]]},get:{type:Y,overloads:[[[X],function(t,e){return Zt(e[0].evaluate(t),t.properties())}],[[X,J],function(t,e){var r=e[0],i=e[1];return Zt(r.evaluate(t),i.evaluate(t))}]]},"feature-state":[Y,[X],function(t,e){return Zt(e[0].evaluate(t),t.featureState||{})}],properties:[J,[],function(t){return t.properties()}],"geometry-type":[X,[],function(t){return t.geometryType()}],id:[Y,[],function(t){return t.id()}],zoom:[W,[],function(t){return t.globals.zoom}],"heatmap-density":[W,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[W,[],function(t){return t.globals.lineProgress||0}],"+":[W,Kt(W),function(t,e){for(var r=0,i=0,n=e;i<n.length;i+=1){r+=n[i].evaluate(t)}return r}],"*":[W,Kt(W),function(t,e){for(var r=1,i=0,n=e;i<n.length;i+=1){r*=n[i].evaluate(t)}return r}],"-":{type:W,overloads:[[[W,W],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)-i.evaluate(t)}],[[W],function(t,e){return-e[0].evaluate(t)}]]},"/":[W,[W,W],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)/i.evaluate(t)}],"%":[W,[W,W],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)%i.evaluate(t)}],ln2:[W,[],function(){return Math.LN2}],pi:[W,[],function(){return Math.PI}],e:[W,[],function(){return Math.E}],"^":[W,[W,W],function(t,e){var r=e[0],i=e[1];return Math.pow(r.evaluate(t),i.evaluate(t))}],sqrt:[W,[W],function(t,e){var r=e[0];return Math.sqrt(r.evaluate(t))}],log10:[W,[W],function(t,e){var r=e[0];return Math.log10(r.evaluate(t))}],ln:[W,[W],function(t,e){var r=e[0];return Math.log(r.evaluate(t))}],log2:[W,[W],function(t,e){var r=e[0];return Math.log2(r.evaluate(t))}],sin:[W,[W],function(t,e){var r=e[0];return Math.sin(r.evaluate(t))}],cos:[W,[W],function(t,e){var r=e[0];return Math.cos(r.evaluate(t))}],tan:[W,[W],function(t,e){var r=e[0];return Math.tan(r.evaluate(t))}],asin:[W,[W],function(t,e){var r=e[0];return Math.asin(r.evaluate(t))}],acos:[W,[W],function(t,e){var r=e[0];return Math.acos(r.evaluate(t))}],atan:[W,[W],function(t,e){var r=e[0];return Math.atan(r.evaluate(t))}],min:[W,Kt(W),function(t,e){return Math.min.apply(Math,e.map((function(e){return e.evaluate(t)})))}],max:[W,Kt(W),function(t,e){return Math.max.apply(Math,e.map((function(e){return e.evaluate(t)})))}],abs:[W,[W],function(t,e){var r=e[0];return Math.abs(r.evaluate(t))}],round:[W,[W],function(t,e){var r=e[0].evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[W,[W],function(t,e){var r=e[0];return Math.floor(r.evaluate(t))}],ceil:[W,[W],function(t,e){var r=e[0];return Math.ceil(r.evaluate(t))}],"filter-==":[H,[X,Y],function(t,e){var r=e[0],i=e[1];return t.properties()[r.value]===i.value}],"filter-id-==":[H,[Y],function(t,e){var r=e[0];return t.id()===r.value}],"filter-type-==":[H,[X],function(t,e){var r=e[0];return t.geometryType()===r.value}],"filter-<":[H,[X,Y],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n<o}],"filter-id-<":[H,[Y],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i<n}],"filter->":[H,[X,Y],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n>o}],"filter-id->":[H,[Y],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i>n}],"filter-<=":[H,[X,Y],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n<=o}],"filter-id-<=":[H,[Y],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i<=n}],"filter->=":[H,[X,Y],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n>=o}],"filter-id->=":[H,[Y],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i>=n}],"filter-has":[H,[Y],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[H,[],function(t){return null!==t.id()}],"filter-type-in":[H,[tt(X)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[H,[tt(Y)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[H,[X,tt(Y)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[H,[X,tt(Y)],function(t,e){var r=e[0],i=e[1];return function(t,e,r,i){for(;r<=i;){var n=r+i>>1;if(e[n]===t)return!0;e[n]>t?i=n-1:r=n+1}return!1}(t.properties()[r.value],i.value,0,i.value.length-1)}],">":{type:H,overloads:[[[W,W],Wt],[[X,X],Wt],[[X,X,Q],function(t,e){var r=e[0],i=e[1];return e[2].evaluate(t).compare(r.evaluate(t),i.evaluate(t))>0}]]},"<":{type:H,overloads:[[[W,W],Gt],[[X,X],Gt],[[X,X,Q],function(t,e){var r=e[0],i=e[1];return e[2].evaluate(t).compare(r.evaluate(t),i.evaluate(t))<0}]]},">=":{type:H,overloads:[[[W,W],Ht],[[X,X],Ht],[[X,X,Q],function(t,e){var r=e[0],i=e[1];return e[2].evaluate(t).compare(r.evaluate(t),i.evaluate(t))>=0}]]},"<=":{type:H,overloads:[[[W,W],Xt],[[X,X],Xt],[[X,X,Q],function(t,e){var r=e[0],i=e[1];return e[2].evaluate(t).compare(r.evaluate(t),i.evaluate(t))<=0}]]},all:{type:H,overloads:[[[H,H],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)&&i.evaluate(t)}],[Kt(H),function(t,e){for(var r=0,i=e;r<i.length;r+=1){if(!i[r].evaluate(t))return!1}return!0}]]},any:{type:H,overloads:[[[H,H],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)||i.evaluate(t)}],[Kt(H),function(t,e){for(var r=0,i=e;r<i.length;r+=1){if(i[r].evaluate(t))return!0}return!1}]]},"!":[H,[H],function(t,e){return!e[0].evaluate(t)}],"is-supported-script":[H,[X],function(t,e){var r=e[0],i=t.globals&&t.globals.isSupportedScript;return!i||i(r.evaluate(t))}],upcase:[X,[X],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[X,[X],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[X,Kt(X),function(t,e){return e.map((function(e){return e.evaluate(t)})).join("")}],"resolved-locale":[X,[Q],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var re=.95047,ie=1,ne=1.08883,oe=4/29,ae=6/29,se=3*ae*ae,le=ae*ae*ae,ue=Math.PI/180,ce=180/Math.PI;function he(t){return t>le?Math.pow(t,1/3):t/se+oe}function pe(t){return t>ae?t*t*t:se*(t-oe)}function fe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function de(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function me(t){var e=de(t.r),r=de(t.g),i=de(t.b),n=he((.4124564*e+.3575761*r+.1804375*i)/re),o=he((.2126729*e+.7151522*r+.072175*i)/ie);return{l:116*o-16,a:500*(n-o),b:200*(o-he((.0193339*e+.119192*r+.9503041*i)/ne)),alpha:t.a}}function ye(t){var e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,i=isNaN(t.b)?e:e-t.b/200;return e=ie*pe(e),r=re*pe(r),i=ne*pe(i),new ot(fe(3.2404542*r-1.5371385*e-.4985314*i),fe(-.969266*r+1.8760108*e+.041556*i),fe(.0556434*r-.2040259*e+1.0572252*i),t.alpha)}var ve={forward:me,reverse:ye,interpolate:function(t,e,r){return{l:It(t.l,e.l,r),a:It(t.a,e.a,r),b:It(t.b,e.b,r),alpha:It(t.alpha,e.alpha,r)}}},ge={forward:function(t){var e=me(t),r=e.l,i=e.a,n=e.b,o=Math.atan2(n,i)*ce;return{h:o<0?o+360:o,c:Math.sqrt(i*i+n*n),l:r,alpha:t.a}},reverse:function(t){var e=t.h*ue,r=t.c;return ye({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:function(t,e,r){var i=e-t;return t+r*(i>180||i<-180?i-360*Math.round(i/360):i)}(t.h,e.h,r),c:It(t.c,e.c,r),l:It(t.l,e.l,r),alpha:It(t.alpha,e.alpha,r)}}},_e=Object.freeze({lab:ve,hcl:ge});function xe(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function be(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function we(t){return t}function Ee(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function Se(t,e,r,i,n){return Ee(typeof r===n?i[r]:void 0,t["default"],e["default"])}function Te(t,e,r){if("number"!==xe(r))return Ee(t["default"],e["default"]);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];var n=Ie(t.stops,r);return t.stops[n][1]}function Ae(t,e,r){var i=void 0!==t.base?t.base:1;if("number"!==xe(r))return Ee(t["default"],e["default"]);var n=t.stops.length;if(1===n)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];var o=Ie(t.stops,r),a=function(t,e,r,i){var n=i-r,o=t-r;return 0===n?0:1===e?o/n:(Math.pow(e,o)-1)/(Math.pow(e,n)-1)}(r,i,t.stops[o][0],t.stops[o+1][0]),s=t.stops[o][1],l=t.stops[o+1][1],u=kt[e.type]||we;if(t.colorSpace&&"rgb"!==t.colorSpace){var c=_e[t.colorSpace];u=function(t,e){return c.reverse(c.interpolate(c.forward(t),c.forward(e),a))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=s.evaluate.apply(void 0,t),i=l.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==i)return u(r,i,a)}}:u(s,l,a)}function ze(t,e,r){return"color"===e.type?r=ot.parse(r):xe(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),Ee(r,t["default"],e["default"])}function Ie(t,e){for(var r,i,n=0,o=t.length-1,a=0;n<=o;){if(r=t[a=Math.floor((n+o)/2)][0],i=t[a+1][0],e===r||e>r&&e<i)return a;r<e?n=a+1:r>e&&(o=a-1)}return Math.max(a-1,0)}var ke=function(t,e){var r;this.expression=t,this._warningHistory={},this._defaultValue="color"===(r=e).type&&be(r["default"])?new ot(0,0,0,0):"color"===r.type?ot.parse(r["default"])||null:void 0===r["default"]?null:r["default"],"enum"===e.type&&(this._enumValues=e.values)};function Me(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in Ut}function Ce(t,e){var r=new Tt(Ut,[],function(t){var e={color:K,string:X,number:W,"enum":X,boolean:H};if("array"===t.type)return tt(e[t.value]||Y,t.length);return e[t.type]||null}(e)),i=r.parse(t);return i?Jt(new ke(i,e)):Yt(r.errors)}ke.prototype.evaluateWithoutErrorHandling=function(t,e,r){return this._evaluator||(this._evaluator=new _t),this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this.expression.evaluate(this._evaluator)},ke.prototype.evaluate=function(t,e,r){this._evaluator||(this._evaluator=new _t),this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r;try{var i=this.expression.evaluate(this._evaluator);if(null==i)return this._defaultValue;if(this._enumValues&&!(i in this._enumValues))throw new ht("Expected value to be one of "+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(", ")+", but found "+JSON.stringify(i)+" instead.");return i}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Pe=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!wt(e.expression)};Pe.prototype.evaluateWithoutErrorHandling=function(t,e,r){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r)},Pe.prototype.evaluate=function(t,e,r){return this._styleExpression.evaluate(t,e,r)};var Le=function(t,e,r){this.kind=t,this.zoomStops=r.labels,this._styleExpression=e,this.isStateDependent="camera"!==t&&!wt(e.expression),r instanceof Mt&&(this._interpolationType=r.interpolation)};function De(t,e){if("error"===(t=Ce(t,e)).result)return t;var r=t.value.expression,i=bt(r);if(!i&&!Qt(e))return Yt([new $("","data expressions not supported")]);var n=Et(r,["zoom"]);if(!n&&!te(e))return Yt([new $("","zoom expressions not supported")]);var o=function a(t){var e=null;if(t instanceof Lt)e=a(t.result);else if(t instanceof Pt)for(var r=0,i=t.args;r<i.length;r+=1){var n=i[r];if(e=a(n))break}else(t instanceof zt||t instanceof Mt)&&t.input instanceof xt&&"zoom"===t.input.name&&(e=t);if(e instanceof $)return e;t.eachChild((function(t){var r=a(t);r instanceof $?e=r:!e&&r?e=new $("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&r&&e!==r&&(e=new $("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}));return e}(r);return o||n?o instanceof $?Yt([o]):o instanceof Mt&&!ee(e)?Yt([new $("",'"interpolate" expressions cannot be used with this property')]):Jt(o?new Le(i?"camera":"composite",t.value,o):new Pe(i?"constant":"source",t.value)):Yt([new $("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}Le.prototype.evaluateWithoutErrorHandling=function(t,e,r){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r)},Le.prototype.evaluate=function(t,e,r){return this._styleExpression.evaluate(t,e,r)},Le.prototype.interpolationFactor=function(t,e,r){return this._interpolationType?Mt.interpolationFactor(this._interpolationType,t,e,r):0};var Re=function(t,e){this._parameters=t,this._specification=e,j(this,function r(t,e){var i,n,o,a="color"===e.type,s=t.stops&&"object"==typeof t.stops[0][0],l=s||void 0!==t.property,u=s||!l,c=t.type||(ee(e)?"exponential":"interval");if(a&&((t=j({},t)).stops&&(t.stops=t.stops.map((function(t){return[t[0],ot.parse(t[1])]}))),t["default"]?t["default"]=ot.parse(t["default"]):t["default"]=ot.parse(e["default"])),t.colorSpace&&"rgb"!==t.colorSpace&&!_e[t.colorSpace])throw new Error("Unknown color space: "+t.colorSpace);if("exponential"===c)i=Ae;else if("interval"===c)i=Te;else if("categorical"===c){i=Se,n=Object.create(null);for(var h=0,p=t.stops;h<p.length;h+=1){var f=p[h];n[f[0]]=f[1]}o=typeof t.stops[0][0]}else{if("identity"!==c)throw new Error('Unknown function type "'+c+'"');i=ze}if(s){for(var d={},m=[],y=0;y<t.stops.length;y++){var v=t.stops[y],g=v[0].zoom;void 0===d[g]&&(d[g]={zoom:g,type:t.type,property:t.property,"default":t["default"],stops:[]},m.push(g)),d[g].stops.push([v[0].value,v[1]])}for(var _=[],x=0,b=m;x<b.length;x+=1){var w=b[x];_.push([d[w].zoom,r(d[w],e)])}return{kind:"composite",interpolationFactor:Mt.interpolationFactor.bind(void 0,{name:"linear"}),zoomStops:_.map((function(t){return t[0]})),evaluate:function(r,i){var n=r.zoom;return Ae({stops:_,base:t.base},e,n).evaluate(n,i)}}}return u?{kind:"camera",interpolationFactor:"exponential"===c?Mt.interpolationFactor.bind(void 0,{name:"exponential",base:void 0!==t.base?t.base:1}):function(){return 0},zoomStops:t.stops.map((function(t){return t[0]})),evaluate:function(r){var a=r.zoom;return i(t,e,a,n,o)}}:{kind:"source",evaluate:function(r,a){var s=a&&a.properties?a.properties[t.property]:void 0;return void 0===s?Ee(t["default"],e["default"]):i(t,e,s,n,o)}}}(this._parameters,this._specification))};function Be(t,e){if(be(t))return new Re(t,e);if(Me(t)){var r=De(t,e);if("error"===r.result)throw new Error(r.value.map((function(t){return t.key+": "+t.message})).join(", "));return r.value}var i=t;return"string"==typeof t&&"color"===e.type&&(i=ot.parse(t)),{kind:"constant",evaluate:function(){return i}}}function Oe(t){var e=t.key,r=t.value,i=t.valueSpec||{},n=t.objectElementValidators||{},o=t.style,a=t.styleSpec,s=[],l=xe(r);if("object"!==l)return[new V(e,r,"object expected, "+l+" found")];for(var u in r){var c=u.split(".")[0],h=i[c]||i["*"],p=void 0;if(n[c])p=n[c];else if(i[c])p=sr;else if(n["*"])p=n["*"];else{if(!i["*"]){s.push(new V(e,r[u],'unknown property "'+u+'"'));continue}p=sr}s=s.concat(p({key:(e?e+".":e)+u,value:r[u],valueSpec:h,style:o,styleSpec:a,object:r,objectKey:u},r))}for(var f in i)n[f]||i[f].required&&void 0===i[f]["default"]&&void 0===r[f]&&s.push(new V(e,r,'missing required property "'+f+'"'));return s}function Fe(t){var e=t.value,r=t.valueSpec,i=t.style,n=t.styleSpec,o=t.key,a=t.arrayElementValidator||sr;if("array"!==xe(e))return[new V(o,e,"array expected, "+xe(e)+" found")];if(r.length&&e.length!==r.length)return[new V(o,e,"array length "+r.length+" expected, length "+e.length+" found")];if(r["min-length"]&&e.length<r["min-length"])return[new V(o,e,"array length at least "+r["min-length"]+" expected, length "+e.length+" found")];var s={type:r.value};n.$version<7&&(s["function"]=r["function"]),"object"===xe(r.value)&&(s=r.value);for(var l=[],u=0;u<e.length;u++)l=l.concat(a({array:e,arrayIndex:u,value:e[u],valueSpec:s,style:i,styleSpec:n,key:o+"["+u+"]"}));return l}function Ve(t){var e=t.key,r=t.value,i=t.valueSpec,n=xe(r);return"number"!==n?[new V(e,r,"number expected, "+n+" found")]:"minimum"in i&&r<i.minimum?[new V(e,r,r+" is less than the minimum value "+i.minimum)]:"maximum"in i&&r>i.maximum?[new V(e,r,r+" is greater than the maximum value "+i.maximum)]:[]}function Ne(t){var e,r,i,n=t.valueSpec,o=U(t.value.type),a={},s="categorical"!==o&&void 0===t.value.property,l=!s,u="array"===xe(t.value.stops)&&"array"===xe(t.value.stops[0])&&"object"===xe(t.value.stops[0][0]),c=Oe({key:t.key,value:t.value,valueSpec:t.styleSpec["function"],style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new V(t.key,t.value,'identity function may not have a "stops" property')];var e=[],r=t.value;e=e.concat(Fe({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:h})),"array"===xe(r)&&0===r.length&&e.push(new V(t.key,r,"array must have at least one stop"));return e},"default":function(t){return sr({key:t.key,value:t.value,valueSpec:n,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&s&&c.push(new V(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||c.push(new V(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!ee(t.valueSpec)&&c.push(new V(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!Qt(t.valueSpec)?c.push(new V(t.key,t.value,"property functions not supported")):s&&!te(t.valueSpec)&&c.push(new V(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!u||void 0!==t.value.property||c.push(new V(t.key,t.value,'"property" property is required')),c;function h(t){var e=[],o=t.value,s=t.key;if("array"!==xe(o))return[new V(s,o,"array expected, "+xe(o)+" found")];if(2!==o.length)return[new V(s,o,"array length 2 expected, length "+o.length+" found")];if(u){if("object"!==xe(o[0]))return[new V(s,o,"object expected, "+xe(o[0])+" found")];if(void 0===o[0].zoom)return[new V(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new V(s,o,"object stop key must have value")];if(i&&i>U(o[0].zoom))return[new V(s,o[0].zoom,"stop zoom values must appear in ascending order")];U(o[0].zoom)!==i&&(i=U(o[0].zoom),r=void 0,a={}),e=e.concat(Oe({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Ve,value:p}}))}else e=e.concat(p({key:s+"[0]",value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return e.concat(sr({key:s+"[1]",value:o[1],valueSpec:n,style:t.style,styleSpec:t.styleSpec}))}function p(t,i){var s=xe(t.value),l=U(t.value),u=null!==t.value?t.value:i;if(e){if(s!==e)return[new V(t.key,u,s+" stop domain type must match previous stop domain type "+e)]}else e=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new V(t.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==o){var c="number expected, "+s+" found";return Qt(n)&&void 0===o&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new V(t.key,u,c)]}return"categorical"!==o||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==o&&"number"===s&&void 0!==r&&l<r?[new V(t.key,u,"stop domain values must appear in ascending order")]:(r=l,"categorical"===o&&l in a?[new V(t.key,u,"stop domain values must be unique")]:(a[l]=!0,[])):[new V(t.key,u,"integer expected, found "+l)]}}function je(t){var e=("property"===t.expressionContext?De:Ce)(q(t.value),t.valueSpec);return"error"===e.result?e.value.map((function(e){return new V(""+t.key+e.key,t.value,e.message)})):"property"===t.expressionContext&&"text-font"===t.propertyKey&&-1!==e.value._styleExpression.expression.possibleOutputs().indexOf(void 0)?[new V(t.key,t.value,'Invalid data expression for "text-font". Output values must be contained as literals within the expression.')]:"property"!==t.expressionContext||"layout"!==t.propertyType||wt(e.value._styleExpression.expression)?[]:[new V(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')]}function Ue(t){var e=t.key,r=t.value,i=t.valueSpec,n=[];return Array.isArray(i.values)?-1===i.values.indexOf(U(r))&&n.push(new V(e,r,"expected one of ["+i.values.join(", ")+"], "+JSON.stringify(r)+" found")):-1===Object.keys(i.values).indexOf(U(r))&&n.push(new V(e,r,"expected one of ["+Object.keys(i.values).join(", ")+"], "+JSON.stringify(r)+" found")),n}function qe(t){if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,r=t.slice(1);e<r.length;e+=1){var i=r[e];if(!qe(i)&&"boolean"!=typeof i)return!1}return!0;default:return!0}}Re.deserialize=function(t){return new Re(t._parameters,t._specification)},Re.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}};var $e={type:"boolean","default":!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Ze(t){if(!t)return function(){return!0};qe(t)||(t=We(t));var e=Ce(t,$e);if("error"===e.result)throw new Error(e.value.map((function(t){return t.key+": "+t.message})).join(", "));return function(t,r){return e.value.evaluate(t,r)}}function Ge(t,e){return t<e?-1:t>e?1:0}function We(t){if(!t)return!0;var e,r=t[0];return t.length<=1?"any"!==r:"=="===r?Xe(t[1],t[2],"=="):"!="===r?Je(Xe(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?Xe(t[1],t[2],r):"any"===r?(e=t.slice(1),["any"].concat(e.map(We))):"all"===r?["all"].concat(t.slice(1).map(We)):"none"===r?["all"].concat(t.slice(1).map(We).map(Je)):"in"===r?He(t[1],t.slice(2)):"!in"===r?Je(He(t[1],t.slice(2))):"has"===r?Ke(t[1]):"!has"!==r||Je(Ke(t[1]))}function Xe(t,e,r){switch(t){case"$type":return["filter-type-"+r,e];case"$id":return["filter-id-"+r,e];default:return["filter-"+r,t,e]}}function He(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((function(t){return typeof t!=typeof e[0]}))?["filter-in-large",t,["literal",e.sort(Ge)]]:["filter-in-small",t,["literal",e]]}}function Ke(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Je(t){return["!",t]}function Ye(t){return qe(q(t.value))?je(j({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function e(t){var r=t.value;var i=t.key;if("array"!==xe(r))return[new V(i,r,"array expected, "+xe(r)+" found")];var n=t.styleSpec;var o;var a=[];if(r.length<1)return[new V(i,r,"filter array must have at least 1 element")];a=a.concat(Ue({key:i+"[0]",value:r[0],valueSpec:n.filter_operator,style:t.style,styleSpec:t.styleSpec}));switch(U(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===U(r[1])&&a.push(new V(i,r,'"$type" cannot be use with operator "'+r[0]+'"'));case"==":case"!=":3!==r.length&&a.push(new V(i,r,'filter array for operator "'+r[0]+'" must have 3 elements'));case"in":case"!in":r.length>=2&&"string"!==(o=xe(r[1]))&&a.push(new V(i+"[1]",r[1],"string expected, "+o+" found"));for(var s=2;s<r.length;s++)o=xe(r[s]),"$type"===U(r[1])?a=a.concat(Ue({key:i+"["+s+"]",value:r[s],valueSpec:n.geometry_type,style:t.style,styleSpec:t.styleSpec})):"string"!==o&&"number"!==o&&"boolean"!==o&&a.push(new V(i+"["+s+"]",r[s],"string, number, or boolean expected, "+o+" found"));break;case"any":case"all":case"none":for(var l=1;l<r.length;l++)a=a.concat(e({key:i+"["+l+"]",value:r[l],style:t.style,styleSpec:t.styleSpec}));break;case"has":case"!has":o=xe(r[1]),2!==r.length?a.push(new V(i,r,'filter array for "'+r[0]+'" operator must have 2 elements')):"string"!==o&&a.push(new V(i+"[1]",r[1],"string expected, "+o+" found"))}return a}(t)}function Qe(t,e){var r=t.key,i=t.style,n=t.styleSpec,o=t.value,a=t.objectKey,s=n[e+"_"+t.layerType];if(!s)return[];var l=a.match(/^(.*)-transition$/);if("paint"===e&&l&&s[l[1]]&&s[l[1]].transition)return sr({key:r,value:o,valueSpec:n.transition,style:i,styleSpec:n});var u,c=t.valueSpec||s[a];if(!c)return[new V(r,o,'unknown property "'+a+'"')];if("string"===xe(o)&&Qt(c)&&!c.tokens&&(u=/^{([^}]+)}$/.exec(o)))return[new V(r,o,'"'+a+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(u[1])+" }`.")];var h=[];return"symbol"===t.layerType&&("text-field"===a&&i&&!i.glyphs&&h.push(new V(r,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===a&&be(q(o))&&"identity"===U(o.type)&&h.push(new V(r,o,'"text-font" does not support identity functions'))),h.concat(sr({key:t.key,value:o,valueSpec:c,style:i,styleSpec:n,expressionContext:"property",propertyType:e,propertyKey:a}))}function tr(t){return Qe(t,"paint")}function er(t){return Qe(t,"layout")}function rr(t){var e=[],r=t.value,i=t.key,n=t.style,o=t.styleSpec;r.type||r.ref||e.push(new V(i,r,'either "type" or "ref" is required'));var a,s=U(r.type),l=U(r.ref);if(r.id)for(var u=U(r.id),c=0;c<t.arrayIndex;c++){var h=n.layers[c];U(h.id)===u&&e.push(new V(i,r.id,'duplicate layer id "'+r.id+'", previously used at line '+h.id.__line__))}if("ref"in r)["type","source","source-layer","filter","layout"].forEach((function(t){t in r&&e.push(new V(i,r[t],'"'+t+'" is prohibited for ref layers'))})),n.layers.forEach((function(t){U(t.id)===l&&(a=t)})),a?a.ref?e.push(new V(i,r.ref,"ref cannot reference another ref layer")):s=U(a.type):e.push(new V(i,r.ref,'ref layer "'+l+'" not found'));else if("background"!==s)if(r.source){var p=n.sources&&n.sources[r.source],f=p&&U(p.type);p?"vector"===f&&"raster"===s?e.push(new V(i,r.source,'layer "'+r.id+'" requires a raster source')):"raster"===f&&"raster"!==s?e.push(new V(i,r.source,'layer "'+r.id+'" requires a vector source')):"vector"!==f||r["source-layer"]?"raster-dem"===f&&"hillshade"!==s?e.push(new V(i,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==s||!r.paint||!r.paint["line-gradient"]||"geojson"===f&&p.lineMetrics||e.push(new V(i,r,'layer "'+r.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new V(i,r,'layer "'+r.id+'" must specify a "source-layer"')):e.push(new V(i,r.source,'source "'+r.source+'" not found'))}else e.push(new V(i,r,'missing required property "source"'));return e=e.concat(Oe({key:i,value:r,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return sr({key:i+".type",value:r.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:r,objectKey:"type"})},filter:Ye,layout:function(t){return Oe({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return er(j({layerType:s},t))}}})},paint:function(t){return Oe({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return tr(j({layerType:s},t))}}})}}}))}function ir(t){var e=t.value,r=t.key,i=t.styleSpec,n=t.style;if(!e.type)return[new V(r,e,'"type" is required')];var o=U(e.type),a=[];switch(o){case"vector":case"raster":case"raster-dem":if(a=a.concat(Oe({key:r,value:e,valueSpec:i["source_"+o.replace("-","_")],style:t.style,styleSpec:i})),"url"in e)for(var s in e)["type","url","tileSize"].indexOf(s)<0&&a.push(new V(r+"."+s,e[s],'a source with a "url" property may not include a "'+s+'" property'));return a;case"geojson":return Oe({key:r,value:e,valueSpec:i.source_geojson,style:n,styleSpec:i});case"video":return Oe({key:r,value:e,valueSpec:i.source_video,style:n,styleSpec:i});case"image":return Oe({key:r,value:e,valueSpec:i.source_image,style:n,styleSpec:i});case"canvas":return a.push(new V(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")),a;default:return Ue({key:r+".type",value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:n,styleSpec:i})}}function nr(t){var e=t.value,r=t.styleSpec,i=r.light,n=t.style,o=[],a=xe(e);if(void 0===e)return o;if("object"!==a)return o=o.concat([new V("light",e,"object expected, "+a+" found")]);for(var s in e){var l=s.match(/^(.*)-transition$/);o=l&&i[l[1]]&&i[l[1]].transition?o.concat(sr({key:s,value:e[s],valueSpec:r.transition,style:n,styleSpec:r})):i[s]?o.concat(sr({key:s,value:e[s],valueSpec:i[s],style:n,styleSpec:r})):o.concat([new V(s,e[s],'unknown property "'+s+'"')])}return o}function or(t){var e=t.value,r=t.key,i=xe(e);return"string"!==i?[new V(r,e,"string expected, "+i+" found")]:[]}var ar={"*":function(){return[]},array:Fe,boolean:function(t){var e=t.value,r=t.key,i=xe(e);return"boolean"!==i?[new V(r,e,"boolean expected, "+i+" found")]:[]},number:Ve,color:function(t){var e=t.key,r=t.value,i=xe(r);return"string"!==i?[new V(e,r,"color expected, "+i+" found")]:null===nt(r)?[new V(e,r,'color expected, "'+r+'" found')]:[]},constants:N,"enum":Ue,filter:Ye,"function":Ne,layer:rr,object:Oe,source:ir,light:nr,string:or};function sr(t){var e=t.value,r=t.valueSpec,i=t.styleSpec;return r.expression&&be(U(e))?Ne(t):r.expression&&Me(q(e))?je(t):r.type&&ar[r.type]?ar[r.type](t):Oe(j({},t,{valueSpec:r.type?i[r.type]:r}))}function lr(t){var e=t.value,r=t.key,i=or(t);return i.length?i:(-1===e.indexOf("{fontstack}")&&i.push(new V(r,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&i.push(new V(r,e,'"glyphs" url must include a "{range}" token')),i)}function ur(t,e){e=e||F;var r=[];return r=r.concat(sr({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:lr,"*":function(){return[]}}})),t.constants&&(r=r.concat(N({key:"constants",value:t.constants,style:t,styleSpec:e}))),cr(r)}function cr(t){return[].concat(t).sort((function(t,e){return t.line-e.line}))}function hr(t){return function(){return cr(t.apply(this,arguments))}}ur.source=hr(ir),ur.light=hr(nr),ur.layer=hr(rr),ur.filter=hr(Ye),ur.paintProperty=hr(tr),ur.layoutProperty=hr(er);var pr=ur,fr=ur.light,dr=ur.paintProperty,mr=ur.layoutProperty;function yr(t,e){var r=!1;if(e&&e.length)for(var i=0,n=e;i<n.length;i+=1){var o=n[i];t.fire(new B(new Error(o.message))),r=!0}return r}var vr=_r,gr=3;function _r(t,e,r){var i=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var n=new Int32Array(this.arrayBuffer);t=n[0],e=n[1],r=n[2],this.d=e+2*r;for(var o=0;o<this.d*this.d;o++){var a=n[gr+o],s=n[gr+o+1];i.push(a===s?null:n.subarray(a,s))}var l=n[gr+i.length],u=n[gr+i.length+1];this.keys=n.subarray(l,u),this.bboxes=n.subarray(u),this.insert=this._insertReadonly}else{this.d=e+2*r;for(var c=0;c<this.d*this.d;c++)i.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=r,this.scale=e/t,this.uid=0;var h=r/e*t;this.min=-h,this.max=t+h}_r.prototype.insert=function(t,e,r,i,n){this._forEachCell(e,r,i,n,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(i),this.bboxes.push(n)},_r.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},_r.prototype._insertCell=function(t,e,r,i,n,o){this.cells[n].push(o)},_r.prototype.query=function(t,e,r,i){var n=this.min,o=this.max;if(t<=n&&e<=n&&o<=r&&o<=i)return Array.prototype.slice.call(this.keys);var a=[];return this._forEachCell(t,e,r,i,this._queryCell,a,{}),a},_r.prototype._queryCell=function(t,e,r,i,n,o,a){var s=this.cells[n];if(null!==s)for(var l=this.keys,u=this.bboxes,c=0;c<s.length;c++){var h=s[c];if(void 0===a[h]){var p=4*h;t<=u[p+2]&&e<=u[p+3]&&r>=u[p+0]&&i>=u[p+1]?(a[h]=!0,o.push(l[h])):a[h]=!1}}},_r.prototype._forEachCell=function(t,e,r,i,n,o,a){for(var s=this._convertToCellCoord(t),l=this._convertToCellCoord(e),u=this._convertToCellCoord(r),c=this._convertToCellCoord(i),h=s;h<=u;h++)for(var p=l;p<=c;p++){var f=this.d*p+h;if(n.call(this,t,e,r,i,f,o,a))return}},_r.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},_r.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=gr+this.cells.length+1+1,r=0,i=0;i<this.cells.length;i++)r+=this.cells[i].length;var n=new Int32Array(e+r+this.keys.length+this.bboxes.length);n[0]=this.extent,n[1]=this.n,n[2]=this.padding;for(var o=e,a=0;a<t.length;a++){var s=t[a];n[gr+a]=o,n.set(s,o),o+=s.length}return n[gr+t.length]=o,n.set(this.keys,o),o+=this.keys.length,n[gr+t.length+1]=o,n.set(this.bboxes,o),o+=this.bboxes.length,n.buffer};var xr=self.ImageData,br={};function wr(t,e,r){void 0===r&&(r={}),Object.defineProperty(e,"_classRegistryKey",{value:t,writeable:!1}),br[t]={klass:e,omit:r.omit||[],shallow:r.shallow||[]}}for(var Er in wr("Object",Object),vr.serialize=function(t,e){var r=t.toArrayBuffer();return e&&e.push(r),r},vr.deserialize=function(t){return new vr(t)},wr("Grid",vr),wr("Color",ot),wr("Error",Error),wr("StylePropertyFunction",Re),wr("StyleExpression",ke,{omit:["_evaluator"]}),wr("ZoomDependentExpression",Le),wr("ZoomConstantExpression",Pe),wr("CompoundExpression",xt,{omit:["_evaluate"]}),Ut)Ut[Er]._classRegistryKey||wr("Expression_"+Er,Ut[Er]);function Sr(t,e){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp)return t;if(t instanceof ArrayBuffer)return e&&e.push(t),t;if(ArrayBuffer.isView(t)){var r=t;return e&&e.push(r.buffer),r}if(t instanceof xr)return e&&e.push(t.data.buffer),t;if(Array.isArray(t)){for(var i=[],n=0,o=t;n<o.length;n+=1){var a=o[n];i.push(Sr(a,e))}return i}if("object"==typeof t){var s=t.constructor,l=s._classRegistryKey;if(!l)throw new Error("can't serialize object of unregistered class");var u={};if(s.serialize)u._serialized=s.serialize(t,e);else{for(var c in t)if(t.hasOwnProperty(c)&&!(br[l].omit.indexOf(c)>=0)){var h=t[c];u[c]=br[l].shallow.indexOf(c)>=0?h:Sr(h,e)}t instanceof Error&&(u.message=t.message)}return{name:l,properties:u}}throw new Error("can't serialize object of type "+typeof t)}function Tr(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof xr)return t;if(Array.isArray(t))return t.map((function(t){return Tr(t)}));if("object"==typeof t){var e=t,r=e.name,i=e.properties;if(!r)throw new Error("can't deserialize object of anonymous class");var n=br[r].klass;if(!n)throw new Error("can't deserialize unregistered class "+r);if(n.deserialize)return n.deserialize(i._serialized);for(var o=Object.create(n.prototype),a=0,s=Object.keys(i);a<s.length;a+=1){var l=s[a];o[l]=br[r].shallow.indexOf(l)>=0?i[l]:Tr(i[l])}return o}throw new Error("can't deserialize object of type "+typeof t)}var Ar=function(){this.first=!0};Ar.prototype.update=function(t,e){var r=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoom<r&&(this.lastIntegerZoom=r,this.lastIntegerZoomTime=e),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=r,!0))};var zr={"Latin-1 Supplement":function(t){return t>=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},"Arabic Supplement":function(t){return t>=1872&&t<=1919},"Arabic Extended-A":function(t){return t>=2208&&t<=2303},"Hangul Jamo":function(t){return t>=4352&&t<=4607},"Unified Canadian Aboriginal Syllabics":function(t){return t>=5120&&t<=5759},Khmer:function(t){return t>=6016&&t<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(t){return t>=6320&&t<=6399},"General Punctuation":function(t){return t>=8192&&t<=8303},"Letterlike Symbols":function(t){return t>=8448&&t<=8527},"Number Forms":function(t){return t>=8528&&t<=8591},"Miscellaneous Technical":function(t){return t>=8960&&t<=9215},"Control Pictures":function(t){return t>=9216&&t<=9279},"Optical Character Recognition":function(t){return t>=9280&&t<=9311},"Enclosed Alphanumerics":function(t){return t>=9312&&t<=9471},"Geometric Shapes":function(t){return t>=9632&&t<=9727},"Miscellaneous Symbols":function(t){return t>=9728&&t<=9983},"Miscellaneous Symbols and Arrows":function(t){return t>=11008&&t<=11263},"CJK Radicals Supplement":function(t){return t>=11904&&t<=12031},"Kangxi Radicals":function(t){return t>=12032&&t<=12255},"Ideographic Description Characters":function(t){return t>=12272&&t<=12287},"CJK Symbols and Punctuation":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},"Hangul Compatibility Jamo":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},"Bopomofo Extended":function(t){return t>=12704&&t<=12735},"CJK Strokes":function(t){return t>=12736&&t<=12783},"Katakana Phonetic Extensions":function(t){return t>=12784&&t<=12799},"Enclosed CJK Letters and Months":function(t){return t>=12800&&t<=13055},"CJK Compatibility":function(t){return t>=13056&&t<=13311},"CJK Unified Ideographs Extension A":function(t){return t>=13312&&t<=19903},"Yijing Hexagram Symbols":function(t){return t>=19904&&t<=19967},"CJK Unified Ideographs":function(t){return t>=19968&&t<=40959},"Yi Syllables":function(t){return t>=40960&&t<=42127},"Yi Radicals":function(t){return t>=42128&&t<=42191},"Hangul Jamo Extended-A":function(t){return t>=43360&&t<=43391},"Hangul Syllables":function(t){return t>=44032&&t<=55215},"Hangul Jamo Extended-B":function(t){return t>=55216&&t<=55295},"Private Use Area":function(t){return t>=57344&&t<=63743},"CJK Compatibility Ideographs":function(t){return t>=63744&&t<=64255},"Arabic Presentation Forms-A":function(t){return t>=64336&&t<=65023},"Vertical Forms":function(t){return t>=65040&&t<=65055},"CJK Compatibility Forms":function(t){return t>=65072&&t<=65103},"Small Form Variants":function(t){return t>=65104&&t<=65135},"Arabic Presentation Forms-B":function(t){return t>=65136&&t<=65279},"Halfwidth and Fullwidth Forms":function(t){return t>=65280&&t<=65519}};function Ir(t){for(var e=0,r=t;e<r.length;e+=1){if(Mr(r[e].charCodeAt(0)))return!0}return!1}function kr(t){return!zr.Arabic(t)&&(!zr["Arabic Supplement"](t)&&(!zr["Arabic Extended-A"](t)&&(!zr["Arabic Presentation Forms-A"](t)&&!zr["Arabic Presentation Forms-B"](t))))}function Mr(t){return 746===t||747===t||!(t<4352)&&(!!zr["Bopomofo Extended"](t)||(!!zr.Bopomofo(t)||(!(!zr["CJK Compatibility Forms"](t)||t>=65097&&t<=65103)||(!!zr["CJK Compatibility Ideographs"](t)||(!!zr["CJK Compatibility"](t)||(!!zr["CJK Radicals Supplement"](t)||(!!zr["CJK Strokes"](t)||(!(!zr["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||(!!zr["CJK Unified Ideographs Extension A"](t)||(!!zr["CJK Unified Ideographs"](t)||(!!zr["Enclosed CJK Letters and Months"](t)||(!!zr["Hangul Compatibility Jamo"](t)||(!!zr["Hangul Jamo Extended-A"](t)||(!!zr["Hangul Jamo Extended-B"](t)||(!!zr["Hangul Jamo"](t)||(!!zr["Hangul Syllables"](t)||(!!zr.Hiragana(t)||(!!zr["Ideographic Description Characters"](t)||(!!zr.Kanbun(t)||(!!zr["Kangxi Radicals"](t)||(!!zr["Katakana Phonetic Extensions"](t)||(!(!zr.Katakana(t)||12540===t)||(!(!zr["Halfwidth and Fullwidth Forms"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||(!(!zr["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||(!!zr["Unified Canadian Aboriginal Syllabics"](t)||(!!zr["Unified Canadian Aboriginal Syllabics Extended"](t)||(!!zr["Vertical Forms"](t)||(!!zr["Yijing Hexagram Symbols"](t)||(!!zr["Yi Syllables"](t)||!!zr["Yi Radicals"](t))))))))))))))))))))))))))))))}function Cr(t){return!(Mr(t)||function(t){return!!(zr["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||zr["General Punctuation"](t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||zr["Letterlike Symbols"](t)||zr["Number Forms"](t)||zr["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||zr["Control Pictures"](t)&&9251!==t||zr["Optical Character Recognition"](t)||zr["Enclosed Alphanumerics"](t)||zr["Geometric Shapes"](t)||zr["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||zr["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||zr["CJK Symbols and Punctuation"](t)||zr.Katakana(t)||zr["Private Use Area"](t)||zr["CJK Compatibility Forms"](t)||zr["Small Form Variants"](t)||zr["Halfwidth and Fullwidth Forms"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}(t))}function Pr(t,e){return!(!e&&(t>=1424&&t<=2303||zr["Arabic Presentation Forms-A"](t)||zr["Arabic Presentation Forms-B"](t)))&&!(t>=2304&&t<=3583||t>=3840&&t<=4255||zr.Khmer(t))}var Lr,Dr=!1,Rr=null,Br=!1,Or=new O,Fr={applyArabicShaping:null,processBidirectionalText:null,isLoaded:function(){return Br||null!=Fr.applyArabicShaping}},Vr=function(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ar,this.transition={})};Vr.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,i=t;r<i.length;r+=1)if(!Pr(i[r].charCodeAt(0),e))return!1;return!0}(t,Fr.isLoaded())},Vr.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)};var Nr=function(t,e){this.property=t,this.value=e,this.expression=Be(void 0===e?t.specification["default"]:e,t.specification)};Nr.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Nr.prototype.possiblyEvaluate=function(t){return this.property.possiblyEvaluate(this,t)};var jr=function(t){this.property=t,this.value=new Nr(t,void 0)};jr.prototype.transitioned=function(t,e){return new qr(this.property,this.value,e,v({},t.transition,this.transition),t.now)},jr.prototype.untransitioned=function(){return new qr(this.property,this.value,null,{},0)};var Ur=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};Ur.prototype.getValue=function(t){return S(this._values[t].value.value)},Ur.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new jr(this._values[t].property)),this._values[t].value=new Nr(this._values[t].property,null===e?void 0:S(e))},Ur.prototype.getTransition=function(t){return S(this._values[t].transition)},Ur.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new jr(this._values[t].property)),this._values[t].transition=S(e)||void 0},Ur.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var i=r[e],n=this.getValue(i);void 0!==n&&(t[i]=n);var o=this.getTransition(i);void 0!==o&&(t[i+"-transition"]=o)}return t},Ur.prototype.transitioned=function(t,e){for(var r=new $r(this._properties),i=0,n=Object.keys(this._values);i<n.length;i+=1){var o=n[i];r._values[o]=this._values[o].transitioned(t,e._values[o])}return r},Ur.prototype.untransitioned=function(){for(var t=new $r(this._properties),e=0,r=Object.keys(this._values);e<r.length;e+=1){var i=r[e];t._values[i]=this._values[i].untransitioned()}return t};var qr=function(t,e,r,i,n){this.property=t,this.value=e,this.begin=n+i.delay||0,this.end=this.begin+i.duration||0,t.specification.transition&&(i.delay||i.duration)&&(this.prior=r)};qr.prototype.possiblyEvaluate=function(t){var e=t.now||0,r=this.value.possiblyEvaluate(t),i=this.prior;if(i){if(e>this.end)return this.prior=null,r;if(this.value.isDataDriven())return this.prior=null,r;if(e<this.begin)return i.possiblyEvaluate(t);var n=(e-this.begin)/(this.end-this.begin);return this.property.interpolate(i.possiblyEvaluate(t),r,function(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}(n))}return r};var $r=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};$r.prototype.possiblyEvaluate=function(t){for(var e=new Wr(this._properties),r=0,i=Object.keys(this._values);r<i.length;r+=1){var n=i[r];e._values[n]=this._values[n].possiblyEvaluate(t)}return e},$r.prototype.hasTransition=function(){for(var t=0,e=Object.keys(this._values);t<e.length;t+=1){var r=e[t];if(this._values[r].prior)return!0}return!1};var Zr=function(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)};Zr.prototype.getValue=function(t){return S(this._values[t].value)},Zr.prototype.setValue=function(t,e){this._values[t]=new Nr(this._values[t].property,null===e?void 0:S(e))},Zr.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var i=r[e],n=this.getValue(i);void 0!==n&&(t[i]=n)}return t},Zr.prototype.possiblyEvaluate=function(t){for(var e=new Wr(this._properties),r=0,i=Object.keys(this._values);r<i.length;r+=1){var n=i[r];e._values[n]=this._values[n].possiblyEvaluate(t)}return e};var Gr=function(t,e,r){this.property=t,this.value=e,this.globals=r};Gr.prototype.isConstant=function(){return"constant"===this.value.kind},Gr.prototype.constantOr=function(t){return"constant"===this.value.kind?this.value.value:t},Gr.prototype.evaluate=function(t,e){return this.property.evaluate(this.value,this.globals,t,e)};var Wr=function(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)};Wr.prototype.get=function(t){return this._values[t]};var Xr=function(t){this.specification=t};Xr.prototype.possiblyEvaluate=function(t,e){return t.expression.evaluate(e)},Xr.prototype.interpolate=function(t,e,r){var i=kt[this.specification.type];return i?i(t,e,r):t};var Hr=function(t){this.specification=t};Hr.prototype.possiblyEvaluate=function(t,e){return"constant"===t.expression.kind||"camera"===t.expression.kind?new Gr(this,{kind:"constant",value:t.expression.evaluate(e)},e):new Gr(this,t.expression,e)},Hr.prototype.interpolate=function(t,e,r){if("constant"!==t.value.kind||"constant"!==e.value.kind)return t;if(void 0===t.value.value||void 0===e.value.value)return new Gr(this,{kind:"constant",value:void 0},t.globals);var i=kt[this.specification.type];return i?new Gr(this,{kind:"constant",value:i(t.value.value,e.value.value,r)},t.globals):t},Hr.prototype.evaluate=function(t,e,r,i){return"constant"===t.kind?t.value:t.evaluate(e,r,i)};var Kr=function(t){this.specification=t};Kr.prototype.possiblyEvaluate=function(t,e){if(void 0!==t.value){if("constant"===t.expression.kind){var r=t.expression.evaluate(e);return this._calculate(r,r,r,e)}return this._calculate(t.expression.evaluate(new Vr(Math.floor(e.zoom-1),e)),t.expression.evaluate(new Vr(Math.floor(e.zoom),e)),t.expression.evaluate(new Vr(Math.floor(e.zoom+1),e)),e)}},Kr.prototype._calculate=function(t,e,r,i){var n=i.zoom,o=n-Math.floor(n),a=i.crossFadingFactor();return n>i.zoomHistory.lastIntegerZoom?{from:t,to:e,fromScale:2,toScale:1,t:o+(1-o)*a}:{from:r,to:e,fromScale:.5,toScale:1,t:1-(1-a)*o}},Kr.prototype.interpolate=function(t){return t};var Jr=function(t){this.specification=t};Jr.prototype.possiblyEvaluate=function(t,e){return!!t.expression.evaluate(e)},Jr.prototype.interpolate=function(){return!1};var Yr=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},t){var r=t[e],i=this.defaultPropertyValues[e]=new Nr(r,void 0),n=this.defaultTransitionablePropertyValues[e]=new jr(r);this.defaultTransitioningPropertyValues[e]=n.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=i.possiblyEvaluate({})}};wr("DataDrivenProperty",Hr),wr("DataConstantProperty",Xr),wr("CrossFadedProperty",Kr),wr("ColorRampProperty",Jr);var Qr=function(t){function e(e,r){for(var i in t.call(this),this.id=e.id,this.metadata=e.metadata,this.type=e.type,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,this.visibility="visible","background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),this._featureFilter=function(){return!0},r.layout&&(this._unevaluatedLayout=new Zr(r.layout)),this._transitionablePaint=new Ur(r.paint),e.paint)this.setPaintProperty(i,e.paint[i],{validate:!1});for(var n in e.layout)this.setLayoutProperty(n,e.layout[n],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getLayoutProperty=function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){if(null!=e){var i="layers."+this.id+".layout."+t;if(this._validate(mr,i,t,e,r))return}"visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility="none"===e?e:"visible"},e.prototype.getPaintProperty=function(t){return b(t,"-transition")?this._transitionablePaint.getTransition(t.slice(0,-"-transition".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(null!=e){var i="layers."+this.id+".paint."+t;if(this._validate(dr,i,t,e,r))return!1}if(b(t,"-transition"))return this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0),!1;var n=this._transitionablePaint._values[t].value.isDataDriven();this._transitionablePaint.setValue(t,e);var o=this._transitionablePaint._values[t].value.isDataDriven();return this._handleSpecialPaintPropertyUpdate(t),o||n},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype.isHidden=function(t){return!!(this.minzoom&&t<this.minzoom)||(!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.visibility)},e.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(t){this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t)),this.paint=this._transitioningPaint.possiblyEvaluate(t)},e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return"none"===this.visibility&&(t.layout=t.layout||{},t.layout.visibility="none"),E(t,(function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)}))},e.prototype._validate=function(t,e,r,i,n){return(!n||!1!==n.validate)&&yr(this,t.call(pr,{key:e,layerType:this.type,objectKey:r,value:i,styleSpec:F,style:{glyphs:!0,sprite:!0}}))},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof Gr&&Qt(e.property.specification)&&(("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent))return!0}return!1},e}(O),ti={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},ei=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},ri=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function ii(t,e){void 0===e&&(e=1);var r=0,i=0;return{members:t.map((function(t){var n,o=(n=t.type,ti[n].BYTES_PER_ELEMENT),a=r=ni(r,Math.max(e,o)),s=t.components||1;return i=Math.max(i,o),r+=o*s,{name:t.name,type:t.type,components:s,offset:a}})),size:ni(r,Math.max(i,e)),alignment:e}}function ni(t,e){return Math.ceil(t/e)*e}ri.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},ri.deserialize=function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},ri.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},ri.prototype.clear=function(){this.length=0},ri.prototype.resize=function(t){this.reserve(t),this.length=t},ri.prototype.reserve=function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},ri.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var oi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var i=2*r;return this.int16[i+0]=t,this.int16[i+1]=e,r},e.prototype.emplace=function(t,e,r){var i=2*t;return this.int16[i+0]=e,this.int16[i+1]=r,t},e}(ri);oi.prototype.bytesPerElement=4,wr("StructArrayLayout2i4",oi);var ai=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i){var n=this.length;this.resize(n+1);var o=4*n;return this.int16[o+0]=t,this.int16[o+1]=e,this.int16[o+2]=r,this.int16[o+3]=i,n},e.prototype.emplace=function(t,e,r,i,n){var o=4*t;return this.int16[o+0]=e,this.int16[o+1]=r,this.int16[o+2]=i,this.int16[o+3]=n,t},e}(ri);ai.prototype.bytesPerElement=8,wr("StructArrayLayout4i8",ai);var si=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o){var a=this.length;this.resize(a+1);var s=6*a;return this.int16[s+0]=t,this.int16[s+1]=e,this.int16[s+2]=r,this.int16[s+3]=i,this.int16[s+4]=n,this.int16[s+5]=o,a},e.prototype.emplace=function(t,e,r,i,n,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(ri);si.prototype.bytesPerElement=12,wr("StructArrayLayout2i4i12",si);var li=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s){var l=this.length;this.resize(l+1);var u=6*l,c=12*l;return this.int16[u+0]=t,this.int16[u+1]=e,this.int16[u+2]=r,this.int16[u+3]=i,this.uint8[c+8]=n,this.uint8[c+9]=o,this.uint8[c+10]=a,this.uint8[c+11]=s,l},e.prototype.emplace=function(t,e,r,i,n,o,a,s,l){var u=6*t,c=12*t;return this.int16[u+0]=e,this.int16[u+1]=r,this.int16[u+2]=i,this.int16[u+3]=n,this.uint8[c+8]=o,this.uint8[c+9]=a,this.uint8[c+10]=s,this.uint8[c+11]=l,t},e}(ri);li.prototype.bytesPerElement=12,wr("StructArrayLayout4i4ub12",li);var ui=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s){var l=this.length;this.resize(l+1);var u=8*l;return this.int16[u+0]=t,this.int16[u+1]=e,this.int16[u+2]=r,this.int16[u+3]=i,this.uint16[u+4]=n,this.uint16[u+5]=o,this.uint16[u+6]=a,this.uint16[u+7]=s,l},e.prototype.emplace=function(t,e,r,i,n,o,a,s,l){var u=8*t;return this.int16[u+0]=e,this.int16[u+1]=r,this.int16[u+2]=i,this.int16[u+3]=n,this.uint16[u+4]=o,this.uint16[u+5]=a,this.uint16[u+6]=s,this.uint16[u+7]=l,t},e}(ri);ui.prototype.bytesPerElement=16,wr("StructArrayLayout4i4ui16",ui);var ci=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var i=this.length;this.resize(i+1);var n=3*i;return this.float32[n+0]=t,this.float32[n+1]=e,this.float32[n+2]=r,i},e.prototype.emplace=function(t,e,r,i){var n=3*t;return this.float32[n+0]=e,this.float32[n+1]=r,this.float32[n+2]=i,t},e}(ri);ci.prototype.bytesPerElement=12,wr("StructArrayLayout3f12",ci);var hi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;this.resize(e+1);var r=1*e;return this.uint32[r+0]=t,e},e.prototype.emplace=function(t,e){var r=1*t;return this.uint32[r+0]=e,t},e}(ri);hi.prototype.bytesPerElement=4,wr("StructArrayLayout1ul4",hi);var pi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s,l,u,c){var h=this.length;this.resize(h+1);var p=12*h,f=6*h;return this.int16[p+0]=t,this.int16[p+1]=e,this.int16[p+2]=r,this.int16[p+3]=i,this.int16[p+4]=n,this.int16[p+5]=o,this.uint32[f+3]=a,this.uint16[p+8]=s,this.uint16[p+9]=l,this.int16[p+10]=u,this.int16[p+11]=c,h},e.prototype.emplace=function(t,e,r,i,n,o,a,s,l,u,c,h){var p=12*t,f=6*t;return this.int16[p+0]=e,this.int16[p+1]=r,this.int16[p+2]=i,this.int16[p+3]=n,this.int16[p+4]=o,this.int16[p+5]=a,this.uint32[f+3]=s,this.uint16[p+8]=l,this.uint16[p+9]=u,this.int16[p+10]=c,this.int16[p+11]=h,t},e}(ri);pi.prototype.bytesPerElement=24,wr("StructArrayLayout6i1ul2ui2i24",pi);var fi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o){var a=this.length;this.resize(a+1);var s=6*a;return this.int16[s+0]=t,this.int16[s+1]=e,this.int16[s+2]=r,this.int16[s+3]=i,this.int16[s+4]=n,this.int16[s+5]=o,a},e.prototype.emplace=function(t,e,r,i,n,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(ri);fi.prototype.bytesPerElement=12,wr("StructArrayLayout2i2i2i12",fi);var di=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var i=4*r;return this.uint8[i+0]=t,this.uint8[i+1]=e,r},e.prototype.emplace=function(t,e,r){var i=4*t;return this.uint8[i+0]=e,this.uint8[i+1]=r,t},e}(ri);di.prototype.bytesPerElement=4,wr("StructArrayLayout2ub4",di);var mi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s,l,u,c,h,p,f){var d=this.length;this.resize(d+1);var m=20*d,y=10*d,v=40*d;return this.int16[m+0]=t,this.int16[m+1]=e,this.uint16[m+2]=r,this.uint16[m+3]=i,this.uint32[y+2]=n,this.uint32[y+3]=o,this.uint32[y+4]=a,this.uint16[m+10]=s,this.uint16[m+11]=l,this.uint16[m+12]=u,this.float32[y+7]=c,this.float32[y+8]=h,this.uint8[v+36]=p,this.uint8[v+37]=f,d},e.prototype.emplace=function(t,e,r,i,n,o,a,s,l,u,c,h,p,f,d){var m=20*t,y=10*t,v=40*t;return this.int16[m+0]=e,this.int16[m+1]=r,this.uint16[m+2]=i,this.uint16[m+3]=n,this.uint32[y+2]=o,this.uint32[y+3]=a,this.uint32[y+4]=s,this.uint16[m+10]=l,this.uint16[m+11]=u,this.uint16[m+12]=c,this.float32[y+7]=h,this.float32[y+8]=p,this.uint8[v+36]=f,this.uint8[v+37]=d,t},e}(ri);mi.prototype.bytesPerElement=40,wr("StructArrayLayout2i2ui3ul3ui2f2ub40",mi);var yi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;this.resize(e+1);var r=1*e;return this.float32[r+0]=t,e},e.prototype.emplace=function(t,e){var r=1*t;return this.float32[r+0]=e,t},e}(ri);yi.prototype.bytesPerElement=4,wr("StructArrayLayout1f4",yi);var vi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var i=this.length;this.resize(i+1);var n=3*i;return this.int16[n+0]=t,this.int16[n+1]=e,this.int16[n+2]=r,i},e.prototype.emplace=function(t,e,r,i){var n=3*t;return this.int16[n+0]=e,this.int16[n+1]=r,this.int16[n+2]=i,t},e}(ri);vi.prototype.bytesPerElement=6,wr("StructArrayLayout3i6",vi);var gi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var i=this.length;this.resize(i+1);var n=2*i,o=4*i;return this.uint32[n+0]=t,this.uint16[o+2]=e,this.uint16[o+3]=r,i},e.prototype.emplace=function(t,e,r,i){var n=2*t,o=4*t;return this.uint32[n+0]=e,this.uint16[o+2]=r,this.uint16[o+3]=i,t},e}(ri);gi.prototype.bytesPerElement=8,wr("StructArrayLayout1ul2ui8",gi);var _i=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var i=this.length;this.resize(i+1);var n=3*i;return this.uint16[n+0]=t,this.uint16[n+1]=e,this.uint16[n+2]=r,i},e.prototype.emplace=function(t,e,r,i){var n=3*t;return this.uint16[n+0]=e,this.uint16[n+1]=r,this.uint16[n+2]=i,t},e}(ri);_i.prototype.bytesPerElement=6,wr("StructArrayLayout3ui6",_i);var xi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var i=2*r;return this.uint16[i+0]=t,this.uint16[i+1]=e,r},e.prototype.emplace=function(t,e,r){var i=2*t;return this.uint16[i+0]=e,this.uint16[i+1]=r,t},e}(ri);xi.prototype.bytesPerElement=4,wr("StructArrayLayout2ui4",xi);var bi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;this.resize(r+1);var i=2*r;return this.float32[i+0]=t,this.float32[i+1]=e,r},e.prototype.emplace=function(t,e,r){var i=2*t;return this.float32[i+0]=e,this.float32[i+1]=r,t},e}(ri);bi.prototype.bytesPerElement=8,wr("StructArrayLayout2f8",bi);var wi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i){var n=this.length;this.resize(n+1);var o=4*n;return this.float32[o+0]=t,this.float32[o+1]=e,this.float32[o+2]=r,this.float32[o+3]=i,n},e.prototype.emplace=function(t,e,r,i,n){var o=4*t;return this.float32[o+0]=e,this.float32[o+1]=r,this.float32[o+2]=i,this.float32[o+3]=n,t},e}(ri);wi.prototype.bytesPerElement=16,wr("StructArrayLayout4f16",wi);var Ei=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorPointY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.x1.set=function(t){this._structArray.int16[this._pos2+2]=t},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.y1.set=function(t){this._structArray.int16[this._pos2+3]=t},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.x2.set=function(t){this._structArray.int16[this._pos2+4]=t},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.y2.set=function(t){this._structArray.int16[this._pos2+5]=t},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},r.radius.get=function(){return this._structArray.int16[this._pos2+10]},r.radius.set=function(t){this._structArray.int16[this._pos2+10]=t},r.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},r.signedDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+11]=t},r.anchorPoint.get=function(){return new h(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(ei);Ei.prototype.size=24;var Si=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new Ei(this,t)},e}(pi);wr("CollisionBoxArray",Si);var Ti=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},hidden:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.glyphStartIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.numGlyphs.set=function(t){this._structArray.uint16[this._pos2+3]=t},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.vertexStartIndex.set=function(t){this._structArray.uint32[this._pos4+2]=t},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineStartIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.lineLength.set=function(t){this._structArray.uint32[this._pos4+4]=t},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.segment.set=function(t){this._structArray.uint16[this._pos2+10]=t},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.lowerSize.set=function(t){this._structArray.uint16[this._pos2+11]=t},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.upperSize.set=function(t){this._structArray.uint16[this._pos2+12]=t},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetX.set=function(t){this._structArray.float32[this._pos4+7]=t},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.lineOffsetY.set=function(t){this._structArray.float32[this._pos4+8]=t},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.writingMode.set=function(t){this._structArray.uint8[this._pos1+36]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+37]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+37]=t},Object.defineProperties(e.prototype,r),e}(ei);Ti.prototype.size=40;var Ai=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new Ti(this,t)},e}(mi);wr("PlacedSymbolArray",Ai);var zi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={offsetX:{configurable:!0}};return r.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},r.offsetX.set=function(t){this._structArray.float32[this._pos4+0]=t},Object.defineProperties(e.prototype,r),e}(ei);zi.prototype.size=4;var Ii=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e.prototype.get=function(t){return new zi(this,t)},e}(yi);wr("GlyphOffsetArray",Ii);var ki=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return r.x.get=function(){return this._structArray.int16[this._pos2+0]},r.x.set=function(t){this._structArray.int16[this._pos2+0]=t},r.y.get=function(){return this._structArray.int16[this._pos2+1]},r.y.set=function(t){this._structArray.int16[this._pos2+1]=t},r.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},r.tileUnitDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+2]=t},Object.defineProperties(e.prototype,r),e}(ei);ki.prototype.size=6;var Mi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e.prototype.get=function(t){return new ki(this,t)},e}(vi);wr("SymbolLineVertexArray",Mi);var Ci=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+0]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+3]=t},Object.defineProperties(e.prototype,r),e}(ei);Ci.prototype.size=8;var Pi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new Ci(this,t)},e}(gi);wr("FeatureIndexArray",Pi);var Li=ii([{name:"a_pos",components:2,type:"Int16"}],4).members,Di=function(t){void 0===t&&(t=[]),this.segments=t};Di.prototype.prepareSegment=function(t,e,r){var i=this.segments[this.segments.length-1];return t>Di.MAX_VERTEX_ARRAY_LENGTH&&A("Max vertices per segment is "+Di.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!i||i.vertexLength+t>Di.MAX_VERTEX_ARRAY_LENGTH)&&(i={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},this.segments.push(i)),i},Di.prototype.get=function(){return this.segments},Di.prototype.destroy=function(){for(var t=0,e=this.segments;t<e.length;t+=1){var r=e[t];for(var i in r.vaos)r.vaos[i].destroy()}},Di.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,wr("SegmentVector",Di);var Ri=function(t,e){return 256*(t=y(Math.floor(t),0,255))+(e=y(Math.floor(e),0,255))};function Bi(t){return[Ri(255*t.r,255*t.g),Ri(255*t.b,255*t.a)]}var Oi=function(t,e,r){this.value=t,this.name=e,this.type=r,this.statistics={max:-1/0}};Oi.prototype.defines=function(){return["#define HAS_UNIFORM_u_"+this.name]},Oi.prototype.populatePaintArray=function(){},Oi.prototype.updatePaintArray=function(){},Oi.prototype.upload=function(){},Oi.prototype.destroy=function(){},Oi.prototype.setUniforms=function(t,e,r,i){var n=i.constantOr(this.value),o=t.gl;"color"===this.type?o.uniform4f(e.uniforms["u_"+this.name],n.r,n.g,n.b,n.a):o.uniform1f(e.uniforms["u_"+this.name],n)};var Fi=function(t,e,r){this.expression=t,this.name=e,this.type=r,this.statistics={max:-1/0};var i="color"===r?bi:yi;this.paintVertexAttributes=[{name:"a_"+e,type:"Float32",components:"color"===r?2:1,offset:0}],this.paintVertexArray=new i};Fi.prototype.defines=function(){return[]},Fi.prototype.populatePaintArray=function(t,e){var r=this.paintVertexArray,i=r.length;r.reserve(t);var n=this.expression.evaluate(new Vr(0),e,{});if("color"===this.type)for(var o=Bi(n),a=i;a<t;a++)r.emplaceBack(o[0],o[1]);else{for(var s=i;s<t;s++)r.emplaceBack(n);this.statistics.max=Math.max(this.statistics.max,n)}},Fi.prototype.updatePaintArray=function(t,e,r,i){var n=this.paintVertexArray,o=this.expression.evaluate({zoom:0},r,i);if("color"===this.type)for(var a=Bi(o),s=t;s<e;s++)n.emplace(s,a[0],a[1]);else{for(var l=t;l<e;l++)n.emplace(l,o);this.statistics.max=Math.max(this.statistics.max,o)}},Fi.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Fi.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Fi.prototype.setUniforms=function(t,e){t.gl.uniform1f(e.uniforms["a_"+this.name+"_t"],0)};var Vi=function(t,e,r,i,n){this.expression=t,this.name=e,this.type=r,this.useIntegerZoom=i,this.zoom=n,this.statistics={max:-1/0};var o="color"===r?wi:bi;this.paintVertexAttributes=[{name:"a_"+e,type:"Float32",components:"color"===r?4:2,offset:0}],this.paintVertexArray=new o};Vi.prototype.defines=function(){return[]},Vi.prototype.populatePaintArray=function(t,e){var r=this.paintVertexArray,i=r.length;r.reserve(t);var n=this.expression.evaluate(new Vr(this.zoom),e,{}),o=this.expression.evaluate(new Vr(this.zoom+1),e,{});if("color"===this.type)for(var a=Bi(n),s=Bi(o),l=i;l<t;l++)r.emplaceBack(a[0],a[1],s[0],s[1]);else{for(var u=i;u<t;u++)r.emplaceBack(n,o);this.statistics.max=Math.max(this.statistics.max,n,o)}},Vi.prototype.updatePaintArray=function(t,e,r,i){var n=this.paintVertexArray,o=this.expression.evaluate({zoom:this.zoom},r,i),a=this.expression.evaluate({zoom:this.zoom+1},r,i);if("color"===this.type)for(var s=Bi(o),l=Bi(a),u=t;u<e;u++)n.emplace(u,s[0],s[1],l[0],l[1]);else{for(var c=t;c<e;c++)n.emplace(c,o,a);this.statistics.max=Math.max(this.statistics.max,o,a)}},Vi.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Vi.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Vi.prototype.interpolationFactor=function(t){return this.useIntegerZoom?this.expression.interpolationFactor(Math.floor(t),this.zoom,this.zoom+1):this.expression.interpolationFactor(t,this.zoom,this.zoom+1)},Vi.prototype.setUniforms=function(t,e,r){t.gl.uniform1f(e.uniforms["a_"+this.name+"_t"],this.interpolationFactor(r.zoom))};var Ni=function(){this.binders={},this.cacheKey="",this._buffers=[],this._idMap={},this._bufferOffset=0};Ni.createDynamic=function(t,e,r){var i=new Ni,n=[];for(var o in t.paint._values)if(r(o)){var a=t.paint.get(o);if(a instanceof Gr&&Qt(a.property.specification)){var s=Ui(o,t.type),l=a.property.specification.type,u=a.property.useIntegerZoom;"constant"===a.value.kind?(i.binders[o]=new Oi(a.value,s,l),n.push("/u_"+s)):"source"===a.value.kind?(i.binders[o]=new Fi(a.value,s,l),n.push("/a_"+s)):(i.binders[o]=new Vi(a.value,s,l,u,e),n.push("/z_"+s))}}return i.cacheKey=n.sort().join(""),i},Ni.prototype.populatePaintArrays=function(t,e,r){for(var i in this.binders)this.binders[i].populatePaintArray(t,e);if(e.id){var n=String(e.id);this._idMap[n]=this._idMap[n]||[],this._idMap[n].push({index:r,start:this._bufferOffset,end:t})}this._bufferOffset=t},Ni.prototype.updatePaintArrays=function(t,e,r){var i=!1;for(var n in t){var o=this._idMap[n];if(o)for(var a=t[n],s=0,l=o;s<l.length;s+=1){var u=l[s],c=e.feature(u.index);for(var h in this.binders){var p=this.binders[h];if(!(p instanceof Oi)&&!0===p.expression.isStateDependent){var f=r.paint.get(h);p.expression=f.value,p.updatePaintArray(u.start,u.end,c,a),i=!0}}}}return i},Ni.prototype.defines=function(){var t=[];for(var e in this.binders)t.push.apply(t,this.binders[e].defines());return t},Ni.prototype.setUniforms=function(t,e,r,i){for(var n in this.binders){this.binders[n].setUniforms(t,e,i,r.get(n))}},Ni.prototype.getPaintVertexBuffers=function(){return this._buffers},Ni.prototype.upload=function(t){for(var e in this.binders)this.binders[e].upload(t);var r=[];for(var i in this.binders){var n=this.binders[i];(n instanceof Fi||n instanceof Vi)&&n.paintVertexBuffer&&r.push(n.paintVertexBuffer)}this._buffers=r},Ni.prototype.destroy=function(){for(var t in this.binders)this.binders[t].destroy()};var ji=function(t,e,r,i){void 0===i&&(i=function(){return!0}),this.programConfigurations={};for(var n=0,o=e;n<o.length;n+=1){var a=o[n];this.programConfigurations[a.id]=Ni.createDynamic(a,r,i),this.programConfigurations[a.id].layoutAttributes=t}this.needsUpload=!1};function Ui(t,e){return{"text-opacity":"opacity","icon-opacity":"opacity","text-color":"fill_color","icon-color":"fill_color","text-halo-color":"halo_color","icon-halo-color":"halo_color","text-halo-blur":"halo_blur","icon-halo-blur":"halo_blur","text-halo-width":"halo_width","icon-halo-width":"halo_width","line-gap-width":"gapwidth"}[t]||t.replace(e+"-","").replace(/-/g,"_")}ji.prototype.populatePaintArrays=function(t,e,r){for(var i in this.programConfigurations)this.programConfigurations[i].populatePaintArrays(t,e,r);this.needsUpload=!0},ji.prototype.updatePaintArrays=function(t,e,r){for(var i=0,n=r;i<n.length;i+=1){var o=n[i];this.needsUpload=this.programConfigurations[o.id].updatePaintArrays(t,e,o)||this.needsUpload}},ji.prototype.get=function(t){return this.programConfigurations[t]},ji.prototype.upload=function(t){if(this.needsUpload){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}},ji.prototype.destroy=function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy()},wr("ConstantBinder",Oi),wr("SourceExpressionBinder",Fi),wr("CompositeExpressionBinder",Vi),wr("ProgramConfiguration",Ni,{omit:["_buffers"]}),wr("ProgramConfigurationSet",ji);var qi=8192;var $i,Zi=($i=16,{min:-1*Math.pow(2,$i-1),max:Math.pow(2,$i-1)-1});function Gi(t){for(var e=qi/t.extent,r=t.loadGeometry(),i=0;i<r.length;i++)for(var n=r[i],o=0;o<n.length;o++){var a=n[o];a.x=Math.round(a.x*e),a.y=Math.round(a.y*e),(a.x<Zi.min||a.x>Zi.max||a.y<Zi.min||a.y>Zi.max)&&A("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function Wi(t,e,r,i,n){t.emplaceBack(2*e+(i+1)/2,2*r+(n+1)/2)}var Xi=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.layoutVertexArray=new oi,this.indexArray=new _i,this.segments=new Di,this.programConfigurations=new ji(Li,t.layers,t.zoom)};function Hi(t,e,r){for(var i=0;i<t.length;i++){var n=t[i];if(on(n,e))return!0;if(en(e,n,r))return!0}return!1}function Ki(t,e){if(1===t.length&&1===t[0].length)return nn(e,t[0][0]);for(var r=0;r<e.length;r++)for(var i=e[r],n=0;n<i.length;n++)if(nn(t,i[n]))return!0;for(var o=0;o<t.length;o++){for(var a=t[o],s=0;s<a.length;s++)if(nn(e,a[s]))return!0;for(var l=0;l<e.length;l++)if(Qi(a,e[l]))return!0}return!1}function Ji(t,e,r){for(var i=0;i<e.length;i++)for(var n=e[i],o=0;o<t.length;o++){var a=t[o];if(a.length>=3)for(var s=0;s<n.length;s++)if(on(a,n[s]))return!0;if(Yi(a,n,r))return!0}return!1}function Yi(t,e,r){if(t.length>1){if(Qi(t,e))return!0;for(var i=0;i<e.length;i++)if(en(e[i],t,r))return!0}for(var n=0;n<t.length;n++)if(en(t[n],e,r))return!0;return!1}function Qi(t,e){if(0===t.length||0===e.length)return!1;for(var r=0;r<t.length-1;r++)for(var i=t[r],n=t[r+1],o=0;o<e.length-1;o++){if(tn(i,n,e[o],e[o+1]))return!0}return!1}function tn(t,e,r,i){return z(t,r,i)!==z(e,r,i)&&z(t,e,r)!==z(t,e,i)}function en(t,e,r){var i=r*r;if(1===e.length)return t.distSqr(e[0])<i;for(var n=1;n<e.length;n++){if(rn(t,e[n-1],e[n])<i)return!0}return!1}function rn(t,e,r){var i=e.distSqr(r);if(0===i)return t.distSqr(e);var n=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/i;return n<0?t.distSqr(e):n>1?t.distSqr(r):t.distSqr(r.sub(e)._mult(n)._add(e))}function nn(t,e){for(var r,i,n,o=!1,a=0;a<t.length;a++)for(var s=0,l=(r=t[a]).length-1;s<r.length;l=s++)i=r[s],n=r[l],i.y>e.y!=n.y>e.y&&e.x<(n.x-i.x)*(e.y-i.y)/(n.y-i.y)+i.x&&(o=!o);return o}function on(t,e){for(var r=!1,i=0,n=t.length-1;i<t.length;n=i++){var o=t[i],a=t[n];o.y>e.y!=a.y>e.y&&e.x<(a.x-o.x)*(e.y-o.y)/(a.y-o.y)+o.x&&(r=!r)}return r}function an(t,e,r){var i=e.paint.get(t).value;return"constant"===i.kind?i.value:r.programConfigurations.get(e.id).binders[t].statistics.max}function sn(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function ln(t,e,r,i,n){if(!e[0]&&!e[1])return t;var o=h.convert(e);"viewport"===r&&o._rotate(-i);for(var a=[],s=0;s<t.length;s++){for(var l=t[s],u=[],c=0;c<l.length;c++)u.push(l[c].sub(o._mult(n)));a.push(u)}return a}Xi.prototype.populate=function(t,e){for(var r=0,i=t;r<i.length;r+=1){var n=i[r],o=n.feature,a=n.index,s=n.sourceLayerIndex;if(this.layers[0]._featureFilter(new Vr(this.zoom),o)){var l=Gi(o);this.addFeature(o,l,a),e.featureIndex.insert(o,l,a,s,this.index)}}},Xi.prototype.update=function(t,e){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers)},Xi.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Xi.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Xi.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Li),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},Xi.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Xi.prototype.addFeature=function(t,e,r){for(var i=0,n=e;i<n.length;i+=1)for(var o=0,a=n[i];o<a.length;o+=1){var s=a[o],l=s.x,u=s.y;if(!(l<0||l>=qi||u<0||u>=qi)){var c=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),h=c.vertexLength;Wi(this.layoutVertexArray,l,u,-1,-1),Wi(this.layoutVertexArray,l,u,1,-1),Wi(this.layoutVertexArray,l,u,1,1),Wi(this.layoutVertexArray,l,u,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),c.vertexLength+=4,c.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r)},wr("CircleBucket",Xi,{omit:["layers"]});var un={paint:new Yr({"circle-radius":new Hr(F.paint_circle["circle-radius"]),"circle-color":new Hr(F.paint_circle["circle-color"]),"circle-blur":new Hr(F.paint_circle["circle-blur"]),"circle-opacity":new Hr(F.paint_circle["circle-opacity"]),"circle-translate":new Xr(F.paint_circle["circle-translate"]),"circle-translate-anchor":new Xr(F.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Xr(F.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Xr(F.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Hr(F.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Hr(F.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Hr(F.paint_circle["circle-stroke-opacity"])})},cn="undefined"!=typeof Float32Array?Float32Array:Array;Math.PI;function hn(){var t=new cn(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function pn(){var t=new cn(3);return t[0]=0,t[1]=0,t[2]=0,t}function fn(t){var e=t[0],r=t[1],i=t[2];return Math.sqrt(e*e+r*r+i*i)}function dn(t,e,r){var i=new cn(3);return i[0]=t,i[1]=e,i[2]=r,i}function mn(t,e){var r=e[0],i=e[1],n=e[2],o=r*r+i*i+n*n;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function yn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function vn(t,e,r){var i=e[0],n=e[1],o=e[2],a=r[0],s=r[1],l=r[2];return t[0]=n*l-o*s,t[1]=o*a-i*l,t[2]=i*s-n*a,t}var gn,_n=fn,xn=(gn=pn(),function(t,e,r,i,n,o){var a,s;for(e||(e=3),r||(r=0),s=i?Math.min(i*e+r,t.length):t.length,a=r;a<s;a+=e)gn[0]=t[a],gn[1]=t[a+1],gn[2]=t[a+2],n(gn,gn,o),t[a]=gn[0],t[a+1]=gn[1],t[a+2]=gn[2];return t});function bn(){var t=new cn(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}function wn(t,e){var r=e[0],i=e[1],n=e[2],o=e[3],a=r*r+i*i+n*n+o*o;return a>0&&(a=1/Math.sqrt(a),t[0]=r*a,t[1]=i*a,t[2]=n*a,t[3]=o*a),t}function En(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3];return t[0]=r[0]*i+r[4]*n+r[8]*o+r[12]*a,t[1]=r[1]*i+r[5]*n+r[9]*o+r[13]*a,t[2]=r[2]*i+r[6]*n+r[10]*o+r[14]*a,t[3]=r[3]*i+r[7]*n+r[11]*o+r[15]*a,t}var Sn=function(){var t=bn();return function(e,r,i,n,o,a){var s,l;for(r||(r=4),i||(i=0),l=n?Math.min(n*r+i,e.length):e.length,s=i;s<l;s+=r)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],t[3]=e[s+3],o(t,t,a),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2],e[s+3]=t[3];return e}}();function Tn(){var t=new cn(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function An(t,e,r,i){var n,o,a,s,l,u=e[0],c=e[1],h=e[2],p=e[3],f=r[0],d=r[1],m=r[2],y=r[3];return(o=u*f+c*d+h*m+p*y)<0&&(o=-o,f=-f,d=-d,m=-m,y=-y),1-o>1e-6?(n=Math.acos(o),a=Math.sin(n),s=Math.sin((1-i)*n)/a,l=Math.sin(i*n)/a):(s=1-i,l=i),t[0]=s*u+l*f,t[1]=s*c+l*d,t[2]=s*h+l*m,t[3]=s*p+l*y,t}var zn,In,kn,Mn,Cn,Pn,Ln=wn;zn=pn(),In=dn(1,0,0),kn=dn(0,1,0),Mn=Tn(),Cn=Tn(),Pn=hn();!function(){var t,e=((t=new cn(2))[0]=0,t[1]=0,t)}();var Dn=function(t){function e(e){t.call(this,e,un)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Xi(t)},e.prototype.queryRadius=function(t){var e=t;return an("circle-radius",this,e)+an("circle-stroke-width",this,e)+sn(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,i,n,o,a,s){for(var l=ln(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,a),u=this.paint.get("circle-radius").evaluate(e,r)+this.paint.get("circle-stroke-width").evaluate(e,r),c="map"===this.paint.get("circle-pitch-alignment"),h=c?l:function(t,e,r){return t.map((function(t){return t.map((function(t){return Rn(t,e,r)}))}))}(l,s,o),p=c?u*a:u,f=0,d=i;f<d.length;f+=1)for(var m=0,y=d[f];m<y.length;m+=1){var v=y[m],g=c?v:Rn(v,s,o),_=p,x=En([],[v.x,v.y,0,1],s);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?_*=x[3]/o.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(_*=o.cameraToCenterDistance/x[3]),Hi(h,g,_))return!0}return!1},e}(Qr);function Rn(t,e,r){var i=En([],[t.x,t.y,0,1],e);return new h((i[0]/i[3]+1)*r.width*.5,(i[1]/i[3]+1)*r.height*.5)}var Bn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Xi);function On(t,e,r,i){var n=e.width,o=e.height;if(i){if(i.length!==n*o*r)throw new RangeError("mismatched image size")}else i=new Uint8Array(n*o*r);return t.width=n,t.height=o,t.data=i,t}function Fn(t,e,r){var i=e.width,n=e.height;if(i!==t.width||n!==t.height){var o=On({},{width:i,height:n},r);Vn(t,o,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,i),height:Math.min(t.height,n)},r),t.width=i,t.height=n,t.data=o.data}}function Vn(t,e,r,i,n,o){if(0===n.width||0===n.height)return e;if(n.width>t.width||n.height>t.height||r.x>t.width-n.width||r.y>t.height-n.height)throw new RangeError("out of range source coordinates for image copy");if(n.width>e.width||n.height>e.height||i.x>e.width-n.width||i.y>e.height-n.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=t.data,s=e.data,l=0;l<n.height;l++)for(var u=((r.y+l)*t.width+r.x)*o,c=((i.y+l)*e.width+i.x)*o,h=0;h<n.width*o;h++)s[c+h]=a[u+h];return e}wr("HeatmapBucket",Bn,{omit:["layers"]});var Nn=function(t,e){On(this,t,1,e)};Nn.prototype.resize=function(t){Fn(this,t,1)},Nn.prototype.clone=function(){return new Nn({width:this.width,height:this.height},new Uint8Array(this.data))},Nn.copy=function(t,e,r,i,n){Vn(t,e,r,i,n,1)};var jn=function(t,e){On(this,t,4,e)};jn.prototype.resize=function(t){Fn(this,t,4)},jn.prototype.clone=function(){return new jn({width:this.width,height:this.height},new Uint8Array(this.data))},jn.copy=function(t,e,r,i,n){Vn(t,e,r,i,n,4)},wr("AlphaImage",Nn),wr("RGBAImage",jn);var Un={paint:new Yr({"heatmap-radius":new Hr(F.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Hr(F.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Xr(F.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Jr(F.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Xr(F.paint_heatmap["heatmap-opacity"])})};function qn(t,e){for(var r=new Uint8Array(1024),i={},n=0,o=0;n<256;n++,o+=4){i[e]=n/255;var a=t.evaluate(i);r[o+0]=Math.floor(255*a.r/a.a),r[o+1]=Math.floor(255*a.g/a.a),r[o+2]=Math.floor(255*a.b/a.a),r[o+3]=Math.floor(255*a.a)}return new jn({width:256,height:1},r)}var $n=function(t){function e(e){t.call(this,e,Un),this._updateColorRamp()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Bn(t)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){"heatmap-color"===t&&this._updateColorRamp()},e.prototype._updateColorRamp=function(){var t=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=qn(t,"heatmapDensity"),this.colorRampTexture=null},e.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility},e}(Qr),Zn={paint:new Yr({"hillshade-illumination-direction":new Xr(F.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Xr(F.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Xr(F.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Xr(F.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Xr(F.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Xr(F.paint_hillshade["hillshade-accent-color"])})},Gn=function(t){function e(e){t.call(this,e,Zn)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility},e}(Qr),Wn=ii([{name:"a_pos",components:2,type:"Int16"}],4).members,Xn=Kn,Hn=Kn;function Kn(t,e,r){r=r||2;var i,n,o,a,s,l,u,c=e&&e.length,h=c?e[0]*r:t.length,p=Jn(t,0,h,r,!0),f=[];if(!p)return f;if(c&&(p=function(t,e,r,i){var n,o,a,s,l,u=[];for(n=0,o=e.length;n<o;n++)a=e[n]*i,s=n<o-1?e[n+1]*i:t.length,(l=Jn(t,a,s,i,!1))===l.next&&(l.steiner=!0),u.push(so(l));for(u.sort(no),n=0;n<u.length;n++)oo(u[n],r),r=Yn(r,r.next);return r}(t,e,p,r)),t.length>80*r){i=o=t[0],n=a=t[1];for(var d=r;d<h;d+=r)(s=t[d])<i&&(i=s),(l=t[d+1])<n&&(n=l),s>o&&(o=s),l>a&&(a=l);u=0!==(u=Math.max(o-i,a-n))?1/u:0}return Qn(p,f,r,i,n,u),f}function Jn(t,e,r,i,n){var o,a;if(n===_o(t,e,r,i)>0)for(o=e;o<r;o+=i)a=yo(o,t[o],t[o+1],a);else for(o=r-i;o>=e;o-=i)a=yo(o,t[o],t[o+1],a);return a&&ho(a,a.next)&&(vo(a),a=a.next),a}function Yn(t,e){if(!t)return t;e||(e=t);var r,i=t;do{if(r=!1,i.steiner||!ho(i,i.next)&&0!==co(i.prev,i,i.next))i=i.next;else{if(vo(i),(i=e=i.prev)===i.next)break;r=!0}}while(r||i!==e);return e}function Qn(t,e,r,i,n,o,a){if(t){!a&&o&&function(t,e,r,i){var n=t;do{null===n.z&&(n.z=ao(n.x,n.y,e,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,r,i,n,o,a,s,l,u=1;do{for(r=t,t=null,o=null,a=0;r;){for(a++,i=r,s=0,e=0;e<u&&(s++,i=i.nextZ);e++);for(l=u;s>0||l>0&&i;)0!==s&&(0===l||!i||r.z<=i.z)?(n=r,r=r.nextZ,s--):(n=i,i=i.nextZ,l--),o?o.nextZ=n:t=n,n.prevZ=o,o=n;r=i}o.nextZ=null,u*=2}while(a>1)}(n)}(t,i,n,o);for(var s,l,u=t;t.prev!==t.next;)if(s=t.prev,l=t.next,o?eo(t,i,n,o):to(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),vo(t),t=l.next,u=l.next;else if((t=l)===u){a?1===a?Qn(t=ro(t,e,r),e,r,i,n,o,2):2===a&&io(t,e,r,i,n,o):Qn(Yn(t),e,r,i,n,o,1);break}}}function to(t){var e=t.prev,r=t,i=t.next;if(co(e,r,i)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(lo(e.x,e.y,r.x,r.y,i.x,i.y,n.x,n.y)&&co(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function eo(t,e,r,i){var n=t.prev,o=t,a=t.next;if(co(n,o,a)>=0)return!1;for(var s=n.x<o.x?n.x<a.x?n.x:a.x:o.x<a.x?o.x:a.x,l=n.y<o.y?n.y<a.y?n.y:a.y:o.y<a.y?o.y:a.y,u=n.x>o.x?n.x>a.x?n.x:a.x:o.x>a.x?o.x:a.x,c=n.y>o.y?n.y>a.y?n.y:a.y:o.y>a.y?o.y:a.y,h=ao(s,l,e,r,i),p=ao(u,c,e,r,i),f=t.prevZ,d=t.nextZ;f&&f.z>=h&&d&&d.z<=p;){if(f!==t.prev&&f!==t.next&&lo(n.x,n.y,o.x,o.y,a.x,a.y,f.x,f.y)&&co(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,d!==t.prev&&d!==t.next&&lo(n.x,n.y,o.x,o.y,a.x,a.y,d.x,d.y)&&co(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;f&&f.z>=h;){if(f!==t.prev&&f!==t.next&&lo(n.x,n.y,o.x,o.y,a.x,a.y,f.x,f.y)&&co(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;d&&d.z<=p;){if(d!==t.prev&&d!==t.next&&lo(n.x,n.y,o.x,o.y,a.x,a.y,d.x,d.y)&&co(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function ro(t,e,r){var i=t;do{var n=i.prev,o=i.next.next;!ho(n,o)&&po(n,i,i.next,o)&&fo(n,o)&&fo(o,n)&&(e.push(n.i/r),e.push(i.i/r),e.push(o.i/r),vo(i),vo(i.next),i=t=o),i=i.next}while(i!==t);return i}function io(t,e,r,i,n,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&uo(a,s)){var l=mo(a,s);return a=Yn(a,a.next),l=Yn(l,l.next),Qn(a,e,r,i,n,o),void Qn(l,e,r,i,n,o)}s=s.next}a=a.next}while(a!==t)}function no(t,e){return t.x-e.x}function oo(t,e){if(e=function(t,e){var r,i=e,n=t.x,o=t.y,a=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=n&&s>a){if(a=s,s===n){if(o===i.y)return i;if(o===i.next.y)return i.next}r=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!r)return null;if(n===a)return r.prev;var l,u=r,c=r.x,h=r.y,p=1/0;i=r.next;for(;i!==u;)n>=i.x&&i.x>=c&&n!==i.x&&lo(o<h?n:a,o,c,h,o<h?a:n,o,i.x,i.y)&&((l=Math.abs(o-i.y)/(n-i.x))<p||l===p&&i.x>r.x)&&fo(i,t)&&(r=i,p=l),i=i.next;return r}(t,e)){var r=mo(e,t);Yn(r,r.next)}}function ao(t,e,r,i,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*n)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*n)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function so(t){var e=t,r=t;do{e.x<r.x&&(r=e),e=e.next}while(e!==t);return r}function lo(t,e,r,i,n,o,a,s){return(n-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(i-s)-(r-a)*(e-s)>=0&&(r-a)*(o-s)-(n-a)*(i-s)>=0}function uo(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&po(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&fo(t,e)&&fo(e,t)&&function(t,e){var r=t,i=!1,n=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&n<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next}while(r!==t);return i}(t,e)}function co(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function ho(t,e){return t.x===e.x&&t.y===e.y}function po(t,e,r,i){return!!(ho(t,e)&&ho(r,i)||ho(t,i)&&ho(r,e))||co(t,e,r)>0!=co(t,e,i)>0&&co(r,i,t)>0!=co(r,i,e)>0}function fo(t,e){return co(t.prev,t,t.next)<0?co(t,e,t.next)>=0&&co(t,t.prev,e)>=0:co(t,e,t.prev)<0||co(t,t.next,e)<0}function mo(t,e){var r=new go(t.i,t.x,t.y),i=new go(e.i,e.x,e.y),n=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,o.next=i,i.prev=o,i}function yo(t,e,r,i){var n=new go(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function vo(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function go(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function _o(t,e,r,i){for(var n=0,o=e,a=r-i;o<r;o+=i)n+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return n}Kn.deviation=function(t,e,r,i){var n=e&&e.length,o=n?e[0]*r:t.length,a=Math.abs(_o(t,0,o,r));if(n)for(var s=0,l=e.length;s<l;s++){var u=e[s]*r,c=s<l-1?e[s+1]*r:t.length;a-=Math.abs(_o(t,u,c,r))}var h=0;for(s=0;s<i.length;s+=3){var p=i[s]*r,f=i[s+1]*r,d=i[s+2]*r;h+=Math.abs((t[p]-t[d])*(t[f+1]-t[p+1])-(t[p]-t[f])*(t[d+1]-t[p+1]))}return 0===a&&0===h?0:Math.abs((h-a)/a)},Kn.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},i=0,n=0;n<t.length;n++){for(var o=0;o<t[n].length;o++)for(var a=0;a<e;a++)r.vertices.push(t[n][o][a]);n>0&&(i+=t[n-1].length,r.holes.push(i))}return r},Xn["default"]=Hn;var xo=wo,bo=wo;function wo(t,e,r,i,n){!function o(t,e,r,i,n){for(;i>r;){if(i-r>600){var a=i-r+1,s=e-r+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1),h=Math.max(r,Math.floor(e-s*u/a+c)),p=Math.min(i,Math.floor(e+(a-s)*u/a+c));o(t,e,h,p,n)}var f=t[e],d=r,m=i;for(Eo(t,r,e),n(t[i],f)>0&&Eo(t,r,i);d<m;){for(Eo(t,d,m),d++,m--;n(t[d],f)<0;)d++;for(;n(t[m],f)>0;)m--}0===n(t[r],f)?Eo(t,r,m):Eo(t,++m,i),m<=e&&(r=m+1),e<=m&&(i=m-1)}}(t,e,r||0,i||t.length-1,n||So)}function Eo(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function So(t,e){return t<e?-1:t>e?1:0}function To(t,e){var r=t.length;if(r<=1)return[t];for(var i,n,o=[],a=0;a<r;a++){var s=I(t[a]);0!==s&&(t[a].area=Math.abs(s),void 0===n&&(n=s<0),n===s<0?(i&&o.push(i),i=[t[a]]):i.push(t[a]))}if(i&&o.push(i),e>1)for(var l=0;l<o.length;l++)o[l].length<=e||(xo(o[l],e,1,o[l].length-1,Ao),o[l]=o[l].slice(0,e));return o}function Ao(t,e){return e.area-t.area}xo["default"]=bo;var zo=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.layoutVertexArray=new oi,this.indexArray=new _i,this.indexArray2=new xi,this.programConfigurations=new ji(Wn,t.layers,t.zoom),this.segments=new Di,this.segments2=new Di};zo.prototype.populate=function(t,e){for(var r=0,i=t;r<i.length;r+=1){var n=i[r],o=n.feature,a=n.index,s=n.sourceLayerIndex;if(this.layers[0]._featureFilter(new Vr(this.zoom),o)){var l=Gi(o);this.addFeature(o,l,a),e.featureIndex.insert(o,l,a,s,this.index)}}},zo.prototype.update=function(t,e){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers)},zo.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},zo.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},zo.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Wn),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0},zo.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},zo.prototype.addFeature=function(t,e,r){for(var i=0,n=To(e,500);i<n.length;i+=1){for(var o=n[i],a=0,s=0,l=o;s<l.length;s+=1){a+=l[s].length}for(var u=this.segments.prepareSegment(a,this.layoutVertexArray,this.indexArray),c=u.vertexLength,h=[],p=[],f=0,d=o;f<d.length;f+=1){var m=d[f];if(0!==m.length){m!==o[0]&&p.push(h.length/2);var y=this.segments2.prepareSegment(m.length,this.layoutVertexArray,this.indexArray2),v=y.vertexLength;this.layoutVertexArray.emplaceBack(m[0].x,m[0].y),this.indexArray2.emplaceBack(v+m.length-1,v),h.push(m[0].x),h.push(m[0].y);for(var g=1;g<m.length;g++)this.layoutVertexArray.emplaceBack(m[g].x,m[g].y),this.indexArray2.emplaceBack(v+g-1,v+g),h.push(m[g].x),h.push(m[g].y);y.vertexLength+=m.length,y.primitiveLength+=m.length}}for(var _=Xn(h,p),x=0;x<_.length;x+=3)this.indexArray.emplaceBack(c+_[x],c+_[x+1],c+_[x+2]);u.vertexLength+=a,u.primitiveLength+=_.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r)},wr("FillBucket",zo,{omit:["layers"]});var Io={paint:new Yr({"fill-antialias":new Xr(F.paint_fill["fill-antialias"]),"fill-opacity":new Hr(F.paint_fill["fill-opacity"]),"fill-color":new Hr(F.paint_fill["fill-color"]),"fill-outline-color":new Hr(F.paint_fill["fill-outline-color"]),"fill-translate":new Xr(F.paint_fill["fill-translate"]),"fill-translate-anchor":new Xr(F.paint_fill["fill-translate-anchor"]),"fill-pattern":new Kr(F.paint_fill["fill-pattern"])})},ko=function(t){function e(e){t.call(this,e,Io)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(t){this.paint=this._transitioningPaint.possiblyEvaluate(t);var e=this.paint._values["fill-outline-color"];"constant"===e.value.kind&&void 0===e.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},e.prototype.createBucket=function(t){return new zo(t)},e.prototype.queryRadius=function(){return sn(this.paint.get("fill-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,i,n,o,a){return Ki(ln(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),o.angle,a),i)},e}(Qr),Mo=ii([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4).members,Co=Math.pow(2,13);function Po(t,e,r,i,n,o,a,s){t.emplaceBack(e,r,2*Math.floor(i*Co)+a,n*Co*2,o*Co*2,Math.round(s))}var Lo=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.layoutVertexArray=new si,this.indexArray=new _i,this.programConfigurations=new ji(Mo,t.layers,t.zoom),this.segments=new Di};function Do(t,e){return t.x===e.x&&(t.x<0||t.x>qi)||t.y===e.y&&(t.y<0||t.y>qi)}function Ro(t){return t.every((function(t){return t.x<0}))||t.every((function(t){return t.x>qi}))||t.every((function(t){return t.y<0}))||t.every((function(t){return t.y>qi}))}Lo.prototype.populate=function(t,e){for(var r=0,i=t;r<i.length;r+=1){var n=i[r],o=n.feature,a=n.index,s=n.sourceLayerIndex;if(this.layers[0]._featureFilter(new Vr(this.zoom),o)){var l=Gi(o);this.addFeature(o,l,a),e.featureIndex.insert(o,l,a,s,this.index)}}},Lo.prototype.update=function(t,e){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers)},Lo.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Lo.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Lo.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Mo),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},Lo.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Lo.prototype.addFeature=function(t,e,r){for(var i=0,n=To(e,500);i<n.length;i+=1){for(var o=n[i],a=0,s=0,l=o;s<l.length;s+=1){a+=l[s].length}for(var u=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),c=0,h=o;c<h.length;c+=1){var p=h[c];if(0!==p.length&&!Ro(p))for(var f=0,d=0;d<p.length;d++){var m=p[d];if(d>=1){var y=p[d-1];if(!Do(m,y)){u.vertexLength+4>Di.MAX_VERTEX_ARRAY_LENGTH&&(u=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var v=m.sub(y)._perp()._unit(),g=y.dist(m);f+g>32768&&(f=0),Po(this.layoutVertexArray,m.x,m.y,v.x,v.y,0,0,f),Po(this.layoutVertexArray,m.x,m.y,v.x,v.y,0,1,f),f+=g,Po(this.layoutVertexArray,y.x,y.y,v.x,v.y,0,0,f),Po(this.layoutVertexArray,y.x,y.y,v.x,v.y,0,1,f);var _=u.vertexLength;this.indexArray.emplaceBack(_,_+1,_+2),this.indexArray.emplaceBack(_+1,_+2,_+3),u.vertexLength+=4,u.primitiveLength+=2}}}}u.vertexLength+a>Di.MAX_VERTEX_ARRAY_LENGTH&&(u=this.segments.prepareSegment(a,this.layoutVertexArray,this.indexArray));for(var x=[],b=[],w=u.vertexLength,E=0,S=o;E<S.length;E+=1){var T=S[E];if(0!==T.length){T!==o[0]&&b.push(x.length/2);for(var A=0;A<T.length;A++){var z=T[A];Po(this.layoutVertexArray,z.x,z.y,0,0,1,1,0),x.push(z.x),x.push(z.y)}}}for(var I=Xn(x,b),k=0;k<I.length;k+=3)this.indexArray.emplaceBack(w+I[k],w+I[k+1],w+I[k+2]);u.primitiveLength+=I.length/3,u.vertexLength+=a}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r)},wr("FillExtrusionBucket",Lo,{omit:["layers"]});var Bo={paint:new Yr({"fill-extrusion-opacity":new Xr(F["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Hr(F["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Xr(F["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Xr(F["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Kr(F["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Hr(F["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Hr(F["paint_fill-extrusion"]["fill-extrusion-base"])})},Oo=function(t){function e(e){t.call(this,e,Bo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Lo(t)},e.prototype.queryRadius=function(){return sn(this.paint.get("fill-extrusion-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,i,n,o,a){return Ki(ln(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),o.angle,a),i)},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("fill-extrusion-opacity")&&"none"!==this.visibility},e.prototype.resize=function(){this.viewportFrame&&(this.viewportFrame.destroy(),this.viewportFrame=null)},e}(Qr),Fo=ii([{name:"a_pos_normal",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,Vo=No;function No(t,e,r,i,n){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=i,this._values=n,t.readFields(jo,this,e)}function jo(t,e,r){1==t?e.id=r.readVarint():2==t?function(t,e){var r=t.readVarint()+t.pos;for(;t.pos<r;){var i=e._keys[t.readVarint()],n=e._values[t.readVarint()];e.properties[i]=n}}(r,e):3==t?e.type=r.readVarint():4==t&&(e._geometry=r.pos)}function Uo(t){for(var e,r,i=0,n=0,o=t.length,a=o-1;n<o;a=n++)e=t[n],i+=((r=t[a]).x-e.x)*(e.y+r.y);return i}No.types=["Unknown","Point","LineString","Polygon"],No.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,r=t.readVarint()+t.pos,i=1,n=0,o=0,a=0,s=[];t.pos<r;){if(n<=0){var l=t.readVarint();i=7&l,n=l>>3}if(n--,1===i||2===i)o+=t.readSVarint(),a+=t.readSVarint(),1===i&&(e&&s.push(e),e=[]),e.push(new h(o,a));else{if(7!==i)throw new Error("unknown command "+i);e&&e.push(e[0].clone())}}return e&&s.push(e),s},No.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,i=0,n=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;t.pos<e;){if(i<=0){var c=t.readVarint();r=7&c,i=c>>3}if(i--,1===r||2===r)(n+=t.readSVarint())<a&&(a=n),n>s&&(s=n),(o+=t.readSVarint())<l&&(l=o),o>u&&(u=o);else if(7!==r)throw new Error("unknown command "+r)}return[a,l,s,u]},No.prototype.toGeoJSON=function(t,e,r){var i,n,o=this.extent*Math.pow(2,r),a=this.extent*t,s=this.extent*e,l=this.loadGeometry(),u=No.types[this.type];function c(t){for(var e=0;e<t.length;e++){var r=t[e],i=180-360*(r.y+s)/o;t[e]=[360*(r.x+a)/o-180,360/Math.PI*Math.atan(Math.exp(i*Math.PI/180))-90]}}switch(this.type){case 1:var h=[];for(i=0;i<l.length;i++)h[i]=l[i][0];c(l=h);break;case 2:for(i=0;i<l.length;i++)c(l[i]);break;case 3:for(l=function(t){var e=t.length;if(e<=1)return[t];for(var r,i,n=[],o=0;o<e;o++){var a=Uo(t[o]);0!==a&&(void 0===i&&(i=a<0),i===a<0?(r&&n.push(r),r=[t[o]]):r.push(t[o]))}r&&n.push(r);return n}(l),i=0;i<l.length;i++)for(n=0;n<l[i].length;n++)c(l[i][n])}1===l.length?l=l[0]:u="Multi"+u;var p={type:"Feature",geometry:{type:u,coordinates:l},properties:this.properties};return"id"in this&&(p.id=this.id),p};var qo=$o;function $o(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(Zo,this,e),this.length=this._features.length}function Zo(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&&e._values.push(function(t){var e=null,r=t.readVarint()+t.pos;for(;t.pos<r;){var i=t.readVarint()>>3;e=1===i?t.readString():2===i?t.readFloat():3===i?t.readDouble():4===i?t.readVarint64():5===i?t.readVarint():6===i?t.readSVarint():7===i?t.readBoolean():null}return e}(r))}function Go(t,e,r){if(3===t){var i=new qo(r,r.readVarint()+r.pos);i.length&&(e[i.name]=i)}}$o.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new Vo(this._pbf,e,this.extent,this._keys,this._values)};var Wo={VectorTile:function(t,e){this.layers=t.readFields(Go,{},e)},VectorTileFeature:Vo,VectorTileLayer:qo},Xo=Wo.VectorTileFeature.types,Ho=63,Ko=Math.cos(Math.PI/180*37.5),Jo=.5,Yo=Math.pow(2,14)/Jo;function Qo(t,e,r,i,n,o,a){t.emplaceBack(e.x,e.y,i?1:0,n?1:-1,Math.round(Ho*r.x)+128,Math.round(Ho*r.y)+128,1+(0===o?0:o<0?-1:1)|(a*Jo&63)<<2,a*Jo>>6)}var ta=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.layoutVertexArray=new li,this.indexArray=new _i,this.programConfigurations=new ji(Fo,t.layers,t.zoom),this.segments=new Di};function ea(t,e){return(t/e.tileTotal*(e.end-e.start)+e.start)*(Yo-1)}ta.prototype.populate=function(t,e){for(var r=0,i=t;r<i.length;r+=1){var n=i[r],o=n.feature,a=n.index,s=n.sourceLayerIndex;if(this.layers[0]._featureFilter(new Vr(this.zoom),o)){var l=Gi(o);this.addFeature(o,l,a),e.featureIndex.insert(o,l,a,s,this.index)}}},ta.prototype.update=function(t,e){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers)},ta.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},ta.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},ta.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Fo),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},ta.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},ta.prototype.addFeature=function(t,e,r){for(var i=this.layers[0].layout,n=i.get("line-join").evaluate(t,{}),o=i.get("line-cap"),a=i.get("line-miter-limit"),s=i.get("line-round-limit"),l=0,u=e;l<u.length;l+=1){var c=u[l];this.addLine(c,t,n,o,a,s,r)}},ta.prototype.addLine=function(t,e,r,i,n,o,a){var s=null;e.properties&&e.properties.hasOwnProperty("mapbox_clip_start")&&e.properties.hasOwnProperty("mapbox_clip_end")&&(s={start:e.properties.mapbox_clip_start,end:e.properties.mapbox_clip_end,tileTotal:void 0});for(var l="Polygon"===Xo[e.type],u=t.length;u>=2&&t[u-1].equals(t[u-2]);)u--;for(var c=0;c<u-1&&t[c].equals(t[c+1]);)c++;if(!(u<(l?3:2))){s&&(s.tileTotal=function(t,e,r){for(var i,n,o=0,a=e;a<r-1;a++)i=t[a],n=t[a+1],o+=i.dist(n);return o}(t,c,u)),"bevel"===r&&(n=1.05);var h=qi/(512*this.overscaling)*15,p=t[c],f=this.segments.prepareSegment(10*u,this.layoutVertexArray,this.indexArray);this.distance=0;var d,m,y,v=i,g=l?"butt":i,_=!0,x=void 0,b=void 0,w=void 0,E=void 0;this.e1=this.e2=this.e3=-1,l&&(d=t[u-2],E=p.sub(d)._unit()._perp());for(var S=c;S<u;S++)if(!(b=l&&S===u-1?t[c+1]:t[S+1])||!t[S].equals(b)){E&&(w=E),d&&(x=d),d=t[S],E=b?b.sub(d)._unit()._perp():w;var T=(w=w||E).add(E);0===T.x&&0===T.y||T._unit();var A=T.x*E.x+T.y*E.y,z=0!==A?1/A:1/0,I=A<Ko&&x&&b;if(I&&S>c){var k=d.dist(x);if(k>2*h){var M=d.sub(d.sub(x)._mult(h/k)._round());this.distance+=M.dist(x),this.addCurrentVertex(M,this.distance,w.mult(1),0,0,!1,f,s),x=M}}var C=x&&b,P=C?r:b?v:g;if(C&&"round"===P&&(z<o?P="miter":z<=2&&(P="fakeround")),"miter"===P&&z>n&&(P="bevel"),"bevel"===P&&(z>2&&(P="flipbevel"),z<n&&(P="miter")),x&&(this.distance+=d.dist(x)),"miter"===P)T._mult(z),this.addCurrentVertex(d,this.distance,T,0,0,!1,f,s);else if("flipbevel"===P){if(z>100)T=E.clone().mult(-1);else{var L=w.x*E.y-w.y*E.x>0?-1:1,D=z*w.add(E).mag()/w.sub(E).mag();T._perp()._mult(D*L)}this.addCurrentVertex(d,this.distance,T,0,0,!1,f,s),this.addCurrentVertex(d,this.distance,T.mult(-1),0,0,!1,f,s)}else if("bevel"===P||"fakeround"===P){var R=w.x*E.y-w.y*E.x>0,B=-Math.sqrt(z*z-1);if(R?(y=0,m=B):(m=0,y=B),_||this.addCurrentVertex(d,this.distance,w,m,y,!1,f,s),"fakeround"===P){for(var O=Math.floor(8*(.5-(A-.5))),F=void 0,V=0;V<O;V++)F=E.mult((V+1)/(O+1))._add(w)._unit(),this.addPieSliceVertex(d,this.distance,F,R,f,s);this.addPieSliceVertex(d,this.distance,T,R,f,s);for(var N=O-1;N>=0;N--)F=w.mult((N+1)/(O+1))._add(E)._unit(),this.addPieSliceVertex(d,this.distance,F,R,f,s)}b&&this.addCurrentVertex(d,this.distance,E,-m,-y,!1,f,s)}else"butt"===P?(_||this.addCurrentVertex(d,this.distance,w,0,0,!1,f,s),b&&this.addCurrentVertex(d,this.distance,E,0,0,!1,f,s)):"square"===P?(_||(this.addCurrentVertex(d,this.distance,w,1,1,!1,f,s),this.e1=this.e2=-1),b&&this.addCurrentVertex(d,this.distance,E,-1,-1,!1,f,s)):"round"===P&&(_||(this.addCurrentVertex(d,this.distance,w,0,0,!1,f,s),this.addCurrentVertex(d,this.distance,w,1,1,!0,f,s),this.e1=this.e2=-1),b&&(this.addCurrentVertex(d,this.distance,E,-1,-1,!0,f,s),this.addCurrentVertex(d,this.distance,E,0,0,!1,f,s)));if(I&&S<u-1){var j=d.dist(b);if(j>2*h){var U=d.add(b.sub(d)._mult(h/j)._round());this.distance+=U.dist(d),this.addCurrentVertex(U,this.distance,E.mult(1),0,0,!1,f,s),d=U}}_=!1}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,a)}},ta.prototype.addCurrentVertex=function(t,e,r,i,n,o,a,s){var l,u=this.layoutVertexArray,c=this.indexArray;s&&(e=ea(e,s)),l=r.clone(),i&&l._sub(r.perp()._mult(i)),Qo(u,t,l,o,!1,i,e),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(c.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),this.e1=this.e2,this.e2=this.e3,l=r.mult(-1),n&&l._sub(r.perp()._mult(n)),Qo(u,t,l,o,!0,-n,e),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(c.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),this.e1=this.e2,this.e2=this.e3,e>Yo/2&&!s&&(this.distance=0,this.addCurrentVertex(t,this.distance,r,i,n,o,a))},ta.prototype.addPieSliceVertex=function(t,e,r,i,n,o){r=r.mult(i?-1:1);var a=this.layoutVertexArray,s=this.indexArray;o&&(e=ea(e,o)),Qo(a,t,r,!1,i,0,e),this.e3=n.vertexLength++,this.e1>=0&&this.e2>=0&&(s.emplaceBack(this.e1,this.e2,this.e3),n.primitiveLength++),i?this.e2=this.e3:this.e1=this.e3},wr("LineBucket",ta,{omit:["layers"]});var ra=new Yr({"line-cap":new Xr(F.layout_line["line-cap"]),"line-join":new Hr(F.layout_line["line-join"]),"line-miter-limit":new Xr(F.layout_line["line-miter-limit"]),"line-round-limit":new Xr(F.layout_line["line-round-limit"])}),ia={paint:new Yr({"line-opacity":new Hr(F.paint_line["line-opacity"]),"line-color":new Hr(F.paint_line["line-color"]),"line-translate":new Xr(F.paint_line["line-translate"]),"line-translate-anchor":new Xr(F.paint_line["line-translate-anchor"]),"line-width":new Hr(F.paint_line["line-width"]),"line-gap-width":new Hr(F.paint_line["line-gap-width"]),"line-offset":new Hr(F.paint_line["line-offset"]),"line-blur":new Hr(F.paint_line["line-blur"]),"line-dasharray":new Kr(F.paint_line["line-dasharray"]),"line-pattern":new Kr(F.paint_line["line-pattern"]),"line-gradient":new Jr(F.paint_line["line-gradient"])}),layout:ra},na=new(function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(e,r){return r=new Vr(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),t.prototype.possiblyEvaluate.call(this,e,r)},e.prototype.evaluate=function(e,r,i,n){return r=v({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,i,n)},e}(Hr))(ia.paint.properties["line-width"].specification);na.useIntegerZoom=!0;var oa=function(t){function e(e){t.call(this,e,ia)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){"line-gradient"===t&&this._updateGradient()},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=qn(t,"lineProgress"),this.gradientTexture=null},e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),this.paint._values["line-floorwidth"]=na.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new ta(t)},e.prototype.queryRadius=function(t){var e=t,r=aa(an("line-width",this,e),an("line-gap-width",this,e)),i=an("line-offset",this,e);return r/2+Math.abs(i)+sn(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,i,n,o,a){var s=ln(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,a),l=a/2*aa(this.paint.get("line-width").evaluate(e,r),this.paint.get("line-gap-width").evaluate(e,r)),u=this.paint.get("line-offset").evaluate(e,r);return u&&(i=function(t,e){for(var r=[],i=new h(0,0),n=0;n<t.length;n++){for(var o=t[n],a=[],s=0;s<o.length;s++){var l=o[s-1],u=o[s],c=o[s+1],p=0===s?i:u.sub(l)._unit()._perp(),f=s===o.length-1?i:c.sub(u)._unit()._perp(),d=p._add(f)._unit(),m=d.x*f.x+d.y*f.y;d._mult(1/m),a.push(d._mult(e)._add(u))}r.push(a)}return r}(i,u*a)),Ji(s,i,l)},e}(Qr);function aa(t,e){return e>0?e+2*t:t}var sa=ii([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"}]),la=ii([{name:"a_projected_pos",components:3,type:"Float32"}],4),ua=(ii([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),ii([{name:"a_placed",components:2,type:"Uint8"}],4)),ca=(ii([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]),ii([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),ha=ii([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);ii([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"hidden"}]),ii([{type:"Float32",name:"offsetX"}]),ii([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);function pa(t,e,r){var i=e.layout.get("text-transform").evaluate(r,{});return"uppercase"===i?t=t.toLocaleUpperCase():"lowercase"===i&&(t=t.toLocaleLowerCase()),Fr.applyArabicShaping&&(t=Fr.applyArabicShaping(t)),t}var fa={"!":"︕","#":"＃",$:"＄","%":"％","&":"＆","(":"︵",")":"︶","*":"＊","+":"＋",",":"︐","-":"︲",".":"・","/":"／",":":"︓",";":"︔","<":"︿","=":"＝",">":"﹀","?":"︖","@":"＠","[":"﹇","\\":"＼","]":"﹈","^":"＾",_:"︳","`":"｀","{":"︷","|":"―","}":"︸","~":"～","¢":"￠","£":"￡","¥":"￥","¦":"￤","¬":"￢","¯":"￣","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"￦","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","！":"︕","（":"︵","）":"︶","，":"︐","－":"︲","．":"・","：":"︓","；":"︔","＜":"︿","＞":"﹀","？":"︖","［":"﹇","］":"﹈","＿":"︳","｛":"︷","｜":"―","｝":"︸","｟":"︵","｠":"︶","｡":"︒","｢":"﹁","｣":"﹂"};var da=function(t){function e(e,r,i,n){t.call(this,e,r),this.angle=i,void 0!==n&&(this.segment=n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}(h);function ma(t,e){var r=e.expression;if("constant"===r.kind)return{functionType:"constant",layoutSize:r.evaluate(new Vr(t+1))};if("source"===r.kind)return{functionType:"source"};for(var i=r.zoomStops,n=0;n<i.length&&i[n]<=t;)n++;for(var o=n=Math.max(0,n-1);o<i.length&&i[o]<t+1;)o++;o=Math.min(i.length-1,o);var a={min:i[n],max:i[o]};return"composite"===r.kind?{functionType:"composite",zoomRange:a,propertyValue:e.value}:{functionType:"camera",layoutSize:r.evaluate(new Vr(t+1)),zoomRange:a,sizeRange:{min:r.evaluate(new Vr(a.min)),max:r.evaluate(new Vr(a.max))},propertyValue:e.value}}wr("Anchor",da);var ya=Wo.VectorTileFeature.types,va=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function ga(t,e,r,i,n,o,a,s){t.emplaceBack(e,r,Math.round(32*i),Math.round(32*n),o,a,s?s[0]:0,s?s[1]:0)}function _a(t,e,r){t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r)}var xa=function(t){this.layoutVertexArray=new ui,this.indexArray=new _i,this.programConfigurations=t,this.segments=new Di,this.dynamicLayoutVertexArray=new ci,this.opacityVertexArray=new hi,this.placedSymbolArray=new Ai};xa.prototype.upload=function(t,e,r,i){r&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,sa.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,la.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,va,!0),this.opacityVertexBuffer.itemSize=1),(r||i)&&this.programConfigurations.upload(t)},xa.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},wr("SymbolBuffers",xa);var ba=function(t,e,r){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new r,this.segments=new Di,this.collisionVertexArray=new di};ba.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,ua.members,!0)},ba.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},wr("CollisionBuffers",ba);var wa=function(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex;var e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=ma(this.zoom,e["text-size"]),this.iconSizeData=ma(this.zoom,e["icon-size"]);var r=this.layers[0].layout;this.sortFeaturesByY=r.get("text-allow-overlap")||r.get("icon-allow-overlap")||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sourceID=t.sourceID};wa.prototype.createArrays=function(){this.text=new xa(new ji(sa.members,this.layers,this.zoom,(function(t){return/^text/.test(t)}))),this.icon=new xa(new ji(sa.members,this.layers,this.zoom,(function(t){return/^icon/.test(t)}))),this.collisionBox=new ba(fi,ca.members,xi),this.collisionCircle=new ba(fi,ha.members,_i),this.glyphOffsetArray=new Ii,this.lineVertexArray=new Mi},wa.prototype.populate=function(t,e){var r=this.layers[0],i=r.layout,n=i.get("text-font"),o=i.get("text-field"),a=i.get("icon-image"),s=("constant"!==o.value.kind||o.value.value.length>0)&&("constant"!==n.value.kind||n.value.value.length>0),l="constant"!==a.value.kind||a.value.value&&a.value.value.length>0;if(this.features=[],s||l){for(var u=e.iconDependencies,c=e.glyphDependencies,h=new Vr(this.zoom),p=0,f=t;p<f.length;p+=1){var d=f[p],m=d.feature,y=d.index,v=d.sourceLayerIndex;if(r._featureFilter(h,m)){var g=void 0;s&&(g=pa(g=r.getValueAndResolveTokens("text-field",m),r,m));var _=void 0;if(l&&(_=r.getValueAndResolveTokens("icon-image",m)),g||_){var x={text:g,icon:_,index:y,sourceLayerIndex:v,geometry:Gi(m),properties:m.properties,type:ya[m.type]};if(void 0!==m.id&&(x.id=m.id),this.features.push(x),_&&(u[_]=!0),g)for(var b=n.evaluate(m,{}).join(","),w=c[b]=c[b]||{},E="map"===i.get("text-rotation-alignment")&&"point"!==i.get("symbol-placement"),S=Ir(g),T=0;T<g.length;T++)if(w[g.charCodeAt(T)]=!0,E&&S){var A=fa[g.charAt(T)];A&&(w[A.charCodeAt(0)]=!0)}}}}"line"===i.get("symbol-placement")&&(this.features=function(t){var e={},r={},i=[],n=0;function o(e){i.push(t[e]),n++}function a(t,e,n){var o=r[t];return delete r[t],r[e]=o,i[o].geometry[0].pop(),i[o].geometry[0]=i[o].geometry[0].concat(n[0]),o}function s(t,r,n){var o=e[r];return delete e[r],e[t]=o,i[o].geometry[0].shift(),i[o].geometry[0]=n[0].concat(i[o].geometry[0]),o}function l(t,e,r){var i=r?e[0][e[0].length-1]:e[0][0];return t+":"+i.x+":"+i.y}for(var u=0;u<t.length;u++){var c=t[u],h=c.geometry,p=c.text;if(p){var f=l(p,h),d=l(p,h,!0);if(f in r&&d in e&&r[f]!==e[d]){var m=s(f,d,h),y=a(f,d,i[m].geometry);delete e[f],delete r[d],r[l(p,i[y].geometry,!0)]=y,i[m].geometry=null}else f in r?a(f,d,h):d in e?s(f,d,h):(o(u),e[f]=n-1,r[d]=n-1)}else o(u)}return i.filter((function(t){return t.geometry}))}(this.features))}},wa.prototype.update=function(t,e){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers))},wa.prototype.isEmpty=function(){return 0===this.symbolInstances.length},wa.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},wa.prototype.upload=function(t){this.uploaded||(this.collisionBox.upload(t),this.collisionCircle.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},wa.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.collisionBox.destroy(),this.collisionCircle.destroy()},wa.prototype.addToLineVertexArray=function(t,e){var r=this.lineVertexArray.length;if(void 0!==t.segment){for(var i=t.dist(e[t.segment+1]),n=t.dist(e[t.segment]),o={},a=t.segment+1;a<e.length;a++)o[a]={x:e[a].x,y:e[a].y,tileUnitDistanceFromAnchor:i},a<e.length-1&&(i+=e[a+1].dist(e[a]));for(var s=t.segment||0;s>=0;s--)o[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:n},s>0&&(n+=e[s-1].dist(e[s]));for(var l=0;l<e.length;l++){var u=o[l];this.lineVertexArray.emplaceBack(u.x,u.y,u.tileUnitDistanceFromAnchor)}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}},wa.prototype.addSymbols=function(t,e,r,i,n,o,a,s,l,u){for(var c=t.indexArray,h=t.layoutVertexArray,p=t.dynamicLayoutVertexArray,f=t.segments.prepareSegment(4*e.length,t.layoutVertexArray,t.indexArray),d=this.glyphOffsetArray.length,m=f.vertexLength,y=0,v=e;y<v.length;y+=1){var g=v[y],_=g.tl,x=g.tr,b=g.bl,w=g.br,E=g.tex,S=f.vertexLength,T=g.glyphOffset[1];ga(h,s.x,s.y,_.x,T+_.y,E.x,E.y,r),ga(h,s.x,s.y,x.x,T+x.y,E.x+E.w,E.y,r),ga(h,s.x,s.y,b.x,T+b.y,E.x,E.y+E.h,r),ga(h,s.x,s.y,w.x,T+w.y,E.x+E.w,E.y+E.h,r),_a(p,s,0),c.emplaceBack(S,S+1,S+2),c.emplaceBack(S+1,S+2,S+3),f.vertexLength+=4,f.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(g.glyphOffset[0])}t.placedSymbolArray.emplaceBack(s.x,s.y,d,this.glyphOffsetArray.length-d,m,l,u,s.segment,r?r[0]:0,r?r[1]:0,i[0],i[1],a,!1),t.programConfigurations.populatePaintArrays(t.layoutVertexArray.length,o,o.index)},wa.prototype._addCollisionDebugVertex=function(t,e,r,i,n){return e.emplaceBack(0,0),t.emplaceBack(r.x,r.y,i.x,i.y,Math.round(n.x),Math.round(n.y))},wa.prototype.addCollisionDebugVertices=function(t,e,r,i,n,o,a,s){var l=n.segments.prepareSegment(4,n.layoutVertexArray,n.indexArray),u=l.vertexLength,c=n.layoutVertexArray,p=n.collisionVertexArray;if(this._addCollisionDebugVertex(c,p,o,a.anchor,new h(t,e)),this._addCollisionDebugVertex(c,p,o,a.anchor,new h(r,e)),this._addCollisionDebugVertex(c,p,o,a.anchor,new h(r,i)),this._addCollisionDebugVertex(c,p,o,a.anchor,new h(t,i)),l.vertexLength+=4,s){var f=n.indexArray;f.emplaceBack(u,u+1,u+2),f.emplaceBack(u,u+2,u+3),l.primitiveLength+=2}else{var d=n.indexArray;d.emplaceBack(u,u+1),d.emplaceBack(u+1,u+2),d.emplaceBack(u+2,u+3),d.emplaceBack(u+3,u),l.primitiveLength+=4}},wa.prototype.generateCollisionDebugBuffers=function(){for(var t=0,e=this.symbolInstances;t<e.length;t+=1){var r=e[t];r.textCollisionFeature={boxStartIndex:r.textBoxStartIndex,boxEndIndex:r.textBoxEndIndex},r.iconCollisionFeature={boxStartIndex:r.iconBoxStartIndex,boxEndIndex:r.iconBoxEndIndex};for(var i=0;i<2;i++){var n=r[0===i?"textCollisionFeature":"iconCollisionFeature"];if(n)for(var o=n.boxStartIndex;o<n.boxEndIndex;o++){var a=this.collisionBoxArray.get(o),s=a.x1,l=a.y1,u=a.x2,c=a.y2,h=a.radius>0;this.addCollisionDebugVertices(s,l,u,c,h?this.collisionCircle:this.collisionBox,a.anchorPoint,r,h)}}}},wa.prototype.deserializeCollisionBoxes=function(t,e,r,i,n){for(var o={},a=e;a<r;a++){var s=t.get(a);if(0===s.radius){o.textBox={x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2,anchorPointX:s.anchorPointX,anchorPointY:s.anchorPointY},o.textFeatureIndex=s.featureIndex;break}o.textCircles||(o.textCircles=[],o.textFeatureIndex=s.featureIndex);o.textCircles.push(s.anchorPointX,s.anchorPointY,s.radius,s.signedDistanceFromAnchor,1)}for(var l=i;l<n;l++){var u=t.get(l);if(0===u.radius){o.iconBox={x1:u.x1,y1:u.y1,x2:u.x2,y2:u.y2,anchorPointX:u.anchorPointX,anchorPointY:u.anchorPointY},o.iconFeatureIndex=u.featureIndex;break}}return o},wa.prototype.hasTextData=function(){return this.text.segments.get().length>0},wa.prototype.hasIconData=function(){return this.icon.segments.get().length>0},wa.prototype.hasCollisionBoxData=function(){return this.collisionBox.segments.get().length>0},wa.prototype.hasCollisionCircleData=function(){return this.collisionCircle.segments.get().length>0},wa.prototype.sortFeatures=function(t){var e=this;if(this.sortFeaturesByY&&this.sortedAngle!==t&&(this.sortedAngle=t,!(this.text.segments.get().length>1||this.icon.segments.get().length>1))){for(var r=[],i=0;i<this.symbolInstances.length;i++)r.push(i);var n=Math.sin(t),o=Math.cos(t);r.sort((function(t,r){var i=e.symbolInstances[t],a=e.symbolInstances[r];return(0|Math.round(n*i.anchor.x+o*i.anchor.y))-(0|Math.round(n*a.anchor.x+o*a.anchor.y))||a.featureIndex-i.featureIndex})),this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var a=0,s=r;a<s.length;a+=1){var l=s[a],u=e.symbolInstances[l];e.featureSortOrder.push(u.featureIndex);for(var c=0,h=u.placedTextSymbolIndices;c<h.length;c+=1)for(var p=h[c],f=e.text.placedSymbolArray.get(p),d=f.vertexStartIndex+4*f.numGlyphs,m=f.vertexStartIndex;m<d;m+=4)e.text.indexArray.emplaceBack(m,m+1,m+2),e.text.indexArray.emplaceBack(m+1,m+2,m+3);var y=e.icon.placedSymbolArray.get(l);if(y.numGlyphs){var v=y.vertexStartIndex;e.icon.indexArray.emplaceBack(v,v+1,v+2),e.icon.indexArray.emplaceBack(v+1,v+2,v+3)}}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},wr("SymbolBucket",wa,{omit:["layers","collisionBoxArray","features","compareText"],shallow:["symbolInstances"]}),wa.MAX_GLYPHS=65535,wa.addDynamicAttributes=_a;var Ea=new Yr({"symbol-placement":new Xr(F.layout_symbol["symbol-placement"]),"symbol-spacing":new Xr(F.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Xr(F.layout_symbol["symbol-avoid-edges"]),"icon-allow-overlap":new Xr(F.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Xr(F.layout_symbol["icon-ignore-placement"]),"icon-optional":new Xr(F.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Xr(F.layout_symbol["icon-rotation-alignment"]),"icon-size":new Hr(F.layout_symbol["icon-size"]),"icon-text-fit":new Xr(F.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Xr(F.layout_symbol["icon-text-fit-padding"]),"icon-image":new Hr(F.layout_symbol["icon-image"]),"icon-rotate":new Hr(F.layout_symbol["icon-rotate"]),"icon-padding":new Xr(F.layout_symbol["icon-padding"]),"icon-keep-upright":new Xr(F.layout_symbol["icon-keep-upright"]),"icon-offset":new Hr(F.layout_symbol["icon-offset"]),"icon-anchor":new Hr(F.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Xr(F.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Xr(F.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Xr(F.layout_symbol["text-rotation-alignment"]),"text-field":new Hr(F.layout_symbol["text-field"]),"text-font":new Hr(F.layout_symbol["text-font"]),"text-size":new Hr(F.layout_symbol["text-size"]),"text-max-width":new Hr(F.layout_symbol["text-max-width"]),"text-line-height":new Xr(F.layout_symbol["text-line-height"]),"text-letter-spacing":new Hr(F.layout_symbol["text-letter-spacing"]),"text-justify":new Hr(F.layout_symbol["text-justify"]),"text-anchor":new Hr(F.layout_symbol["text-anchor"]),"text-max-angle":new Xr(F.layout_symbol["text-max-angle"]),"text-rotate":new Hr(F.layout_symbol["text-rotate"]),"text-padding":new Xr(F.layout_symbol["text-padding"]),"text-keep-upright":new Xr(F.layout_symbol["text-keep-upright"]),"text-transform":new Hr(F.layout_symbol["text-transform"]),"text-offset":new Hr(F.layout_symbol["text-offset"]),"text-allow-overlap":new Xr(F.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Xr(F.layout_symbol["text-ignore-placement"]),"text-optional":new Xr(F.layout_symbol["text-optional"])}),Sa={paint:new Yr({"icon-opacity":new Hr(F.paint_symbol["icon-opacity"]),"icon-color":new Hr(F.paint_symbol["icon-color"]),"icon-halo-color":new Hr(F.paint_symbol["icon-halo-color"]),"icon-halo-width":new Hr(F.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Hr(F.paint_symbol["icon-halo-blur"]),"icon-translate":new Xr(F.paint_symbol["icon-translate"]),"icon-translate-anchor":new Xr(F.paint_symbol["icon-translate-anchor"]),"text-opacity":new Hr(F.paint_symbol["text-opacity"]),"text-color":new Hr(F.paint_symbol["text-color"]),"text-halo-color":new Hr(F.paint_symbol["text-halo-color"]),"text-halo-width":new Hr(F.paint_symbol["text-halo-width"]),"text-halo-blur":new Hr(F.paint_symbol["text-halo-blur"]),"text-translate":new Xr(F.paint_symbol["text-translate"]),"text-translate-anchor":new Xr(F.paint_symbol["text-translate-anchor"])}),layout:Ea},Ta=function(t){function e(e){t.call(this,e,Sa)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment"))},e.prototype.getValueAndResolveTokens=function(t,e){var r,i=this.layout.get(t).evaluate(e,{}),n=this._unevaluatedLayout._values[t];return n.isDataDriven()||Me(n.value)?i:(r=e.properties,i.replace(/{([^{}]+)}/g,(function(t,e){return e in r?String(r[e]):""})))},e.prototype.createBucket=function(t){return new wa(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e}(Qr),Aa={paint:new Yr({"background-color":new Xr(F.paint_background["background-color"]),"background-pattern":new Kr(F.paint_background["background-pattern"]),"background-opacity":new Xr(F.paint_background["background-opacity"])})},za=function(t){function e(e){t.call(this,e,Aa)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Qr),Ia={paint:new Yr({"raster-opacity":new Xr(F.paint_raster["raster-opacity"]),"raster-hue-rotate":new Xr(F.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Xr(F.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Xr(F.paint_raster["raster-brightness-max"]),"raster-saturation":new Xr(F.paint_raster["raster-saturation"]),"raster-contrast":new Xr(F.paint_raster["raster-contrast"]),"raster-resampling":new Xr(F.paint_raster["raster-resampling"]),"raster-fade-duration":new Xr(F.paint_raster["raster-fade-duration"])})},ka={circle:Dn,heatmap:$n,hillshade:Gn,fill:ko,"fill-extrusion":Oo,line:oa,symbol:Ta,background:za,raster:function(t){function e(e){t.call(this,e,Ia)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Qr)};var Ma=r((function(t,e){t.exports=function(){function t(t,e,r){r=r||{},this.w=t||64,this.h=e||64,this.autoResize=!!r.autoResize,this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0}function e(t,e,r){this.x=0,this.y=t,this.w=this.free=e,this.h=r}return t.prototype.pack=function(t,e){t=[].concat(t),e=e||{};for(var r,i,n,o,a=[],s=0;s<t.length;s++)if(r=t[s].w||t[s].width,i=t[s].h||t[s].height,n=t[s].id,r&&i){if(!(o=this.packOne(r,i,n)))continue;e.inPlace&&(t[s].x=o.x,t[s].y=o.y,t[s].id=o.id),a.push(o)}return this.shrink(),a},t.prototype.packOne=function(t,r,i){var n,o,a,s,l,u,c,h,p={freebin:-1,shelf:-1,waste:1/0},f=0;if("string"==typeof i||"number"==typeof i){if(n=this.getBin(i))return this.ref(n),n;"number"==typeof i&&(this.maxId=Math.max(i,this.maxId))}else i=++this.maxId;for(s=0;s<this.freebins.length;s++){if(r===(n=this.freebins[s]).maxh&&t===n.maxw)return this.allocFreebin(s,t,r,i);r>n.maxh||t>n.maxw||r<=n.maxh&&t<=n.maxw&&(a=n.maxw*n.maxh-t*r)<p.waste&&(p.waste=a,p.freebin=s)}for(s=0;s<this.shelves.length;s++)if(f+=(o=this.shelves[s]).h,!(t>o.free)){if(r===o.h)return this.allocShelf(s,t,r,i);r>o.h||r<o.h&&(a=(o.h-r)*t)<p.waste&&(p.freebin=-1,p.waste=a,p.shelf=s)}return-1!==p.freebin?this.allocFreebin(p.freebin,t,r,i):-1!==p.shelf?this.allocShelf(p.shelf,t,r,i):r<=this.h-f&&t<=this.w?(o=new e(f,this.w,r),this.allocShelf(this.shelves.push(o)-1,t,r,i)):this.autoResize?(l=u=this.h,((c=h=this.w)<=l||t>c)&&(h=2*Math.max(t,c)),(l<c||r>l)&&(u=2*Math.max(r,l)),this.resize(h,u),this.packOne(t,r,i)):null},t.prototype.allocFreebin=function(t,e,r,i){var n=this.freebins.splice(t,1)[0];return n.id=i,n.w=e,n.h=r,n.refcount=0,this.bins[i]=n,this.ref(n),n},t.prototype.allocShelf=function(t,e,r,i){var n=this.shelves[t].alloc(e,r,i);return this.bins[i]=n,this.ref(n),n},t.prototype.shrink=function(){if(this.shelves.length>0){for(var t=0,e=0,r=0;r<this.shelves.length;r++){var i=this.shelves[r];e+=i.h,t=Math.max(i.w-i.free,t)}this.resize(t,e)}},t.prototype.getBin=function(t){return this.bins[t]},t.prototype.ref=function(t){if(1==++t.refcount){var e=t.h;this.stats[e]=1+(0|this.stats[e])}return t.refcount},t.prototype.unref=function(t){return 0===t.refcount?0:(0==--t.refcount&&(this.stats[t.h]--,delete this.bins[t.id],this.freebins.push(t)),t.refcount)},t.prototype.clear=function(){this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0},t.prototype.resize=function(t,e){this.w=t,this.h=e;for(var r=0;r<this.shelves.length;r++)this.shelves[r].resize(t);return!0},e.prototype.alloc=function(t,e,r){if(t>this.free||e>this.h)return null;var i=this.x;return this.x+=t,this.free-=t,new function(t,e,r,i,n,o,a){this.id=t,this.x=e,this.y=r,this.w=i,this.h=n,this.maxw=o||i,this.maxh=a||n,this.refcount=0}(r,i,this.y,t,e,t,this.h)},e.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0},t}()})),Ca=function(t,e){var r=e.pixelRatio;this.paddedRect=t,this.pixelRatio=r},Pa={tl:{configurable:!0},br:{configurable:!0},displaySize:{configurable:!0}};Pa.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},Pa.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},Pa.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Ca.prototype,Pa);var La=function(t){var e=new jn({width:0,height:0}),r={},i=new Ma(0,0,{autoResize:!0});for(var n in t){var o=t[n],a=i.packOne(o.data.width+2,o.data.height+2);e.resize({width:i.w,height:i.h}),jn.copy(o.data,e,{x:0,y:0},{x:a.x+1,y:a.y+1},o.data),r[n]=new Ca(a,o)}i.shrink(),e.resize({width:i.w,height:i.h}),this.image=e,this.positions=r};wr("ImagePosition",Ca),wr("ImageAtlas",La);var Da=self.HTMLImageElement,Ra=self.HTMLCanvasElement,Ba=self.HTMLVideoElement,Oa=self.ImageData,Fa=function(t,e,r,i){this.context=t,this.format=r,this.texture=t.gl.createTexture(),this.update(e,i)};Fa.prototype.update=function(t,e){var r=t.width,i=t.height,n=!this.size||this.size[0]!==r||this.size[1]!==i,o=this.context,a=o.gl;this.useMipmap=Boolean(e&&e.useMipmap),a.bindTexture(a.TEXTURE_2D,this.texture),n?(this.size=[r,i],o.pixelStoreUnpack.set(1),this.format!==a.RGBA||e&&!1===e.premultiply||o.pixelStoreUnpackPremultiplyAlpha.set(!0),t instanceof Da||t instanceof Ra||t instanceof Ba||t instanceof Oa?a.texImage2D(a.TEXTURE_2D,0,this.format,this.format,a.UNSIGNED_BYTE,t):a.texImage2D(a.TEXTURE_2D,0,this.format,r,i,0,this.format,a.UNSIGNED_BYTE,t.data)):t instanceof Da||t instanceof Ra||t instanceof Ba||t instanceof Oa?a.texSubImage2D(a.TEXTURE_2D,0,0,0,a.RGBA,a.UNSIGNED_BYTE,t):a.texSubImage2D(a.TEXTURE_2D,0,0,0,r,i,a.RGBA,a.UNSIGNED_BYTE,t.data),this.useMipmap&&this.isSizePowerOfTwo()&&a.generateMipmap(a.TEXTURE_2D)},Fa.prototype.bind=function(t,e,r){var i=this.context.gl;i.bindTexture(i.TEXTURE_2D,this.texture),r!==i.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(r=i.LINEAR),t!==this.filter&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,r||t),this.filter=t),e!==this.wrap&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,e),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,e),this.wrap=e)},Fa.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},Fa.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var Va=function(t,e,r,i,n){var o,a,s=8*n-i-1,l=(1<<s)-1,u=l>>1,c=-7,h=r?n-1:0,p=r?-1:1,f=t[e+h];for(h+=p,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+t[e+h],h+=p,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=i;c>0;a=256*a+t[e+h],h+=p,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,i),o-=u}return(f?-1:1)*a*Math.pow(2,o-i)},Na=function(t,e,r,i,n,o){var a,s,l,u=8*o-n-1,c=(1<<u)-1,h=c>>1,p=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,d=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+h>=1?p/l:p*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(e*l-1)*Math.pow(2,n),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,n),a=0));n>=8;t[r+f]=255&s,f+=d,s/=256,n-=8);for(a=a<<n|s,u+=n;u>0;t[r+f]=255&a,f+=d,a/=256,u-=8);t[r+f-d]|=128*m},ja=Ua;function Ua(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}Ua.Varint=0,Ua.Fixed64=1,Ua.Bytes=2,Ua.Fixed32=5;function qa(t){return t.type===Ua.Bytes?t.readVarint()+t.pos:t.pos+1}function $a(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function Za(t,e,r){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));r.realloc(i);for(var n=r.pos-1;n>=t;n--)r.buf[n+i]=r.buf[n]}function Ga(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r])}function Wa(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r])}function Xa(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r])}function Ha(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r])}function Ka(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r])}function Ja(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r])}function Ya(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r])}function Qa(t,e){for(var r=0;r<t.length;r++)e.writeFixed64(t[r])}function ts(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r])}function es(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function rs(t,e,r){t[r]=e,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function is(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}Ua.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos<r;){var i=this.readVarint(),n=i>>3,o=this.pos;this.type=7&i,t(n,e,this),this.pos===o&&this.skip(i)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=es(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=is(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=es(this.buf,this.pos)+4294967296*es(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=es(this.buf,this.pos)+4294967296*is(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=Va(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=Va(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,i=this.buf;return e=127&(r=i[this.pos++]),r<128?e:(e|=(127&(r=i[this.pos++]))<<7,r<128?e:(e|=(127&(r=i[this.pos++]))<<14,r<128?e:(e|=(127&(r=i[this.pos++]))<<21,r<128?e:function(t,e,r){var i,n,o=r.buf;if(n=o[r.pos++],i=(112&n)>>4,n<128)return $a(t,i,e);if(n=o[r.pos++],i|=(127&n)<<3,n<128)return $a(t,i,e);if(n=o[r.pos++],i|=(127&n)<<10,n<128)return $a(t,i,e);if(n=o[r.pos++],i|=(127&n)<<17,n<128)return $a(t,i,e);if(n=o[r.pos++],i|=(127&n)<<24,n<128)return $a(t,i,e);if(n=o[r.pos++],i|=(1&n)<<31,n<128)return $a(t,i,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=i[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=function(t,e,r){var i="",n=e;for(;n<r;){var o,a,s,l=t[n],u=null,c=l>239?4:l>223?3:l>191?2:1;if(n+c>r)break;1===c?l<128&&(u=l):2===c?128==(192&(o=t[n+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===c?(o=t[n+1],a=t[n+2],128==(192&o)&&128==(192&a)&&((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(o=t[n+1],a=t[n+2],s=t[n+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,i+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),i+=String.fromCharCode(u),n+=c}return i}(this.buf,this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){var r=qa(this);for(t=t||[];this.pos<r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){var e=qa(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){var e=qa(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){var e=qa(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){var e=qa(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){var e=qa(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){var e=qa(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){var e=qa(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){var e=qa(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===Ua.Varint)for(;this.buf[this.pos++]>127;);else if(e===Ua.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Ua.Fixed32)this.pos+=4;else{if(e!==Ua.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var r=new Uint8Array(e);r.set(this.buf),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),rs(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),rs(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),rs(this.buf,-1&t,this.pos),rs(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),rs(this.buf,-1&t,this.pos),rs(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var r,i;t>=0?(r=t%4294967296|0,i=t/4294967296|0):(i=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,i=i+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;if(e.buf[e.pos++]|=r|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;e.buf[e.pos++]=127&t}(i,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var i,n,o=0;o<e.length;o++){if((i=e.charCodeAt(o))>55295&&i<57344){if(!n){i>56319||o+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):n=i;continue}if(i<56320){t[r++]=239,t[r++]=191,t[r++]=189,n=i;continue}i=n-55296<<10|i-56320|65536,n=null}else n&&(t[r++]=239,t[r++]=191,t[r++]=189,n=null);i<128?t[r++]=i:(i<2048?t[r++]=i>>6|192:(i<65536?t[r++]=i>>12|224:(t[r++]=i>>18|240,t[r++]=i>>12&63|128),t[r++]=i>>6&63|128),t[r++]=63&i|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&Za(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),Na(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),Na(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r<e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;var r=this.pos;t(e,this);var i=this.pos-r;i>=128&&Za(r,i,this),this.pos=r-1,this.writeVarint(i),this.pos+=i},writeMessage:function(t,e,r){this.writeTag(t,Ua.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){this.writeMessage(t,Ga,e)},writePackedSVarint:function(t,e){this.writeMessage(t,Wa,e)},writePackedBoolean:function(t,e){this.writeMessage(t,Ka,e)},writePackedFloat:function(t,e){this.writeMessage(t,Xa,e)},writePackedDouble:function(t,e){this.writeMessage(t,Ha,e)},writePackedFixed32:function(t,e){this.writeMessage(t,Ja,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,Ya,e)},writePackedFixed64:function(t,e){this.writeMessage(t,Qa,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,ts,e)},writeBytesField:function(t,e){this.writeTag(t,Ua.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,Ua.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,Ua.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,Ua.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,Ua.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,Ua.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,Ua.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,Ua.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,Ua.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,Ua.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var ns=3;function os(t,e,r){1===t&&r.readMessage(as,e)}function as(t,e,r){if(3===t){var i=r.readMessage(ss,{}),n=i.id,o=i.bitmap,a=i.width,s=i.height,l=i.left,u=i.top,c=i.advance;e.push({id:n,bitmap:new Nn({width:a+2*ns,height:s+2*ns},o),metrics:{width:a,height:s,left:l,top:u,advance:c}})}}function ss(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}var ls=ns,us=function(t,e,r){this.target=t,this.parent=e,this.mapId=r,this.callbacks={},this.callbackID=0,x(["receive"],this),this.target.addEventListener("message",this.receive,!1)};us.prototype.send=function(t,e,r,i){var n=r?this.mapId+":"+this.callbackID++:null;r&&(this.callbacks[n]=r);var o=[];this.target.postMessage({targetMapId:i,sourceMapId:this.mapId,type:t,id:String(n),data:Sr(e,o)},o)},us.prototype.receive=function(t){var e,r=this,i=t.data,n=i.id;if(!i.targetMapId||this.mapId===i.targetMapId){var o=function(t,e){var i=[];r.target.postMessage({sourceMapId:r.mapId,type:"<response>",id:String(n),error:t?Sr(t):null,data:Sr(e,i)},i)};if("<response>"===i.type)e=this.callbacks[i.id],delete this.callbacks[i.id],e&&i.error?e(Tr(i.error)):e&&e(null,Tr(i.data));else if(void 0!==i.id&&this.parent[i.type])this.parent[i.type](i.sourceMapId,Tr(i.data),o);else if(void 0!==i.id&&this.parent.getWorkerSource){var a=i.type.split("."),s=Tr(i.data);this.parent.getWorkerSource(i.sourceMapId,a[0],s.source)[a[1]](s,o)}else this.parent[i.type](Tr(i.data))}},us.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)};var cs=r((function(t,e){!function(t){function e(t,e,i){e=Math.pow(2,i)-e-1;var n=r(256*t,256*e,i),o=r(256*(t+1),256*(e+1),i);return n[0]+","+n[1]+","+o[0]+","+o[1]}function r(t,e,r){var i=2*Math.PI*6378137/256/Math.pow(2,r),n=t*i-2*Math.PI*6378137/2,o=e*i-2*Math.PI*6378137/2;return[n,o]}t.getURL=function(t,r,i,n,o,a){return a=a||{},t+"?"+["bbox="+e(i,n,o),"format="+(a.format||"image/png"),"service="+(a.service||"WMS"),"version="+(a.version||"1.1.1"),"request="+(a.request||"GetMap"),"srs="+(a.srs||"EPSG:3857"),"width="+(a.width||256),"height="+(a.height||256),"layers="+r].join("&")},t.getTileBBox=e,t.getMercCoords=r,Object.defineProperty(t,"__esModule",{value:!0})}(e)}));e(cs);var hs=cs.getTileBBox,ps=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=ms(0,t,e,r)};ps.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},ps.prototype.url=function(t,e){var r=hs(this.x,this.y,this.z),i=function(t,e,r){for(var i,n="",o=t;o>0;o--)n+=(e&(i=1<<o-1)?1:0)+(r&i?2:0);return n}(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String("tms"===e?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",i).replace("{bbox-epsg-3857}",r)};var fs=function(t,e){this.wrap=t,this.canonical=e,this.key=ms(t,e.z,e.x,e.y)},ds=function(t,e,r,i,n){this.overscaledZ=t,this.wrap=e,this.canonical=new ps(r,+i,+n),this.key=ms(e,t,i,n)};function ms(t,e,r,i){(t*=2)<0&&(t=-1*t-1);var n=1<<e;return 32*(n*n*t+n*i+r)+e}ds.prototype.equals=function(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)},ds.prototype.scaledTo=function(t){var e=this.canonical.z-t;return t>this.canonical.z?new ds(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new ds(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},ds.prototype.isChildOf=function(t){var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e},ds.prototype.children=function(t){if(this.overscaledZ>=t)return[new ds(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,r=2*this.canonical.x,i=2*this.canonical.y;return[new ds(e,this.wrap,e,r,i),new ds(e,this.wrap,e,r+1,i),new ds(e,this.wrap,e,r,i+1),new ds(e,this.wrap,e,r+1,i+1)]},ds.prototype.isLessThan=function(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))},ds.prototype.wrapped=function(){return new ds(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},ds.prototype.unwrapTo=function(t){return new ds(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)},ds.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},ds.prototype.toUnwrapped=function(){return new fs(this.wrap,this.canonical)},ds.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},ds.prototype.toCoordinate=function(){return new c(this.canonical.x+Math.pow(2,this.wrap),this.canonical.y,this.canonical.z)},wr("CanonicalTileID",ps),wr("OverscaledTileID",ds,{omit:["posMatrix"]});var ys=function(t,e,r){if(t<=0)throw new RangeError("Level must have positive dimension");this.dim=t,this.border=e,this.stride=this.dim+2*this.border,this.data=r||new Int32Array((this.dim+2*this.border)*(this.dim+2*this.border))};ys.prototype.set=function(t,e,r){this.data[this._idx(t,e)]=r+65536},ys.prototype.get=function(t,e){return this.data[this._idx(t,e)]-65536},ys.prototype._idx=function(t,e){if(t<-this.border||t>=this.dim+this.border||e<-this.border||e>=this.dim+this.border)throw new RangeError("out of range source coordinates for DEM data");return(e+this.border)*this.stride+(t+this.border)},wr("Level",ys);var vs=function(t,e,r){this.uid=t,this.scale=e||1,this.level=r||new ys(256,512),this.loaded=!!r};vs.prototype.loadFromImage=function(t,e){if(t.height!==t.width)throw new RangeError("DEM tiles must be square");if(e&&"mapbox"!==e&&"terrarium"!==e)return A('"'+e+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');var r=this.level=new ys(t.width,t.width/2),i=t.data;this._unpackData(r,i,e||"mapbox");for(var n=0;n<r.dim;n++)r.set(-1,n,r.get(0,n)),r.set(r.dim,n,r.get(r.dim-1,n)),r.set(n,-1,r.get(n,0)),r.set(n,r.dim,r.get(n,r.dim-1));r.set(-1,-1,r.get(0,0)),r.set(r.dim,-1,r.get(r.dim-1,0)),r.set(-1,r.dim,r.get(0,r.dim-1)),r.set(r.dim,r.dim,r.get(r.dim-1,r.dim-1)),this.loaded=!0},vs.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},vs.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},vs.prototype._unpackData=function(t,e,r){for(var i={mapbox:this._unpackMapbox,terrarium:this._unpackTerrarium}[r],n=0;n<t.dim;n++)for(var o=0;o<t.dim;o++){var a=4*(n*t.dim+o);t.set(o,n,this.scale*i(e[a],e[a+1],e[a+2]))}},vs.prototype.getPixels=function(){return new jn({width:this.level.dim+2*this.level.border,height:this.level.dim+2*this.level.border},new Uint8Array(this.level.data.buffer))},vs.prototype.backfillBorder=function(t,e,r){var i=this.level,n=t.level;if(i.dim!==n.dim)throw new Error("level mismatch (dem dimension)");var o=e*i.dim,a=e*i.dim+i.dim,s=r*i.dim,l=r*i.dim+i.dim;switch(e){case-1:o=a-1;break;case 1:a=o+1}switch(r){case-1:s=l-1;break;case 1:l=s+1}for(var u=y(o,-i.border,i.dim+i.border),c=y(a,-i.border,i.dim+i.border),h=y(s,-i.border,i.dim+i.border),p=y(l,-i.border,i.dim+i.border),f=-e*i.dim,d=-r*i.dim,m=h;m<p;m++)for(var v=u;v<c;v++)i.set(v,m,n.get(v+f,m+d))},wr("DEMData",vs);var gs=ii([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);var _s=function(t){this._stringToNumber={},this._numberToString=[];for(var e=0;e<t.length;e++){var r=t[e];this._stringToNumber[r]=e,this._numberToString[e]=r}};_s.prototype.encode=function(t){return this._stringToNumber[t]},_s.prototype.decode=function(t){return this._numberToString[t]};var xs=function(t,e,r,i){this.type="Feature",this._vectorTileFeature=t,t._z=e,t._x=r,t._y=i,this.properties=t.properties,null!=t.id&&(this.id=t.id)},bs={geometry:{configurable:!0}};bs.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},bs.geometry.set=function(t){this._geometry=t},xs.prototype.toJSON=function(){var t={geometry:this.geometry};for(var e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&(t[e]=this[e]);return t},Object.defineProperties(xs.prototype,bs);var ws=function(){this.state={},this.stateChanges={}};ws.prototype.updateState=function(t,e,r){e=String(e),this.stateChanges[t]=this.stateChanges[t]||{},this.stateChanges[t][e]=this.stateChanges[t][e]||{},v(this.stateChanges[t][e],r)},ws.prototype.getState=function(t,e){e=String(e);var r=this.state[t]||{},i=this.stateChanges[t]||{};return v({},r[e],i[e])},ws.prototype.initializeTileState=function(t,e){t.setFeatureState(this.state,e)},ws.prototype.coalesceChanges=function(t,e){var r={};for(var i in this.stateChanges){this.state[i]=this.state[i]||{};var n={};for(var o in this.stateChanges[i])this.state[i][o]||(this.state[i][o]={}),v(this.state[i][o],this.stateChanges[i][o]),n[o]=this.state[i][o];r[i]=n}if(this.stateChanges={},0!==Object.keys(r).length)for(var a in t){t[a].setFeatureState(r,e)}};var Es=function(t,e,r){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=e||new vr(qi,16,0),this.featureIndexArray=r||new Pi};function Ss(t,e){return e-t}Es.prototype.insert=function(t,e,r,i,n){var o=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,i,n);for(var a=0;a<e.length;a++){for(var s=e[a],l=[1/0,1/0,-1/0,-1/0],u=0;u<s.length;u++){var c=s[u];l[0]=Math.min(l[0],c.x),l[1]=Math.min(l[1],c.y),l[2]=Math.max(l[2],c.x),l[3]=Math.max(l[3],c.y)}l[0]<qi&&l[1]<qi&&l[2]>=0&&l[3]>=0&&this.grid.insert(o,l[0],l[1],l[2],l[3])}},Es.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Wo.VectorTile(new ja(this.rawTileData)).layers,this.sourceLayerCoder=new _s(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Es.prototype.query=function(t,e,r){var i=this;this.loadVTLayers();for(var n=t.params||{},o=qi/t.tileSize/t.scale,a=Ze(n.filter),s=t.queryGeometry,l=t.queryPadding*o,u=1/0,c=1/0,h=-1/0,p=-1/0,f=0;f<s.length;f++)for(var d=s[f],m=0;m<d.length;m++){var y=d[m];u=Math.min(u,y.x),c=Math.min(c,y.y),h=Math.max(h,y.x),p=Math.max(p,y.y)}var v=this.grid.query(u-l,c-l,h+l,p+l);v.sort(Ss);for(var g,_={},x=function(l){var u=v[l];if(u!==g){g=u;var c=i.featureIndexArray.get(u),h=null;i.loadMatchingFeature(_,c.bucketIndex,c.sourceLayerIndex,c.featureIndex,a,n.layers,e,(function(e,n){h||(h=Gi(e));var a={};return e.id&&(a=r.getState(n.sourceLayer||"_geojsonTileLayer",String(e.id))),n.queryIntersectsFeature(s,e,a,h,i.z,t.transform,o,t.posMatrix)}))}},b=0;b<v.length;b++)x(b);return _},Es.prototype.loadMatchingFeature=function(t,e,r,i,n,o,a,s){var l=this.bucketLayerIDs[e];if(!o||function(t,e){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>=0)return!0;return!1}(o,l)){var u=this.sourceLayerCoder.decode(r),c=this.vtLayers[u].feature(i);if(n(new Vr(this.tileID.overscaledZ),c))for(var h=0;h<l.length;h++){var p=l[h];if(!(o&&o.indexOf(p)<0)){var f=a[p];if(f&&(!s||s(c,f))){var d=new xs(c,this.z,this.x,this.y);d.layer=f.serialize();var m=t[p];void 0===m&&(m=t[p]=[]),m.push({featureIndex:i,feature:d})}}}}},Es.prototype.lookupSymbolFeatures=function(t,e,r,i,n,o){var a={};this.loadVTLayers();for(var s=Ze(i),l=0,u=t;l<u.length;l+=1){var c=u[l];this.loadMatchingFeature(a,e,r,c,s,n,o)}return a},Es.prototype.hasLayer=function(t){for(var e=0,r=this.bucketLayerIDs;e<r.length;e+=1)for(var i=0,n=r[e];i<n.length;i+=1){if(t===n[i])return!0}return!1},wr("FeatureIndex",Es,{omit:["rawTileData","sourceLayerCoder"]});var Ts=function(t,e){this.tileID=t,this.uid=_(),this.uses=0,this.tileSize=e,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.expiredRequestCount=0,this.state="loading"};Ts.prototype.registerFadeDuration=function(t){var e=t+this.timeAdded;e<a.now()||this.fadeEndTime&&e<this.fadeEndTime||(this.fadeEndTime=e)},Ts.prototype.wasRequested=function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state},Ts.prototype.loadVectorData=function(t,e,r){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",t){if(t.featureIndex&&(this.latestFeatureIndex=t.featureIndex,t.rawTileData?(this.latestRawTileData=t.rawTileData,this.latestFeatureIndex.rawTileData=t.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=t.collisionBoxArray,this.buckets=function(t,e){var r={};if(!e)return r;for(var i=0,n=t;i<n.length;i+=1){var o=n[i],a=o.layerIds.map((function(t){return e.getLayer(t)})).filter(Boolean);if(0!==a.length){o.layers=a,o.stateDependentLayers=a.filter((function(t){return t.isStateDependent()}));for(var s=0,l=a;s<l.length;s+=1)r[l[s].id]=o}}return r}(t.buckets,e.style),r)for(var i in this.buckets){var n=this.buckets[i];n instanceof wa&&(n.justReloaded=!0)}for(var o in this.queryPadding=0,this.buckets){var a=this.buckets[o];this.queryPadding=Math.max(this.queryPadding,e.style.getLayer(a.layerIds[0]).queryRadius(a))}t.iconAtlasImage&&(this.iconAtlasImage=t.iconAtlasImage),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)}else this.collisionBoxArray=new Si},Ts.prototype.unloadVectorData=function(){for(var t in this.buckets)this.buckets[t].destroy();this.buckets={},this.iconAtlasTexture&&this.iconAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},Ts.prototype.unloadDEMData=function(){this.dem=null,this.neighboringTiles=null,this.state="unloaded"},Ts.prototype.getBucket=function(t){return this.buckets[t.id]},Ts.prototype.upload=function(t){for(var e in this.buckets){var r=this.buckets[e];r.uploadPending()&&r.upload(t)}var i=t.gl;this.iconAtlasImage&&(this.iconAtlasTexture=new Fa(t,this.iconAtlasImage,i.RGBA),this.iconAtlasImage=null),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Fa(t,this.glyphAtlasImage,i.ALPHA),this.glyphAtlasImage=null)},Ts.prototype.queryRenderedFeatures=function(t,e,r,i,n,o,a,s){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:r,scale:i,tileSize:this.tileSize,posMatrix:s,transform:o,params:n,queryPadding:this.queryPadding*a},t,e):{}},Ts.prototype.querySourceFeatures=function(t,e){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData){var r=this.latestFeatureIndex.loadVTLayers(),i=e?e.sourceLayer:"",n=r._geojsonTileLayer||r[i];if(n)for(var o=Ze(e&&e.filter),a={z:this.tileID.overscaledZ,x:this.tileID.canonical.x,y:this.tileID.canonical.y},s=0;s<n.length;s++){var l=n.feature(s);if(o(new Vr(this.tileID.overscaledZ),l)){var u=new xs(l,a.z,a.x,a.y);u.tile=a,t.push(u)}}}},Ts.prototype.clearMask=function(){this.segments&&(this.segments.destroy(),delete this.segments),this.maskedBoundsBuffer&&(this.maskedBoundsBuffer.destroy(),delete this.maskedBoundsBuffer),this.maskedIndexBuffer&&(this.maskedIndexBuffer.destroy(),delete this.maskedIndexBuffer)},Ts.prototype.setMask=function(t,e){if(!f(this.mask,t)&&(this.mask=t,this.clearMask(),!f(t,{0:!0}))){var r=new ai,i=new _i;this.segments=new Di,this.segments.prepareSegment(0,r,i);for(var n=Object.keys(t),o=0;o<n.length;o++){var a=t[n[o]],s=qi>>a.z,l=new h(a.x*s,a.y*s),u=new h(l.x+s,l.y+s),c=this.segments.prepareSegment(4,r,i);r.emplaceBack(l.x,l.y,l.x,l.y),r.emplaceBack(u.x,l.y,u.x,l.y),r.emplaceBack(l.x,u.y,l.x,u.y),r.emplaceBack(u.x,u.y,u.x,u.y);var p=c.vertexLength;i.emplaceBack(p,p+1,p+2),i.emplaceBack(p+1,p+2,p+3),c.vertexLength+=4,c.primitiveLength+=2}this.maskedBoundsBuffer=e.createVertexBuffer(r,gs.members),this.maskedIndexBuffer=e.createIndexBuffer(i)}},Ts.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},Ts.prototype.setExpiryData=function(t){var e=this.expirationTime;if(t.cacheControl){var r=function(t){var e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(function(t,r,i,n){var o=i||n;return e[r]=!o||o.toLowerCase(),""})),e["max-age"]){var r=parseInt(e["max-age"],10);isNaN(r)?delete e["max-age"]:e["max-age"]=r}return e}(t.cacheControl);r["max-age"]&&(this.expirationTime=Date.now()+1e3*r["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){var i=Date.now(),n=!1;if(this.expirationTime>i)n=!1;else if(e)if(this.expirationTime<e)n=!0;else{var o=this.expirationTime-e;o?this.expirationTime=i+Math.max(o,3e4):n=!0}else n=!0;n?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},Ts.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)},Ts.prototype.setFeatureState=function(t,e){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&0!==Object.keys(t).length){var r=this.latestFeatureIndex.loadVTLayers();for(var i in this.buckets){var n=this.buckets[i],o=n.layers[0].sourceLayer||"_geojsonTileLayer",a=r[o],s=t[o];a&&s&&0!==Object.keys(s).length&&(n.update(s,a),e&&e.style&&(this.queryPadding=Math.max(this.queryPadding,e.style.getLayer(n.layerIds[0]).queryRadius(n))))}}};var As={horizontal:1,vertical:2,horizontalOnly:3};var zs={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Is={};function ks(t,e,r,i){var n=Math.pow(t-e,2);return i?t<e?n/2:2*n:n+Math.abs(r)*r}function Ms(t,e){var r=0;return 10===t&&(r-=1e4),40!==t&&65288!==t||(r+=50),41!==e&&65289!==e||(r+=50),r}function Cs(t,e,r,i,n,o){for(var a=null,s=ks(e,r,n,o),l=0,u=i;l<u.length;l+=1){var c=u[l],h=ks(e-c.x,r,n,o)+c.badness;h<=s&&(a=c,s=h)}return{index:t,x:e,priorBreak:a,badness:s}}function Ps(t,e,r,i){if(!r)return[];if(!t)return[];for(var n,o=[],a=function(t,e,r,i){for(var n=0,o=0;o<t.length;o++){var a=i[t.charCodeAt(o)];a&&(n+=a.metrics.advance+e)}return n/Math.max(1,Math.ceil(n/r))}(t,e,r,i),s=0,l=0;l<t.length;l++){var u=t.charCodeAt(l),c=i[u];c&&!zs[u]&&(s+=c.metrics.advance+e),l<t.length-1&&(Is[u]||!((n=u)<11904)&&(zr["Bopomofo Extended"](n)||zr.Bopomofo(n)||zr["CJK Compatibility Forms"](n)||zr["CJK Compatibility Ideographs"](n)||zr["CJK Compatibility"](n)||zr["CJK Radicals Supplement"](n)||zr["CJK Strokes"](n)||zr["CJK Symbols and Punctuation"](n)||zr["CJK Unified Ideographs Extension A"](n)||zr["CJK Unified Ideographs"](n)||zr["Enclosed CJK Letters and Months"](n)||zr["Halfwidth and Fullwidth Forms"](n)||zr.Hiragana(n)||zr["Ideographic Description Characters"](n)||zr["Kangxi Radicals"](n)||zr["Katakana Phonetic Extensions"](n)||zr.Katakana(n)||zr["Vertical Forms"](n)||zr["Yi Radicals"](n)||zr["Yi Syllables"](n)))&&o.push(Cs(l+1,s,a,o,Ms(u,t.charCodeAt(l+1)),!1))}return function h(t){return t?h(t.priorBreak).concat(t.index):[]}(Cs(t.length,s,a,o,0,!0))}function Ls(t){var e=.5,r=.5;switch(t){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(t){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:e,verticalAlign:r}}function Ds(t,e,r,i,n){if(n){var o=e[t[i].glyph];if(o)for(var a=o.metrics.advance,s=(t[i].x+a)*n,l=r;l<=i;l++)t[l].x-=s}}Is[10]=!0,Is[32]=!0,Is[38]=!0,Is[40]=!0,Is[41]=!0,Is[43]=!0,Is[45]=!0,Is[47]=!0,Is[173]=!0,Is[183]=!0,Is[8203]=!0,Is[8208]=!0,Is[8211]=!0,Is[8231]=!0,t.unwrapExports=e,t.createCommonjsModule=r,t["default"]=h,t.default$1=self,t.default$2=a,t.getJSON=function(t,e){var r=C(t);return r.setRequestHeader("Accept","application/json"),r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if(r.status>=200&&r.status<300&&r.response){var i;try{i=JSON.parse(r.response)}catch(t){return e(t)}e(null,i)}else 401===r.status&&t.url.match(/mapbox.com/)?e(new M(r.statusText+": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens",r.status,t.url)):e(new M(r.statusText,r.status,t.url))},r.send(),{cancel:function(){return r.abort()}}},t.getImage=function(t,e){return P(t,(function(t,r){if(t)e(t);else if(r){var i=new self.Image,n=self.URL||self.webkitURL;i.onload=function(){e(null,i),n.revokeObjectURL(i.src)};var o=new self.Blob([new Uint8Array(r.data)],{type:"image/png"});i.cacheControl=r.cacheControl,i.expires=r.expires,i.src=r.data.byteLength?n.createObjectURL(o):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}}))},t.ResourceType=k,t.RGBAImage=jn,t.default$3=Ma,t.ImagePosition=Ca,t.default$4=Fa,t.getArrayBuffer=P,t.default$5=function(t){return new ja(t).readFields(os,[])},t.default$6=zr,t.asyncAll=function(t,e,r){if(!t.length)return r(null,[]);var i=t.length,n=new Array(t.length),o=null;t.forEach((function(t,a){e(t,(function(t,e){t&&(o=t),n[a]=e,0==--i&&r(o,n)}))}))},t.AlphaImage=Nn,t.default$7=F,t.endsWith=b,t.extend=v,t.sphericalToCartesian=function(t){var e=t[0],r=t[1],i=t[2];return r+=90,r*=Math.PI/180,i*=Math.PI/180,{x:e*Math.cos(r)*Math.sin(i),y:e*Math.sin(r)*Math.sin(i),z:e*Math.cos(i)}},t.Evented=O,t.validateStyle=pr,t.validateLight=fr,t.emitValidationErrors=yr,t.default$8=ot,t.number=It,t.Properties=Yr,t.Transitionable=Ur,t.Transitioning=$r,t.PossiblyEvaluated=Wr,t.DataConstantProperty=Xr,t.warnOnce=A,t.uniqueId=_,t.default$9=us,t.pick=function(t,e){for(var r={},i=0;i<e.length;i++){var n=e[i];n in t&&(r[n]=t[n])}return r},t.wrap=function(t,e,r){var i=r-e,n=((t-e)%i+i)%i+e;return n===e?r:n},t.clamp=y,t.Event=R,t.ErrorEvent=B,t.OverscaledTileID=ds,t.default$10=qi,t.getCoordinatesCenter=function(t){for(var e=1/0,r=1/0,i=-1/0,n=-1/0,o=0;o<t.length;o++)e=Math.min(e,t[o].column),r=Math.min(r,t[o].row),i=Math.max(i,t[o].column),n=Math.max(n,t[o].row);var a=i-e,s=n-r,l=Math.max(a,s),u=Math.max(0,Math.floor(-Math.log(l)/Math.LN2));return new c((e+i)/2,(r+n)/2,0).zoomTo(u)},t.CanonicalTileID=ps,t.RasterBoundsArray=ai,t.default$11=gs,t.getVideo=function(t,e){var r,i,n=self.document.createElement("video");n.muted=!0,n.onloadstart=function(){e(null,n)};for(var o=0;o<t.length;o++){var a=self.document.createElement("source");r=t[o],i=void 0,(i=self.document.createElement("a")).href=r,(i.protocol!==self.document.location.protocol||i.host!==self.document.location.host)&&(n.crossOrigin="Anonymous"),a.src=t[o],n.appendChild(a)}return{cancel:function(){}}},t.default$12=V,t.bindAll=x,t.default$13=f,t.default$14=Ts,t.default$15=c,t.keysDifference=function(t,e){var r=[];for(var i in t)i in e||r.push(i);return r},t.default$16=ws,t.default$17=["type","source","source-layer","minzoom","maxzoom","filter","layout"],t.create=function(){var t=new cn(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.invert=function(t,e){var r=e[0],i=e[1],n=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],p=e[10],f=e[11],d=e[12],m=e[13],y=e[14],v=e[15],g=r*s-i*a,_=r*l-n*a,x=r*u-o*a,b=i*l-n*s,w=i*u-o*s,E=n*u-o*l,S=c*m-h*d,T=c*y-p*d,A=c*v-f*d,z=h*y-p*m,I=h*v-f*m,k=p*v-f*y,M=g*k-_*I+x*z+b*A-w*T+E*S;return M?(M=1/M,t[0]=(s*k-l*I+u*z)*M,t[1]=(n*I-i*k-o*z)*M,t[2]=(m*E-y*w+v*b)*M,t[3]=(p*w-h*E-f*b)*M,t[4]=(l*A-a*k-u*T)*M,t[5]=(r*k-n*A+o*T)*M,t[6]=(y*x-d*E-v*_)*M,t[7]=(c*E-p*x+f*_)*M,t[8]=(a*I-s*A+u*S)*M,t[9]=(i*A-r*I-o*S)*M,t[10]=(d*w-m*x+v*g)*M,t[11]=(h*x-c*w-f*g)*M,t[12]=(s*T-a*z-l*S)*M,t[13]=(r*z-i*T+n*S)*M,t[14]=(m*_-d*b-y*g)*M,t[15]=(c*b-h*_+p*g)*M,t):null},t.multiply=function(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],p=e[9],f=e[10],d=e[11],m=e[12],y=e[13],v=e[14],g=e[15],_=r[0],x=r[1],b=r[2],w=r[3];return t[0]=_*i+x*s+b*h+w*m,t[1]=_*n+x*l+b*p+w*y,t[2]=_*o+x*u+b*f+w*v,t[3]=_*a+x*c+b*d+w*g,_=r[4],x=r[5],b=r[6],w=r[7],t[4]=_*i+x*s+b*h+w*m,t[5]=_*n+x*l+b*p+w*y,t[6]=_*o+x*u+b*f+w*v,t[7]=_*a+x*c+b*d+w*g,_=r[8],x=r[9],b=r[10],w=r[11],t[8]=_*i+x*s+b*h+w*m,t[9]=_*n+x*l+b*p+w*y,t[10]=_*o+x*u+b*f+w*v,t[11]=_*a+x*c+b*d+w*g,_=r[12],x=r[13],b=r[14],w=r[15],t[12]=_*i+x*s+b*h+w*m,t[13]=_*n+x*l+b*p+w*y,t[14]=_*o+x*u+b*f+w*v,t[15]=_*a+x*c+b*d+w*g,t},t.translate=function(t,e,r){var i,n,o,a,s,l,u,c,h,p,f,d,m=r[0],y=r[1],v=r[2];return e===t?(t[12]=e[0]*m+e[4]*y+e[8]*v+e[12],t[13]=e[1]*m+e[5]*y+e[9]*v+e[13],t[14]=e[2]*m+e[6]*y+e[10]*v+e[14],t[15]=e[3]*m+e[7]*y+e[11]*v+e[15]):(i=e[0],n=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],p=e[9],f=e[10],d=e[11],t[0]=i,t[1]=n,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=h,t[9]=p,t[10]=f,t[11]=d,t[12]=i*m+s*y+h*v+e[12],t[13]=n*m+l*y+p*v+e[13],t[14]=o*m+u*y+f*v+e[14],t[15]=a*m+c*y+d*v+e[15]),t},t.scale=function(t,e,r){var i=r[0],n=r[1],o=r[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},t.rotateX=function(t,e,r){var i=Math.sin(r),n=Math.cos(r),o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],h=e[10],p=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*n+u*i,t[5]=a*n+c*i,t[6]=s*n+h*i,t[7]=l*n+p*i,t[8]=u*n-o*i,t[9]=c*n-a*i,t[10]=h*n-s*i,t[11]=p*n-l*i,t},t.rotateZ=function(t,e,r){var i=Math.sin(r),n=Math.cos(r),o=e[0],a=e[1],s=e[2],l=e[3],u=e[4],c=e[5],h=e[6],p=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*n+u*i,t[1]=a*n+c*i,t[2]=s*n+h*i,t[3]=l*n+p*i,t[4]=u*n-o*i,t[5]=c*n-a*i,t[6]=h*n-s*i,t[7]=p*n-l*i,t},t.perspective=function(t,e,r,i,n){var o=1/Math.tan(e/2),a=1/(i-n);return t[0]=o/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(n+i)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*n*i*a,t[15]=0,t},t.ortho=function(t,e,r,i,n,o,a){var s=1/(e-r),l=1/(i-n),u=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(n+i)*l,t[14]=(a+o)*u,t[15]=1,t},t.create$1=bn,t.normalize=wn,t.transformMat4=En,t.forEach=Sn,t.getSizeData=ma,t.evaluateSizeForFeature=function(t,e,r){var i=e;return"source"===t.functionType?r.lowerSize/10:"composite"===t.functionType?It(r.lowerSize/10,r.upperSize/10,i.uSizeT):i.uSize},t.evaluateSizeForZoom=function(t,e,r){if("constant"===t.functionType)return{uSizeT:0,uSize:t.layoutSize};if("source"===t.functionType)return{uSizeT:0,uSize:0};if("camera"===t.functionType){var i=t.propertyValue,n=t.zoomRange,o=t.sizeRange,a=y(Be(i,r.specification).interpolationFactor(e,n.min,n.max),0,1);return{uSizeT:0,uSize:o.min+a*(o.max-o.min)}}var s=t.propertyValue,l=t.zoomRange;return{uSizeT:y(Be(s,r.specification).interpolationFactor(e,l.min,l.max),0,1),uSize:0}},t.addDynamicAttributes=_a,t.default$18=Sa,t.WritingMode=As,t.multiPolygonIntersectsBufferedPoint=Hi,t.multiPolygonIntersectsMultiPolygon=Ki,t.multiPolygonIntersectsBufferedMultiLine=Ji,t.polygonIntersectsPolygon=function(t,e){for(var r=0;r<t.length;r++)if(on(e,t[r]))return!0;for(var i=0;i<e.length;i++)if(on(t,e[i]))return!0;return!!Qi(t,e)},t.distToSegmentSquared=rn,t.default$19=Qr,t.default$20=function(t){return new ka[t.type](t)},t.clone=S,t.filterObject=E,t.mapObject=w,t.registerForPluginAvailability=function(t){return Rr?t({pluginURL:Rr,completionCallback:Lr}):Or.once("pluginAvailable",t),t},t.evented=Or,t.default$21=Ar,t.createLayout=ii,t.default$22=Ni,t.create$2=hn,t.fromRotation=function(t,e){var r=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=r,t[2]=0,t[3]=-r,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},t.create$3=pn,t.length=fn,t.fromValues=dn,t.normalize$1=mn,t.dot=yn,t.cross=vn,t.transformMat3=function(t,e,r){var i=e[0],n=e[1],o=e[2];return t[0]=i*r[0]+n*r[3]+o*r[6],t[1]=i*r[1]+n*r[4]+o*r[7],t[2]=i*r[2]+n*r[5]+o*r[8],t},t.len=_n,t.forEach$1=xn,t.PosArray=oi,t.UnwrappedTileID=fs,t.create$4=function(){var t=new cn(4);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},t.rotate=function(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=i*l+o*s,t[1]=n*l+a*s,t[2]=i*-s+o*l,t[3]=n*-s+a*l,t},t.ease=m,t.bezier=d,t.default$23=Vr,t.setRTLTextPlugin=function(t,e){if(Dr)throw new Error("setRTLTextPlugin cannot be called multiple times.");Dr=!0,Rr=a.resolveURL(t),Lr=function(t){t?(Dr=!1,Rr=null,e&&e(t)):Br=!0},Or.fire(new R("pluginAvailable",{pluginURL:Rr,completionCallback:Lr}))},t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.default$24=Ze,t.default$25=da,t.register=wr,t.GLYPH_PBF_BORDER=ls,t.shapeText=function(t,e,r,i,n,o,a,s,l,u){var c=t.trim();u===As.vertical&&(c=function(t){for(var e="",r=0;r<t.length;r++){var i=t.charCodeAt(r+1)||null,n=t.charCodeAt(r-1)||null;i&&Cr(i)&&!fa[t[r+1]]||n&&Cr(n)&&!fa[t[r-1]]||!fa[t[r]]?e+=t[r]:e+=fa[t[r]]}return e}(c));var h=[],p={positionedGlyphs:h,text:c,top:s[1],bottom:s[1],left:s[0],right:s[0],writingMode:u},f=Fr.processBidirectionalText;return function(t,e,r,i,n,o,a,s,l){for(var u=0,c=-17,h=0,p=t.positionedGlyphs,f="right"===o?1:"left"===o?0:.5,d=0,m=r;d<m.length;d+=1){var y=m[d];if((y=y.trim()).length){for(var v=p.length,g=0;g<y.length;g++){var _=y.charCodeAt(g),x=e[_];x&&(Mr(_)&&a!==As.horizontal?(p.push({glyph:_,x:u,y:0,vertical:!0}),u+=l+s):(p.push({glyph:_,x:u,y:c,vertical:!1}),u+=x.metrics.advance+s))}if(p.length!==v){var b=u-s;h=Math.max(b,h),Ds(p,e,v,p.length-1,f)}u=0,c+=i}else c+=i}var w=Ls(n),E=w.horizontalAlign,S=w.verticalAlign;!function(t,e,r,i,n,o,a){for(var s=(e-r)*n,l=(-i*a+.5)*o,u=0;u<t.length;u++)t[u].x+=s,t[u].y+=l}(p,f,E,S,h,i,r.length);var T=r.length*i;t.top+=-S*T,t.bottom=t.top+T,t.left+=-E*h,t.right=t.left+h}(p,e,f?f(c,Ps(c,a,r,e)):function(t,e){for(var r=[],i=0,n=0,o=e;n<o.length;n+=1){var a=o[n];r.push(t.substring(i,a)),i=a}return i<t.length&&r.push(t.substring(i,t.length)),r}(c,Ps(c,a,r,e)),i,n,o,u,a,l),!!h.length&&p},t.shapeIcon=function(t,e,r){var i=Ls(r),n=i.horizontalAlign,o=i.verticalAlign,a=e[0],s=e[1],l=a-t.displaySize[0]*n,u=l+t.displaySize[0],c=s-t.displaySize[1]*o;return{image:t,top:c,bottom:c+t.displaySize[1],left:l,right:u}},t.allowsVerticalWritingMode=Ir,t.allowsLetterSpacing=function(t){for(var e=0,r=t;e<r.length;e+=1)if(!kr(r[e].charCodeAt(0)))return!1;return!0},t.default$26=To,t.default$27=wa,t.default$28=Es,t.CollisionBoxArray=Si,t.default$29=_s,t.default$30=La,t.default$31=Wo,t.default$32=ja,t.default$33=vs,t.__moduleExports=Wo,t.default$34=h,t.__moduleExports$1=ja,t.plugin=Fr}));i(["./chunk1.js"],(function(t){"use strict";function e(t){var r=typeof t;if("number"===r||"boolean"===r||"string"===r||null==t)return JSON.stringify(t);if(Array.isArray(t)){for(var i="[",n=0,o=t;n<o.length;n+=1){i+=e(o[n])+","}return i+"]"}for(var a=Object.keys(t).sort(),s="{",l=0;l<a.length;l++)s+=JSON.stringify(a[l])+":"+e(t[a[l]])+",";return s+"}"}function r(r){for(var i="",n=0,o=t.default$17;n<o.length;n+=1){i+="/"+e(r[o[n]])}return i}var i=function(t){t&&this.replace(t)};function n(t,e,r,i,n){if(void 0===e.segment)return!0;for(var o=e,a=e.segment+1,s=0;s>-r/2;){if(--a<0)return!1;s-=t[a].dist(o),o=t[a]}s+=t[a].dist(t[a+1]),a++;for(var l=[],u=0;s<r/2;){var c=t[a-1],h=t[a],p=t[a+1];if(!p)return!1;var f=c.angleTo(h)-h.angleTo(p);for(f=Math.abs((f+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:f}),u+=f;s-l[0].distance>i;)u-=l.shift().angleDelta;if(u>n)return!1;a++,s+=h.dist(p)}return!0}function o(t){for(var e=0,r=0;r<t.length-1;r++)e+=t[r].dist(t[r+1]);return e}function a(t,e,r){return t?.6*e*r:0}function s(t,e){return Math.max(t?t.right-t.left:0,e?e.right-e.left:0)}function l(e,r,i,l,u,c){for(var h=a(i,u,c),p=s(i,l),f=0,d=o(e)/2,m=0;m<e.length-1;m++){var y=e[m],v=e[m+1],g=y.dist(v);if(f+g>d){var _=(d-f)/g,x=t.number(y.x,v.x,_),b=t.number(y.y,v.y,_),w=new t.default$25(x,b,v.angleTo(y),m);if(w._round(),h&&!n(e,w,p,h,r))return;return w}f+=g}}function u(e,r,i,l,u,c,h,p,f){var d=a(l,c,h),m=s(l,u),y=0===e[0].x||e[0].x===f||0===e[0].y||e[0].y===f;return r-m*h<r/4&&(r=m*h+r/4),function v(e,r,i,a,s,l,u,c,h){var p=l/2;var f=o(e);var d=0,m=r-i;var y=[];for(var g=0;g<e.length-1;g++){for(var _=e[g],x=e[g+1],b=_.dist(x),w=x.angleTo(_);m+i<d+b;){var E=((m+=i)-d)/b,S=t.number(_.x,x.x,E),T=t.number(_.y,x.y,E);if(S>=0&&S<h&&T>=0&&T<h&&m-p>=0&&m+p<=f){var A=new t.default$25(S,T,w,g);A._round(),a&&!n(e,A,l,a,s)||y.push(A)}}d+=b}c||y.length||u||(y=v(e,d/2,i,a,s,l,u,!0,h));return y}(e,y?r/2*p%r:(m/2+2*c)*h*p%r,r,d,i,m*h,y,!1,f)}i.prototype.replace=function(t){this._layerConfigs={},this._layers={},this.update(t,[])},i.prototype.update=function(e,i){for(var n=this,o=0,a=e;o<a.length;o+=1){var s=a[o];n._layerConfigs[s.id]=s;var l=n._layers[s.id]=t.default$20(s);l._featureFilter=t.default$24(l.filter)}for(var u=0,c=i;u<c.length;u+=1){var h=c[u];delete n._layerConfigs[h],delete n._layers[h]}this.familiesBySource={};for(var p=0,f=function(t){for(var e={},i=0;i<t.length;i++){var n=r(t[i]),o=e[n];o||(o=e[n]=[]),o.push(t[i])}var a=[];for(var s in e)a.push(e[s]);return a}(t.values(this._layerConfigs));p<f.length;p+=1){var d=f[p].map((function(t){return n._layers[t.id]})),m=d[0];if("none"!==m.visibility){var y=m.source||"",v=n.familiesBySource[y];v||(v=n.familiesBySource[y]={});var g=m.sourceLayer||"_geojsonTileLayer",_=v[g];_||(_=v[g]=[]),_.push(d)}}};var c=function(){this.opacity=0,this.targetOpacity=0,this.time=0};c.prototype.clone=function(){var t=new c;return t.opacity=this.opacity,t.targetOpacity=this.targetOpacity,t.time=this.time,t},t.register("OpacityState",c);var h=function(e,r,i,n,o,a,s,l,u,c,h,p){var f=s.top*l-u,d=s.bottom*l+u,m=s.left*l-u,y=s.right*l+u;if(this.boxStartIndex=e.length,c){var v=d-f,g=y-m;v>0&&(v=Math.max(10*l,v),this._addLineCollisionCircles(e,r,i,i.segment,g,v,n,o,a,h))}else{if(p){var _=new t["default"](m,f),x=new t["default"](y,f),b=new t["default"](m,d),w=new t["default"](y,d),E=p*Math.PI/180;_._rotate(E),x._rotate(E),b._rotate(E),w._rotate(E),m=Math.min(_.x,x.x,b.x,w.x),y=Math.max(_.x,x.x,b.x,w.x),f=Math.min(_.y,x.y,b.y,w.y),d=Math.max(_.y,x.y,b.y,w.y)}e.emplaceBack(i.x,i.y,m,f,y,d,n,o,a,0,0)}this.boxEndIndex=e.length};h.prototype._addLineCollisionCircles=function(t,e,r,i,n,o,a,s,l,u){var c=o/2,h=Math.floor(n/c),p=1+.4*Math.log(u)/Math.LN2,f=Math.floor(h*p/2),d=-o/2,m=r,y=i+1,v=d,g=-n/2,_=g-n/4;do{if(--y<0){if(v>g)return;y=0;break}v-=e[y].dist(m),m=e[y]}while(v>_);for(var x=e[y].dist(e[y+1]),b=-f;b<h+f;b++){var w=b*c,E=g+w;if(w<0&&(E+=w),w>n&&(E+=w-n),!(E<v)){for(;v+x<E;){if(v+=x,++y+1>=e.length)return;x=e[y].dist(e[y+1])}var S=E-v,T=e[y],A=e[y+1].sub(T)._unit()._mult(S)._add(T)._round(),z=Math.abs(E-d)<c?0:.8*(E-d);t.emplaceBack(A.x,A.y,-o/2,-o/2,o/2,o/2,a,s,l,o/2,z)}}};var p=d,f=d;function d(t,e){if(!(this instanceof d))return new d(t,e);if(this.data=t||[],this.length=this.data.length,this.compare=e||m,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)}function m(t,e){return t<e?-1:t>e?1:0}function y(e,r,i){void 0===r&&(r=1),void 0===i&&(i=!1);for(var n=1/0,o=1/0,a=-1/0,s=-1/0,l=e[0],u=0;u<l.length;u++){var c=l[u];(!u||c.x<n)&&(n=c.x),(!u||c.y<o)&&(o=c.y),(!u||c.x>a)&&(a=c.x),(!u||c.y>s)&&(s=c.y)}var h=a-n,f=s-o,d=Math.min(h,f),m=d/2,y=new p(null,v);if(0===d)return new t["default"](n,o);for(var _=n;_<a;_+=d)for(var x=o;x<s;x+=d)y.push(new g(_+m,x+m,m,e));for(var b=function(t){for(var e=0,r=0,i=0,n=t[0],o=0,a=n.length,s=a-1;o<a;s=o++){var l=n[o],u=n[s],c=l.x*u.y-u.x*l.y;r+=(l.x+u.x)*c,i+=(l.y+u.y)*c,e+=3*c}return new g(r/e,i/e,0,t)}(e),w=y.length;y.length;){var E=y.pop();(E.d>b.d||!b.d)&&(b=E,i&&console.log("found best %d after %d probes",Math.round(1e4*E.d)/1e4,w)),E.max-b.d<=r||(m=E.h/2,y.push(new g(E.p.x-m,E.p.y-m,m,e)),y.push(new g(E.p.x+m,E.p.y-m,m,e)),y.push(new g(E.p.x-m,E.p.y+m,m,e)),y.push(new g(E.p.x+m,E.p.y+m,m,e)),w+=4)}return i&&(console.log("num probes: "+w),console.log("best distance: "+b.d)),b.p}function v(t,e){return e.max-t.max}function g(e,r,i,n){this.p=new t["default"](e,r),this.h=i,this.d=function(e,r){for(var i=!1,n=1/0,o=0;o<r.length;o++)for(var a=r[o],s=0,l=a.length,u=l-1;s<l;u=s++){var c=a[s],h=a[u];c.y>e.y!=h.y>e.y&&e.x<(h.x-c.x)*(e.y-c.y)/(h.y-c.y)+c.x&&(i=!i),n=Math.min(n,t.distToSegmentSquared(e,c,h))}return(i?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}function _(e,r,i,n,o,a){e.createArrays(),e.symbolInstances=[];var s=512*e.overscaling;e.tilePixelRatio=t.default$10/s,e.compareText={},e.iconsNeedLinear=!1;var l=e.layers[0].layout,u=e.layers[0]._unevaluatedLayout._values,c={};if("composite"===e.textSizeData.functionType){var h=e.textSizeData.zoomRange,p=h.min,f=h.max;c.compositeTextSizes=[u["text-size"].possiblyEvaluate(new t.default$23(p)),u["text-size"].possiblyEvaluate(new t.default$23(f))]}if("composite"===e.iconSizeData.functionType){var d=e.iconSizeData.zoomRange,m=d.min,y=d.max;c.compositeIconSizes=[u["icon-size"].possiblyEvaluate(new t.default$23(m)),u["icon-size"].possiblyEvaluate(new t.default$23(y))]}c.layoutTextSize=u["text-size"].possiblyEvaluate(new t.default$23(e.zoom+1)),c.layoutIconSize=u["icon-size"].possiblyEvaluate(new t.default$23(e.zoom+1)),c.textMaxSize=u["text-size"].possiblyEvaluate(new t.default$23(18));for(var v=24*l.get("text-line-height"),g="map"===l.get("text-rotation-alignment")&&"point"!==l.get("symbol-placement"),_=l.get("text-keep-upright"),b=0,w=e.features;b<w.length;b+=1){var E=w[b],S=l.get("text-font").evaluate(E,{}).join(","),T=r[S]||{},A=i[S]||{},z={},I=E.text;if(I){var k=l.get("text-offset").evaluate(E,{}).map((function(t){return 24*t})),M=24*l.get("text-letter-spacing").evaluate(E,{}),C=t.allowsLetterSpacing(I)?M:0,P=l.get("text-anchor").evaluate(E,{}),L=l.get("text-justify").evaluate(E,{}),D="point"===l.get("symbol-placement")?24*l.get("text-max-width").evaluate(E,{}):0;z.horizontal=t.shapeText(I,T,D,v,P,L,C,k,24,t.WritingMode.horizontal),t.allowsVerticalWritingMode(I)&&g&&_&&(z.vertical=t.shapeText(I,T,D,v,P,L,C,k,24,t.WritingMode.vertical))}var R=void 0;if(E.icon){var B=n[E.icon];B&&(R=t.shapeIcon(o[E.icon],l.get("icon-offset").evaluate(E,{}),l.get("icon-anchor").evaluate(E,{})),void 0===e.sdfIcons?e.sdfIcons=B.sdf:e.sdfIcons!==B.sdf&&t.warnOnce("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),B.pixelRatio!==e.pixelRatio?e.iconsNeedLinear=!0:0!==l.get("icon-rotate").constantOr(1)&&(e.iconsNeedLinear=!0))}(z.horizontal||R)&&x(e,E,z,R,A,c)}a&&e.generateCollisionDebugBuffers()}function x(e,r,i,n,o,a){var s=a.layoutTextSize.evaluate(r,{}),p=a.layoutIconSize.evaluate(r,{}),f=a.textMaxSize.evaluate(r,{});void 0===f&&(f=s);var d=e.layers[0].layout,m=d.get("text-offset").evaluate(r,{}),v=d.get("icon-offset").evaluate(r,{}),g=s/24,_=e.tilePixelRatio*g,x=e.tilePixelRatio*f/24,E=e.tilePixelRatio*p,S=e.tilePixelRatio*d.get("symbol-spacing"),T=d.get("text-padding")*e.tilePixelRatio,A=d.get("icon-padding")*e.tilePixelRatio,z=d.get("text-max-angle")/180*Math.PI,I="map"===d.get("text-rotation-alignment")&&"point"!==d.get("symbol-placement"),k="map"===d.get("icon-rotation-alignment")&&"point"!==d.get("symbol-placement"),M=d.get("symbol-placement"),C=S/2,P=function(s,l){l.x<0||l.x>=t.default$10||l.y<0||l.y>=t.default$10||e.symbolInstances.push(function(e,r,i,n,o,a,s,l,u,p,f,d,m,y,v,g,_,x,w,E,S){var T,A,z=e.addToLineVertexArray(r,i),I=0,k=0,M=0,C=n.horizontal?n.horizontal.text:"",P=[];if(n.horizontal){var L=a.layout.get("text-rotate").evaluate(w,{});T=new h(s,i,r,l,u,p,n.horizontal,f,d,m,e.overscaling,L),k+=b(e,r,n.horizontal,a,m,w,y,z,n.vertical?t.WritingMode.horizontal:t.WritingMode.horizontalOnly,P,E,S),n.vertical&&(M+=b(e,r,n.vertical,a,m,w,y,z,t.WritingMode.vertical,P,E,S))}var D=T?T.boxStartIndex:e.collisionBoxArray.length,R=T?T.boxEndIndex:e.collisionBoxArray.length;if(o){var B=function(e,r,i,n,o,a){var s,l,u,c,h=r.image,p=i.layout,f=r.top-1/h.pixelRatio,d=r.left-1/h.pixelRatio,m=r.bottom+1/h.pixelRatio,y=r.right+1/h.pixelRatio;if("none"!==p.get("icon-text-fit")&&o){var v=y-d,g=m-f,_=p.get("text-size").evaluate(a,{})/24,x=o.left*_,b=o.right*_,w=o.top*_,E=b-x,S=o.bottom*_-w,T=p.get("icon-text-fit-padding")[0],A=p.get("icon-text-fit-padding")[1],z=p.get("icon-text-fit-padding")[2],I=p.get("icon-text-fit-padding")[3],k="width"===p.get("icon-text-fit")?.5*(S-g):0,M="height"===p.get("icon-text-fit")?.5*(E-v):0,C="width"===p.get("icon-text-fit")||"both"===p.get("icon-text-fit")?E:v,P="height"===p.get("icon-text-fit")||"both"===p.get("icon-text-fit")?S:g;s=new t["default"](x+M-I,w+k-T),l=new t["default"](x+M+A+C,w+k-T),u=new t["default"](x+M+A+C,w+k+z+P),c=new t["default"](x+M-I,w+k+z+P)}else s=new t["default"](d,f),l=new t["default"](y,f),u=new t["default"](y,m),c=new t["default"](d,m);var L=i.layout.get("icon-rotate").evaluate(a,{})*Math.PI/180;if(L){var D=Math.sin(L),R=Math.cos(L),B=[R,-D,D,R];s._matMult(B),l._matMult(B),c._matMult(B),u._matMult(B)}return[{tl:s,tr:l,bl:c,br:u,tex:h.paddedRect,writingMode:void 0,glyphOffset:[0,0]}]}(0,o,a,0,n.horizontal,w),O=a.layout.get("icon-rotate").evaluate(w,{});A=new h(s,i,r,l,u,p,o,v,g,!1,e.overscaling,O),I=4*B.length;var F=e.iconSizeData,V=null;"source"===F.functionType?V=[10*a.layout.get("icon-size").evaluate(w,{})]:"composite"===F.functionType&&(V=[10*S.compositeIconSizes[0].evaluate(w,{}),10*S.compositeIconSizes[1].evaluate(w,{})]),e.addSymbols(e.icon,B,V,x,_,w,!1,r,z.lineStartIndex,z.lineLength)}var N=A?A.boxStartIndex:e.collisionBoxArray.length,j=A?A.boxEndIndex:e.collisionBoxArray.length;e.glyphOffsetArray.length>=t.default$27.MAX_GLYPHS&&t.warnOnce("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907");var U=new c,q=new c;return{key:C,textBoxStartIndex:D,textBoxEndIndex:R,iconBoxStartIndex:N,iconBoxEndIndex:j,textOffset:y,iconOffset:x,anchor:r,line:i,featureIndex:l,feature:w,numGlyphVertices:k,numVerticalGlyphVertices:M,numIconVertices:I,textOpacityState:U,iconOpacityState:q,isDuplicate:!1,placedTextSymbolIndices:P,crossTileID:0}}(e,l,s,i,n,e.layers[0],e.collisionBoxArray,r.index,r.sourceLayerIndex,e.index,_,T,I,m,E,A,k,v,r,o,a))};if("line"===M)for(var L=0,D=function(e,r,i,n,o){for(var a=[],s=0;s<e.length;s++)for(var l=e[s],u=void 0,c=0;c<l.length-1;c++){var h=l[c],p=l[c+1];h.x<r&&p.x<r||(h.x<r?h=new t["default"](r,h.y+(p.y-h.y)*((r-h.x)/(p.x-h.x)))._round():p.x<r&&(p=new t["default"](r,h.y+(p.y-h.y)*((r-h.x)/(p.x-h.x)))._round()),h.y<i&&p.y<i||(h.y<i?h=new t["default"](h.x+(p.x-h.x)*((i-h.y)/(p.y-h.y)),i)._round():p.y<i&&(p=new t["default"](h.x+(p.x-h.x)*((i-h.y)/(p.y-h.y)),i)._round()),h.x>=n&&p.x>=n||(h.x>=n?h=new t["default"](n,h.y+(p.y-h.y)*((n-h.x)/(p.x-h.x)))._round():p.x>=n&&(p=new t["default"](n,h.y+(p.y-h.y)*((n-h.x)/(p.x-h.x)))._round()),h.y>=o&&p.y>=o||(h.y>=o?h=new t["default"](h.x+(p.x-h.x)*((o-h.y)/(p.y-h.y)),o)._round():p.y>=o&&(p=new t["default"](h.x+(p.x-h.x)*((o-h.y)/(p.y-h.y)),o)._round()),u&&h.equals(u[u.length-1])||(u=[h],a.push(u)),u.push(p)))))}return a}(r.geometry,0,0,t.default$10,t.default$10);L<D.length;L+=1)for(var R=D[L],B=0,O=u(R,S,z,i.vertical||i.horizontal,n,24,x,e.overscaling,t.default$10);B<O.length;B+=1){var F=O[B],V=i.horizontal;V&&w(e,V.text,C,F)||P(R,F)}else if("line-center"===M)for(var N=0,j=r.geometry;N<j.length;N+=1){var U=j[N];if(U.length>1){var q=l(U,z,i.vertical||i.horizontal,n,24,x);q&&P(U,q)}}else if("Polygon"===r.type)for(var $=0,Z=t.default$26(r.geometry,0);$<Z.length;$+=1){var G=Z[$],W=y(G,16);P(G[0],new t.default$25(W.x,W.y,0))}else if("LineString"===r.type)for(var X=0,H=r.geometry;X<H.length;X+=1){var K=H[X];P(K,new t.default$25(K[0].x,K[0].y,0))}else if("Point"===r.type)for(var J=0,Y=r.geometry;J<Y.length;J+=1)for(var Q=0,tt=Y[J];Q<tt.length;Q+=1){var et=tt[Q];P([et],new t.default$25(et.x,et.y,0))}}function b(e,r,i,n,o,a,s,l,u,c,h,p){var f=function(e,r,i,n,o,a){for(var s=i.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,l=i.layout.get("text-offset").evaluate(o,{}).map((function(t){return 24*t})),u=r.positionedGlyphs,c=[],h=0;h<u.length;h++){var p=u[h],f=a[p.glyph];if(f){var d=f.rect;if(d){var m=t.GLYPH_PBF_BORDER+1,y=f.metrics.advance/2,v=n?[p.x+y,p.y]:[0,0],g=n?[0,0]:[p.x+y+l[0],p.y+l[1]],_=f.metrics.left-m-y+g[0],x=-f.metrics.top-m+g[1],b=_+d.w,w=x+d.h,E=new t["default"](_,x),S=new t["default"](b,x),T=new t["default"](_,w),A=new t["default"](b,w);if(n&&p.vertical){var z=new t["default"](-y,y),I=-Math.PI/2,k=new t["default"](5,0);E._rotateAround(I,z)._add(k),S._rotateAround(I,z)._add(k),T._rotateAround(I,z)._add(k),A._rotateAround(I,z)._add(k)}if(s){var M=Math.sin(s),C=Math.cos(s),P=[C,-M,M,C];E._matMult(P),S._matMult(P),T._matMult(P),A._matMult(P)}c.push({tl:E,tr:S,bl:T,br:A,tex:d,writingMode:r.writingMode,glyphOffset:v})}}}return c}(0,i,n,o,a,h),d=e.textSizeData,m=null;return"source"===d.functionType?m=[10*n.layout.get("text-size").evaluate(a,{})]:"composite"===d.functionType&&(m=[10*p.compositeTextSizes[0].evaluate(a,{}),10*p.compositeTextSizes[1].evaluate(a,{})]),e.addSymbols(e.text,f,m,s,o,a,u,r,l.lineStartIndex,l.lineLength),c.push(e.text.placedSymbolArray.length-1),4*f.length}function w(t,e,r,i){var n=t.compareText;if(e in n){for(var o=n[e],a=o.length-1;a>=0;a--)if(i.dist(o[a])<r)return!0}else n[e]=[];return n[e].push(i),!1}d.prototype={push:function(t){this.data.push(t),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var t=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},peek:function(){return this.data[0]},_up:function(t){for(var e=this.data,r=this.compare,i=e[t];t>0;){var n=t-1>>1,o=e[n];if(r(i,o)>=0)break;e[t]=o,t=n}e[t]=i},_down:function(t){for(var e=this.data,r=this.compare,i=this.length>>1,n=e[t];t<i;){var o=1+(t<<1),a=o+1,s=e[o];if(a<this.length&&r(e[a],s)<0&&(o=a,s=e[a]),r(s,n)>=0)break;e[t]=s,t=o}e[t]=n}},p["default"]=f;var E=function(e){var r=new t.AlphaImage({width:0,height:0}),i={},n=new t.default$3(0,0,{autoResize:!0});for(var o in e){var a=e[o],s=i[o]={};for(var l in a){var u=a[+l];if(u&&0!==u.bitmap.width&&0!==u.bitmap.height){var c=n.packOne(u.bitmap.width+2,u.bitmap.height+2);r.resize({width:n.w,height:n.h}),t.AlphaImage.copy(u.bitmap,r,{x:0,y:0},{x:c.x+1,y:c.y+1},u.bitmap),s[l]={rect:c,metrics:u.metrics}}}}n.shrink(),r.resize({width:n.w,height:n.h}),this.image=r,this.positions=i};t.register("GlyphAtlas",E);var S=function(e){this.tileID=new t.OverscaledTileID(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=e.showCollisionBoxes,this.collectResourceTiming=!!e.collectResourceTiming};function T(e,r){for(var i=new t.default$23(r),n=0,o=e;n<o.length;n+=1){o[n].recalculate(i)}}S.prototype.parse=function(e,r,i,n){var o=this;this.status="parsing",this.data=e,this.collisionBoxArray=new t.CollisionBoxArray;var a=new t.default$29(Object.keys(e.layers).sort()),s=new t.default$28(this.tileID);s.bucketLayerIDs=[];var l,u,c,h={},p={featureIndex:s,iconDependencies:{},glyphDependencies:{}},f=r.familiesBySource[this.source];for(var d in f){var m=e.layers[d];if(m){1===m.version&&t.warnOnce('Vector tile source "'+o.source+'" layer "'+d+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var y=a.encode(d),v=[],g=0;g<m.length;g++){var x=m.feature(g);v.push({feature:x,index:g,sourceLayerIndex:y})}for(var b=0,w=f[d];b<w.length;b+=1){var S=w[b],A=S[0];if(!(A.minzoom&&o.zoom<Math.floor(A.minzoom)))if(!(A.maxzoom&&o.zoom>=A.maxzoom))if("none"!==A.visibility)T(S,o.zoom),(h[A.id]=A.createBucket({index:s.bucketLayerIDs.length,layers:S,zoom:o.zoom,pixelRatio:o.pixelRatio,overscaling:o.overscaling,collisionBoxArray:o.collisionBoxArray,sourceLayerIndex:y,sourceID:o.source})).populate(v,p),s.bucketLayerIDs.push(S.map((function(t){return t.id})))}}}var z=t.mapObject(p.glyphDependencies,(function(t){return Object.keys(t).map(Number)}));Object.keys(z).length?i.send("getGlyphs",{uid:this.uid,stacks:z},(function(t,e){l||(l=t,u=e,k.call(o))})):u={};var I=Object.keys(p.iconDependencies);function k(){if(l)return n(l);if(u&&c){var e=new E(u),r=new t.default$30(c);for(var i in h){var o=h[i];o instanceof t.default$27&&(T(o.layers,this.zoom),_(o,u,e.positions,c,r.positions,this.showCollisionBoxes))}this.status="done",n(null,{buckets:t.values(h).filter((function(t){return!t.isEmpty()})),featureIndex:s,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,iconAtlasImage:r.image})}}I.length?i.send("getImages",{icons:I},(function(t,e){l||(l=t,c=e,k.call(o))})):c={},k.call(this)};var A="undefined"!=typeof performance,z={getEntriesByName:function(t){return!!(A&&performance&&performance.getEntriesByName)&&performance.getEntriesByName(t)},mark:function(t){return!!(A&&performance&&performance.mark)&&performance.mark(t)},measure:function(t,e,r){return!!(A&&performance&&performance.measure)&&performance.measure(t,e,r)},clearMarks:function(t){return!!(A&&performance&&performance.clearMarks)&&performance.clearMarks(t)},clearMeasures:function(t){return!!(A&&performance&&performance.clearMeasures)&&performance.clearMeasures(t)}},I=function(t){this._marks={start:[t.url,"start"].join("#"),end:[t.url,"end"].join("#"),measure:t.url.toString()},z.mark(this._marks.start)};function k(e,r){var i=t.getArrayBuffer(e.request,(function(e,i){e?r(e):i&&r(null,{vectorTile:new t.default$31.VectorTile(new t.default$32(i.data)),rawData:i.data,cacheControl:i.cacheControl,expires:i.expires})}));return function(){i.cancel(),r()}}I.prototype.finish=function(){z.mark(this._marks.end);var t=z.getEntriesByName(this._marks.measure);return 0===t.length&&(z.measure(this._marks.measure,this._marks.start,this._marks.end),t=z.getEntriesByName(this._marks.measure),z.clearMarks(this._marks.start),z.clearMarks(this._marks.end),z.clearMeasures(this._marks.measure)),t},z.Performance=I;var M=function(t,e,r){this.actor=t,this.layerIndex=e,this.loadVectorData=r||k,this.loading={},this.loaded={}};M.prototype.loadTile=function(e,r){var i=this,n=e.uid;this.loading||(this.loading={});var o=!!(e&&e.request&&e.request.collectResourceTiming)&&new z.Performance(e.request),a=this.loading[n]=new S(e);a.abort=this.loadVectorData(e,(function(e,s){if(delete i.loading[n],e||!s)return r(e);var l=s.rawData,u={};s.expires&&(u.expires=s.expires),s.cacheControl&&(u.cacheControl=s.cacheControl);var c={};if(o){var h=o.finish();h&&(c.resourceTiming=JSON.parse(JSON.stringify(h)))}a.vectorTile=s.vectorTile,a.parse(s.vectorTile,i.layerIndex,i.actor,(function(e,i){if(e||!i)return r(e);r(null,t.extend({rawTileData:l.slice(0)},i,u,c))})),i.loaded=i.loaded||{},i.loaded[n]=a}))},M.prototype.reloadTile=function(t,e){var r=this.loaded,i=t.uid,n=this;if(r&&r[i]){var o=r[i];o.showCollisionBoxes=t.showCollisionBoxes;var a=function(t,r){var i=o.reloadCallback;i&&(delete o.reloadCallback,o.parse(o.vectorTile,n.layerIndex,n.actor,i)),e(t,r)};"parsing"===o.status?o.reloadCallback=a:"done"===o.status&&o.parse(o.vectorTile,this.layerIndex,this.actor,a)}},M.prototype.abortTile=function(t,e){var r=this.loading,i=t.uid;r&&r[i]&&r[i].abort&&(r[i].abort(),delete r[i]),e()},M.prototype.removeTile=function(t,e){var r=this.loaded,i=t.uid;r&&r[i]&&delete r[i],e()};var C=function(){this.loading={},this.loaded={}};C.prototype.loadTile=function(e,r){var i=e.uid,n=e.encoding,o=new t.default$33(i);this.loading[i]=o,o.loadFromImage(e.rawImageData,n),delete this.loading[i],this.loaded=this.loaded||{},this.loaded[i]=o,r(null,o)},C.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var P={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:6356752.3142};function L(t){var e=0;if(t&&t.length>0){e+=Math.abs(D(t[0]));for(var r=1;r<t.length;r++)e-=Math.abs(D(t[r]))}return e}function D(t){var e,r,i,n,o,a,s=0,l=t.length;if(l>2){for(a=0;a<l;a++)a===l-2?(i=l-2,n=l-1,o=0):a===l-1?(i=l-1,n=0,o=1):(i=a,n=a+1,o=a+2),e=t[i],r=t[n],s+=(R(t[o][0])-R(e[0]))*Math.sin(R(r[1]));s=s*P.RADIUS*P.RADIUS/2}return s}function R(t){return t*Math.PI/180}var B={geometry:function Yt(t){var e,r=0;switch(t.type){case"Polygon":return L(t.coordinates);case"MultiPolygon":for(e=0;e<t.coordinates.length;e++)r+=L(t.coordinates[e]);return r;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0;case"GeometryCollection":for(e=0;e<t.geometries.length;e++)r+=Yt(t.geometries[e]);return r}},ring:D},O=function Qt(t,e){switch(t&&t.type||null){case"FeatureCollection":return t.features=t.features.map(F(Qt,e)),t;case"Feature":return t.geometry=Qt(t.geometry,e),t;case"Polygon":case"MultiPolygon":return function(t,e){"Polygon"===t.type?t.coordinates=V(t.coordinates,e):"MultiPolygon"===t.type&&(t.coordinates=t.coordinates.map(F(V,e)));return t}(t,e);default:return t}};function F(t,e){return function(r){return t(r,e)}}function V(t,e){e=!!e,t[0]=N(t[0],e);for(var r=1;r<t.length;r++)t[r]=N(t[r],!e);return t}function N(t,e){return function(t){return B.ring(t)>=0}(t)===e?t:t.reverse()}var j=t.default$31.VectorTileFeature.prototype.toGeoJSON,U=function(e){this._feature=e,this.extent=t.default$10,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};U.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,i=this._feature.geometry;r<i.length;r+=1){var n=i[r];e.push([new t["default"](n[0],n[1])])}return e}for(var o=[],a=0,s=this._feature.geometry;a<s.length;a+=1){for(var l=[],u=0,c=s[a];u<c.length;u+=1){var h=c[u];l.push(new t["default"](h[0],h[1]))}o.push(l)}return o},U.prototype.toGeoJSON=function(t,e,r){return j.call(this,t,e,r)};var q=function(e){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=t.default$10,this.length=e.length,this._features=e};q.prototype.feature=function(t){return new U(this._features[t])};var $=t.__moduleExports.VectorTileFeature,Z=G;function G(t,e){this.options=e||{},this.features=t,this.length=t.length}function W(t,e){this.id="number"==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=e||4096}G.prototype.feature=function(t){return new W(this.features[t],this.options.extent)},W.prototype.loadGeometry=function(){var e=this.rawGeometry;this.geometry=[];for(var r=0;r<e.length;r++){for(var i=e[r],n=[],o=0;o<i.length;o++)n.push(new t.default$34(i[o][0],i[o][1]));this.geometry.push(n)}return this.geometry},W.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,r=-1/0,i=1/0,n=-1/0,o=0;o<t.length;o++)for(var a=t[o],s=0;s<a.length;s++){var l=a[s];e=Math.min(e,l.x),r=Math.max(r,l.x),i=Math.min(i,l.y),n=Math.max(n,l.y)}return[e,i,r,n]},W.prototype.toGeoJSON=$.prototype.toGeoJSON;var X=Y,H=Y,K=function(t,e){e=e||{};var r={};for(var i in t)r[i]=new Z(t[i].features,e),r[i].name=i,r[i].version=e.version,r[i].extent=e.extent;return Y({layers:r})},J=Z;function Y(e){var r=new t.__moduleExports$1;return function(t,e){for(var r in t.layers)e.writeMessage(3,Q,t.layers[r])}(e,r),r.finish()}function Q(t,e){var r;e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);var i={keys:[],values:[],keycache:{},valuecache:{}};for(r=0;r<t.length;r++)i.feature=t.feature(r),e.writeMessage(2,tt,i);var n=i.keys;for(r=0;r<n.length;r++)e.writeStringField(3,n[r]);var o=i.values;for(r=0;r<o.length;r++)e.writeMessage(4,ot,o[r])}function tt(t,e){var r=t.feature;void 0!==r.id&&e.writeVarintField(1,r.id),e.writeMessage(2,et,t),e.writeVarintField(3,r.type),e.writeMessage(4,nt,r)}function et(t,e){var r=t.feature,i=t.keys,n=t.values,o=t.keycache,a=t.valuecache;for(var s in r.properties){var l=o[s];void 0===l&&(i.push(s),l=i.length-1,o[s]=l),e.writeVarint(l);var u=r.properties[s],c=typeof u;"string"!==c&&"boolean"!==c&&"number"!==c&&(u=JSON.stringify(u));var h=c+":"+u,p=a[h];void 0===p&&(n.push(u),p=n.length-1,a[h]=p),e.writeVarint(p)}}function rt(t,e){return(e<<3)+(7&t)}function it(t){return t<<1^t>>31}function nt(t,e){for(var r=t.loadGeometry(),i=t.type,n=0,o=0,a=r.length,s=0;s<a;s++){var l=r[s],u=1;1===i&&(u=l.length),e.writeVarint(rt(1,u));for(var c=3===i?l.length-1:l.length,h=0;h<c;h++){1===h&&1!==i&&e.writeVarint(rt(2,c-1));var p=l[h].x-n,f=l[h].y-o;e.writeVarint(it(p)),e.writeVarint(it(f)),n+=p,o+=f}3===i&&e.writeVarint(rt(7,0))}}function ot(t,e){var r=typeof t;"string"===r?e.writeStringField(1,t):"boolean"===r?e.writeBooleanField(7,t):"number"===r&&(t%1!=0?e.writeDoubleField(3,t):t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}function at(t,e,r,i,n,o){if(!(n-i<=r)){var a=Math.floor((i+n)/2);!function s(t,e,r,i,n,o){for(;n>i;){if(n-i>600){var a=n-i+1,l=r-i+1,u=Math.log(a),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(a-c)/a)*(l-a/2<0?-1:1),p=Math.max(i,Math.floor(r-l*c/a+h)),f=Math.min(n,Math.floor(r+(a-l)*c/a+h));s(t,e,r,p,f,o)}var d=e[2*r+o],m=i,y=n;for(st(t,e,i,r),e[2*n+o]>d&&st(t,e,i,n);m<y;){for(st(t,e,m,y),m++,y--;e[2*m+o]<d;)m++;for(;e[2*y+o]>d;)y--}e[2*i+o]===d?st(t,e,i,y):st(t,e,++y,n),y<=r&&(i=y+1),r<=y&&(n=y-1)}}(t,e,a,i,n,o%2),at(t,e,r,i,a-1,o+1),at(t,e,r,a+1,n,o+1)}}function st(t,e,r,i){lt(t,r,i),lt(e,2*r,2*i),lt(e,2*r+1,2*i+1)}function lt(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function ut(t,e,r,i){var n=t-r,o=e-i;return n*n+o*o}function ct(t,e,r,i,n){return new ht(t,e,r,i,n)}function ht(t,e,r,i,n){e=e||pt,r=r||ft,n=n||Array,this.nodeSize=i||64,this.points=t,this.ids=new n(t.length),this.coords=new n(2*t.length);for(var o=0;o<t.length;o++)this.ids[o]=o,this.coords[2*o]=e(t[o]),this.coords[2*o+1]=r(t[o]);at(this.ids,this.coords,this.nodeSize,0,this.ids.length-1,0)}function pt(t){return t[0]}function ft(t){return t[1]}function dt(t){this.options=xt(Object.create(this.options),t),this.trees=new Array(this.options.maxZoom+1)}function mt(t,e,r,i,n){return{x:t,y:e,zoom:1/0,id:r,parentId:-1,numPoints:i,properties:n}}function yt(t){return{type:"Feature",properties:vt(t),geometry:{type:"Point",coordinates:[(i=t.x,360*(i-.5)),(e=t.y,r=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(r))/Math.PI-90)]}};var e,r,i}function vt(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return xt(xt({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function gt(t){return t/360+.5}function _t(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function xt(t,e){for(var r in e)t[r]=e[r];return t}function bt(t){return t.x}function wt(t){return t.y}function Et(t,e,r,i,n,o){var a=n-r,s=o-i;if(0!==a||0!==s){var l=((t-r)*a+(e-i)*s)/(a*a+s*s);l>1?(r=n,i=o):l>0&&(r+=a*l,i+=s*l)}return(a=t-r)*a+(s=e-i)*s}function St(t,e,r,i){var n={id:void 0===t?null:t,type:e,geometry:r,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,r=t.type;if("Point"===r||"MultiPoint"===r||"LineString"===r)Tt(t,e);else if("Polygon"===r||"MultiLineString"===r)for(var i=0;i<e.length;i++)Tt(t,e[i]);else if("MultiPolygon"===r)for(i=0;i<e.length;i++)for(var n=0;n<e[i].length;n++)Tt(t,e[i][n])}(n),n}function Tt(t,e){for(var r=0;r<e.length;r+=3)t.minX=Math.min(t.minX,e[r]),t.minY=Math.min(t.minY,e[r+1]),t.maxX=Math.max(t.maxX,e[r]),t.maxY=Math.max(t.maxY,e[r+1])}function At(t,e,r){if(e.geometry){var i=e.geometry.coordinates,n=e.geometry.type,o=Math.pow(r.tolerance/((1<<r.maxZoom)*r.extent),2),a=[];if("Point"===n)zt(i,a);else if("MultiPoint"===n)for(var s=0;s<i.length;s++)zt(i[s],a);else if("LineString"===n)It(i,a,o,!1);else if("MultiLineString"===n){if(r.lineMetrics){for(s=0;s<i.length;s++)a=[],It(i[s],a,o,!1),t.push(St(e.id,"LineString",a,e.properties));return}kt(i,a,o,!1)}else if("Polygon"===n)kt(i,a,o,!0);else{if("MultiPolygon"!==n){if("GeometryCollection"===n){for(s=0;s<e.geometry.geometries.length;s++)At(t,{id:e.id,geometry:e.geometry.geometries[s],properties:e.properties},r);return}throw new Error("Input data is not a valid GeoJSON object.")}for(s=0;s<i.length;s++){var l=[];kt(i[s],l,o,!0),a.push(l)}}t.push(St(e.id,n,a,e.properties))}}function zt(t,e){e.push(Mt(t[0])),e.push(Ct(t[1])),e.push(0)}function It(t,e,r,i){for(var n,o,a=0,s=0;s<t.length;s++){var l=Mt(t[s][0]),u=Ct(t[s][1]);e.push(l),e.push(u),e.push(0),s>0&&(a+=i?(n*u-l*o)/2:Math.sqrt(Math.pow(l-n,2)+Math.pow(u-o,2))),n=l,o=u}var c=e.length-3;e[2]=1,function h(t,e,r,i){for(var n,o=i,a=r-e>>1,s=r-e,l=t[e],u=t[e+1],c=t[r],p=t[r+1],f=e+3;f<r;f+=3){var d=Et(t[f],t[f+1],l,u,c,p);if(d>o)n=f,o=d;else if(d===o){var m=Math.abs(f-a);m<s&&(n=f,s=m)}}o>i&&(n-e>3&&h(t,e,n,i),t[n+2]=o,r-n>3&&h(t,n,r,i))}(e,0,c,r),e[c+2]=1,e.size=Math.abs(a),e.start=0,e.end=e.size}function kt(t,e,r,i){for(var n=0;n<t.length;n++){var o=[];It(t[n],o,r,i),e.push(o)}}function Mt(t){return t/360+.5}function Ct(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function Pt(t,e,r,i,n,o,a,s){if(i/=e,o>=(r/=e)&&a<i)return t;if(a<r||o>=i)return null;for(var l=[],u=0;u<t.length;u++){var c=t[u],h=c.geometry,p=c.type,f=0===n?c.minX:c.minY,d=0===n?c.maxX:c.maxY;if(f>=r&&d<i)l.push(c);else if(!(d<r||f>=i)){var m=[];if("Point"===p||"MultiPoint"===p)Lt(h,m,r,i,n);else if("LineString"===p)Dt(h,m,r,i,n,!1,s.lineMetrics);else if("MultiLineString"===p)Bt(h,m,r,i,n,!1);else if("Polygon"===p)Bt(h,m,r,i,n,!0);else if("MultiPolygon"===p)for(var y=0;y<h.length;y++){var v=[];Bt(h[y],v,r,i,n,!0),v.length&&m.push(v)}if(m.length){if(s.lineMetrics&&"LineString"===p){for(y=0;y<m.length;y++)l.push(St(c.id,p,m[y],c.tags));continue}"LineString"!==p&&"MultiLineString"!==p||(1===m.length?(p="LineString",m=m[0]):p="MultiLineString"),"Point"!==p&&"MultiPoint"!==p||(p=3===m.length?"Point":"MultiPoint"),l.push(St(c.id,p,m,c.tags))}}}return l.length?l:null}function Lt(t,e,r,i,n){for(var o=0;o<t.length;o+=3){var a=t[o+n];a>=r&&a<=i&&(e.push(t[o]),e.push(t[o+1]),e.push(t[o+2]))}}function Dt(t,e,r,i,n,o,a){for(var s,l,u=Rt(t),c=0===n?Ft:Vt,h=t.start,p=0;p<t.length-3;p+=3){var f=t[p],d=t[p+1],m=t[p+2],y=t[p+3],v=t[p+4],g=0===n?f:d,_=0===n?y:v,x=!1;a&&(s=Math.sqrt(Math.pow(f-y,2)+Math.pow(d-v,2))),g<r?_>=r&&(l=c(u,f,d,y,v,r),a&&(u.start=h+s*l)):g>=i?_<i&&(l=c(u,f,d,y,v,i),a&&(u.start=h+s*l)):Ot(u,f,d,m),_<r&&g>=r&&(l=c(u,f,d,y,v,r),x=!0),_>i&&g<=i&&(l=c(u,f,d,y,v,i),x=!0),!o&&x&&(a&&(u.end=h+s*l),e.push(u),u=Rt(t)),a&&(h+=s)}var b=t.length-3;f=t[b],d=t[b+1],m=t[b+2],(g=0===n?f:d)>=r&&g<=i&&Ot(u,f,d,m),b=u.length-3,o&&b>=3&&(u[b]!==u[0]||u[b+1]!==u[1])&&Ot(u,u[0],u[1],u[2]),u.length&&e.push(u)}function Rt(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function Bt(t,e,r,i,n,o){for(var a=0;a<t.length;a++)Dt(t[a],e,r,i,n,o,!1)}function Ot(t,e,r,i){t.push(e),t.push(r),t.push(i)}function Ft(t,e,r,i,n,o){var a=(o-e)/(i-e);return t.push(o),t.push(r+(n-r)*a),t.push(1),a}function Vt(t,e,r,i,n,o){var a=(o-r)/(n-r);return t.push(e+(i-e)*a),t.push(o),t.push(1),a}function Nt(t,e){for(var r=[],i=0;i<t.length;i++){var n,o=t[i],a=o.type;if("Point"===a||"MultiPoint"===a||"LineString"===a)n=jt(o.geometry,e);else if("MultiLineString"===a||"Polygon"===a){n=[];for(var s=0;s<o.geometry.length;s++)n.push(jt(o.geometry[s],e))}else if("MultiPolygon"===a)for(n=[],s=0;s<o.geometry.length;s++){for(var l=[],u=0;u<o.geometry[s].length;u++)l.push(jt(o.geometry[s][u],e));n.push(l)}r.push(St(o.id,a,n,o.tags))}return r}function jt(t,e){var r=[];r.size=t.size,void 0!==t.start&&(r.start=t.start,r.end=t.end);for(var i=0;i<t.length;i+=3)r.push(t[i]+e,t[i+1],t[i+2]);return r}function Ut(t,e){if(t.transformed)return t;var r,i,n,o=1<<t.z,a=t.x,s=t.y;for(r=0;r<t.features.length;r++){var l=t.features[r],u=l.geometry,c=l.type;if(l.geometry=[],1===c)for(i=0;i<u.length;i+=2)l.geometry.push(qt(u[i],u[i+1],e,o,a,s));else for(i=0;i<u.length;i++){var h=[];for(n=0;n<u[i].length;n+=2)h.push(qt(u[i][n],u[i][n+1],e,o,a,s));l.geometry.push(h)}}return t.transformed=!0,t}function qt(t,e,r,i,n,o){return[Math.round(r*(t*i-n)),Math.round(r*(e*i-o))]}function $t(t,e,r,i,n){for(var o=e===n.maxZoom?0:n.tolerance/((1<<e)*n.extent),a={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:i,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<t.length;s++){a.numFeatures++,Zt(a,t[s],o,n);var l=t[s].minX,u=t[s].minY,c=t[s].maxX,h=t[s].maxY;l<a.minX&&(a.minX=l),u<a.minY&&(a.minY=u),c>a.maxX&&(a.maxX=c),h>a.maxY&&(a.maxY=h)}return a}function Zt(t,e,r,i){var n=e.geometry,o=e.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s<n.length;s+=3)a.push(n[s]),a.push(n[s+1]),t.numPoints++,t.numSimplified++;else if("LineString"===o)Gt(a,n,t,r,!1,!1);else if("MultiLineString"===o||"Polygon"===o)for(s=0;s<n.length;s++)Gt(a,n[s],t,r,"Polygon"===o,0===s);else if("MultiPolygon"===o)for(var l=0;l<n.length;l++){var u=n[l];for(s=0;s<u.length;s++)Gt(a,u[s],t,r,!0,0===s)}if(a.length){var c=e.tags||null;if("LineString"===o&&i.lineMetrics){for(var h in c={},e.tags)c[h]=e.tags[h];c.mapbox_clip_start=n.start/n.size,c.mapbox_clip_end=n.end/n.size}var p={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:c};null!==e.id&&(p.id=e.id),t.features.push(p)}}function Gt(t,e,r,i,n,o){var a=i*i;if(i>0&&e.size<(n?a:i))r.numPoints+=e.length/3;else{for(var s=[],l=0;l<e.length;l+=3)(0===i||e[l+2]>a)&&(r.numSimplified++,s.push(e[l]),s.push(e[l+1])),r.numPoints++;n&&function(t,e){for(var r=0,i=0,n=t.length,o=n-2;i<n;o=i,i+=2)r+=(t[i]-t[o])*(t[i+1]+t[o+1]);if(r>0===e)for(i=0,n=t.length;i<n/2;i+=2){var a=t[i],s=t[i+1];t[i]=t[n-2-i],t[i+1]=t[n-1-i],t[n-2-i]=a,t[n-1-i]=s}}(s,o),t.push(s)}}function Wt(t,e){var r=(e=this.options=function(t,e){for(var r in e)t[r]=e[r];return t}(Object.create(this.options),e)).debug;if(r&&console.time("preprocess data"),e.maxZoom<0||e.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");var i=function(t,e){var r=[];if("FeatureCollection"===t.type)for(var i=0;i<t.features.length;i++)At(r,t.features[i],e);else"Feature"===t.type?At(r,t,e):At(r,{geometry:t},e);return r}(t,e);this.tiles={},this.tileCoords=[],r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(i=function(t,e){var r=e.buffer/e.extent,i=t,n=Pt(t,1,-1-r,r,0,-1,2,e),o=Pt(t,1,1-r,2+r,0,-1,2,e);return(n||o)&&(i=Pt(t,1,-r,1+r,0,-1,2,e)||[],n&&(i=Nt(n,1).concat(i)),o&&(i=i.concat(Nt(o,-1)))),i}(i,e)).length&&this.splitTile(i,0,0,0),r&&(i.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function Xt(t,e,r){return 32*((1<<t)*r+e)+t}function Ht(t,e){var r=t.tileID.canonical;if(!this._geoJSONIndex)return e(null,null);var i=this._geoJSONIndex.getTile(r.z,r.x,r.y);if(!i)return e(null,null);var n=new q(i.features),o=X(n);0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),e(null,{vectorTile:n,rawData:o.buffer})}X.fromVectorTileJs=H,X.fromGeojsonVt=K,X.GeoJSONWrapper=J,ht.prototype={range:function(t,e,r,i){return function(t,e,r,i,n,o,a){for(var s,l,u=[0,t.length-1,0],c=[];u.length;){var h=u.pop(),p=u.pop(),f=u.pop();if(p-f<=a)for(var d=f;d<=p;d++)s=e[2*d],l=e[2*d+1],s>=r&&s<=n&&l>=i&&l<=o&&c.push(t[d]);else{var m=Math.floor((f+p)/2);s=e[2*m],l=e[2*m+1],s>=r&&s<=n&&l>=i&&l<=o&&c.push(t[m]);var y=(h+1)%2;(0===h?r<=s:i<=l)&&(u.push(f),u.push(m-1),u.push(y)),(0===h?n>=s:o>=l)&&(u.push(m+1),u.push(p),u.push(y))}}return c}(this.ids,this.coords,t,e,r,i,this.nodeSize)},within:function(t,e,r){return function(t,e,r,i,n,o){for(var a=[0,t.length-1,0],s=[],l=n*n;a.length;){var u=a.pop(),c=a.pop(),h=a.pop();if(c-h<=o)for(var p=h;p<=c;p++)ut(e[2*p],e[2*p+1],r,i)<=l&&s.push(t[p]);else{var f=Math.floor((h+c)/2),d=e[2*f],m=e[2*f+1];ut(d,m,r,i)<=l&&s.push(t[f]);var y=(u+1)%2;(0===u?r-n<=d:i-n<=m)&&(a.push(h),a.push(f-1),a.push(y)),(0===u?r+n>=d:i+n>=m)&&(a.push(f+1),a.push(c),a.push(y))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)}},dt.prototype={options:{minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,initial:function(){return{}},map:function(t){return t}},load:function(t){var e=this.options.log;e&&console.time("total time");var r="prepare "+t.length+" points";e&&console.time(r),this.points=t;for(var i,n,o,a=[],s=0;s<t.length;s++)t[s].geometry&&a.push((i=t[s],n=s,void 0,{x:gt((o=i.geometry.coordinates)[0]),y:_t(o[1]),zoom:1/0,id:n,parentId:-1}));this.trees[this.options.maxZoom+1]=ct(a,bt,wt,this.options.nodeSize,Float32Array),e&&console.timeEnd(r);for(var l=this.options.maxZoom;l>=this.options.minZoom;l--){var u=+Date.now();a=this._cluster(a,l),this.trees[l]=ct(a,bt,wt,this.options.nodeSize,Float32Array),e&&console.log("z%d: %d clusters in %dms",l,a.length,+Date.now()-u)}return e&&console.timeEnd("total time"),this},getClusters:function(t,e){var r=((t[0]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,t[1])),n=180===t[2]?180:((t[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,n=180;else if(r>n){var a=this.getClusters([r,i,180,o],e),s=this.getClusters([-180,i,n,o],e);return a.concat(s)}for(var l=this.trees[this._limitZoom(e)],u=l.range(gt(r),_t(o),gt(n),_t(i)),c=[],h=0;h<u.length;h++){var p=l.points[u[h]];c.push(p.numPoints?yt(p):this.points[p.id])}return c},getChildren:function(t){var e=t>>5,r=t%32,i="No cluster with the specified id.",n=this.trees[r];if(!n)throw new Error(i);var o=n.points[e];if(!o)throw new Error(i);for(var a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=n.within(o.x,o.y,a),l=[],u=0;u<s.length;u++){var c=n.points[s[u]];c.parentId===t&&l.push(c.numPoints?yt(c):this.points[c.id])}if(0===l.length)throw new Error(i);return l},getLeaves:function(t,e,r){e=e||10,r=r||0;var i=[];return this._appendLeaves(i,t,e,r,0),i},getTile:function(t,e,r){var i=this.trees[this._limitZoom(t)],n=Math.pow(2,t),o=this.options.extent,a=this.options.radius/o,s=(r-a)/n,l=(r+1+a)/n,u={features:[]};return this._addTileFeatures(i.range((e-a)/n,s,(e+1+a)/n,l),i.points,e,r,n,u),0===e&&this._addTileFeatures(i.range(1-a/n,s,1,l),i.points,n,r,n,u),e===n-1&&this._addTileFeatures(i.range(0,s,a/n,l),i.points,-1,r,n,u),u.features.length?u:null},getClusterExpansionZoom:function(t){for(var e=t%32-1;e<this.options.maxZoom;){var r=this.getChildren(t);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e},_appendLeaves:function(t,e,r,i,n){for(var o=this.getChildren(e),a=0;a<o.length;a++){var s=o[a].properties;if(s&&s.cluster?n+s.point_count<=i?n+=s.point_count:n=this._appendLeaves(t,s.cluster_id,r,i,n):n<i?n++:t.push(o[a]),t.length===r)break}return n},_addTileFeatures:function(t,e,r,i,n,o){for(var a=0;a<t.length;a++){var s=e[t[a]];o.features.push({type:1,geometry:[[Math.round(this.options.extent*(s.x*n-r)),Math.round(this.options.extent*(s.y*n-i))]],tags:s.numPoints?vt(s):this.points[s.id].properties})}},_limitZoom:function(t){return Math.max(this.options.minZoom,Math.min(t,this.options.maxZoom+1))},_cluster:function(t,e){for(var r=[],i=this.options.radius/(this.options.extent*Math.pow(2,e)),n=0;n<t.length;n++){var o=t[n];if(!(o.zoom<=e)){o.zoom=e;var a=this.trees[e+1],s=a.within(o.x,o.y,i),l=o.numPoints||1,u=o.x*l,c=o.y*l,h=null;this.options.reduce&&(h=this.options.initial(),this._accumulate(h,o));for(var p=(n<<5)+(e+1),f=0;f<s.length;f++){var d=a.points[s[f]];if(!(d.zoom<=e)){d.zoom=e;var m=d.numPoints||1;u+=d.x*m,c+=d.y*m,l+=m,d.parentId=p,this.options.reduce&&this._accumulate(h,d)}}1===l?r.push(o):(o.parentId=p,r.push(mt(u/l,c/l,p,l,h)))}}return r},_accumulate:function(t,e){var r=e.numPoints?e.properties:this.options.map(this.points[e.id].properties);this.options.reduce(t,r)}},Wt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,debug:0},Wt.prototype.splitTile=function(t,e,r,i,n,o,a){for(var s=[t,e,r,i],l=this.options,u=l.debug;s.length;){i=s.pop(),r=s.pop(),e=s.pop(),t=s.pop();var c=1<<e,h=Xt(e,r,i),p=this.tiles[h];if(!p&&(u>1&&console.time("creation"),p=this.tiles[h]=$t(t,e,r,i,l),this.tileCoords.push({z:e,x:r,y:i}),u)){u>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,i,p.numFeatures,p.numPoints,p.numSimplified),console.timeEnd("creation"));var f="z"+e;this.stats[f]=(this.stats[f]||0)+1,this.total++}if(p.source=t,n){if(e===l.maxZoom||e===n)continue;var d=1<<n-e;if(r!==Math.floor(o/d)||i!==Math.floor(a/d))continue}else if(e===l.indexMaxZoom||p.numPoints<=l.indexMaxPoints)continue;if(p.source=null,0!==t.length){u>1&&console.time("clipping");var m,y,v,g,_,x,b=.5*l.buffer/l.extent,w=.5-b,E=.5+b,S=1+b;m=y=v=g=null,_=Pt(t,c,r-b,r+E,0,p.minX,p.maxX,l),x=Pt(t,c,r+w,r+S,0,p.minX,p.maxX,l),t=null,_&&(m=Pt(_,c,i-b,i+E,1,p.minY,p.maxY,l),y=Pt(_,c,i+w,i+S,1,p.minY,p.maxY,l),_=null),x&&(v=Pt(x,c,i-b,i+E,1,p.minY,p.maxY,l),g=Pt(x,c,i+w,i+S,1,p.minY,p.maxY,l),x=null),u>1&&console.timeEnd("clipping"),s.push(m||[],e+1,2*r,2*i),s.push(y||[],e+1,2*r,2*i+1),s.push(v||[],e+1,2*r+1,2*i),s.push(g||[],e+1,2*r+1,2*i+1)}}},Wt.prototype.getTile=function(t,e,r){var i=this.options,n=i.extent,o=i.debug;if(t<0||t>24)return null;var a=1<<t,s=Xt(t,e=(e%a+a)%a,r);if(this.tiles[s])return Ut(this.tiles[s],n);o>1&&console.log("drilling down to z%d-%d-%d",t,e,r);for(var l,u=t,c=e,h=r;!l&&u>0;)u--,c=Math.floor(c/2),h=Math.floor(h/2),l=this.tiles[Xt(u,c,h)];return l&&l.source?(o>1&&console.log("found parent tile z%d-%d-%d",u,c,h),o>1&&console.time("drilling down"),this.splitTile(l.source,u,c,h,t,e,r),o>1&&console.timeEnd("drilling down"),this.tiles[s]?Ut(this.tiles[s],n):null):null};var Kt=function(e){function r(t,r,i){e.call(this,t,r,Ht),i&&(this.loadGeoJSON=i)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var t=this;if(this._pendingCallback&&this._pendingLoadDataParams){var e=this._pendingCallback,r=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var i=!!(r&&r.request&&r.request.collectResourceTiming)&&new z.Performance(r.request);this.loadGeoJSON(r,(function(n,o){if(n||!o)return e(n);if("object"!=typeof o)return e(new Error("Input data is not a valid GeoJSON object."));O(o,!0);try{t._geoJSONIndex=r.cluster?(a=r.superclusterOptions,new dt(a)).load(o.features):function(t,e){return new Wt(t,e)}(o,r.geojsonVtOptions)}catch(n){return e(n)}t.loaded={};var a,s={};if(i){var l=i.finish();l&&(s.resourceTiming={},s.resourceTiming[r.source]=JSON.parse(JSON.stringify(l)))}e(null,s)}))}},r.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},r.prototype.reloadTile=function(t,r){var i=this.loaded,n=t.uid;return i&&i[n]?e.prototype.reloadTile.call(this,t,r):this.loadTile(t,r)},r.prototype.loadGeoJSON=function(e,r){if(e.request)t.getJSON(e.request,r);else{if("string"!=typeof e.data)return r(new Error("Input data is not a valid GeoJSON object."));try{return r(null,JSON.parse(e.data))}catch(t){return r(new Error("Input data is not a valid GeoJSON object."))}}},r.prototype.removeSource=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),e()},r.prototype.getClusterExpansionZoom=function(t,e){e(null,this._geoJSONIndex.getClusterExpansionZoom(t.clusterId))},r.prototype.getClusterChildren=function(t,e){e(null,this._geoJSONIndex.getChildren(t.clusterId))},r.prototype.getClusterLeaves=function(t,e){e(null,this._geoJSONIndex.getLeaves(t.clusterId,t.limit,t.offset))},r}(M),Jt=function(e){var r=this;this.self=e,this.actor=new t.default$9(e,this),this.layerIndexes={},this.workerSourceTypes={vector:M,geojson:Kt},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(t,e){if(r.workerSourceTypes[t])throw new Error('Worker source with name "'+t+'" already registered.');r.workerSourceTypes[t]=e},this.self.registerRTLTextPlugin=function(e){if(t.plugin.isLoaded())throw new Error("RTL text plugin already registered.");t.plugin.applyArabicShaping=e.applyArabicShaping,t.plugin.processBidirectionalText=e.processBidirectionalText}};return Jt.prototype.setLayers=function(t,e,r){this.getLayerIndex(t).replace(e),r()},Jt.prototype.updateLayers=function(t,e,r){this.getLayerIndex(t).update(e.layers,e.removedIds),r()},Jt.prototype.loadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).loadTile(e,r)},Jt.prototype.loadDEMTile=function(t,e,r){this.getDEMWorkerSource(t,e.source).loadTile(e,r)},Jt.prototype.reloadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).reloadTile(e,r)},Jt.prototype.abortTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).abortTile(e,r)},Jt.prototype.removeTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).removeTile(e,r)},Jt.prototype.removeDEMTile=function(t,e){this.getDEMWorkerSource(t,e.source).removeTile(e)},Jt.prototype.removeSource=function(t,e,r){if(this.workerSources[t]&&this.workerSources[t][e.type]&&this.workerSources[t][e.type][e.source]){var i=this.workerSources[t][e.type][e.source];delete this.workerSources[t][e.type][e.source],void 0!==i.removeSource?i.removeSource(e,r):r()}},Jt.prototype.loadWorkerSource=function(t,e,r){try{this.self.importScripts(e.url),r()}catch(t){r(t.toString())}},Jt.prototype.loadRTLTextPlugin=function(e,r,i){try{t.plugin.isLoaded()||(this.self.importScripts(r),i(t.plugin.isLoaded()?null:new Error("RTL Text Plugin failed to import scripts from "+r)))}catch(t){i(t.toString())}},Jt.prototype.getLayerIndex=function(t){var e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new i),e},Jt.prototype.getWorkerSource=function(t,e,r){var i=this;if(this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][e]||(this.workerSources[t][e]={}),!this.workerSources[t][e][r]){var n={send:function(e,r,n){i.actor.send(e,r,n,t)}};this.workerSources[t][e][r]=new this.workerSourceTypes[e](n,this.getLayerIndex(t))}return this.workerSources[t][e][r]},Jt.prototype.getDEMWorkerSource=function(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new C),this.demWorkerSources[t][e]},"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&new Jt(self),Jt}));i(["./chunk1.js"],(function(t){"use strict";var e=t.createCommonjsModule((function(t){function e(t){return!!("undefined"!=typeof window&&"undefined"!=typeof document&&Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray&&Function.prototype&&Function.prototype.bind&&Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions&&"JSON"in window&&"parse"in JSON&&"stringify"in JSON&&function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var t,e,r=new Blob([""],{type:"text/javascript"}),i=URL.createObjectURL(r);try{e=new Worker(i),t=!0}catch(e){t=!1}e&&e.terminate();return URL.revokeObjectURL(i),t}()&&"Uint8ClampedArray"in window&&ArrayBuffer.isView&&function(t){void 0===r[t]&&(r[t]=function(t){var r=document.createElement("canvas"),i=Object.create(e.webGLContextAttributes);return i.failIfMajorPerformanceCaveat=t,r.probablySupportsContext?r.probablySupportsContext("webgl",i)||r.probablySupportsContext("experimental-webgl",i):r.supportsContext?r.supportsContext("webgl",i)||r.supportsContext("experimental-webgl",i):r.getContext("webgl",i)||r.getContext("experimental-webgl",i)}(t));return r[t]}(t&&t.failIfMajorPerformanceCaveat))}t.exports?t.exports=e:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=e);var r={};e.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}})),r={create:function(e,r,i){var n=t.default$1.document.createElement(e);return r&&(n.className=r),i&&i.appendChild(n),n},createNS:function(e,r){return t.default$1.document.createElementNS(e,r)}},i=t.default$1.document?t.default$1.document.documentElement.style:null;function n(t){if(!i)return null;for(var e=0;e<t.length;e++)if(t[e]in i)return t[e];return t[0]}var o,a=n(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);r.disableDrag=function(){i&&a&&(o=i[a],i[a]="none")},r.enableDrag=function(){i&&a&&(i[a]=o)};var s=n(["transform","WebkitTransform"]);r.setTransform=function(t,e){t.style[s]=e};var l=!1;try{var u=Object.defineProperty({},"passive",{get:function(){l=!0}});t.default$1.addEventListener("test",u,u),t.default$1.removeEventListener("test",u,u)}catch(t){l=!1}r.addEventListener=function(t,e,r,i){void 0===i&&(i={}),"passive"in i&&l?t.addEventListener(e,r,i):t.addEventListener(e,r,i.capture)},r.removeEventListener=function(t,e,r,i){void 0===i&&(i={}),"passive"in i&&l?t.removeEventListener(e,r,i):t.removeEventListener(e,r,i.capture)};var c=function(e){e.preventDefault(),e.stopPropagation(),t.default$1.removeEventListener("click",c,!0)};r.suppressClick=function(){t.default$1.addEventListener("click",c,!0),t.default$1.setTimeout((function(){t.default$1.removeEventListener("click",c,!0)}),0)},r.mousePos=function(e,r){var i=e.getBoundingClientRect();return r=r.touches?r.touches[0]:r,new t["default"](r.clientX-i.left-e.clientLeft,r.clientY-i.top-e.clientTop)},r.touchPos=function(e,r){for(var i=e.getBoundingClientRect(),n=[],o="touchend"===r.type?r.changedTouches:r.touches,a=0;a<o.length;a++)n.push(new t["default"](o[a].clientX-i.left-e.clientLeft,o[a].clientY-i.top-e.clientTop));return n},r.mouseButton=function(e){return void 0!==t.default$1.InstallTrigger&&2===e.button&&e.ctrlKey&&t.default$1.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:e.button},r.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var h={API_URL:"https://api.mapbox.com",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null},p="See https://www.mapbox.com/api-documentation/#access-tokens";function f(t,e){var r=b(h.API_URL);if(t.protocol=r.protocol,t.authority=r.authority,"/"!==r.path&&(t.path=""+r.path+t.path),!h.REQUIRE_ACCESS_TOKEN)return w(t);if(!(e=e||h.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+p);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+p);return t.params.push("access_token="+e),w(t)}function d(t){return 0===t.indexOf("mapbox:")}var m=function(t,e){if(!d(t))return t;var r=b(t);return r.path="/fonts/v1"+r.path,f(r,e)},y=function(t,e){if(!d(t))return t;var r=b(t);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),f(r,e)},v=function(t,e,r,i){var n=b(t);return d(t)?(n.path="/styles/v1"+n.path+"/sprite"+e+r,f(n,i)):(n.path+=""+e+r,w(n))},g=/(\.(png|jpg)\d*)(?=$)/,_=function(e,r,i){if(!r||!d(r))return e;var n=b(e),o=t.default$2.devicePixelRatio>=2||512===i?"@2x":"",a=t.default$2.supportsWebp?".webp":"$1";return n.path=n.path.replace(g,""+o+a),function(t){for(var e=0;e<t.length;e++)0===t[e].indexOf("access_token=tk.")&&(t[e]="access_token="+(h.ACCESS_TOKEN||""))}(n.params),w(n)};var x=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function b(t){var e=t.match(x);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function w(t){var e=t.params.length?"?"+t.params.join("&"):"";return t.protocol+"://"+t.authority+t.path+e}var E=function(){this.images={},this.loaded=!1,this.requestors=[],this.shelfPack=new t.default$3(64,64,{autoResize:!0}),this.patterns={},this.atlasImage=new t.RGBAImage({width:64,height:64}),this.dirty=!0};E.prototype.isLoaded=function(){return this.loaded},E.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,r=this.requestors;e<r.length;e+=1){var i=r[e],n=i.ids,o=i.callback;this._notify(n,o)}this.requestors=[]}},E.prototype.getImage=function(t){return this.images[t]},E.prototype.addImage=function(t,e){this.images[t]=e},E.prototype.removeImage=function(t){delete this.images[t];var e=this.patterns[t];e&&(this.shelfPack.unref(e.bin),delete this.patterns[t])},E.prototype.listImages=function(){return Object.keys(this.images)},E.prototype.getImages=function(t,e){var r=!0;if(!this.isLoaded())for(var i=0,n=t;i<n.length;i+=1){var o=n[i];this.images[o]||(r=!1)}this.isLoaded()||r?this._notify(t,e):this.requestors.push({ids:t,callback:e})},E.prototype._notify=function(t,e){for(var r={},i=0,n=t;i<n.length;i+=1){var o=n[i],a=this.images[o];a&&(r[o]={data:a.data.clone(),pixelRatio:a.pixelRatio,sdf:a.sdf})}e(null,r)},E.prototype.getPixelSize=function(){return{width:this.shelfPack.w,height:this.shelfPack.h}},E.prototype.getPattern=function(e){var r=this.patterns[e];if(r)return r.position;var i=this.getImage(e);if(!i)return null;var n=i.data.width+2,o=i.data.height+2,a=this.shelfPack.packOne(n,o);if(!a)return null;this.atlasImage.resize(this.getPixelSize());var s=i.data,l=this.atlasImage,u=a.x+1,c=a.y+1,h=s.width,p=s.height;t.RGBAImage.copy(s,l,{x:0,y:0},{x:u,y:c},{width:h,height:p}),t.RGBAImage.copy(s,l,{x:0,y:p-1},{x:u,y:c-1},{width:h,height:1}),t.RGBAImage.copy(s,l,{x:0,y:0},{x:u,y:c+p},{width:h,height:1}),t.RGBAImage.copy(s,l,{x:h-1,y:0},{x:u-1,y:c},{width:1,height:p}),t.RGBAImage.copy(s,l,{x:0,y:0},{x:u+h,y:c},{width:1,height:p}),this.dirty=!0;var f=new t.ImagePosition(a,i);return this.patterns[e]={bin:a,position:f},f},E.prototype.bind=function(e){var r=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new t.default$4(e,this.atlasImage,r.RGBA),this.atlasTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)};var S=A,T=1e20;function A(t,e,r,i,n,o){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=i||.25,this.fontFamily=n||"sans-serif",this.fontWeight=o||"normal",this.radius=r||8;var a=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.d=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Int16Array(a),this.middle=Math.round(a/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function z(t,e,r,i,n,o,a){for(var s=0;s<e;s++){for(var l=0;l<r;l++)i[l]=t[l*e+s];for(I(i,n,o,a,r),l=0;l<r;l++)t[l*e+s]=n[l]}for(l=0;l<r;l++){for(s=0;s<e;s++)i[s]=t[l*e+s];for(I(i,n,o,a,e),s=0;s<e;s++)t[l*e+s]=Math.sqrt(n[s])}}function I(t,e,r,i,n){r[0]=0,i[0]=-T,i[1]=+T;for(var o=1,a=0;o<n;o++){for(var s=(t[o]+o*o-(t[r[a]]+r[a]*r[a]))/(2*o-2*r[a]);s<=i[a];)a--,s=(t[o]+o*o-(t[r[a]]+r[a]*r[a]))/(2*o-2*r[a]);r[++a]=o,i[a]=s,i[a+1]=+T}for(o=0,a=0;o<n;o++){for(;i[a+1]<o;)a++;e[o]=(o-r[a])*(o-r[a])+t[r[a]]}}A.prototype.draw=function(t){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(t,this.buffer,this.middle);for(var e=this.ctx.getImageData(0,0,this.size,this.size),r=new Uint8ClampedArray(this.size*this.size),i=0;i<this.size*this.size;i++){var n=e.data[4*i+3]/255;this.gridOuter[i]=1===n?0:0===n?T:Math.pow(Math.max(0,.5-n),2),this.gridInner[i]=1===n?T:0===n?0:Math.pow(Math.max(0,n-.5),2)}for(z(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),z(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),i=0;i<this.size*this.size;i++){var o=this.gridOuter[i]-this.gridInner[i];r[i]=Math.max(0,Math.min(255,Math.round(255-255*(o/this.radius+this.cutoff))))}return r};var k=function(t,e){this.requestTransform=t,this.localIdeographFontFamily=e,this.entries={}};k.prototype.setURL=function(t){this.url=t},k.prototype.getGlyphs=function(e,r){var i=this,n=[];for(var o in e)for(var a=0,s=e[o];a<s.length;a+=1){var l=s[a];n.push({stack:o,id:l})}t.asyncAll(n,(function(t,e){var r=t.stack,n=t.id,o=i.entries[r];o||(o=i.entries[r]={glyphs:{},requests:{}});var a=o.glyphs[n];if(void 0===a)if(a=i._tinySDF(o,r,n))e(null,{stack:r,id:n,glyph:a});else{var s=Math.floor(n/256);if(256*s>65535)e(new Error("glyphs > 65535 not supported"));else{var l=o.requests[s];l||(l=o.requests[s]=[],k.loadGlyphRange(r,s,i.url,i.requestTransform,(function(t,e){if(e)for(var r in e)o.glyphs[+r]=e[+r];for(var i=0,n=l;i<n.length;i+=1){(0,n[i])(t,e)}delete o.requests[s]}))),l.push((function(t,i){t?e(t):i&&e(null,{stack:r,id:n,glyph:i[n]||null})}))}}else e(null,{stack:r,id:n,glyph:a})}),(function(t,e){if(t)r(t);else if(e){for(var i={},n=0,o=e;n<o.length;n+=1){var a=o[n],s=a.stack,l=a.id,u=a.glyph;(i[s]||(i[s]={}))[l]=u&&{id:u.id,bitmap:u.bitmap.clone(),metrics:u.metrics}}r(null,i)}}))},k.prototype._tinySDF=function(e,r,i){var n=this.localIdeographFontFamily;if(n&&(t.default$6["CJK Unified Ideographs"](i)||t.default$6["Hangul Syllables"](i))){var o=e.tinySDF;if(!o){var a="400";/bold/i.test(r)?a="900":/medium/i.test(r)?a="500":/light/i.test(r)&&(a="200"),o=e.tinySDF=new k.TinySDF(24,3,8,.25,n,a)}return{id:i,bitmap:new t.AlphaImage({width:30,height:30},o.draw(String.fromCharCode(i))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},k.loadGlyphRange=function(e,r,i,n,o){var a=256*r,s=a+255,l=n(m(i).replace("{fontstack}",e).replace("{range}",a+"-"+s),t.ResourceType.Glyphs);t.getArrayBuffer(l,(function(e,r){if(e)o(e);else if(r){for(var i={},n=0,a=t.default$5(r.data);n<a.length;n+=1){var s=a[n];i[s.id]=s}o(null,i)}}))},k.TinySDF=S;var M=function(){this.specification=t.default$7.light.position};M.prototype.possiblyEvaluate=function(e,r){return t.sphericalToCartesian(e.expression.evaluate(r))},M.prototype.interpolate=function(e,r,i){return{x:t.number(e.x,r.x,i),y:t.number(e.y,r.y,i),z:t.number(e.z,r.z,i)}};var C=new t.Properties({anchor:new t.DataConstantProperty(t.default$7.light.anchor),position:new M,color:new t.DataConstantProperty(t.default$7.light.color),intensity:new t.DataConstantProperty(t.default$7.light.intensity)}),P=function(e){function r(r){e.call(this),this._transitionable=new t.Transitionable(C),this.setLight(r),this._transitioning=this._transitionable.untransitioned()}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getLight=function(){return this._transitionable.serialize()},r.prototype.setLight=function(e){if(!this._validate(t.validateLight,e))for(var r in e){var i=e[r];t.endsWith(r,"-transition")?this._transitionable.setTransition(r.slice(0,-"-transition".length),i):this._transitionable.setValue(r,i)}},r.prototype.updateTransitions=function(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)},r.prototype.hasTransition=function(){return this._transitioning.hasTransition()},r.prototype.recalculate=function(t){this.properties=this._transitioning.possiblyEvaluate(t)},r.prototype._validate=function(e,r){return t.emitValidationErrors(this,e.call(t.validateStyle,t.extend({value:r,style:{glyphs:!0,sprite:!0},styleSpec:t.default$7})))},r}(t.Evented),L=function(t,e){this.width=t,this.height=e,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};L.prototype.getDash=function(t,e){var r=t.join(",")+String(e);return this.positions[r]||(this.positions[r]=this.addDash(t,e)),this.positions[r]},L.prototype.addDash=function(e,r){var i=r?7:0,n=2*i+1;if(this.nextRow+n>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var o=0,a=0;a<e.length;a++)o+=e[a];for(var s=this.width/o,l=s/2,u=e.length%2==1,c=-i;c<=i;c++)for(var h=this.nextRow+i+c,p=this.width*h,f=u?-e[e.length-1]:0,d=e[0],m=1,y=0;y<this.width;y++){for(;d<y/s;)f=d,d+=e[m],u&&m===e.length-1&&(d+=e[0]),m++;var v=Math.abs(y-f*s),g=Math.abs(y-d*s),_=Math.min(v,g),x=m%2==1,b=void 0;if(r){var w=i?c/i*(l+1):0;if(x){var E=l-Math.abs(w);b=Math.sqrt(_*_+E*E)}else b=l-Math.sqrt(_*_+w*w)}else b=(x?1:-1)*_;this.data[3+4*(p+y)]=Math.max(0,Math.min(255,b+128))}var S={y:(this.nextRow+i+.5)/this.height,height:2*i/this.height,width:o};return this.nextRow+=n,this.dirty=!0,S},L.prototype.bind=function(t){var e=t.gl;this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.width,this.height,e.RGBA,e.UNSIGNED_BYTE,this.data))):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,this.width,this.height,0,e.RGBA,e.UNSIGNED_BYTE,this.data))};var D=function pi(e,r){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=t.uniqueId();for(var i=this.workerPool.acquire(this.id),n=0;n<i.length;n++){var o=i[n],a=new pi.Actor(o,r,this.id);a.name="Worker "+n,this.actors.push(a)}};function R(e,r,i){var n=function(e,r){if(e)return i(e);if(r){var n=t.pick(r,["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds"]);r.vector_layers&&(n.vectorLayers=r.vector_layers,n.vectorLayerIds=n.vectorLayers.map((function(t){return t.id}))),i(null,n)}};return e.url?t.getJSON(r(y(e.url),t.ResourceType.Source),n):t.default$2.frame((function(){return n(null,e)}))}D.prototype.broadcast=function(e,r,i){i=i||function(){},t.asyncAll(this.actors,(function(t,i){t.send(e,r,i)}),i)},D.prototype.send=function(t,e,r,i){return("number"!=typeof i||isNaN(i))&&(i=this.currentActor=(this.currentActor+1)%this.actors.length),this.actors[i].send(t,e,r),i},D.prototype.remove=function(){this.actors.forEach((function(t){t.remove()})),this.actors=[],this.workerPool.release(this.id)},D.Actor=t.default$9;var B=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};B.prototype.wrap=function(){return new B(t.wrap(this.lng,-180,180),this.lat)},B.prototype.toArray=function(){return[this.lng,this.lat]},B.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},B.prototype.toBounds=function(t){var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new O(new B(this.lng-r,this.lat-e),new B(this.lng+r,this.lat+e))},B.convert=function(t){if(t instanceof B)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new B(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new B(Number(t.lng),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var O=function(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};O.prototype.setNorthEast=function(t){return this._ne=t instanceof B?new B(t.lng,t.lat):B.convert(t),this},O.prototype.setSouthWest=function(t){return this._sw=t instanceof B?new B(t.lng,t.lat):B.convert(t),this},O.prototype.extend=function(t){var e,r,i=this._sw,n=this._ne;if(t instanceof B)e=t,r=t;else{if(!(t instanceof O))return Array.isArray(t)?t.every(Array.isArray)?this.extend(O.convert(t)):this.extend(B.convert(t)):this;if(e=t._sw,r=t._ne,!e||!r)return this}return i||n?(i.lng=Math.min(e.lng,i.lng),i.lat=Math.min(e.lat,i.lat),n.lng=Math.max(r.lng,n.lng),n.lat=Math.max(r.lat,n.lat)):(this._sw=new B(e.lng,e.lat),this._ne=new B(r.lng,r.lat)),this},O.prototype.getCenter=function(){return new B((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},O.prototype.getSouthWest=function(){return this._sw},O.prototype.getNorthEast=function(){return this._ne},O.prototype.getNorthWest=function(){return new B(this.getWest(),this.getNorth())},O.prototype.getSouthEast=function(){return new B(this.getEast(),this.getSouth())},O.prototype.getWest=function(){return this._sw.lng},O.prototype.getSouth=function(){return this._sw.lat},O.prototype.getEast=function(){return this._ne.lng},O.prototype.getNorth=function(){return this._ne.lat},O.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},O.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},O.prototype.isEmpty=function(){return!(this._sw&&this._ne)},O.convert=function(t){return!t||t instanceof O?t:new O(t)};var F=function(t,e,r){this.bounds=O.convert(this.validateBounds(t)),this.minzoom=e||0,this.maxzoom=r||24};F.prototype.validateBounds=function(t){return Array.isArray(t)&&4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]},F.prototype.contains=function(t){var e=Math.floor(this.lngX(this.bounds.getWest(),t.z)),r=Math.floor(this.latY(this.bounds.getNorth(),t.z)),i=Math.ceil(this.lngX(this.bounds.getEast(),t.z)),n=Math.ceil(this.latY(this.bounds.getSouth(),t.z));return t.x>=e&&t.x<i&&t.y>=r&&t.y<n},F.prototype.lngX=function(t,e){return(t+180)*(Math.pow(2,e)/360)},F.prototype.latY=function(e,r){var i=t.clamp(Math.sin(Math.PI/180*e),-.9999,.9999),n=Math.pow(2,r)/(2*Math.PI);return Math.pow(2,r-1)+.5*Math.log((1+i)/(1-i))*-n};var V=function(e){function r(r,i,n,o){if(e.call(this),this.id=r,this.dispatcher=n,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,t.extend(this,t.pick(i,["url","scheme","tileSize"])),this._options=t.extend({type:"vector"},i),this._collectResourceTiming=i.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(o)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=R(this._options,this.map._transformRequest,(function(r,i){e._tileJSONRequest=null,r?e.fire(new t.ErrorEvent(r)):i&&(t.extend(e,i),i.bounds&&(e.tileBounds=new F(i.bounds,e.minzoom,e.maxzoom)),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))}))},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.loadTile=function(e,r){var i=_(e.tileID.canonical.url(this.tiles,this.scheme),this.url),n={request:this.map._transformRequest(i,t.ResourceType.Tile),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:t.default$2.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};function o(t,i){return e.aborted?r(null):t?r(t):(i&&i.resourceTiming&&(e.resourceTiming=i.resourceTiming),this.map._refreshExpiredTiles&&e.setExpiryData(i),e.loadVectorData(i,this.map.painter),r(null),void(e.reloadCallback&&(this.loadTile(e,e.reloadCallback),e.reloadCallback=null)))}n.request.collectResourceTiming=this._collectResourceTiming,void 0===e.workerID||"expired"===e.state?e.workerID=this.dispatcher.send("loadTile",n,o.bind(this)):"loading"===e.state?e.reloadCallback=r:this.dispatcher.send("reloadTile",n,o.bind(this),e.workerID)},r.prototype.abortTile=function(t){this.dispatcher.send("abortTile",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},r.prototype.hasTransition=function(){return!1},r}(t.Evented),N=function(e){function r(r,i,n,o){e.call(this),this.id=r,this.dispatcher=n,this.setEventedParent(o),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.extend({},i),t.extend(this,t.pick(i,["url","scheme","tileSize"]))}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=R(this._options,this.map._transformRequest,(function(r,i){e._tileJSONRequest=null,r?e.fire(new t.ErrorEvent(r)):i&&(t.extend(e,i),i.bounds&&(e.tileBounds=new F(i.bounds,e.minzoom,e.maxzoom)),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))}))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.loadTile=function(e,r){var i=this,n=_(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(n,t.ResourceType.Tile),(function(n,o){if(delete e.request,e.aborted)e.state="unloaded",r(null);else if(n)e.state="errored",r(n);else if(o){i.map._refreshExpiredTiles&&e.setExpiryData(o),delete o.cacheControl,delete o.expires;var a=i.map.painter.context,s=a.gl;e.texture=i.map.painter.getTileTexture(o.width),e.texture?e.texture.update(o,{useMipmap:!0}):(e.texture=new t.default$4(a,o,s.RGBA,{useMipmap:!0}),e.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),a.extTextureFilterAnisotropic&&s.texParameterf(s.TEXTURE_2D,a.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,a.extTextureFilterAnisotropicMax)),e.state="loaded",r(null)}}))},r.prototype.abortTile=function(t,e){t.request&&(t.request.cancel(),delete t.request),e()},r.prototype.unloadTile=function(t,e){t.texture&&this.map.painter.saveTileTexture(t.texture),e()},r.prototype.hasTransition=function(){return!1},r}(t.Evented),j=function(e){function r(r,i,n,o){e.call(this,r,i,n,o),this.type="raster-dem",this.maxzoom=22,this._options=t.extend({},i),this.encoding=i.encoding||"mapbox"}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},r.prototype.loadTile=function(e,r){var i=_(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(i,t.ResourceType.Tile),function(i,n){if(delete e.request,e.aborted)e.state="unloaded",r(null);else if(i)e.state="errored",r(i);else if(n){this.map._refreshExpiredTiles&&e.setExpiryData(n),delete n.cacheControl,delete n.expires;var o=t.default$2.getImageData(n),a={uid:e.uid,coord:e.tileID,source:this.id,rawImageData:o,encoding:this.encoding};e.workerID&&"expired"!==e.state||(e.workerID=this.dispatcher.send("loadDEMTile",a,function(t,i){t&&(e.state="errored",r(t));i&&(e.dem=i,e.needsHillshadePrepare=!0,e.state="loaded",r(null))}.bind(this)))}}.bind(this)),e.neighboringTiles=this._getNeighboringTiles(e.tileID)},r.prototype._getNeighboringTiles=function(e){var r=e.canonical,i=Math.pow(2,r.z),n=(r.x-1+i)%i,o=0===r.x?e.wrap-1:e.wrap,a=(r.x+1+i)%i,s=r.x+1===i?e.wrap+1:e.wrap,l={};return l[new t.OverscaledTileID(e.overscaledZ,o,r.z,n,r.y).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,a,r.y).key]={backfilled:!1},r.y>0&&(l[new t.OverscaledTileID(e.overscaledZ,o,r.z,n,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,a,r.y-1).key]={backfilled:!1}),r.y+1<i&&(l[new t.OverscaledTileID(e.overscaledZ,o,r.z,n,r.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,a,r.y+1).key]={backfilled:!1}),l},r.prototype.unloadTile=function(t){t.demTexture&&this.map.painter.saveTileTexture(t.demTexture),t.fbo&&(t.fbo.destroy(),delete t.fbo),t.dem&&delete t.dem,delete t.neighboringTiles,t.state="unloaded",this.dispatcher.send("removeDEMTile",{uid:t.uid,source:this.id},void 0,t.workerID)},r}(N),U=function(e){function r(r,i,n,o){e.call(this),this.id=r,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this.dispatcher=n,this.setEventedParent(o),this._data=i.data,this._options=t.extend({},i),this._collectResourceTiming=i.collectResourceTiming,this._resourceTiming=[],void 0!==i.maxzoom&&(this.maxzoom=i.maxzoom),i.type&&(this.type=i.type),i.attribution&&(this.attribution=i.attribution);var a=t.default$10/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:i.cluster||!1,geojsonVtOptions:{buffer:(void 0!==i.buffer?i.buffer:128)*a,tolerance:(void 0!==i.tolerance?i.tolerance:.375)*a,extent:t.default$10,maxZoom:this.maxzoom,lineMetrics:i.lineMetrics||!1},superclusterOptions:{maxZoom:void 0!==i.clusterMaxZoom?Math.min(i.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:t.default$10,radius:(i.clusterRadius||50)*a,log:!1}},i.workerOptions)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(r){if(r)e.fire(new t.ErrorEvent(r));else{var i={dataType:"source",sourceDataType:"metadata"};e._collectResourceTiming&&e._resourceTiming&&e._resourceTiming.length>0&&(i.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event("data",i))}}))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setData=function(e){var r=this;return this._data=e,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(e){if(e)r.fire(new t.ErrorEvent(e));else{var i={dataType:"source",sourceDataType:"content"};r._collectResourceTiming&&r._resourceTiming&&r._resourceTiming.length>0&&(i.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new t.Event("data",i))}})),this},r.prototype.getClusterExpansionZoom=function(t,e){return this.dispatcher.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},e,this.workerID),this},r.prototype.getClusterChildren=function(t,e){return this.dispatcher.send("geojson.getClusterChildren",{clusterId:t,source:this.id},e,this.workerID),this},r.prototype.getClusterLeaves=function(t,e,r,i){return this.dispatcher.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:e,offset:r},i,this.workerID),this},r.prototype._updateWorkerData=function(e){var r=this,i=t.extend({},this.workerOptions),n=this._data;"string"==typeof n?(i.request=this.map._transformRequest(t.default$2.resolveURL(n),t.ResourceType.Source),i.request.collectResourceTiming=this._collectResourceTiming):i.data=JSON.stringify(n),this.workerID=this.dispatcher.send(this.type+".loadData",i,(function(t,n){r._removed||n&&n.abandoned||(r._loaded=!0,n&&n.resourceTiming&&n.resourceTiming[r.id]&&(r._resourceTiming=n.resourceTiming[r.id].slice(0)),r.dispatcher.send(r.type+".coalesce",{source:i.source},null,r.workerID),e(t))}),this.workerID)},r.prototype.loadTile=function(e,r){var i=this,n=void 0===e.workerID?"loadTile":"reloadTile",o={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.default$2.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};e.workerID=this.dispatcher.send(n,o,(function(t,o){return e.unloadVectorData(),e.aborted?r(null):t?r(t):(e.loadVectorData(o,i.map.painter,"reloadTile"===n),r(null))}),this.workerID)},r.prototype.abortTile=function(t){t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},null,t.workerID)},r.prototype.onRemove=function(){this._removed=!0,this.dispatcher.send("removeSource",{type:this.type,source:this.id},null,this.workerID)},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),q=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};q.prototype.bind=function(t,e,r,i,n,o,a,s){this.context=t;for(var l=this.boundPaintVertexBuffers.length!==i.length,u=0;!l&&u<i.length;u++)this.boundPaintVertexBuffers[u]!==i[u]&&(l=!0);var c=!this.vao||this.boundProgram!==e||this.boundLayoutVertexBuffer!==r||l||this.boundIndexBuffer!==n||this.boundVertexOffset!==o||this.boundDynamicVertexBuffer!==a||this.boundDynamicVertexBuffer2!==s;!t.extVertexArrayObject||c?this.freshBind(e,r,i,n,o,a,s):(t.bindVertexArrayOES.set(this.vao),a&&a.bind(),n&&n.dynamicDraw&&n.bind(),s&&s.bind())},q.prototype.freshBind=function(t,e,r,i,n,o,a){var s,l=t.numAttributes,u=this.context,c=u.gl;if(u.extVertexArrayObject)this.vao&&this.destroy(),this.vao=u.extVertexArrayObject.createVertexArrayOES(),u.bindVertexArrayOES.set(this.vao),s=0,this.boundProgram=t,this.boundLayoutVertexBuffer=e,this.boundPaintVertexBuffers=r,this.boundIndexBuffer=i,this.boundVertexOffset=n,this.boundDynamicVertexBuffer=o,this.boundDynamicVertexBuffer2=a;else{s=u.currentNumAttributes||0;for(var h=l;h<s;h++)c.disableVertexAttribArray(h)}e.enableAttributes(c,t);for(var p=0,f=r;p<f.length;p+=1){f[p].enableAttributes(c,t)}o&&o.enableAttributes(c,t),a&&a.enableAttributes(c,t),e.bind(),e.setVertexAttribPointers(c,t,n);for(var d=0,m=r;d<m.length;d+=1){var y=m[d];y.bind(),y.setVertexAttribPointers(c,t,n)}o&&(o.bind(),o.setVertexAttribPointers(c,t,n)),i&&i.bind(),a&&(a.bind(),a.setVertexAttribPointers(c,t,n)),u.currentNumAttributes=l},q.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var $=function(e){function r(t,r,i,n){e.call(this),this.id=t,this.dispatcher=i,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this.setEventedParent(n),this.options=r}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._transformRequest(this.url,t.ResourceType.Image),(function(r,i){r?e.fire(new t.ErrorEvent(r)):i&&(e.image=t.default$2.getImageData(i),e._finishLoading())}))},r.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setCoordinates=function(e){this.coordinates=e;var r=this.map,i=e.map((function(t){return r.transform.locationCoordinate(B.convert(t)).zoomTo(0)})),n=this.centerCoord=t.getCoordinatesCenter(i);n.column=Math.floor(n.column),n.row=Math.floor(n.row),this.tileID=new t.CanonicalTileID(n.zoom,n.column,n.row),this.minzoom=this.maxzoom=n.zoom;var o=i.map((function(e){var r=e.zoomTo(n.zoom);return new t["default"](Math.round((r.column-n.column)*t.default$10),Math.round((r.row-n.row)*t.default$10))}));return this._boundsArray=new t.RasterBoundsArray,this._boundsArray.emplaceBack(o[0].x,o[0].y,0,0),this._boundsArray.emplaceBack(o[1].x,o[1].y,t.default$10,0),this._boundsArray.emplaceBack(o[3].x,o[3].y,0,t.default$10),this._boundsArray.emplaceBack(o[2].x,o[2].y,t.default$10,t.default$10),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})),this},r.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var e=this.map.painter.context,r=e.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,t.default$11.members)),this.boundsVAO||(this.boundsVAO=new q),this.texture||(this.texture=new t.default$4(e,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[i];"loaded"!==n.state&&(n.state="loaded",n.texture=this.texture)}}},r.prototype.loadTile=function(t,e){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},e(null)):(t.state="errored",e(null))},r.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return!1},r}(t.Evented),Z=function(e){function r(t,r,i,n){e.call(this,t,r,i,n),this.roundZoom=!0,this.type="video",this.options=r}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this,r=this.options;this.urls=[];for(var i=0,n=r.urls;i<n.length;i+=1){var o=n[i];e.urls.push(e.map._transformRequest(o,t.ResourceType.Source).url)}t.getVideo(this.urls,(function(r,i){r?e.fire(new t.ErrorEvent(r)):i&&(e.video=i,e.video.loop=!0,e.video.addEventListener("playing",(function(){e.map._rerender()})),e.map&&e.video.play(),e._finishLoading())}))},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},r.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var e=this.map.painter.context,r=e.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,t.default$11.members)),this.boundsVAO||(this.boundsVAO=new q),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new t.default$4(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[i];"loaded"!==n.state&&(n.state="loaded",n.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}($),G=function(e){function r(r,i,n,o){e.call(this,r,i,n,o),i.coordinates?Array.isArray(i.coordinates)&&4===i.coordinates.length&&!i.coordinates.some((function(t){return!Array.isArray(t)||2!==t.length||t.some((function(t){return"number"!=typeof t}))}))||this.fire(new t.ErrorEvent(new t.default$12("sources."+r,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.default$12("sources."+r,null,'missing required property "coordinates"'))),i.animate&&"boolean"!=typeof i.animate&&this.fire(new t.ErrorEvent(new t.default$12("sources."+r,null,'optional "animate" property must be a boolean value'))),i.canvas?"string"==typeof i.canvas||i.canvas instanceof t.default$1.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.default$12("sources."+r,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.default$12("sources."+r,null,'missing required property "canvas"'))),this.options=i,this.animate=void 0===i.animate||i.animate}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){this.canvas||(this.canvas=this.options.canvas instanceof t.default$1.HTMLCanvasElement?this.options.canvas:t.default$1.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map._rerender()},this.pause=function(){this._playing=!1},this._finishLoading())},r.prototype.getCanvas=function(){return this.canvas},r.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,i=r.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,t.default$11.members)),this.boundsVAO||(this.boundsVAO=new q),this.texture?e?this.texture.update(this.canvas):this._playing&&(this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE),i.texSubImage2D(i.TEXTURE_2D,0,0,0,i.RGBA,i.UNSIGNED_BYTE,this.canvas)):(this.texture=new t.default$4(r,this.canvas,i.RGBA),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE)),this.tiles){var o=this.tiles[n];"loaded"!==o.state&&(o.state="loaded",o.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];t<e.length;t+=1){var r=e[t];if(isNaN(r)||r<=0)return!0}return!1},r}($),W={vector:V,raster:N,"raster-dem":j,geojson:U,video:Z,image:$,canvas:G},X=function(e,r,i,n){var o=new W[r.type](e,r,i,n);if(o.id!==e)throw new Error("Expected Source id to be "+e+" instead of "+o.id);return t.bindAll(["load","abort","unload","serialize","prepare"],o),o};function H(t,e,r,i,n){var o=n.maxPitchScaleFactor(),a=t.tilesIn(r,o);a.sort(K);for(var s=[],l=0,u=a;l<u.length;l+=1){var c=u[l];s.push({wrappedTileID:c.tileID.wrapped().key,queryResults:c.tile.queryRenderedFeatures(e,t._state,c.queryGeometry,c.scale,i,n,o,t.transform.calculatePosMatrix(c.tileID.toUnwrapped()))})}var h=function(t){for(var e={},r={},i=0,n=t;i<n.length;i+=1){var o=n[i],a=o.queryResults,s=o.wrappedTileID,l=r[s]=r[s]||{};for(var u in a)for(var c=a[u],h=l[u]=l[u]||{},p=e[u]=e[u]||[],f=0,d=c;f<d.length;f+=1){var m=d[f];h[m.featureIndex]||(h[m.featureIndex]=!0,p.push(m.feature))}}return e}(s);for(var p in h)h[p].forEach((function(e){var r=t.getFeatureState(e.layer["source-layer"],e.id);e.source=e.layer.source,e.layer["source-layer"]&&(e.sourceLayer=e.layer["source-layer"]),e.state=r}));return h}function K(t,e){var r=t.tileID,i=e.tileID;return r.overscaledZ-i.overscaledZ||r.canonical.y-i.canonical.y||r.wrap-i.wrap||r.canonical.x-i.canonical.x}var J=function(t,e){this.max=t,this.onRemove=e,this.reset()};J.prototype.reset=function(){for(var t in this.data)for(var e=0,r=this.data[t];e<r.length;e+=1){var i=r[e];i.timeout&&clearTimeout(i.timeout),this.onRemove(i.value)}return this.data={},this.order=[],this},J.prototype.add=function(t,e,r){var i=this,n=t.wrapped().key;void 0===this.data[n]&&(this.data[n]=[]);var o={value:e,timeout:void 0};if(void 0!==r&&(o.timeout=setTimeout((function(){i.remove(t,o)}),r)),this.data[n].push(o),this.order.push(n),this.order.length>this.max){var a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this},J.prototype.has=function(t){return t.wrapped().key in this.data},J.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},J.prototype._getAndRemoveByKey=function(t){var e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value},J.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},J.prototype.remove=function(t,e){if(!this.has(t))return this;var r=t.wrapped().key,i=void 0===e?0:this.data[r].indexOf(e),n=this.data[r][i];return this.data[r].splice(i,1),n.timeout&&clearTimeout(n.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(n.value),this.order.splice(this.order.indexOf(r),1),this},J.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this};var Y=function(t,e,r){this.context=t;var i=t.gl;this.buffer=i.createBuffer(),this.dynamicDraw=Boolean(r),this.unbindVAO(),t.bindElementBuffer.set(this.buffer),i.bufferData(i.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};Y.prototype.unbindVAO=function(){this.context.extVertexArrayObject&&this.context.bindVertexArrayOES.set(null)},Y.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},Y.prototype.updateData=function(t){var e=this.context.gl;this.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},Y.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var Q={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},tt=function(t,e,r,i){this.length=e.length,this.attributes=r,this.itemSize=e.bytesPerElement,this.dynamicDraw=i,this.context=t;var n=t.gl;this.buffer=n.createBuffer(),t.bindVertexBuffer.set(this.buffer),n.bufferData(n.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};tt.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},tt.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},tt.prototype.enableAttributes=function(t,e){for(var r=0;r<this.attributes.length;r++){var i=this.attributes[r],n=e.attributes[i.name];void 0!==n&&t.enableVertexAttribArray(n)}},tt.prototype.setVertexAttribPointers=function(t,e,r){for(var i=0;i<this.attributes.length;i++){var n=this.attributes[i],o=e.attributes[n.name];void 0!==o&&t.vertexAttribPointer(o,n.components,t[Q[n.type]],!1,this.itemSize,n.offset+this.itemSize*(r||0))}},tt.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var et=function(e){this.context=e,this.current=t.default$8.transparent};et.prototype.get=function(){return this.current},et.prototype.set=function(t){var e=this.current;t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a||(this.context.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t)};var rt=function(t){this.context=t,this.current=1};rt.prototype.get=function(){return this.current},rt.prototype.set=function(t){this.current!==t&&(this.context.gl.clearDepth(t),this.current=t)};var it=function(t){this.context=t,this.current=0};it.prototype.get=function(){return this.current},it.prototype.set=function(t){this.current!==t&&(this.context.gl.clearStencil(t),this.current=t)};var nt=function(t){this.context=t,this.current=[!0,!0,!0,!0]};nt.prototype.get=function(){return this.current},nt.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]||(this.context.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t)};var ot=function(t){this.context=t,this.current=!0};ot.prototype.get=function(){return this.current},ot.prototype.set=function(t){this.current!==t&&(this.context.gl.depthMask(t),this.current=t)};var at=function(t){this.context=t,this.current=255};at.prototype.get=function(){return this.current},at.prototype.set=function(t){this.current!==t&&(this.context.gl.stencilMask(t),this.current=t)};var st=function(t){this.context=t,this.current={func:t.gl.ALWAYS,ref:0,mask:255}};st.prototype.get=function(){return this.current},st.prototype.set=function(t){var e=this.current;t.func===e.func&&t.ref===e.ref&&t.mask===e.mask||(this.context.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t)};var lt=function(t){this.context=t;var e=this.context.gl;this.current=[e.KEEP,e.KEEP,e.KEEP]};lt.prototype.get=function(){return this.current},lt.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]||(this.context.gl.stencilOp(t[0],t[1],t[2]),this.current=t)};var ut=function(t){this.context=t,this.current=!1};ut.prototype.get=function(){return this.current},ut.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t}};var ct=function(t){this.context=t,this.current=[0,1]};ct.prototype.get=function(){return this.current},ct.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]||(this.context.gl.depthRange(t[0],t[1]),this.current=t)};var ht=function(t){this.context=t,this.current=!1};ht.prototype.get=function(){return this.current},ht.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t}};var pt=function(t){this.context=t,this.current=t.gl.LESS};pt.prototype.get=function(){return this.current},pt.prototype.set=function(t){this.current!==t&&(this.context.gl.depthFunc(t),this.current=t)};var ft=function(t){this.context=t,this.current=!1};ft.prototype.get=function(){return this.current},ft.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t}};var dt=function(t){this.context=t;var e=this.context.gl;this.current=[e.ONE,e.ZERO]};dt.prototype.get=function(){return this.current},dt.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]||(this.context.gl.blendFunc(t[0],t[1]),this.current=t)};var mt=function(e){this.context=e,this.current=t.default$8.transparent};mt.prototype.get=function(){return this.current},mt.prototype.set=function(t){var e=this.current;t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a||(this.context.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t)};var yt=function(t){this.context=t,this.current=null};yt.prototype.get=function(){return this.current},yt.prototype.set=function(t){this.current!==t&&(this.context.gl.useProgram(t),this.current=t)};var vt=function(t){this.context=t,this.current=t.gl.TEXTURE0};vt.prototype.get=function(){return this.current},vt.prototype.set=function(t){this.current!==t&&(this.context.gl.activeTexture(t),this.current=t)};var gt=function(t){this.context=t;var e=this.context.gl;this.current=[0,0,e.drawingBufferWidth,e.drawingBufferHeight]};gt.prototype.get=function(){return this.current},gt.prototype.set=function(t){var e=this.current;t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]||(this.context.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t)};var _t=function(t){this.context=t,this.current=null};_t.prototype.get=function(){return this.current},_t.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t}};var xt=function(t){this.context=t,this.current=null};xt.prototype.get=function(){return this.current},xt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t}};var bt=function(t){this.context=t,this.current=null};bt.prototype.get=function(){return this.current},bt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t}};var wt=function(t){this.context=t,this.current=null};wt.prototype.get=function(){return this.current},wt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t}};var Et=function(t){this.context=t,this.current=null};Et.prototype.get=function(){return this.current},Et.prototype.set=function(t){var e=this.context.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t};var St=function(t){this.context=t,this.current=null};St.prototype.get=function(){return this.current},St.prototype.set=function(t){this.current!==t&&this.context.extVertexArrayObject&&(this.context.extVertexArrayObject.bindVertexArrayOES(t),this.current=t)};var Tt=function(t){this.context=t,this.current=4};Tt.prototype.get=function(){return this.current},Tt.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t}};var At=function(t){this.context=t,this.current=!1};At.prototype.get=function(){return this.current},At.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t}};var zt=function(t,e){this.context=t,this.current=null,this.parent=e};zt.prototype.get=function(){return this.current};var It=function(t){function e(e,r){t.call(this,e,r),this.dirty=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(this.dirty||this.current!==t){var e=this.context.gl;this.context.bindFramebuffer.set(this.parent),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}},e.prototype.setDirty=function(){this.dirty=!0},e}(zt),kt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(this.current!==t){var e=this.context.gl;this.context.bindFramebuffer.set(this.parent),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.current=t}},e}(zt),Mt=function(t,e,r){this.context=t,this.width=e,this.height=r;var i=t.gl,n=this.framebuffer=i.createFramebuffer();this.colorAttachment=new It(t,n),this.depthAttachment=new kt(t,n)};Mt.prototype.destroy=function(){var t=this.context.gl,e=this.colorAttachment.get();e&&t.deleteTexture(e);var r=this.depthAttachment.get();r&&t.deleteRenderbuffer(r),t.deleteFramebuffer(this.framebuffer)};var Ct=function(t,e,r){this.func=t,this.mask=e,this.range=r};Ct.ReadOnly=!1,Ct.ReadWrite=!0,Ct.disabled=new Ct(519,Ct.ReadOnly,[0,1]);var Pt=function(t,e,r,i,n,o){this.test=t,this.ref=e,this.mask=r,this.fail=i,this.depthFail=n,this.pass=o};Pt.disabled=new Pt({func:519,mask:0},0,0,7680,7680,7680);var Lt=function(t,e,r){this.blendFunction=t,this.blendColor=e,this.mask=r};Lt.Replace=[1,0],Lt.disabled=new Lt(Lt.Replace,t.default$8.transparent,[!1,!1,!1,!1]),Lt.unblended=new Lt(Lt.Replace,t.default$8.transparent,[!0,!0,!0,!0]),Lt.alphaBlended=new Lt([1,771],t.default$8.transparent,[!0,!0,!0,!0]);var Dt=function(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new et(this),this.clearDepth=new rt(this),this.clearStencil=new it(this),this.colorMask=new nt(this),this.depthMask=new ot(this),this.stencilMask=new at(this),this.stencilFunc=new st(this),this.stencilOp=new lt(this),this.stencilTest=new ut(this),this.depthRange=new ct(this),this.depthTest=new ht(this),this.depthFunc=new pt(this),this.blend=new ft(this),this.blendFunc=new dt(this),this.blendColor=new mt(this),this.program=new yt(this),this.activeTexture=new vt(this),this.viewport=new gt(this),this.bindFramebuffer=new _t(this),this.bindRenderbuffer=new xt(this),this.bindTexture=new bt(this),this.bindVertexBuffer=new wt(this),this.bindElementBuffer=new Et(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new St(this),this.pixelStoreUnpack=new Tt(this),this.pixelStoreUnpackPremultiplyAlpha=new At(this),this.extTextureFilterAnisotropic=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=t.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&t.getExtension("OES_texture_half_float_linear")};Dt.prototype.createIndexBuffer=function(t,e){return new Y(this,t,e)},Dt.prototype.createVertexBuffer=function(t,e,r){return new tt(this,t,e,r)},Dt.prototype.createRenderbuffer=function(t,e,r){var i=this.gl,n=i.createRenderbuffer();return this.bindRenderbuffer.set(n),i.renderbufferStorage(i.RENDERBUFFER,t,e,r),this.bindRenderbuffer.set(null),n},Dt.prototype.createFramebuffer=function(t,e){return new Mt(this,t,e)},Dt.prototype.clear=function(t){var e=t.color,r=t.depth,i=this.gl,n=0;e&&(n|=i.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==r&&(n|=i.DEPTH_BUFFER_BIT,this.clearDepth.set(r),this.depthMask.set(!0)),i.clear(n)},Dt.prototype.setDepthMode=function(t){t.func!==this.gl.ALWAYS||t.mask?(this.depthTest.set(!0),this.depthFunc.set(t.func),this.depthMask.set(t.mask),this.depthRange.set(t.range)):this.depthTest.set(!1)},Dt.prototype.setStencilMode=function(t){t.test.func!==this.gl.ALWAYS||t.mask?(this.stencilTest.set(!0),this.stencilMask.set(t.mask),this.stencilOp.set([t.fail,t.depthFail,t.pass]),this.stencilFunc.set({func:t.test.func,ref:t.ref,mask:t.test.mask})):this.stencilTest.set(!1)},Dt.prototype.setColorMode=function(e){t.default$13(e.blendFunction,Lt.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)};var Rt=function(e){function r(r,i,n){var o=this;e.call(this),this.id=r,this.dispatcher=n,this.on("data",(function(t){"source"===t.dataType&&"metadata"===t.sourceDataType&&(o._sourceLoaded=!0),o._sourceLoaded&&!o._paused&&"source"===t.dataType&&"content"===t.sourceDataType&&(o.reload(),o.transform&&o.update(o.transform))})),this.on("error",(function(){o._sourceErrored=!0})),this._source=X(r,i,n,this),this._tiles={},this._cache=new J(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._isIdRenderable=this._isIdRenderable.bind(this),this._coveredTiles={},this._state=new t.default$16}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.onAdd=function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(t)},r.prototype.onRemove=function(t){this._source&&this._source.onRemove&&this._source.onRemove(t)},r.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;for(var t in this._tiles){var e=this._tiles[t];if("loaded"!==e.state&&"errored"!==e.state)return!1}return!0},r.prototype.getSource=function(){return this._source},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){if(this._paused){var t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform)}},r.prototype._loadTile=function(t,e){return this._source.loadTile(t,e)},r.prototype._unloadTile=function(t){if(this._source.unloadTile)return this._source.unloadTile(t,(function(){}))},r.prototype._abortTile=function(t){if(this._source.abortTile)return this._source.abortTile(t,(function(){}))},r.prototype.serialize=function(){return this._source.serialize()},r.prototype.prepare=function(t){for(var e in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles)this._tiles[e].upload(t)},r.prototype.getIds=function(){var e=this;return Object.keys(this._tiles).map(Number).sort((function(r,i){var n=e._tiles[r].tileID,o=e._tiles[i].tileID,a=new t["default"](n.canonical.x,n.canonical.y).rotate(e.transform.angle),s=new t["default"](o.canonical.x,o.canonical.y).rotate(e.transform.angle);return n.overscaledZ-o.overscaledZ||s.y-a.y||s.x-a.x}))},r.prototype.getRenderableIds=function(){return this.getIds().filter(this._isIdRenderable)},r.prototype.hasRenderableParent=function(t){var e=this.findLoadedParent(t,0,{});return!!e&&this._isIdRenderable(e.tileID.key)},r.prototype._isIdRenderable=function(t){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]},r.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var t in this._cache.reset(),this._tiles)"errored"!==this._tiles[t].state&&this._reloadTile(t,"reloading")},r.prototype._reloadTile=function(t,e){var r=this._tiles[t];r&&("loading"!==r.state&&(r.state=e),this._loadTile(r,this._tileLoaded.bind(this,r,t,e)))},r.prototype._tileLoaded=function(e,r,i,n){if(n)return e.state="errored",void(404!==n.status?this._source.fire(new t.ErrorEvent(n,{tile:e})):this.update(this.transform));e.timeAdded=t.default$2.now(),"expired"===i&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),"raster-dem"===this.getSource().type&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),this._source.fire(new t.Event("data",{dataType:"source",tile:e,coord:e.tileID})),this.map&&(this.map.painter.tileExtentVAO.vao=null)},r.prototype._backfillDEM=function(t){for(var e=this.getRenderableIds(),r=0;r<e.length;r++){var i=e[r];if(t.neighboringTiles&&t.neighboringTiles[i]){var n=this.getTileByID(i);o(t,n),o(n,t)}}function o(t,e){t.needsHillshadePrepare=!0;var r=e.tileID.canonical.x-t.tileID.canonical.x,i=e.tileID.canonical.y-t.tileID.canonical.y,n=Math.pow(2,t.tileID.canonical.z),o=e.tileID.key;0===r&&0===i||Math.abs(i)>1||(Math.abs(r)>1&&(1===Math.abs(r+n)?r+=n:1===Math.abs(r-n)&&(r-=n)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,r,i),t.neighboringTiles&&t.neighboringTiles[o]&&(t.neighboringTiles[o].backfilled=!0)))}},r.prototype.getTile=function(t){return this.getTileByID(t.key)},r.prototype.getTileByID=function(t){return this._tiles[t]},r.prototype.getZoom=function(t){return t.zoom+t.scaleZoom(t.tileSize/this._source.tileSize)},r.prototype._findLoadedChildren=function(t,e,r){var i=!1;for(var n in this._tiles){var o=this._tiles[n];if(!(r[n]||!o.hasData()||o.tileID.overscaledZ<=t.overscaledZ||o.tileID.overscaledZ>e)){var a=Math.pow(2,o.tileID.canonical.z-t.canonical.z);if(Math.floor(o.tileID.canonical.x/a)===t.canonical.x&&Math.floor(o.tileID.canonical.y/a)===t.canonical.y)for(r[n]=o.tileID,i=!0;o&&o.tileID.overscaledZ-1>t.overscaledZ;){var s=o.tileID.scaledTo(o.tileID.overscaledZ-1);if(!s)break;(o=this._tiles[s.key])&&o.hasData()&&(delete r[n],r[s.key]=s)}}}return i},r.prototype.findLoadedParent=function(t,e,r){for(var i=t.overscaledZ-1;i>=e;i--){var n=t.scaledTo(i);if(!n)return;var o=String(n.key),a=this._tiles[o];if(a&&a.hasData())return r[o]=n,a;if(this._cache.has(n))return r[o]=n,this._cache.get(n)}},r.prototype.updateCacheSize=function(t){var e=(Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1),r=Math.floor(5*e),i="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(i)},r.prototype.handleWrapJump=function(t){var e=(t-(void 0===this._prevLng?t:this._prevLng))/360,r=Math.round(e);if(this._prevLng=t,r){var i={};for(var n in this._tiles){var o=this._tiles[n];o.tileID=o.tileID.unwrapTo(o.tileID.wrap+r),i[o.tileID.key]=o}for(var a in this._tiles=i,this._timers)clearTimeout(this._timers[a]),delete this._timers[a];for(var s in this._tiles){var l=this._tiles[s];this._setTileReloadTimer(s,l)}}},r.prototype.update=function(e){var i=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var n;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?n=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)})):(n=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(n=n.filter((function(t){return i._source.hasTile(t)})))):n=[];var o,a=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(e)),s=Math.max(a-r.maxOverzooming,this._source.minzoom),l=Math.max(a+r.maxUnderzooming,this._source.minzoom),u=this._updateRetainedTiles(n,a),c={};if(Ot(this._source.type))for(var h=Object.keys(u),p=0;p<h.length;p++){var f=h[p],d=u[f],m=i._tiles[f];if(m&&(void 0===m.fadeEndTime||m.fadeEndTime>=t.default$2.now())){i._findLoadedChildren(d,l,u)&&(u[f]=d);var y=i.findLoadedParent(d,s,c);y&&i._addTile(y.tileID)}}for(o in c)u[o]||(i._coveredTiles[o]=!0);for(o in c)u[o]=c[o];for(var v=t.keysDifference(this._tiles,u),g=0;g<v.length;g++)i._removeTile(v[g])}},r.prototype._updateRetainedTiles=function(t,e){for(var i={},n={},o=Math.max(e-r.maxOverzooming,this._source.minzoom),a=Math.max(e+r.maxUnderzooming,this._source.minzoom),s=0;s<t.length;s++){var l=t[s],u=this._addTile(l),c=!1;if(u.hasData())i[l.key]=l;else{c=u.wasRequested(),i[l.key]=l;var h=!0;if(e+1>this._source.maxzoom){var p=l.children(this._source.maxzoom)[0],f=this.getTile(p);f&&f.hasData()?i[p.key]=p:h=!1}else{this._findLoadedChildren(l,a,i);for(var d=l.children(this._source.maxzoom),m=0;m<d.length;m++)if(!i[d[m].key]){h=!1;break}}if(!h)for(var y=l.overscaledZ-1;y>=o;--y){var v=l.scaledTo(y);if(n[v.key])break;if(n[v.key]=!0,!(u=this.getTile(v))&&c&&(u=this._addTile(v)),u&&(i[v.key]=v,c=u.wasRequested(),u.hasData()))break}}}return i},r.prototype._addTile=function(e){var r=this._tiles[e.key];if(r)return r;(r=this._cache.getAndRemove(e))&&(this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,r)));var i=Boolean(r);return i||(r=new t.default$14(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,this._tileLoaded.bind(this,r,e.key,r.state))),r?(r.uses++,this._tiles[e.key]=r,i||this._source.fire(new t.Event("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r):null},r.prototype._setTileReloadTimer=function(t,e){var r=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);var i=e.getExpiryTimeout();i&&(this._timers[t]=setTimeout((function(){r._reloadTile(t,"expired"),delete r._timers[t]}),i))},r.prototype._removeTile=function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),e.uses>0||(e.hasData()?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},r.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},r.prototype.tilesIn=function(e,r){for(var i=[],n=this.getIds(),o=1/0,a=1/0,s=-1/0,l=-1/0,u=e[0].zoom,c=0;c<e.length;c++){var h=e[c];o=Math.min(o,h.column),a=Math.min(a,h.row),s=Math.max(s,h.column),l=Math.max(l,h.row)}for(var p=0;p<n.length;p++){var f=this._tiles[n[p]],d=f.tileID,m=Math.pow(2,this.transform.zoom-f.tileID.overscaledZ),y=r*f.queryPadding*t.default$10/f.tileSize/m,v=[Bt(d,new t.default$15(o,a,u)),Bt(d,new t.default$15(s,l,u))];if(v[0].x-y<t.default$10&&v[0].y-y<t.default$10&&v[1].x+y>=0&&v[1].y+y>=0){for(var g=[],_=0;_<e.length;_++)g.push(Bt(d,e[_]));i.push({tile:f,tileID:d,queryGeometry:[g],scale:m})}}return i},r.prototype.getVisibleCoordinates=function(){for(var t=this,e=this.getRenderableIds().map((function(e){return t._tiles[e].tileID})),r=0,i=e;r<i.length;r+=1){var n=i[r];n.posMatrix=t.transform.calculatePosMatrix(n.toUnwrapped())}return e},r.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Ot(this._source.type))for(var e in this._tiles){var r=this._tiles[e];if(void 0!==r.fadeEndTime&&r.fadeEndTime>=t.default$2.now())return!0}return!1},r.prototype.setFeatureState=function(t,e,r){t=t||"_geojsonTileLayer",this._state.updateState(t,e,r)},r.prototype.getFeatureState=function(t,e){return t=t||"_geojsonTileLayer",this._state.getState(t,e)},r}(t.Evented);function Bt(e,r){var i=r.zoomTo(e.canonical.z);return new t["default"]((i.column-(e.canonical.x+e.wrap*Math.pow(2,e.canonical.z)))*t.default$10,(i.row-e.canonical.y)*t.default$10)}function Ot(t){return"raster"===t||"image"===t||"video"===t}function Ft(){return new t.default$1.Worker(hi.workerUrl)}Rt.maxOverzooming=10,Rt.maxUnderzooming=3;var Vt,Nt=function(){this.active={}};function jt(e,r){var i={};for(var n in e)"ref"!==n&&(i[n]=e[n]);return t.default$17.forEach((function(t){t in r&&(i[t]=r[t])})),i}function Ut(t){t=t.slice();for(var e=Object.create(null),r=0;r<t.length;r++)e[t[r].id]=t[r];for(var i=0;i<t.length;i++)"ref"in t[i]&&(t[i]=jt(t[i],e[t[i].ref]));return t}Nt.prototype.acquire=function(t){if(!this.workers){var e=hi.workerCount;for(this.workers=[];this.workers.length<e;)this.workers.push(new Ft)}return this.active[t]=!0,this.workers.slice()},Nt.prototype.release=function(t){delete this.active[t],0===Object.keys(this.active).length&&(this.workers.forEach((function(t){t.terminate()})),this.workers=null)};var qt={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function $t(t,e,r){r.push({command:qt.addSource,args:[t,e[t]]})}function Zt(t,e,r){e.push({command:qt.removeSource,args:[t]}),r[t]=!0}function Gt(t,e,r,i){Zt(t,r,i),$t(t,e,r)}function Wt(e,r,i){var n;for(n in e[i])if(e[i].hasOwnProperty(n)&&"data"!==n&&!t.default$13(e[i][n],r[i][n]))return!1;for(n in r[i])if(r[i].hasOwnProperty(n)&&"data"!==n&&!t.default$13(e[i][n],r[i][n]))return!1;return!0}function Xt(e,r,i,n,o,a){var s;for(s in r=r||{},e=e||{})e.hasOwnProperty(s)&&(t.default$13(e[s],r[s])||i.push({command:a,args:[n,s,r[s],o]}));for(s in r)r.hasOwnProperty(s)&&!e.hasOwnProperty(s)&&(t.default$13(e[s],r[s])||i.push({command:a,args:[n,s,r[s],o]}))}function Ht(t){return t.id}function Kt(t,e){return t[e.id]=e,t}function Jt(e,r){if(!e)return[{command:qt.setStyle,args:[r]}];var i=[];try{if(!t.default$13(e.version,r.version))return[{command:qt.setStyle,args:[r]}];t.default$13(e.center,r.center)||i.push({command:qt.setCenter,args:[r.center]}),t.default$13(e.zoom,r.zoom)||i.push({command:qt.setZoom,args:[r.zoom]}),t.default$13(e.bearing,r.bearing)||i.push({command:qt.setBearing,args:[r.bearing]}),t.default$13(e.pitch,r.pitch)||i.push({command:qt.setPitch,args:[r.pitch]}),t.default$13(e.sprite,r.sprite)||i.push({command:qt.setSprite,args:[r.sprite]}),t.default$13(e.glyphs,r.glyphs)||i.push({command:qt.setGlyphs,args:[r.glyphs]}),t.default$13(e.transition,r.transition)||i.push({command:qt.setTransition,args:[r.transition]}),t.default$13(e.light,r.light)||i.push({command:qt.setLight,args:[r.light]});var n={},o=[];!function(e,r,i,n){var o;for(o in r=r||{},e=e||{})e.hasOwnProperty(o)&&(r.hasOwnProperty(o)||Zt(o,i,n));for(o in r)r.hasOwnProperty(o)&&(e.hasOwnProperty(o)?t.default$13(e[o],r[o])||("geojson"===e[o].type&&"geojson"===r[o].type&&Wt(e,r,o)?i.push({command:qt.setGeoJSONSourceData,args:[o,r[o].data]}):Gt(o,r,i,n)):$t(o,r,i))}(e.sources,r.sources,o,n);var a=[];e.layers&&e.layers.forEach((function(t){n[t.source]?i.push({command:qt.removeLayer,args:[t.id]}):a.push(t)})),i=i.concat(o),function(e,r,i){r=r||[];var n,o,a,s,l,u,c,h=(e=e||[]).map(Ht),p=r.map(Ht),f=e.reduce(Kt,{}),d=r.reduce(Kt,{}),m=h.slice(),y=Object.create(null);for(n=0,o=0;n<h.length;n++)a=h[n],d.hasOwnProperty(a)?o++:(i.push({command:qt.removeLayer,args:[a]}),m.splice(m.indexOf(a,o),1));for(n=0,o=0;n<p.length;n++)a=p[p.length-1-n],m[m.length-1-n]!==a&&(f.hasOwnProperty(a)?(i.push({command:qt.removeLayer,args:[a]}),m.splice(m.lastIndexOf(a,m.length-o),1)):o++,u=m[m.length-n],i.push({command:qt.addLayer,args:[d[a],u]}),m.splice(m.length-n,0,a),y[a]=!0);for(n=0;n<p.length;n++)if(s=f[a=p[n]],l=d[a],!y[a]&&!t.default$13(s,l))if(t.default$13(s.source,l.source)&&t.default$13(s["source-layer"],l["source-layer"])&&t.default$13(s.type,l.type)){for(c in Xt(s.layout,l.layout,i,a,null,qt.setLayoutProperty),Xt(s.paint,l.paint,i,a,null,qt.setPaintProperty),t.default$13(s.filter,l.filter)||i.push({command:qt.setFilter,args:[a,l.filter]}),t.default$13(s.minzoom,l.minzoom)&&t.default$13(s.maxzoom,l.maxzoom)||i.push({command:qt.setLayerZoomRange,args:[a,l.minzoom,l.maxzoom]}),s)s.hasOwnProperty(c)&&"layout"!==c&&"paint"!==c&&"filter"!==c&&"metadata"!==c&&"minzoom"!==c&&"maxzoom"!==c&&(0===c.indexOf("paint.")?Xt(s[c],l[c],i,a,c.slice(6),qt.setPaintProperty):t.default$13(s[c],l[c])||i.push({command:qt.setLayerProperty,args:[a,c,l[c]]}));for(c in l)l.hasOwnProperty(c)&&!s.hasOwnProperty(c)&&"layout"!==c&&"paint"!==c&&"filter"!==c&&"metadata"!==c&&"minzoom"!==c&&"maxzoom"!==c&&(0===c.indexOf("paint.")?Xt(s[c],l[c],i,a,c.slice(6),qt.setPaintProperty):t.default$13(s[c],l[c])||i.push({command:qt.setLayerProperty,args:[a,c,l[c]]}))}else i.push({command:qt.removeLayer,args:[a]}),u=m[m.lastIndexOf(a)+1],i.push({command:qt.addLayer,args:[l,u]})}(a,r.layers,i)}catch(t){console.warn("Unable to compute style diff:",t),i=[{command:qt.setStyle,args:[r]}]}return i}var Yt=function(t,e,r){var i=this.boxCells=[],n=this.circleCells=[];this.xCellCount=Math.ceil(t/r),this.yCellCount=Math.ceil(e/r);for(var o=0;o<this.xCellCount*this.yCellCount;o++)i.push([]),n.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=t,this.height=e,this.xScale=this.xCellCount/t,this.yScale=this.yCellCount/e,this.boxUid=0,this.circleUid=0};Yt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Yt.prototype.insert=function(t,e,r,i,n){this._forEachCell(e,r,i,n,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(i),this.bboxes.push(n)},Yt.prototype.insertCircle=function(t,e,r,i){this._forEachCell(e-i,r-i,e+i,r+i,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(r),this.circles.push(i)},Yt.prototype._insertBoxCell=function(t,e,r,i,n,o){this.boxCells[n].push(o)},Yt.prototype._insertCircleCell=function(t,e,r,i,n,o){this.circleCells[n].push(o)},Yt.prototype._query=function(t,e,r,i,n,o){if(r<0||t>this.width||i<0||e>this.height)return!n&&[];var a=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=i){if(n)return!0;for(var s=0;s<this.boxKeys.length;s++)a.push({key:this.boxKeys[s],x1:this.bboxes[4*s],y1:this.bboxes[4*s+1],x2:this.bboxes[4*s+2],y2:this.bboxes[4*s+3]});for(var l=0;l<this.circleKeys.length;l++){var u=this.circles[3*l],c=this.circles[3*l+1],h=this.circles[3*l+2];a.push({key:this.circleKeys[l],x1:u-h,y1:c-h,x2:u+h,y2:c+h})}return o?a.filter(o):a}var p={hitTest:n,seenUids:{box:{},circle:{}}};return this._forEachCell(t,e,r,i,this._queryCell,a,p,o),n?a.length>0:a},Yt.prototype._queryCircle=function(t,e,r,i,n){var o=t-r,a=t+r,s=e-r,l=e+r;if(a<0||o>this.width||l<0||s>this.height)return!i&&[];var u=[],c={hitTest:i,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(o,s,a,l,this._queryCellCircle,u,c,n),i?u.length>0:u},Yt.prototype.query=function(t,e,r,i,n){return this._query(t,e,r,i,!1,n)},Yt.prototype.hitTest=function(t,e,r,i,n){return this._query(t,e,r,i,!0,n)},Yt.prototype.hitTestCircle=function(t,e,r,i){return this._queryCircle(t,e,r,!0,i)},Yt.prototype._queryCell=function(t,e,r,i,n,o,a,s){var l=a.seenUids,u=this.boxCells[n];if(null!==u)for(var c=this.bboxes,h=0,p=u;h<p.length;h+=1){var f=p[h];if(!l.box[f]){l.box[f]=!0;var d=4*f;if(t<=c[d+2]&&e<=c[d+3]&&r>=c[d+0]&&i>=c[d+1]&&(!s||s(this.boxKeys[f]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[f],x1:c[d],y1:c[d+1],x2:c[d+2],y2:c[d+3]})}}}var m=this.circleCells[n];if(null!==m)for(var y=this.circles,v=0,g=m;v<g.length;v+=1){var _=g[v];if(!l.circle[_]){l.circle[_]=!0;var x=3*_;if(this._circleAndRectCollide(y[x],y[x+1],y[x+2],t,e,r,i)&&(!s||s(this.circleKeys[_]))){if(a.hitTest)return o.push(!0),!0;var b=y[x],w=y[x+1],E=y[x+2];o.push({key:this.circleKeys[_],x1:b-E,y1:w-E,x2:b+E,y2:w+E})}}}},Yt.prototype._queryCellCircle=function(t,e,r,i,n,o,a,s){var l=a.circle,u=a.seenUids,c=this.boxCells[n];if(null!==c)for(var h=this.bboxes,p=0,f=c;p<f.length;p+=1){var d=f[p];if(!u.box[d]){u.box[d]=!0;var m=4*d;if(this._circleAndRectCollide(l.x,l.y,l.radius,h[m+0],h[m+1],h[m+2],h[m+3])&&(!s||s(this.boxKeys[d])))return o.push(!0),!0}}var y=this.circleCells[n];if(null!==y)for(var v=this.circles,g=0,_=y;g<_.length;g+=1){var x=_[g];if(!u.circle[x]){u.circle[x]=!0;var b=3*x;if(this._circlesCollide(v[b],v[b+1],v[b+2],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[x])))return o.push(!0),!0}}},Yt.prototype._forEachCell=function(t,e,r,i,n,o,a,s){for(var l=this._convertToXCellCoord(t),u=this._convertToYCellCoord(e),c=this._convertToXCellCoord(r),h=this._convertToYCellCoord(i),p=l;p<=c;p++)for(var f=u;f<=h;f++){var d=this.xCellCount*f+p;if(n.call(this,t,e,r,i,d,o,a,s))return}},Yt.prototype._convertToXCellCoord=function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))},Yt.prototype._convertToYCellCoord=function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))},Yt.prototype._circlesCollide=function(t,e,r,i,n,o){var a=i-t,s=n-e,l=r+o;return l*l>a*a+s*s},Yt.prototype._circleAndRectCollide=function(t,e,r,i,n,o,a){var s=(o-i)/2,l=Math.abs(t-(i+s));if(l>s+r)return!1;var u=(a-n)/2,c=Math.abs(e-(n+u));if(c>u+r)return!1;if(l<=s||c<=u)return!0;var h=l-s,p=c-u;return h*h+p*p<=r*r};var Qt=t.default$18.layout;function te(e,r,i,n,o){var a=t.identity(new Float32Array(16));return r?(t.identity(a),t.scale(a,a,[1/o,1/o,1]),i||t.rotateZ(a,a,n.angle)):(t.scale(a,a,[n.width/2,-n.height/2,1]),t.translate(a,a,[1,-1,0]),t.multiply(a,a,e)),a}function ee(e,r,i,n,o){var a=t.identity(new Float32Array(16));return r?(t.multiply(a,a,e),t.scale(a,a,[o,o,1]),i||t.rotateZ(a,a,-n.angle)):(t.scale(a,a,[1,-1,1]),t.translate(a,a,[-1,-1,0]),t.scale(a,a,[2/n.width,2/n.height,1])),a}function re(e,r){var i=[e.x,e.y,0,1];pe(i,i,r);var n=i[3];return{point:new t["default"](i[0]/n,i[1]/n),signedDistanceFromCamera:n}}function ie(t,e){var r=t[0]/t[3],i=t[1]/t[3];return r>=-e[0]&&r<=e[0]&&i>=-e[1]&&i<=e[1]}function ne(e,r,i,n,o,a,s,l){var u=n?e.textSizeData:e.iconSizeData,c=t.evaluateSizeForZoom(u,i.transform.zoom,Qt.properties[n?"text-size":"icon-size"]),h=[256/i.width*2+1,256/i.height*2+1],p=n?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;p.clear();for(var f=e.lineVertexArray,d=n?e.text.placedSymbolArray:e.icon.placedSymbolArray,m=i.transform.width/i.transform.height,y=!1,v=0;v<d.length;v++){var g=d.get(v);if(g.hidden||g.writingMode===t.WritingMode.vertical&&!y)he(g.numGlyphs,p);else{y=!1;var _=[g.anchorX,g.anchorY,0,1];if(t.transformMat4(_,_,r),ie(_,h)){var x=.5+_[3]/i.transform.cameraToCenterDistance*.5,b=t.evaluateSizeForFeature(u,c,g),w=s?b*x:b/x,E=new t["default"](g.anchorX,g.anchorY),S=re(E,o).point,T={},A=se(g,w,!1,l,r,o,a,e.glyphOffsetArray,f,p,S,E,T,m);y=A.useVertical,(A.notEnoughRoom||y||A.needsFlipping&&se(g,w,!0,l,r,o,a,e.glyphOffsetArray,f,p,S,E,T,m).notEnoughRoom)&&he(g.numGlyphs,p)}else he(g.numGlyphs,p)}}n?e.text.dynamicLayoutVertexBuffer.updateData(p):e.icon.dynamicLayoutVertexBuffer.updateData(p)}function oe(t,e,r,i,n,o,a,s,l,u,c,h){var p=s.glyphStartIndex+s.numGlyphs,f=s.lineStartIndex,d=s.lineStartIndex+s.lineLength,m=e.getoffsetX(s.glyphStartIndex),y=e.getoffsetX(p-1),v=ue(t*m,r,i,n,o,a,s.segment,f,d,l,u,c,h);if(!v)return null;var g=ue(t*y,r,i,n,o,a,s.segment,f,d,l,u,c,h);return g?{first:v,last:g}:null}function ae(e,r,i,n){if(e===t.WritingMode.horizontal&&Math.abs(i.y-r.y)>Math.abs(i.x-r.x)*n)return{useVertical:!0};return(e===t.WritingMode.vertical?r.y<i.y:r.x>i.x)?{needsFlipping:!0}:null}function se(e,r,i,n,o,a,s,l,u,c,h,p,f,d){var m,y=r/24,v=e.lineOffsetX*r,g=e.lineOffsetY*r;if(e.numGlyphs>1){var _=e.glyphStartIndex+e.numGlyphs,x=e.lineStartIndex,b=e.lineStartIndex+e.lineLength,w=oe(y,l,v,g,i,h,p,e,u,a,f,!1);if(!w)return{notEnoughRoom:!0};var E=re(w.first.point,s).point,S=re(w.last.point,s).point;if(n&&!i){var T=ae(e.writingMode,E,S,d);if(T)return T}m=[w.first];for(var A=e.glyphStartIndex+1;A<_-1;A++)m.push(ue(y*l.getoffsetX(A),v,g,i,h,p,e.segment,x,b,u,a,f,!1));m.push(w.last)}else{if(n&&!i){var z=re(p,o).point,I=e.lineStartIndex+e.segment+1,k=new t["default"](u.getx(I),u.gety(I)),M=re(k,o),C=M.signedDistanceFromCamera>0?M.point:le(p,k,z,1,o),P=ae(e.writingMode,z,C,d);if(P)return P}var L=ue(y*l.getoffsetX(e.glyphStartIndex),v,g,i,h,p,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,u,a,f,!1);if(!L)return{notEnoughRoom:!0};m=[L]}for(var D=0,R=m;D<R.length;D+=1){var B=R[D];t.addDynamicAttributes(c,B.point,B.angle)}return{}}function le(t,e,r,i,n){var o=re(t.add(t.sub(e)._unit()),n).point,a=r.sub(o);return r.add(a._mult(i/a.mag()))}function ue(e,r,i,n,o,a,s,l,u,c,h,p,f){var d=n?e-r:e+r,m=d>0?1:-1,y=0;n&&(m*=-1,y=Math.PI),m<0&&(y+=Math.PI);for(var v=m>0?l+s:l+s+1,g=v,_=o,x=o,b=0,w=0,E=Math.abs(d);b+w<=E;){if((v+=m)<l||v>=u)return null;if(x=_,void 0===(_=p[v])){var S=new t["default"](c.getx(v),c.gety(v)),T=re(S,h);if(T.signedDistanceFromCamera>0)_=p[v]=T.point;else{var A=v-m;_=le(0===b?a:new t["default"](c.getx(A),c.gety(A)),S,x,E-b+1,h)}}b+=w,w=x.dist(_)}var z=(E-b)/w,I=_.sub(x),k=I.mult(z)._add(x);return k._add(I._unit()._perp()._mult(i*m)),{point:k,angle:y+Math.atan2(_.y-x.y,_.x-x.x),tileDistance:f?{prevTileDistance:v-m===g?0:c.gettileUnitDistanceFromAnchor(v-m),lastSegmentViewportDistance:E-b}:null}}var ce=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function he(t,e){for(var r=0;r<t;r++){var i=e.length;e.resize(i+4),e.float32.set(ce,3*i)}}function pe(t,e,r){var i=e[0],n=e[1];return t[0]=r[0]*i+r[4]*n+r[12],t[1]=r[1]*i+r[5]*n+r[13],t[3]=r[3]*i+r[7]*n+r[15],t}var fe=function(t,e,r){void 0===e&&(e=new Yt(t.width+200,t.height+200,25)),void 0===r&&(r=new Yt(t.width+200,t.height+200,25)),this.transform=t,this.grid=e,this.ignoredGrid=r,this.pitchfactor=Math.cos(t._pitch)*t.cameraToCenterDistance,this.screenRightBoundary=t.width+100,this.screenBottomBoundary=t.height+100,this.gridRightBoundary=t.width+200,this.gridBottomBoundary=t.height+200};function de(t,e,r){t[e+4]=r?1:0}function me(e,r,i){return r*(t.default$10/(e.tileSize*Math.pow(2,i-e.tileID.overscaledZ)))}fe.prototype.placeCollisionBox=function(t,e,r,i,n){var o=this.projectAndGetPerspectiveRatio(i,t.anchorPointX,t.anchorPointY),a=r*o.perspectiveRatio,s=t.x1*a+o.point.x,l=t.y1*a+o.point.y,u=t.x2*a+o.point.x,c=t.y2*a+o.point.y;return!this.isInsideGrid(s,l,u,c)||!e&&this.grid.hitTest(s,l,u,c,n)?{box:[],offscreen:!1}:{box:[s,l,u,c],offscreen:this.isOffscreen(s,l,u,c)}},fe.prototype.approximateTileDistance=function(t,e,r,i,n){var o=n?1:i/this.pitchfactor,a=t.lastSegmentViewportDistance*r;return t.prevTileDistance+a+(o-1)*a*Math.abs(Math.sin(e))},fe.prototype.placeCollisionCircles=function(e,r,i,n,o,a,s,l,u,c,h,p,f,d){var m=[],y=this.projectAnchor(c,a.anchorX,a.anchorY),v=u/24,g=a.lineOffsetX*u,_=a.lineOffsetY*u,x=new t["default"](a.anchorX,a.anchorY),b=oe(v,l,g,_,!1,re(x,h).point,x,a,s,h,{},!0),w=!1,E=!1,S=!0,T=y.perspectiveRatio*n,A=1/(n*i),z=0,I=0;b&&(z=this.approximateTileDistance(b.first.tileDistance,b.first.angle,A,y.cameraDistance,f),I=this.approximateTileDistance(b.last.tileDistance,b.last.angle,A,y.cameraDistance,f));for(var k=0;k<e.length;k+=5){var M=e[k],C=e[k+1],P=e[k+2],L=e[k+3];if(!b||L<-z||L>I)de(e,k,!1);else{var D=this.projectPoint(c,M,C),R=P*T;if(m.length>0){var B=D.x-m[m.length-4],O=D.y-m[m.length-3];if(R*R*2>B*B+O*O)if(k+8<e.length){var F=e[k+8];if(F>-z&&F<I){de(e,k,!1);continue}}}var V=k/5;m.push(D.x,D.y,R,V),de(e,k,!0);var N=D.x-R,j=D.y-R,U=D.x+R,q=D.y+R;if(S=S&&this.isOffscreen(N,j,U,q),E=E||this.isInsideGrid(N,j,U,q),!r&&this.grid.hitTestCircle(D.x,D.y,R,d)){if(!p)return{circles:[],offscreen:!1};w=!0}}}return{circles:w||!E?[]:m,offscreen:S}},fe.prototype.queryRenderedSymbols=function(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var r=[],i=1/0,n=1/0,o=-1/0,a=-1/0,s=0,l=e;s<l.length;s+=1){var u=l[s],c=new t["default"](u.x+100,u.y+100);i=Math.min(i,c.x),n=Math.min(n,c.y),o=Math.max(o,c.x),a=Math.max(a,c.y),r.push(c)}for(var h={},p={},f=0,d=this.grid.query(i,n,o,a).concat(this.ignoredGrid.query(i,n,o,a));f<d.length;f+=1){var m=d[f],y=m.key;if(void 0===h[y.bucketInstanceId]&&(h[y.bucketInstanceId]={}),!h[y.bucketInstanceId][y.featureIndex]){var v=[new t["default"](m.x1,m.y1),new t["default"](m.x2,m.y1),new t["default"](m.x2,m.y2),new t["default"](m.x1,m.y2)];t.polygonIntersectsPolygon(r,v)&&(h[y.bucketInstanceId][y.featureIndex]=!0,void 0===p[y.bucketInstanceId]&&(p[y.bucketInstanceId]=[]),p[y.bucketInstanceId].push(y.featureIndex))}}return p},fe.prototype.insertCollisionBox=function(t,e,r,i,n){var o={bucketInstanceId:r,featureIndex:i,collisionGroupID:n};(e?this.ignoredGrid:this.grid).insert(o,t[0],t[1],t[2],t[3])},fe.prototype.insertCollisionCircles=function(t,e,r,i,n){for(var o=e?this.ignoredGrid:this.grid,a={bucketInstanceId:r,featureIndex:i,collisionGroupID:n},s=0;s<t.length;s+=4)o.insertCircle(a,t[s],t[s+1],t[s+2])},fe.prototype.projectAnchor=function(t,e,r){var i=[e,r,0,1];return pe(i,i,t),{perspectiveRatio:.5+this.transform.cameraToCenterDistance/i[3]*.5,cameraDistance:i[3]}},fe.prototype.projectPoint=function(e,r,i){var n=[r,i,0,1];return pe(n,n,e),new t["default"]((n[0]/n[3]+1)/2*this.transform.width+100,(-n[1]/n[3]+1)/2*this.transform.height+100)},fe.prototype.projectAndGetPerspectiveRatio=function(e,r,i){var n=[r,i,0,1];return pe(n,n,e),{point:new t["default"]((n[0]/n[3]+1)/2*this.transform.width+100,(-n[1]/n[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5}},fe.prototype.isOffscreen=function(t,e,r,i){return r<100||t>=this.screenRightBoundary||i<100||e>this.screenBottomBoundary},fe.prototype.isInsideGrid=function(t,e,r,i){return r>=0&&t<this.gridRightBoundary&&i>=0&&e<this.gridBottomBoundary};var ye=t.default$18.layout,ve=function(t,e,r,i){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?e:-e))):i&&r?1:0,this.placed=r};ve.prototype.isHidden=function(){return 0===this.opacity&&!this.placed};var ge=function(t,e,r,i,n){this.text=new ve(t?t.text:null,e,r,n),this.icon=new ve(t?t.icon:null,e,i,n)};ge.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var _e=function(t,e,r){this.text=t,this.icon=e,this.skipFade=r},xe=function(t){this.crossSourceCollisions=t,this.maxGroupID=0,this.collisionGroups={}};xe.prototype.get=function(t){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[t]){var e=++this.maxGroupID;this.collisionGroups[t]={ID:e,predicate:function(t){return t.collisionGroupID===e}}}return this.collisionGroups[t]};var be=function(t,e,r){this.transform=t.clone(),this.collisionIndex=new fe(this.transform),this.placements={},this.opacities={},this.stale=!1,this.fadeDuration=e,this.retainedQueryData={},this.collisionGroups=new xe(r)};function we(t,e,r){t.emplaceBack(e?1:0,r?1:0),t.emplaceBack(e?1:0,r?1:0),t.emplaceBack(e?1:0,r?1:0),t.emplaceBack(e?1:0,r?1:0)}be.prototype.placeLayerTile=function(e,r,i,n){var o=r.getBucket(e),a=r.latestFeatureIndex;if(o&&a&&e.id===o.layerIds[0]){var s=r.collisionBoxArray,l=o.layers[0].layout,u=Math.pow(2,this.transform.zoom-r.tileID.overscaledZ),c=r.tileSize/t.default$10,h=this.transform.calculatePosMatrix(r.tileID.toUnwrapped()),p=te(h,"map"===l.get("text-pitch-alignment"),"map"===l.get("text-rotation-alignment"),this.transform,me(r,1,this.transform.zoom)),f=te(h,"map"===l.get("icon-pitch-alignment"),"map"===l.get("icon-rotation-alignment"),this.transform,me(r,1,this.transform.zoom));this.retainedQueryData[o.bucketInstanceId]=new function(t,e,r,i,n){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=r,this.bucketIndex=i,this.tileID=n}(o.bucketInstanceId,a,o.sourceLayerIndex,o.index,r.tileID),this.placeLayerBucket(o,h,p,f,u,c,i,n,s)}},be.prototype.placeLayerBucket=function(e,r,i,n,o,a,s,l,u){for(var c=e.layers[0].layout,h=t.evaluateSizeForZoom(e.textSizeData,this.transform.zoom,ye.properties["text-size"]),p=!e.hasTextData()||c.get("text-optional"),f=!e.hasIconData()||c.get("icon-optional"),d=this.collisionGroups.get(e.sourceID),m=0,y=e.symbolInstances;m<y.length;m+=1){var v=y[m];if(!l[v.crossTileID]){var g=void 0!==v.feature.text,_=void 0!==v.feature.icon,x=!0,b=null,w=null,E=null,S=0,T=0;v.collisionArrays||(v.collisionArrays=e.deserializeCollisionBoxes(u,v.textBoxStartIndex,v.textBoxEndIndex,v.iconBoxStartIndex,v.iconBoxEndIndex)),v.collisionArrays.textFeatureIndex&&(S=v.collisionArrays.textFeatureIndex),v.collisionArrays.textBox&&(g=(b=this.collisionIndex.placeCollisionBox(v.collisionArrays.textBox,c.get("text-allow-overlap"),a,r,d.predicate)).box.length>0,x=x&&b.offscreen);var A=v.collisionArrays.textCircles;if(A){var z=e.text.placedSymbolArray.get(v.placedTextSymbolIndices[0]),I=t.evaluateSizeForFeature(e.textSizeData,h,z);w=this.collisionIndex.placeCollisionCircles(A,c.get("text-allow-overlap"),o,a,v.key,z,e.lineVertexArray,e.glyphOffsetArray,I,r,i,s,"map"===c.get("text-pitch-alignment"),d.predicate),g=c.get("text-allow-overlap")||w.circles.length>0,x=x&&w.offscreen}v.collisionArrays.iconFeatureIndex&&(T=v.collisionArrays.iconFeatureIndex),v.collisionArrays.iconBox&&(_=(E=this.collisionIndex.placeCollisionBox(v.collisionArrays.iconBox,c.get("icon-allow-overlap"),a,r,d.predicate)).box.length>0,x=x&&E.offscreen),p||f?f?p||(_=_&&g):g=_&&g:_=g=_&&g,g&&b&&this.collisionIndex.insertCollisionBox(b.box,c.get("text-ignore-placement"),e.bucketInstanceId,S,d.ID),_&&E&&this.collisionIndex.insertCollisionBox(E.box,c.get("icon-ignore-placement"),e.bucketInstanceId,T,d.ID),g&&w&&this.collisionIndex.insertCollisionCircles(w.circles,c.get("text-ignore-placement"),e.bucketInstanceId,S,d.ID),this.placements[v.crossTileID]=new _e(g,_,x||e.justReloaded),l[v.crossTileID]=!0}}e.justReloaded=!1},be.prototype.commit=function(t,e){this.commitTime=e;var r=!1,i=t&&0!==this.fadeDuration?(this.commitTime-t.commitTime)/this.fadeDuration:1,n=t?t.opacities:{};for(var o in this.placements){var a=this.placements[o],s=n[o];s?(this.opacities[o]=new ge(s,i,a.text,a.icon),r=r||a.text!==s.text.placed||a.icon!==s.icon.placed):(this.opacities[o]=new ge(null,i,a.text,a.icon,a.skipFade),r=r||a.text||a.icon)}for(var l in n){var u=n[l];if(!this.opacities[l]){var c=new ge(u,i,!1,!1);c.isHidden()||(this.opacities[l]=c,r=r||u.text.placed||u.icon.placed)}}r?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)},be.prototype.updateLayerOpacities=function(t,e){for(var r={},i=0,n=e;i<n.length;i+=1){var o=n[i],a=o.getBucket(t);a&&o.latestFeatureIndex&&t.id===a.layerIds[0]&&this.updateBucketOpacities(a,r,o.collisionBoxArray)}},be.prototype.updateBucketOpacities=function(t,e,r){t.hasTextData()&&t.text.opacityVertexArray.clear(),t.hasIconData()&&t.icon.opacityVertexArray.clear(),t.hasCollisionBoxData()&&t.collisionBox.collisionVertexArray.clear(),t.hasCollisionCircleData()&&t.collisionCircle.collisionVertexArray.clear();for(var i=t.layers[0].layout,n=new ge(null,0,!1,!1,!0),o=new ge(null,0,i.get("text-allow-overlap"),i.get("icon-allow-overlap"),!0),a=0;a<t.symbolInstances.length;a++){var s=t.symbolInstances[a],l=e[s.crossTileID],u=this.opacities[s.crossTileID];l?u=n:u||(u=o,this.opacities[s.crossTileID]=u),e[s.crossTileID]=!0;var c=s.numGlyphVertices>0||s.numVerticalGlyphVertices>0,h=s.numIconVertices>0;if(c){for(var p=Me(u.text),f=(s.numGlyphVertices+s.numVerticalGlyphVertices)/4,d=0;d<f;d++)t.text.opacityVertexArray.emplaceBack(p);for(var m=0,y=s.placedTextSymbolIndices;m<y.length;m+=1){var v=y[m];t.text.placedSymbolArray.get(v).hidden=u.text.isHidden()}}if(h){for(var g=Me(u.icon),_=0;_<s.numIconVertices/4;_++)t.icon.opacityVertexArray.emplaceBack(g);t.icon.placedSymbolArray.get(a).hidden=u.icon.isHidden()}s.collisionArrays||(s.collisionArrays=t.deserializeCollisionBoxes(r,s.textBoxStartIndex,s.textBoxEndIndex,s.iconBoxStartIndex,s.iconBoxEndIndex));var x=s.collisionArrays;if(x){x.textBox&&t.hasCollisionBoxData()&&we(t.collisionBox.collisionVertexArray,u.text.placed,!1),x.iconBox&&t.hasCollisionBoxData()&&we(t.collisionBox.collisionVertexArray,u.icon.placed,!1);var b=x.textCircles;if(b&&t.hasCollisionCircleData())for(var w=0;w<b.length;w+=5){var E=l||0===b[w+4];we(t.collisionCircle.collisionVertexArray,u.text.placed,E)}}}t.sortFeatures(this.transform.angle),this.retainedQueryData[t.bucketInstanceId]&&(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasCollisionBoxData()&&t.collisionBox.collisionVertexBuffer&&t.collisionBox.collisionVertexBuffer.updateData(t.collisionBox.collisionVertexArray),t.hasCollisionCircleData()&&t.collisionCircle.collisionVertexBuffer&&t.collisionCircle.collisionVertexBuffer.updateData(t.collisionCircle.collisionVertexArray)},be.prototype.symbolFadeChange=function(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration},be.prototype.hasTransitions=function(t){return this.stale||t-this.lastPlacementChangeTime<this.fadeDuration},be.prototype.stillRecent=function(t){return"undefined"!==this.commitTime&&this.commitTime+this.fadeDuration>t},be.prototype.setStale=function(){this.stale=!0};var Ee=Math.pow(2,25),Se=Math.pow(2,24),Te=Math.pow(2,17),Ae=Math.pow(2,16),ze=Math.pow(2,9),Ie=Math.pow(2,8),ke=Math.pow(2,1);function Me(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,r=Math.floor(127*t.opacity);return r*Ee+e*Se+r*Te+e*Ae+r*ze+e*Ie+r*ke+e}var Ce=function(){this._currentTileIndex=0,this._seenCrossTileIDs={}};Ce.prototype.continuePlacement=function(t,e,r,i,n){for(;this._currentTileIndex<t.length;){var o=t[this._currentTileIndex];if(e.placeLayerTile(i,o,r,this._seenCrossTileIDs),this._currentTileIndex++,n())return!0}};var Pe=function(t,e,r,i,n,o){this.placement=new be(t,n,o),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=r,this._showCollisionBoxes=i,this._done=!1};Pe.prototype.isDone=function(){return this._done},Pe.prototype.continuePlacement=function(e,r,i){for(var n=this,o=t.default$2.now(),a=function(){var e=t.default$2.now()-o;return!n._forceFullPlacement&&e>2};this._currentPlacementIndex>=0;){var s=r[e[n._currentPlacementIndex]],l=n.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(n._inProgressLayer||(n._inProgressLayer=new Ce),n._inProgressLayer.continuePlacement(i[s.source],n.placement,n._showCollisionBoxes,s,a))return;delete n._inProgressLayer}n._currentPlacementIndex--}this._done=!0},Pe.prototype.commit=function(t,e){return this.placement.commit(t,e),this.placement};var Le=512/t.default$10/2,De=function(t,e,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var i=0,n=e;i<n.length;i+=1){var o=n[i],a=o.key;this.indexedSymbolInstances[a]||(this.indexedSymbolInstances[a]=[]),this.indexedSymbolInstances[a].push({crossTileID:o.crossTileID,coord:this.getScaledCoordinates(o,t)})}};De.prototype.getScaledCoordinates=function(e,r){var i=r.canonical.z-this.tileID.canonical.z,n=Le/Math.pow(2,i),o=e.anchor;return{x:Math.floor((r.canonical.x*t.default$10+o.x)*n),y:Math.floor((r.canonical.y*t.default$10+o.y)*n)}},De.prototype.findMatches=function(t,e,r){for(var i=this.tileID.canonical.z<e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-e.canonical.z),n=0,o=t;n<o.length;n+=1){var a=o[n];if(!a.crossTileID){var s=this.indexedSymbolInstances[a.key];if(s)for(var l=this.getScaledCoordinates(a,e),u=0,c=s;u<c.length;u+=1){var h=c[u];if(Math.abs(h.coord.x-l.x)<=i&&Math.abs(h.coord.y-l.y)<=i&&!r[h.crossTileID]){r[h.crossTileID]=!0,a.crossTileID=h.crossTileID;break}}}}};var Re=function(){this.maxCrossTileID=0};Re.prototype.generate=function(){return++this.maxCrossTileID};var Be=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};Be.prototype.handleWrapJump=function(t){var e=Math.round((t-this.lng)/360);if(0!==e)for(var r in this.indexes){var i=this.indexes[r],n={};for(var o in i){var a=i[o];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+e),n[a.tileID.key]=a}this.indexes[r]=n}this.lng=t},Be.prototype.addBucket=function(t,e,r){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===e.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(var i=0,n=e.symbolInstances;i<n.length;i+=1){n[i].crossTileID=0}this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]={});var o=this.usedCrossTileIDs[t.overscaledZ];for(var a in this.indexes){var s=this.indexes[a];if(Number(a)>t.overscaledZ)for(var l in s){var u=s[l];u.tileID.isChildOf(t)&&u.findMatches(e.symbolInstances,t,o)}else{var c=s[t.scaledTo(Number(a)).key];c&&c.findMatches(e.symbolInstances,t,o)}}for(var h=0,p=e.symbolInstances;h<p.length;h+=1){var f=p[h];f.crossTileID||(f.crossTileID=r.generate(),o[f.crossTileID]=!0)}return void 0===this.indexes[t.overscaledZ]&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new De(t,e.symbolInstances,e.bucketInstanceId),!0},Be.prototype.removeBucketCrossTileIDs=function(t,e){for(var r in e.indexedSymbolInstances)for(var i=0,n=e.indexedSymbolInstances[r];i<n.length;i+=1){var o=n[i];delete this.usedCrossTileIDs[t][o.crossTileID]}},Be.prototype.removeStaleBuckets=function(t){var e=!1;for(var r in this.indexes){var i=this.indexes[r];for(var n in i)t[i[n].bucketInstanceId]||(this.removeBucketCrossTileIDs(r,i[n]),delete i[n],e=!0)}return e};var Oe=function(){this.layerIndexes={},this.crossTileIDs=new Re,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Oe.prototype.addLayer=function(t,e,r){var i=this.layerIndexes[t.id];void 0===i&&(i=this.layerIndexes[t.id]=new Be);var n=!1,o={};i.handleWrapJump(r);for(var a=0,s=e;a<s.length;a+=1){var l=s[a],u=l.getBucket(t);u&&t.id===u.layerIds[0]&&(u.bucketInstanceId||(u.bucketInstanceId=++this.maxBucketInstanceId),i.addBucket(l.tileID,u,this.crossTileIDs)&&(n=!0),o[u.bucketInstanceId]=!0)}return i.removeStaleBuckets(o)&&(n=!0),n},Oe.prototype.pruneUnusedLayers=function(t){var e={};for(var r in t.forEach((function(t){e[t]=!0})),this.layerIndexes)e[r]||delete this.layerIndexes[r]};var Fe=function(e,r){return t.emitValidationErrors(e,r&&r.filter((function(t){return"source.canvas"!==t.identifier})))},Ve=t.pick(qt,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Ne=t.pick(qt,["setCenter","setZoom","setBearing","setPitch"]),je=function(e){function r(i,n){var o=this;void 0===n&&(n={}),e.call(this),this.map=i,this.dispatcher=new D((Vt||(Vt=new Nt),Vt),this),this.imageManager=new E,this.glyphManager=new k(i._transformRequest,n.localIdeographFontFamily),this.lineAtlas=new L(256,512),this.crossTileSymbolIndex=new Oe,this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.default$21,this._loaded=!1,this._resetUpdates();var a=this;this._rtlTextPluginCallback=r.registerForPluginAvailability((function(t){for(var e in a.dispatcher.broadcast("loadRTLTextPlugin",t.pluginURL,t.completionCallback),a.sourceCaches)a.sourceCaches[e].reload()})),this.on("data",(function(t){if("source"===t.dataType&&"metadata"===t.sourceDataType){var e=o.sourceCaches[t.sourceId];if(e){var r=e.getSource();if(r&&r.vectorLayerIds)for(var i in o._layers){var n=o._layers[i];n.source===r.id&&o._validateLayer(n)}}}}))}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadURL=function(e,r){var i=this;void 0===r&&(r={}),this.fire(new t.Event("dataloading",{dataType:"style"}));var n="boolean"==typeof r.validate?r.validate:!d(e);e=function(t,e){if(!d(t))return t;var r=b(t);return r.path="/styles/v1"+r.path,f(r,e)}(e,r.accessToken);var o=this.map._transformRequest(e,t.ResourceType.Style);this._request=t.getJSON(o,(function(e,r){i._request=null,e?i.fire(new t.ErrorEvent(e)):r&&i._load(r,n)}))},r.prototype.loadJSON=function(e,r){var i=this;void 0===r&&(r={}),this.fire(new t.Event("dataloading",{dataType:"style"})),this._request=t.default$2.frame((function(){i._request=null,i._load(e,!1!==r.validate)}))},r.prototype._load=function(e,r){var i=this;if(!r||!Fe(this,t.validateStyle(e))){for(var n in this._loaded=!0,this.stylesheet=e,e.sources)i.addSource(n,e.sources[n],{validate:!1});e.sprite?this._spriteRequest=function(e,r,i){var n,o,a,s=t.default$2.devicePixelRatio>1?"@2x":"",l=t.getJSON(r(v(e,s,".json"),t.ResourceType.SpriteJSON),(function(t,e){l=null,a||(a=t,n=e,c())})),u=t.getImage(r(v(e,s,".png"),t.ResourceType.SpriteImage),(function(t,e){u=null,a||(a=t,o=e,c())}));function c(){if(a)i(a);else if(n&&o){var e=t.default$2.getImageData(o),r={};for(var s in n){var l=n[s],u=l.width,c=l.height,h=l.x,p=l.y,f=l.sdf,d=l.pixelRatio,m=new t.RGBAImage({width:u,height:c});t.RGBAImage.copy(e,m,{x:h,y:p},{x:0,y:0},{width:u,height:c}),r[s]={data:m,pixelRatio:d,sdf:f}}i(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),u&&(u.cancel(),u=null)}}}(e.sprite,this.map._transformRequest,(function(e,r){if(i._spriteRequest=null,e)i.fire(new t.ErrorEvent(e));else if(r)for(var n in r)i.imageManager.addImage(n,r[n]);i.imageManager.setLoaded(!0),i.fire(new t.Event("data",{dataType:"style"}))})):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var o=Ut(this.stylesheet.layers);this._order=o.map((function(t){return t.id})),this._layers={};for(var a=0,s=o;a<s.length;a+=1){var l=s[a];(l=t.default$20(l)).setEventedParent(i,{layer:{id:l.id}}),i._layers[l.id]=l}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new P(this.stylesheet.light),this.fire(new t.Event("data",{dataType:"style"})),this.fire(new t.Event("style.load"))}},r.prototype._validateLayer=function(e){var r=this.sourceCaches[e.source];if(r){var i=e.sourceLayer;if(i){var n=r.getSource();("geojson"===n.type||n.vectorLayerIds&&-1===n.vectorLayerIds.indexOf(i))&&this.fire(new t.ErrorEvent(new Error('Source layer "'+i+'" does not exist on source "'+n.id+'" as specified by style layer "'+e.id+'"')))}}},r.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()},r.prototype._serializeLayers=function(t){var e=this;return t.map((function(t){return e._layers[t].serialize()}))},r.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var t in this.sourceCaches)if(this.sourceCaches[t].hasTransition())return!0;for(var e in this._layers)if(this._layers[e].hasTransition())return!0;return!1},r.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},r.prototype.update=function(e){if(this._loaded){if(this._changed){var r=Object.keys(this._updatedLayers),i=Object.keys(this._removedLayers);for(var n in(r.length||i.length)&&this._updateWorkerLayers(r,i),this._updatedSources){var o=this._updatedSources[n];"reload"===o?this._reloadSource(n):"clear"===o&&this._clearSource(n)}for(var a in this._updatedPaintProps)this._layers[a].updateTransitions(e);this.light.updateTransitions(e),this._resetUpdates(),this.fire(new t.Event("data",{dataType:"style"}))}for(var s in this.sourceCaches)this.sourceCaches[s].used=!1;for(var l=0,u=this._order;l<u.length;l+=1){var c=u[l],h=this._layers[c];h.recalculate(e),!h.isHidden(e.zoom)&&h.source&&(this.sourceCaches[h.source].used=!0)}this.light.recalculate(e),this.z=e.zoom}},r.prototype._updateWorkerLayers=function(t,e){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:e})},r.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={}},r.prototype.setState=function(e){var r=this;if(this._checkLoaded(),Fe(this,t.validateStyle(e)))return!1;(e=t.clone(e)).layers=Ut(e.layers);var i=Jt(this.serialize(),e).filter((function(t){return!(t.command in Ne)}));if(0===i.length)return!1;var n=i.filter((function(t){return!(t.command in Ve)}));if(n.length>0)throw new Error("Unimplemented: "+n.map((function(t){return t.command})).join(", ")+".");return i.forEach((function(t){"setTransition"!==t.command&&r[t.command].apply(r,t.args)})),this.stylesheet=e,!0},r.prototype.addImage=function(e,r){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,r),this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.getImage=function(t){return this.imageManager.getImage(t)},r.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(e),this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(e,r,i){var n=this;if(this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error("There is already a source with this ID");if(!r.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(r).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(r.type)>=0)||!this._validate(t.validateStyle.source,"sources."+e,r,null,i)){this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);var o=this.sourceCaches[e]=new Rt(e,r,this.dispatcher);o.style=this,o.setEventedParent(this,(function(){return{isSourceLoaded:n.loaded(),source:o.serialize(),sourceId:e}})),o.onAdd(this.map),this._changed=!0}},r.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(var r in this._layers)if(this._layers[r].source===e)return this.fire(new t.ErrorEvent(new Error('Source "'+e+'" cannot be removed while layer "'+r+'" is using it.')));var i=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],i.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),i.setEventedParent(null),i.clearTiles(),i.onRemove&&i.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},r.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},r.prototype.addLayer=function(e,r,i){this._checkLoaded();var n=e.id;if(this.getLayer(n))this.fire(new t.ErrorEvent(new Error('Layer with id "'+n+'" already exists on this map')));else if("object"==typeof e.source&&(this.addSource(n,e.source),e=t.clone(e),e=t.extend(e,{source:n})),!this._validate(t.validateStyle.layer,"layers."+n,e,{arrayIndex:-1},i)){var o=t.default$20(e);this._validateLayer(o),o.setEventedParent(this,{layer:{id:n}});var a=r?this._order.indexOf(r):this._order.length;if(r&&-1===a)this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.')));else{if(this._order.splice(a,0,n),this._layerOrderChanged=!0,this._layers[n]=o,this._removedLayers[n]&&o.source){var s=this._removedLayers[n];delete this._removedLayers[n],s.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",this.sourceCaches[o.source].pause())}this._updateLayer(o)}}},r.prototype.moveLayer=function(e,r){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==r){var i=this._order.indexOf(e);this._order.splice(i,1);var n=r?this._order.indexOf(r):this._order.length;r&&-1===n?this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.'))):(this._order.splice(n,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be moved.")))},r.prototype.removeLayer=function(e){this._checkLoaded();var r=this._layers[e];if(r){r.setEventedParent(null);var i=this._order.indexOf(e);this._order.splice(i,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e]}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be removed.")))},r.prototype.getLayer=function(t){return this._layers[t]},r.prototype.setLayerZoomRange=function(e,r,i){this._checkLoaded();var n=this.getLayer(e);n?n.minzoom===r&&n.maxzoom===i||(null!=r&&(n.minzoom=r),null!=i&&(n.maxzoom=i),this._updateLayer(n)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot have zoom extent.")))},r.prototype.setFilter=function(e,r){this._checkLoaded();var i=this.getLayer(e);if(i){if(!t.default$13(i.filter,r))return null==r?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(t.validateStyle.filter,"layers."+i.id+".filter",r)||(i.filter=t.clone(r),this._updateLayer(i)))}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")))},r.prototype.getFilter=function(e){return t.clone(this.getLayer(e).filter)},r.prototype.setLayoutProperty=function(e,r,i){this._checkLoaded();var n=this.getLayer(e);n?t.default$13(n.getLayoutProperty(r),i)||(n.setLayoutProperty(r,i),this._updateLayer(n)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getLayoutProperty=function(t,e){return this.getLayer(t).getLayoutProperty(e)},r.prototype.setPaintProperty=function(e,r,i){this._checkLoaded();var n=this.getLayer(e);n?t.default$13(n.getPaintProperty(r),i)||(n.setPaintProperty(r,i)&&this._updateLayer(n),this._changed=!0,this._updatedPaintProps[e]=!0):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},r.prototype.setFeatureState=function(e,r){this._checkLoaded();var i=e.source,n=e.sourceLayer,o=this.sourceCaches[i];void 0!==o?"vector"!==o.getSource().type||n?o.setFeatureState(n,e.id,r):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types."))):this.fire(new t.ErrorEvent(new Error("The source '"+i+"' does not exist in the map's style.")))},r.prototype.getFeatureState=function(e){this._checkLoaded();var r=e.source,i=e.sourceLayer,n=this.sourceCaches[r];if(void 0!==n){if("vector"!==n.getSource().type||i)return n.getFeatureState(i,e.id);this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},r.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){var e=this;return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,(function(t){return t.serialize()})),layers:this._order.map((function(t){return e._layers[t].serialize()}))},(function(t){return void 0!==t}))},r.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._changed=!0},r.prototype._flattenRenderedFeatures=function(t){for(var e=[],r=this._order.length-1;r>=0;r--)for(var i=this._order[r],n=0,o=t;n<o.length;n+=1){var a=o[n][i];if(a)for(var s=0,l=a;s<l.length;s+=1){var u=l[s];e.push(u)}}return e},r.prototype.queryRenderedFeatures=function(e,r,i){r&&r.filter&&this._validate(t.validateStyle.filter,"queryRenderedFeatures.filter",r.filter);var n={};if(r&&r.layers){if(!Array.isArray(r.layers))return this.fire(new t.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var o=0,a=r.layers;o<a.length;o+=1){var s=a[o],l=this._layers[s];if(!l)return this.fire(new t.ErrorEvent(new Error("The layer '"+s+"' does not exist in the map's style and cannot be queried for features."))),[];n[l.source]=!0}}var u=[];for(var c in this.sourceCaches)r.layers&&!n[c]||u.push(H(this.sourceCaches[c],this._layers,e.worldCoordinate,r,i));return this.placement&&u.push(function(t,e,r,i,n,o){for(var a={},s=n.queryRenderedSymbols(r),l=[],u=0,c=Object.keys(s).map(Number);u<c.length;u+=1){var h=c[u];l.push(o[h])}l.sort(K);for(var p=function(){var e=d[f],r=e.featureIndex.lookupSymbolFeatures(s[e.bucketInstanceId],e.bucketIndex,e.sourceLayerIndex,i.filter,i.layers,t);for(var n in r){var o=a[n]=a[n]||[],l=r[n];l.sort((function(t,r){var i=e.featureSortOrder;if(i){var n=i.indexOf(t.featureIndex);return i.indexOf(r.featureIndex)-n}return r.featureIndex-t.featureIndex}));for(var u=0,c=l;u<c.length;u+=1){var h=c[u];o.push(h.feature)}}},f=0,d=l;f<d.length;f+=1)p();var m=function(r){a[r].forEach((function(i){var n=t[r],o=e[n.source].getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source,i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]),i.state=o}))};for(var y in a)m(y);return a}(this._layers,this.sourceCaches,e.viewport,r,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenRenderedFeatures(u)},r.prototype.querySourceFeatures=function(e,r){r&&r.filter&&this._validate(t.validateStyle.filter,"querySourceFeatures.filter",r.filter);var i=this.sourceCaches[e];return i?function(t,e){for(var r=t.getRenderableIds().map((function(e){return t.getTileByID(e)})),i=[],n={},o=0;o<r.length;o++){var a=r[o],s=a.tileID.canonical.key;n[s]||(n[s]=!0,a.querySourceFeatures(i,e))}return i}(i,r):[]},r.prototype.addSourceType=function(t,e,i){return r.getSourceType(t)?i(new Error('A source type called "'+t+'" already exists.')):(r.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:e.workerSourceURL},i):i(null,null))},r.prototype.getLight=function(){return this.light.getLight()},r.prototype.setLight=function(e){this._checkLoaded();var r=this.light.getLight(),i=!1;for(var n in e)if(!t.default$13(e[n],r[n])){i=!0;break}if(i){var o={now:t.default$2.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e),this.light.updateTransitions(o)}},r.prototype._validate=function(e,r,i,n,o){return(!o||!1!==o.validate)&&Fe(this,e.call(t.validateStyle,t.extend({key:r,style:this.serialize(),value:i,styleSpec:t.default$7},n)))},r.prototype._remove=function(){for(var e in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),t.evented.off("pluginAvailable",this._rtlTextPluginCallback),this.sourceCaches)this.sourceCaches[e].clearTiles();this.dispatcher.remove()},r.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},r.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()},r.prototype._updateSources=function(t){for(var e in this.sourceCaches)this.sourceCaches[e].update(t)},r.prototype._generateCollisionBoxes=function(){for(var t in this.sourceCaches)this._reloadSource(t)},r.prototype._updatePlacement=function(e,r,i,n){for(var o=!1,a=!1,s={},l=0,u=this._order;l<u.length;l+=1){var c=u[l],h=this._layers[c];if("symbol"===h.type){if(!s[h.source]){var p=this.sourceCaches[h.source];s[h.source]=p.getRenderableIds().map((function(t){return p.getTileByID(t)})).sort((function(t,e){return e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)}))}var f=this.crossTileSymbolIndex.addLayer(h,s[h.source],e.center.lng);o=o||f}}this.crossTileSymbolIndex.pruneUnusedLayers(this._order);var d=this._layerOrderChanged;if((d||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(t.default$2.now()))&&(this.pauseablePlacement=new Pe(e,this._order,d,r,i,n),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,s),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(this.placement,t.default$2.now()),a=!0),o&&this.pauseablePlacement.placement.setStale()),a||o)for(var m=0,y=this._order;m<y.length;m+=1){var v=y[m],g=this._layers[v];"symbol"===g.type&&this.placement.updateLayerOpacities(g,s[g.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(t.default$2.now())},r.prototype.getImages=function(t,e,r){this.imageManager.getImages(e.icons,r)},r.prototype.getGlyphs=function(t,e,r){this.glyphManager.getGlyphs(e.stacks,r)},r}(t.Evented);je.getSourceType=function(t){return W[t]},je.setSourceType=function(t,e){W[t]=e},je.registerForPluginAvailability=t.registerForPluginAvailability;var Ue=t.createLayout([{name:"a_pos",type:"Int16",components:2}]),qe={prelude:{fragmentSource:"#ifdef GL_ES\nprecision mediump float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n",vertexSource:"#ifdef GL_ES\nprecision highp float;\n#else\n\n#if !defined(lowp)\n#define lowp\n#endif\n\n#if !defined(mediump)\n#define mediump\n#endif\n\n#if !defined(highp)\n#define highp\n#endif\n\n#endif\n\n// Unpack a pair of values that have been packed into a single float.\n// The packed values are assumed to be 8-bit unsigned integers, and are\n// packed like so:\n// packedValue = floor(input[0]) * 256 + input[1],\nvec2 unpack_float(const float packedValue) {\n    int packedIntValue = int(packedValue);\n    int v0 = packedIntValue / 256;\n    return vec2(v0, packedIntValue - v0 * 256);\n}\n\nvec2 unpack_opacity(const float packedOpacity) {\n    int intOpacity = int(packedOpacity) / 2;\n    return vec2(float(intOpacity) / 127.0, mod(packedOpacity, 2.0));\n}\n\n// To minimize the number of attributes needed, we encode a 4-component\n// color into a pair of floats (i.e. a vec2) as follows:\n// [ floor(color.r * 255) * 256 + color.g * 255,\n//   floor(color.b * 255) * 256 + color.g * 255 ]\nvec4 decode_color(const vec2 encodedColor) {\n    return vec4(\n        unpack_float(encodedColor[0]) / 255.0,\n        unpack_float(encodedColor[1]) / 255.0\n    );\n}\n\n// Unpack a pair of paint values and interpolate between them.\nfloat unpack_mix_vec2(const vec2 packedValue, const float t) {\n    return mix(packedValue[0], packedValue[1], t);\n}\n\n// Unpack a pair of paint values and interpolate between them.\nvec4 unpack_mix_vec4(const vec4 packedColors, const float t) {\n    vec4 minColor = decode_color(vec2(packedColors[0], packedColors[1]));\n    vec4 maxColor = decode_color(vec2(packedColors[2], packedColors[3]));\n    return mix(minColor, maxColor, t);\n}\n\n// The offset depends on how many pixels are between the world origin and the edge of the tile:\n// vec2 offset = mod(pixel_coord, size)\n//\n// At high zoom levels there are a ton of pixels between the world origin and the edge of the tile.\n// The glsl spec only guarantees 16 bits of precision for highp floats. We need more than that.\n//\n// The pixel_coord is passed in as two 16 bit values:\n// pixel_coord_upper = floor(pixel_coord / 2^16)\n// pixel_coord_lower = mod(pixel_coord, 2^16)\n//\n// The offset is calculated in a series of steps that should preserve this precision:\nvec2 get_pattern_pos(const vec2 pixel_coord_upper, const vec2 pixel_coord_lower,\n    const vec2 pattern_size, const float tile_units_to_pixels, const vec2 pos) {\n\n    vec2 offset = mod(mod(mod(pixel_coord_upper, pattern_size) * 256.0, pattern_size) * 256.0 + pixel_coord_lower, pattern_size);\n    return (tile_units_to_pixels * pos + offset) / pattern_size;\n}\n"},background:{fragmentSource:"uniform vec4 u_color;\nuniform float u_opacity;\n\nvoid main() {\n    gl_FragColor = u_color * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n"},backgroundPattern:{fragmentSource:"uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\nuniform float u_opacity;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n    vec2 imagecoord = mod(v_pos_a, 1.0);\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n    vec4 color1 = texture2D(u_image, pos);\n\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n    vec4 color2 = texture2D(u_image, pos2);\n\n    gl_FragColor = mix(color1, color2, u_mix) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\n}\n"},circle:{fragmentSource:"#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\n\nvarying vec3 v_data;\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize mediump float radius\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize highp vec4 stroke_color\n    #pragma mapbox: initialize mediump float stroke_width\n    #pragma mapbox: initialize lowp float stroke_opacity\n\n    vec2 extrude = v_data.xy;\n    float extrude_length = length(extrude);\n\n    lowp float antialiasblur = v_data.z;\n    float antialiased_blur = -max(blur, antialiasblur);\n\n    float opacity_t = smoothstep(0.0, antialiased_blur, extrude_length - 1.0);\n\n    float color_t = stroke_width < 0.01 ? 0.0 : smoothstep(\n        antialiased_blur,\n        0.0,\n        extrude_length - radius / (radius + stroke_width)\n    );\n\n    gl_FragColor = opacity_t * mix(color * opacity, stroke_color * stroke_opacity, color_t);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform bool u_scale_with_map;\nuniform bool u_pitch_with_map;\nuniform vec2 u_extrude_scale;\nuniform highp float u_camera_to_center_distance;\n\nattribute vec2 a_pos;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\n\nvarying vec3 v_data;\n\nvoid main(void) {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize mediump float radius\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize highp vec4 stroke_color\n    #pragma mapbox: initialize mediump float stroke_width\n    #pragma mapbox: initialize lowp float stroke_opacity\n\n    // unencode the extrusion vector that we snuck into the a_pos vector\n    vec2 extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n\n    // multiply a_pos by 0.5, since we had it * 2 in order to sneak\n    // in extrusion data\n    vec2 circle_center = floor(a_pos * 0.5);\n    if (u_pitch_with_map) {\n        vec2 corner_position = circle_center;\n        if (u_scale_with_map) {\n            corner_position += extrude * (radius + stroke_width) * u_extrude_scale;\n        } else {\n            // Pitching the circle with the map effectively scales it with the map\n            // To counteract the effect for pitch-scale: viewport, we rescale the\n            // whole circle based on the pitch scaling effect at its central point\n            vec4 projected_center = u_matrix * vec4(circle_center, 0, 1);\n            corner_position += extrude * (radius + stroke_width) * u_extrude_scale * (projected_center.w / u_camera_to_center_distance);\n        }\n\n        gl_Position = u_matrix * vec4(corner_position, 0, 1);\n    } else {\n        gl_Position = u_matrix * vec4(circle_center, 0, 1);\n\n        if (u_scale_with_map) {\n            gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * u_camera_to_center_distance;\n        } else {\n            gl_Position.xy += extrude * (radius + stroke_width) * u_extrude_scale * gl_Position.w;\n        }\n    }\n\n    // This is a minimum blur distance that serves as a faux-antialiasing for\n    // the circle. since blur is a ratio of the circle's size and the intent is\n    // to keep the blur at roughly 1px, the two are inversely related.\n    lowp float antialiasblur = 1.0 / DEVICE_PIXEL_RATIO / (radius + stroke_width);\n\n    v_data = vec3(extrude.x, extrude.y, antialiasblur);\n}\n"},clippingMask:{fragmentSource:"void main() {\n    gl_FragColor = vec4(1.0);\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n"},heatmap:{fragmentSource:"#pragma mapbox: define highp float weight\n\nuniform highp float u_intensity;\nvarying vec2 v_extrude;\n\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\n#define GAUSS_COEF 0.3989422804014327\n\nvoid main() {\n    #pragma mapbox: initialize highp float weight\n\n    // Kernel density estimation with a Gaussian kernel of size 5x5\n    float d = -0.5 * 3.0 * 3.0 * dot(v_extrude, v_extrude);\n    float val = weight * u_intensity * GAUSS_COEF * exp(d);\n\n    gl_FragColor = vec4(val, 1.0, 1.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\n\nuniform mat4 u_matrix;\nuniform float u_extrude_scale;\nuniform float u_opacity;\nuniform float u_intensity;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_extrude;\n\n// Effective \"0\" in the kernel density texture to adjust the kernel size to;\n// this empirically chosen number minimizes artifacts on overlapping kernels\n// for typical heatmap cases (assuming clustered source)\nconst highp float ZERO = 1.0 / 255.0 / 16.0;\n\n// Gaussian kernel coefficient: 1 / sqrt(2 * PI)\n#define GAUSS_COEF 0.3989422804014327\n\nvoid main(void) {\n    #pragma mapbox: initialize highp float weight\n    #pragma mapbox: initialize mediump float radius\n\n    // unencode the extrusion vector that we snuck into the a_pos vector\n    vec2 unscaled_extrude = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\n\n    // This 'extrude' comes in ranging from [-1, -1], to [1, 1].  We'll use\n    // it to produce the vertices of a square mesh framing the point feature\n    // we're adding to the kernel density texture.  We'll also pass it as\n    // a varying, so that the fragment shader can determine the distance of\n    // each fragment from the point feature.\n    // Before we do so, we need to scale it up sufficiently so that the\n    // kernel falls effectively to zero at the edge of the mesh.\n    // That is, we want to know S such that\n    // weight * u_intensity * GAUSS_COEF * exp(-0.5 * 3.0^2 * S^2) == ZERO\n    // Which solves to:\n    // S = sqrt(-2.0 * log(ZERO / (weight * u_intensity * GAUSS_COEF))) / 3.0\n    float S = sqrt(-2.0 * log(ZERO / weight / u_intensity / GAUSS_COEF)) / 3.0;\n\n    // Pass the varying in units of radius\n    v_extrude = S * unscaled_extrude;\n\n    // Scale by radius and the zoom-based scale factor to produce actual\n    // mesh position\n    vec2 extrude = v_extrude * radius * u_extrude_scale;\n\n    // multiply a_pos by 0.5, since we had it * 2 in order to sneak\n    // in extrusion data\n    vec4 pos = vec4(floor(a_pos * 0.5) + extrude, 0, 1);\n\n    gl_Position = u_matrix * pos;\n}\n"},heatmapTexture:{fragmentSource:"uniform sampler2D u_image;\nuniform sampler2D u_color_ramp;\nuniform float u_opacity;\nvarying vec2 v_pos;\n\nvoid main() {\n    float t = texture2D(u_image, v_pos).r;\n    vec4 color = texture2D(u_color_ramp, vec2(t, 0.5));\n    gl_FragColor = color * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(0.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_world;\nattribute vec2 a_pos;\nvarying vec2 v_pos;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\n\n    v_pos.x = a_pos.x;\n    v_pos.y = 1.0 - a_pos.y;\n}\n"},collisionBox:{fragmentSource:"\nvarying float v_placed;\nvarying float v_notUsed;\n\nvoid main() {\n\n    float alpha = 0.5;\n\n    // Red = collision, hide label\n    gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n\n    // Blue = no collision, label is showing\n    if (v_placed > 0.5) {\n        gl_FragColor = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\n    }\n\n    if (v_notUsed > 0.5) {\n        // This box not used, fade it out\n        gl_FragColor *= .1;\n    }\n}",vertexSource:"attribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_placed;\n\nuniform mat4 u_matrix;\nuniform vec2 u_extrude_scale;\nuniform float u_camera_to_center_distance;\n\nvarying float v_placed;\nvarying float v_notUsed;\n\nvoid main() {\n    vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n    highp float camera_to_anchor_distance = projectedPoint.w;\n    highp float collision_perspective_ratio = clamp(\n        0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\n        0.0, // Prevents oversized near-field boxes in pitched/overzoomed tiles\n        4.0);\n\n    gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\n    gl_Position.xy += a_extrude * u_extrude_scale * gl_Position.w * collision_perspective_ratio;\n\n    v_placed = a_placed.x;\n    v_notUsed = a_placed.y;\n}\n"},collisionCircle:{fragmentSource:"uniform float u_overscale_factor;\n\nvarying float v_placed;\nvarying float v_notUsed;\nvarying float v_radius;\nvarying vec2 v_extrude;\nvarying vec2 v_extrude_scale;\n\nvoid main() {\n    float alpha = 0.5;\n\n    // Red = collision, hide label\n    vec4 color = vec4(1.0, 0.0, 0.0, 1.0) * alpha;\n\n    // Blue = no collision, label is showing\n    if (v_placed > 0.5) {\n        color = vec4(0.0, 0.0, 1.0, 0.5) * alpha;\n    }\n\n    if (v_notUsed > 0.5) {\n        // This box not used, fade it out\n        color *= .2;\n    }\n\n    float extrude_scale_length = length(v_extrude_scale);\n    float extrude_length = length(v_extrude) * extrude_scale_length;\n    float stroke_width = 15.0 * extrude_scale_length / u_overscale_factor;\n    float radius = v_radius * extrude_scale_length;\n\n    float distance_to_edge = abs(extrude_length - radius);\n    float opacity_t = smoothstep(-stroke_width, 0.0, -distance_to_edge);\n\n    gl_FragColor = opacity_t * color;\n}\n",vertexSource:"attribute vec2 a_pos;\nattribute vec2 a_anchor_pos;\nattribute vec2 a_extrude;\nattribute vec2 a_placed;\n\nuniform mat4 u_matrix;\nuniform vec2 u_extrude_scale;\nuniform float u_camera_to_center_distance;\n\nvarying float v_placed;\nvarying float v_notUsed;\nvarying float v_radius;\n\nvarying vec2 v_extrude;\nvarying vec2 v_extrude_scale;\n\nvoid main() {\n    vec4 projectedPoint = u_matrix * vec4(a_anchor_pos, 0, 1);\n    highp float camera_to_anchor_distance = projectedPoint.w;\n    highp float collision_perspective_ratio = clamp(\n        0.5 + 0.5 * (u_camera_to_center_distance / camera_to_anchor_distance),\n        0.0, // Prevents oversized near-field circles in pitched/overzoomed tiles\n        4.0);\n\n    gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);\n\n    highp float padding_factor = 1.2; // Pad the vertices slightly to make room for anti-alias blur\n    gl_Position.xy += a_extrude * u_extrude_scale * padding_factor * gl_Position.w * collision_perspective_ratio;\n\n    v_placed = a_placed.x;\n    v_notUsed = a_placed.y;\n    v_radius = abs(a_extrude.y); // We don't pitch the circles, so both units of the extrusion vector are equal in magnitude to the radius\n\n    v_extrude = a_extrude * padding_factor;\n    v_extrude_scale = u_extrude_scale * u_camera_to_center_distance * collision_perspective_ratio;\n}\n"},debug:{fragmentSource:"uniform highp vec4 u_color;\n\nvoid main() {\n    gl_FragColor = u_color;\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n"},fill:{fragmentSource:"#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float opacity\n\n    gl_FragColor = color * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float opacity\n\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n}\n"},fillOutline:{fragmentSource:"#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_pos;\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 outline_color\n    #pragma mapbox: initialize lowp float opacity\n\n    float dist = length(v_pos - gl_FragCoord.xy);\n    float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n    gl_FragColor = outline_color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"attribute vec2 a_pos;\n\nuniform mat4 u_matrix;\nuniform vec2 u_world;\n\nvarying vec2 v_pos;\n\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 outline_color\n    #pragma mapbox: initialize lowp float opacity\n\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n    v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},fillOutlinePattern:{fragmentSource:"uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    vec2 imagecoord = mod(v_pos_a, 1.0);\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n    vec4 color1 = texture2D(u_image, pos);\n\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n    vec4 color2 = texture2D(u_image, pos2);\n\n    // find distance to outline for alpha interpolation\n\n    float dist = length(v_pos - gl_FragCoord.xy);\n    float alpha = 1.0 - smoothstep(0.0, 1.0, dist);\n\n\n    gl_FragColor = mix(color1, color2, u_mix) * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_world;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec2 v_pos;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\n\n    v_pos = (gl_Position.xy / gl_Position.w + 1.0) / 2.0 * u_world;\n}\n"},fillPattern:{fragmentSource:"uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    vec2 imagecoord = mod(v_pos_a, 1.0);\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n    vec4 color1 = texture2D(u_image, pos);\n\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n    vec4 color2 = texture2D(u_image, pos2);\n\n    gl_FragColor = mix(color1, color2, u_mix) * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\n\nattribute vec2 a_pos;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\n\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, a_pos);\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, a_pos);\n}\n"},fillExtrusion:{fragmentSource:"varying vec4 v_color;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define highp vec4 color\n\nvoid main() {\n    #pragma mapbox: initialize lowp float base\n    #pragma mapbox: initialize lowp float height\n    #pragma mapbox: initialize highp vec4 color\n\n    gl_FragColor = v_color;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\n\nattribute vec2 a_pos;\nattribute vec4 a_normal_ed;\n\nvarying vec4 v_color;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n\n#pragma mapbox: define highp vec4 color\n\nvoid main() {\n    #pragma mapbox: initialize lowp float base\n    #pragma mapbox: initialize lowp float height\n    #pragma mapbox: initialize highp vec4 color\n\n    vec3 normal = a_normal_ed.xyz;\n\n    base = max(0.0, base);\n    height = max(0.0, height);\n\n    float t = mod(normal.x, 2.0);\n\n    gl_Position = u_matrix * vec4(a_pos, t > 0.0 ? height : base, 1);\n\n    // Relative luminance (how dark/bright is the surface color?)\n    float colorvalue = color.r * 0.2126 + color.g * 0.7152 + color.b * 0.0722;\n\n    v_color = vec4(0.0, 0.0, 0.0, 1.0);\n\n    // Add slight ambient lighting so no extrusions are totally black\n    vec4 ambientlight = vec4(0.03, 0.03, 0.03, 1.0);\n    color += ambientlight;\n\n    // Calculate cos(theta), where theta is the angle between surface normal and diffuse light ray\n    float directional = clamp(dot(normal / 16384.0, u_lightpos), 0.0, 1.0);\n\n    // Adjust directional so that\n    // the range of values for highlight/shading is narrower\n    // with lower light intensity\n    // and with lighter/brighter surface colors\n    directional = mix((1.0 - u_lightintensity), max((1.0 - colorvalue + u_lightintensity), 1.0), directional);\n\n    // Add gradient along z axis of side surfaces\n    if (normal.y != 0.0) {\n        directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\n    }\n\n    // Assign final color based on surface + ambient light color, diffuse light directional, and light color\n    // with lower bounds adjusted to hue of light\n    // so that shading is tinted with the complementary (opposite) color to the light color\n    v_color.r += clamp(color.r * directional * u_lightcolor.r, mix(0.0, 0.3, 1.0 - u_lightcolor.r), 1.0);\n    v_color.g += clamp(color.g * directional * u_lightcolor.g, mix(0.0, 0.3, 1.0 - u_lightcolor.g), 1.0);\n    v_color.b += clamp(color.b * directional * u_lightcolor.b, mix(0.0, 0.3, 1.0 - u_lightcolor.b), 1.0);\n}\n"},fillExtrusionPattern:{fragmentSource:"uniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_mix;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n\nvoid main() {\n    #pragma mapbox: initialize lowp float base\n    #pragma mapbox: initialize lowp float height\n\n    vec2 imagecoord = mod(v_pos_a, 1.0);\n    vec2 pos = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, imagecoord);\n    vec4 color1 = texture2D(u_image, pos);\n\n    vec2 imagecoord_b = mod(v_pos_b, 1.0);\n    vec2 pos2 = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, imagecoord_b);\n    vec4 color2 = texture2D(u_image, pos2);\n\n    vec4 mixedColor = mix(color1, color2, u_mix);\n\n    gl_FragColor = mixedColor * v_lighting;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pixel_coord_upper;\nuniform vec2 u_pixel_coord_lower;\nuniform float u_scale_a;\nuniform float u_scale_b;\nuniform float u_tile_units_to_pixels;\nuniform float u_height_factor;\n\nuniform vec3 u_lightcolor;\nuniform lowp vec3 u_lightpos;\nuniform lowp float u_lightintensity;\n\nattribute vec2 a_pos;\nattribute vec4 a_normal_ed;\n\nvarying vec2 v_pos_a;\nvarying vec2 v_pos_b;\nvarying vec4 v_lighting;\nvarying float v_directional;\n\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n\nvoid main() {\n    #pragma mapbox: initialize lowp float base\n    #pragma mapbox: initialize lowp float height\n\n    vec3 normal = a_normal_ed.xyz;\n    float edgedistance = a_normal_ed.w;\n\n    base = max(0.0, base);\n    height = max(0.0, height);\n\n    float t = mod(normal.x, 2.0);\n    float z = t > 0.0 ? height : base;\n\n    gl_Position = u_matrix * vec4(a_pos, z, 1);\n\n    vec2 pos = normal.x == 1.0 && normal.y == 0.0 && normal.z == 16384.0\n        ? a_pos // extrusion top\n        : vec2(edgedistance, z * u_height_factor); // extrusion side\n\n    v_pos_a = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_a * u_pattern_size_a, u_tile_units_to_pixels, pos);\n    v_pos_b = get_pattern_pos(u_pixel_coord_upper, u_pixel_coord_lower, u_scale_b * u_pattern_size_b, u_tile_units_to_pixels, pos);\n\n    v_lighting = vec4(0.0, 0.0, 0.0, 1.0);\n    float directional = clamp(dot(normal / 16383.0, u_lightpos), 0.0, 1.0);\n    directional = mix((1.0 - u_lightintensity), max((0.5 + u_lightintensity), 1.0), directional);\n\n    if (normal.y != 0.0) {\n        directional *= clamp((t + base) * pow(height / 150.0, 0.5), mix(0.7, 0.98, 1.0 - u_lightintensity), 1.0);\n    }\n\n    v_lighting.rgb += clamp(directional * u_lightcolor, mix(vec3(0.0), vec3(0.3), 1.0 - u_lightcolor), vec3(1.0));\n}\n"},extrusionTexture:{fragmentSource:"uniform sampler2D u_image;\nuniform float u_opacity;\nvarying vec2 v_pos;\n\nvoid main() {\n    gl_FragColor = texture2D(u_image, v_pos) * u_opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(0.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_world;\nattribute vec2 a_pos;\nvarying vec2 v_pos;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos * u_world, 0, 1);\n\n    v_pos.x = a_pos.x;\n    v_pos.y = 1.0 - a_pos.y;\n}\n"},hillshadePrepare:{fragmentSource:"#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform sampler2D u_image;\nvarying vec2 v_pos;\nuniform vec2 u_dimension;\nuniform float u_zoom;\nuniform float u_maxzoom;\n\nfloat getElevation(vec2 coord, float bias) {\n    // Convert encoded elevation value to meters\n    vec4 data = texture2D(u_image, coord) * 255.0;\n    return (data.r + data.g * 256.0 + data.b * 256.0 * 256.0) / 4.0;\n}\n\nvoid main() {\n    vec2 epsilon = 1.0 / u_dimension;\n\n    // queried pixels:\n    // +-----------+\n    // |   |   |   |\n    // | a | b | c |\n    // |   |   |   |\n    // +-----------+\n    // |   |   |   |\n    // | d | e | f |\n    // |   |   |   |\n    // +-----------+\n    // |   |   |   |\n    // | g | h | i |\n    // |   |   |   |\n    // +-----------+\n\n    float a = getElevation(v_pos + vec2(-epsilon.x, -epsilon.y), 0.0);\n    float b = getElevation(v_pos + vec2(0, -epsilon.y), 0.0);\n    float c = getElevation(v_pos + vec2(epsilon.x, -epsilon.y), 0.0);\n    float d = getElevation(v_pos + vec2(-epsilon.x, 0), 0.0);\n    float e = getElevation(v_pos, 0.0);\n    float f = getElevation(v_pos + vec2(epsilon.x, 0), 0.0);\n    float g = getElevation(v_pos + vec2(-epsilon.x, epsilon.y), 0.0);\n    float h = getElevation(v_pos + vec2(0, epsilon.y), 0.0);\n    float i = getElevation(v_pos + vec2(epsilon.x, epsilon.y), 0.0);\n\n    // here we divide the x and y slopes by 8 * pixel size\n    // where pixel size (aka meters/pixel) is:\n    // circumference of the world / (pixels per tile * number of tiles)\n    // which is equivalent to: 8 * 40075016.6855785 / (512 * pow(2, u_zoom))\n    // which can be reduced to: pow(2, 19.25619978527 - u_zoom)\n    // we want to vertically exaggerate the hillshading though, because otherwise\n    // it is barely noticeable at low zooms. to do this, we multiply this by some\n    // scale factor pow(2, (u_zoom - u_maxzoom) * a) where a is an arbitrary value\n    // Here we use a=0.3 which works out to the expression below. see \n    // nickidlugash's awesome breakdown for more info\n    // https://github.com/mapbox/mapbox-gl-js/pull/5286#discussion_r148419556\n    float exaggeration = u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;\n\n    vec2 deriv = vec2(\n        (c + f + f + i) - (a + d + d + g),\n        (g + h + h + i) - (a + b + b + c)\n    ) /  pow(2.0, (u_zoom - u_maxzoom) * exaggeration + 19.2562 - u_zoom);\n\n    gl_FragColor = clamp(vec4(\n        deriv.x / 2.0 + 0.5,\n        deriv.y / 2.0 + 0.5,\n        1.0,\n        1.0), 0.0, 1.0);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n    v_pos = (a_texture_pos / 8192.0) / 2.0 + 0.25;\n}\n"},hillshade:{fragmentSource:"uniform sampler2D u_image;\nvarying vec2 v_pos;\n\nuniform vec2 u_latrange;\nuniform vec2 u_light;\nuniform vec4 u_shadow;\nuniform vec4 u_highlight;\nuniform vec4 u_accent;\n\n#define PI 3.141592653589793\n\nvoid main() {\n    vec4 pixel = texture2D(u_image, v_pos);\n\n    vec2 deriv = ((pixel.rg * 2.0) - 1.0);\n\n    // We divide the slope by a scale factor based on the cosin of the pixel's approximate latitude\n    // to account for mercator projection distortion. see #4807 for details\n    float scaleFactor = cos(radians((u_latrange[0] - u_latrange[1]) * (1.0 - v_pos.y) + u_latrange[1]));\n    // We also multiply the slope by an arbitrary z-factor of 1.25\n    float slope = atan(1.25 * length(deriv) / scaleFactor);\n    float aspect = deriv.x != 0.0 ? atan(deriv.y, -deriv.x) : PI / 2.0 * (deriv.y > 0.0 ? 1.0 : -1.0);\n\n    float intensity = u_light.x;\n    // We add PI to make this property match the global light object, which adds PI/2 to the light's azimuthal\n    // position property to account for 0deg corresponding to north/the top of the viewport in the style spec\n    // and the original shader was written to accept (-illuminationDirection - 90) as the azimuthal.\n    float azimuth = u_light.y + PI;\n\n    // We scale the slope exponentially based on intensity, using a calculation similar to\n    // the exponential interpolation function in the style spec:\n    // https://github.com/mapbox/mapbox-gl-js/blob/master/src/style-spec/expression/definitions/interpolate.js#L217-L228\n    // so that higher intensity values create more opaque hillshading.\n    float base = 1.875 - intensity * 1.75;\n    float maxValue = 0.5 * PI;\n    float scaledSlope = intensity != 0.5 ? ((pow(base, slope) - 1.0) / (pow(base, maxValue) - 1.0)) * maxValue : slope;\n\n    // The accent color is calculated with the cosine of the slope while the shade color is calculated with the sine\n    // so that the accent color's rate of change eases in while the shade color's eases out.\n    float accent = cos(scaledSlope);\n    // We multiply both the accent and shade color by a clamped intensity value\n    // so that intensities >= 0.5 do not additionally affect the color values\n    // while intensity values < 0.5 make the overall color more transparent.\n    vec4 accent_color = (1.0 - accent) * u_accent * clamp(intensity * 2.0, 0.0, 1.0);\n    float shade = abs(mod((aspect + azimuth) / PI + 0.5, 2.0) - 1.0);\n    vec4 shade_color = mix(u_shadow, u_highlight, shade) * sin(scaledSlope) * clamp(intensity * 2.0, 0.0, 1.0);\n    gl_FragColor = accent_color * (1.0 - shade_color.a) + shade_color;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n    v_pos = a_texture_pos / 8192.0;\n}\n"},line:{fragmentSource:"#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_width2;\nvarying vec2 v_normal;\nvarying float v_gamma_scale;\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n\n    // Calculate the distance of the pixel from the line in pixels.\n    float dist = length(v_normal) * v_width2.s;\n\n    // Calculate the antialiasing fade factor. This is either when fading in\n    // the line in case of an offset line (v_width2.t) or when fading out\n    // (v_width2.s)\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n    gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_gamma_scale;\nvarying highp float v_linesofar;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize mediump float gapwidth\n    #pragma mapbox: initialize lowp float offset\n    #pragma mapbox: initialize mediump float width\n\n    vec2 a_extrude = a_data.xy - 128.0;\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\n\n    v_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0;\n\n    vec2 pos = a_pos_normal.xy;\n\n    // x is 1 if it's a round cap, 0 otherwise\n    // y is 1 if the normal points up, and -1 if it points down\n    mediump vec2 normal = a_pos_normal.zw;\n    v_normal = normal;\n\n    // these transformations used to be applied in the JS and native code bases.\n    // moved them into the shader for clarity and simplicity.\n    gapwidth = gapwidth / 2.0;\n    float halfwidth = width / 2.0;\n    offset = -1.0 * offset;\n\n    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n    // Scale the extrusion vector down to a normal and then up by the line width\n    // of this vertex.\n    mediump vec2 dist = outset * a_extrude * scale;\n\n    // Calculate the offset when drawing a line that is to the side of the actual line.\n    // We do this by creating a vector that points towards the extrude, but rotate\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\n    // extrude vector points in another direction.\n    mediump float u = 0.5 * a_direction;\n    mediump float t = 1.0 - abs(u);\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n    // calculate how much the perspective view squishes or stretches the extrude\n    float extrude_length_without_perspective = length(dist);\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n    v_width2 = vec2(outset, inset);\n}\n"},lineGradient:{fragmentSource:"\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nuniform sampler2D u_image;\n\nvarying vec2 v_width2;\nvarying vec2 v_normal;\nvarying float v_gamma_scale;\nvarying highp float v_lineprogress;\n\nvoid main() {\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n\n    // Calculate the distance of the pixel from the line in pixels.\n    float dist = length(v_normal) * v_width2.s;\n\n    // Calculate the antialiasing fade factor. This is either when fading in\n    // the line in case of an offset line (v_width2.t) or when fading out\n    // (v_width2.s)\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n    // For gradient lines, v_lineprogress is the ratio along the entire line,\n    // scaled to [0, 2^15), and the gradient ramp is stored in a texture.\n    vec4 color = texture2D(u_image, vec2(v_lineprogress, 0.5));\n\n    gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"\n// the attribute conveying progress along a line is scaled to [0, 2^15)\n#define MAX_LINE_DISTANCE 32767.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\n// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_gamma_scale;\nvarying highp float v_lineprogress;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n\nvoid main() {\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize mediump float gapwidth\n    #pragma mapbox: initialize lowp float offset\n    #pragma mapbox: initialize mediump float width\n\n    vec2 a_extrude = a_data.xy - 128.0;\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\n\n    v_lineprogress = (floor(a_data.z / 4.0) + a_data.w * 64.0) * 2.0 / MAX_LINE_DISTANCE;\n\n    vec2 pos = a_pos_normal.xy;\n\n    // x is 1 if it's a round cap, 0 otherwise\n    // y is 1 if the normal points up, and -1 if it points down\n    mediump vec2 normal = a_pos_normal.zw;\n    v_normal = normal;\n\n    // these transformations used to be applied in the JS and native code bases.\n    // moved them into the shader for clarity and simplicity.\n    gapwidth = gapwidth / 2.0;\n    float halfwidth = width / 2.0;\n    offset = -1.0 * offset;\n\n    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n    // Scale the extrusion vector down to a normal and then up by the line width\n    // of this vertex.\n    mediump vec2 dist = outset * a_extrude * scale;\n\n    // Calculate the offset when drawing a line that is to the side of the actual line.\n    // We do this by creating a vector that points towards the extrude, but rotate\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\n    // extrude vector points in another direction.\n    mediump float u = 0.5 * a_direction;\n    mediump float t = 1.0 - abs(u);\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n    // calculate how much the perspective view squishes or stretches the extrude\n    float extrude_length_without_perspective = length(dist);\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n    v_width2 = vec2(outset, inset);\n}\n"},linePattern:{fragmentSource:"uniform vec2 u_pattern_size_a;\nuniform vec2 u_pattern_size_b;\nuniform vec2 u_pattern_tl_a;\nuniform vec2 u_pattern_br_a;\nuniform vec2 u_pattern_tl_b;\nuniform vec2 u_pattern_br_b;\nuniform vec2 u_texsize;\nuniform float u_fade;\n\nuniform sampler2D u_image;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n\nvoid main() {\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n\n    // Calculate the distance of the pixel from the line in pixels.\n    float dist = length(v_normal) * v_width2.s;\n\n    // Calculate the antialiasing fade factor. This is either when fading in\n    // the line in case of an offset line (v_width2.t) or when fading out\n    // (v_width2.s)\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n    float x_a = mod(v_linesofar / u_pattern_size_a.x, 1.0);\n    float x_b = mod(v_linesofar / u_pattern_size_b.x, 1.0);\n\n    // v_normal.y is 0 at the midpoint of the line, -1 at the lower edge, 1 at the upper edge\n    // we clamp the line width outset to be between 0 and half the pattern height plus padding (2.0)\n    // to ensure we don't sample outside the designated symbol on the sprite sheet.\n    // 0.5 is added to shift the component to be bounded between 0 and 1 for interpolation of\n    // the texture coordinate\n    float y_a = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (u_pattern_size_a.y + 2.0) / 2.0) / u_pattern_size_a.y);\n    float y_b = 0.5 + (v_normal.y * clamp(v_width2.s, 0.0, (u_pattern_size_b.y + 2.0) / 2.0) / u_pattern_size_b.y);\n    vec2 pos_a = mix(u_pattern_tl_a / u_texsize, u_pattern_br_a / u_texsize, vec2(x_a, y_a));\n    vec2 pos_b = mix(u_pattern_tl_b / u_texsize, u_pattern_br_b / u_texsize, vec2(x_b, y_b));\n\n    vec4 color = mix(texture2D(u_image, pos_a), texture2D(u_image, pos_b), u_fade);\n\n    gl_FragColor = color * alpha * opacity;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying float v_linesofar;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n\nvoid main() {\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize lowp float offset\n    #pragma mapbox: initialize mediump float gapwidth\n    #pragma mapbox: initialize mediump float width\n\n    vec2 a_extrude = a_data.xy - 128.0;\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\n    float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n    vec2 pos = a_pos_normal.xy;\n\n    // x is 1 if it's a round cap, 0 otherwise\n    // y is 1 if the normal points up, and -1 if it points down\n    mediump vec2 normal = a_pos_normal.zw;\n    v_normal = normal;\n\n    // these transformations used to be applied in the JS and native code bases.\n    // moved them into the shader for clarity and simplicity.\n    gapwidth = gapwidth / 2.0;\n    float halfwidth = width / 2.0;\n    offset = -1.0 * offset;\n\n    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n    // Scale the extrusion vector down to a normal and then up by the line width\n    // of this vertex.\n    mediump vec2 dist = outset * a_extrude * scale;\n\n    // Calculate the offset when drawing a line that is to the side of the actual line.\n    // We do this by creating a vector that points towards the extrude, but rotate\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\n    // extrude vector points in another direction.\n    mediump float u = 0.5 * a_direction;\n    mediump float t = 1.0 - abs(u);\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n    // calculate how much the perspective view squishes or stretches the extrude\n    float extrude_length_without_perspective = length(dist);\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n    v_linesofar = a_linesofar;\n    v_width2 = vec2(outset, inset);\n}\n"},lineSDF:{fragmentSource:"\nuniform sampler2D u_image;\nuniform float u_sdfgamma;\nuniform float u_mix;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize mediump float width\n    #pragma mapbox: initialize lowp float floorwidth\n\n    // Calculate the distance of the pixel from the line in pixels.\n    float dist = length(v_normal) * v_width2.s;\n\n    // Calculate the antialiasing fade factor. This is either when fading in\n    // the line in case of an offset line (v_width2.t) or when fading out\n    // (v_width2.s)\n    float blur2 = (blur + 1.0 / DEVICE_PIXEL_RATIO) * v_gamma_scale;\n    float alpha = clamp(min(dist - (v_width2.t - blur2), v_width2.s - dist) / blur2, 0.0, 1.0);\n\n    float sdfdist_a = texture2D(u_image, v_tex_a).a;\n    float sdfdist_b = texture2D(u_image, v_tex_b).a;\n    float sdfdist = mix(sdfdist_a, sdfdist_b, u_mix);\n    alpha *= smoothstep(0.5 - u_sdfgamma / floorwidth, 0.5 + u_sdfgamma / floorwidth, sdfdist);\n\n    gl_FragColor = color * (alpha * opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"// floor(127 / 2) == 63.0\n// the maximum allowed miter limit is 2.0 at the moment. the extrude normal is\n// stored in a byte (-128..127). we scale regular normals up to length 63, but\n// there are also \"special\" normals that have a bigger length (of up to 126 in\n// this case).\n// #define scale 63.0\n#define scale 0.015873016\n\n// We scale the distance before adding it to the buffers so that we can store\n// long distances for long segments. Use this value to unscale the distance.\n#define LINE_DISTANCE_SCALE 2.0\n\n// the distance over which the line edge fades out.\n// Retina devices need a smaller distance to avoid aliasing.\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n\nattribute vec4 a_pos_normal;\nattribute vec4 a_data;\n\nuniform mat4 u_matrix;\nuniform mediump float u_ratio;\nuniform vec2 u_patternscale_a;\nuniform float u_tex_y_a;\nuniform vec2 u_patternscale_b;\nuniform float u_tex_y_b;\nuniform vec2 u_gl_units_to_pixels;\n\nvarying vec2 v_normal;\nvarying vec2 v_width2;\nvarying vec2 v_tex_a;\nvarying vec2 v_tex_b;\nvarying float v_gamma_scale;\n\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 color\n    #pragma mapbox: initialize lowp float blur\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize mediump float gapwidth\n    #pragma mapbox: initialize lowp float offset\n    #pragma mapbox: initialize mediump float width\n    #pragma mapbox: initialize lowp float floorwidth\n\n    vec2 a_extrude = a_data.xy - 128.0;\n    float a_direction = mod(a_data.z, 4.0) - 1.0;\n    float a_linesofar = (floor(a_data.z / 4.0) + a_data.w * 64.0) * LINE_DISTANCE_SCALE;\n\n    vec2 pos = a_pos_normal.xy;\n\n    // x is 1 if it's a round cap, 0 otherwise\n    // y is 1 if the normal points up, and -1 if it points down\n    mediump vec2 normal = a_pos_normal.zw;\n    v_normal = normal;\n\n    // these transformations used to be applied in the JS and native code bases.\n    // moved them into the shader for clarity and simplicity.\n    gapwidth = gapwidth / 2.0;\n    float halfwidth = width / 2.0;\n    offset = -1.0 * offset;\n\n    float inset = gapwidth + (gapwidth > 0.0 ? ANTIALIASING : 0.0);\n    float outset = gapwidth + halfwidth * (gapwidth > 0.0 ? 2.0 : 1.0) + (halfwidth == 0.0 ? 0.0 : ANTIALIASING);\n\n    // Scale the extrusion vector down to a normal and then up by the line width\n    // of this vertex.\n    mediump vec2 dist =outset * a_extrude * scale;\n\n    // Calculate the offset when drawing a line that is to the side of the actual line.\n    // We do this by creating a vector that points towards the extrude, but rotate\n    // it when we're drawing round end points (a_direction = -1 or 1) since their\n    // extrude vector points in another direction.\n    mediump float u = 0.5 * a_direction;\n    mediump float t = 1.0 - abs(u);\n    mediump vec2 offset2 = offset * a_extrude * scale * normal.y * mat2(t, -u, u, t);\n\n    vec4 projected_extrude = u_matrix * vec4(dist / u_ratio, 0.0, 0.0);\n    gl_Position = u_matrix * vec4(pos + offset2 / u_ratio, 0.0, 1.0) + projected_extrude;\n\n    // calculate how much the perspective view squishes or stretches the extrude\n    float extrude_length_without_perspective = length(dist);\n    float extrude_length_with_perspective = length(projected_extrude.xy / gl_Position.w * u_gl_units_to_pixels);\n    v_gamma_scale = extrude_length_without_perspective / extrude_length_with_perspective;\n\n    v_tex_a = vec2(a_linesofar * u_patternscale_a.x / floorwidth, normal.y * u_patternscale_a.y + u_tex_y_a);\n    v_tex_b = vec2(a_linesofar * u_patternscale_b.x / floorwidth, normal.y * u_patternscale_b.y + u_tex_y_b);\n\n    v_width2 = vec2(outset, inset);\n}\n"},raster:{fragmentSource:"uniform float u_fade_t;\nuniform float u_opacity;\nuniform sampler2D u_image0;\nuniform sampler2D u_image1;\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nuniform float u_brightness_low;\nuniform float u_brightness_high;\n\nuniform float u_saturation_factor;\nuniform float u_contrast_factor;\nuniform vec3 u_spin_weights;\n\nvoid main() {\n\n    // read and cross-fade colors from the main and parent tiles\n    vec4 color0 = texture2D(u_image0, v_pos0);\n    vec4 color1 = texture2D(u_image1, v_pos1);\n    if (color0.a > 0.0) {\n        color0.rgb = color0.rgb / color0.a;\n    }\n    if (color1.a > 0.0) {\n        color1.rgb = color1.rgb / color1.a;\n    }\n    vec4 color = mix(color0, color1, u_fade_t);\n    color.a *= u_opacity;\n    vec3 rgb = color.rgb;\n\n    // spin\n    rgb = vec3(\n        dot(rgb, u_spin_weights.xyz),\n        dot(rgb, u_spin_weights.zxy),\n        dot(rgb, u_spin_weights.yzx));\n\n    // saturation\n    float average = (color.r + color.g + color.b) / 3.0;\n    rgb += (average - rgb) * u_saturation_factor;\n\n    // contrast\n    rgb = (rgb - 0.5) * u_contrast_factor + 0.5;\n\n    // brightness\n    vec3 u_high_vec = vec3(u_brightness_low, u_brightness_low, u_brightness_low);\n    vec3 u_low_vec = vec3(u_brightness_high, u_brightness_high, u_brightness_high);\n\n    gl_FragColor = vec4(mix(u_high_vec, u_low_vec, rgb) * color.a, color.a);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"uniform mat4 u_matrix;\nuniform vec2 u_tl_parent;\nuniform float u_scale_parent;\nuniform float u_buffer_scale;\n\nattribute vec2 a_pos;\nattribute vec2 a_texture_pos;\n\nvarying vec2 v_pos0;\nvarying vec2 v_pos1;\n\nvoid main() {\n    gl_Position = u_matrix * vec4(a_pos, 0, 1);\n    // We are using Int16 for texture position coordinates to give us enough precision for\n    // fractional coordinates. We use 8192 to scale the texture coordinates in the buffer\n    // as an arbitrarily high number to preserve adequate precision when rendering.\n    // This is also the same value as the EXTENT we are using for our tile buffer pos coordinates,\n    // so math for modifying either is consistent.\n    v_pos0 = (((a_texture_pos / 8192.0) - 0.5) / u_buffer_scale ) + 0.5;\n    v_pos1 = (v_pos0 * u_scale_parent) + u_tl_parent;\n}\n"},symbolIcon:{fragmentSource:"uniform sampler2D u_texture;\n\n#pragma mapbox: define lowp float opacity\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    lowp float alpha = opacity * v_fade_opacity;\n    gl_FragColor = texture2D(u_texture, v_tex) * alpha;\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"const float PI = 3.141592653589793;\n\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec3 a_projected_pos;\nattribute float a_fade_opacity;\n\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\nuniform highp float u_camera_to_center_distance;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform float u_fade_change;\n\n#pragma mapbox: define lowp float opacity\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_gl_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_tex;\nvarying float v_fade_opacity;\n\nvoid main() {\n    #pragma mapbox: initialize lowp float opacity\n\n    vec2 a_pos = a_pos_offset.xy;\n    vec2 a_offset = a_pos_offset.zw;\n\n    vec2 a_tex = a_data.xy;\n    vec2 a_size = a_data.zw;\n\n    highp float segment_angle = -a_projected_pos[2];\n\n    float size;\n    if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n        size = mix(a_size[0], a_size[1], u_size_t) / 10.0;\n    } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n        size = a_size[0] / 10.0;\n    } else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {\n        size = u_size;\n    } else {\n        size = u_size;\n    }\n\n    vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n    highp float camera_to_anchor_distance = projectedPoint.w;\n    // See comments in symbol_sdf.vertex\n    highp float distance_ratio = u_pitch_with_map ?\n        camera_to_anchor_distance / u_camera_to_center_distance :\n        u_camera_to_center_distance / camera_to_anchor_distance;\n    highp float perspective_ratio = clamp(\n            0.5 + 0.5 * distance_ratio,\n            0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n            4.0);\n\n    size *= perspective_ratio;\n\n    float fontScale = u_is_text ? size / 24.0 : size;\n\n    highp float symbol_rotation = 0.0;\n    if (u_rotate_symbol) {\n        // See comments in symbol_sdf.vertex\n        vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n        vec2 a = projectedPoint.xy / projectedPoint.w;\n        vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n        symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n    }\n\n    highp float angle_sin = sin(segment_angle + symbol_rotation);\n    highp float angle_cos = cos(segment_angle + symbol_rotation);\n    mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n    vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n    gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);\n\n    v_tex = a_tex / u_texsize;\n    vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n    float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n    v_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n}\n"},symbolSDF:{fragmentSource:"#define SDF_PX 8.0\n#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO\n\nuniform bool u_is_halo;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nuniform sampler2D u_texture;\nuniform highp float u_gamma_scale;\nuniform bool u_is_text;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 fill_color\n    #pragma mapbox: initialize highp vec4 halo_color\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize lowp float halo_width\n    #pragma mapbox: initialize lowp float halo_blur\n\n    vec2 tex = v_data0.xy;\n    float gamma_scale = v_data1.x;\n    float size = v_data1.y;\n    float fade_opacity = v_data1[2];\n\n    float fontScale = u_is_text ? size / 24.0 : size;\n\n    lowp vec4 color = fill_color;\n    highp float gamma = EDGE_GAMMA / (fontScale * u_gamma_scale);\n    lowp float buff = (256.0 - 64.0) / 256.0;\n    if (u_is_halo) {\n        color = halo_color;\n        gamma = (halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (fontScale * u_gamma_scale);\n        buff = (6.0 - halo_width / fontScale) / SDF_PX;\n    }\n\n    lowp float dist = texture2D(u_texture, tex).a;\n    highp float gamma_scaled = gamma * gamma_scale;\n    highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\n\n    gl_FragColor = color * (alpha * opacity * fade_opacity);\n\n#ifdef OVERDRAW_INSPECTOR\n    gl_FragColor = vec4(1.0);\n#endif\n}\n",vertexSource:"const float PI = 3.141592653589793;\n\nattribute vec4 a_pos_offset;\nattribute vec4 a_data;\nattribute vec3 a_projected_pos;\nattribute float a_fade_opacity;\n\n// contents of a_size vary based on the type of property value\n// used for {text,icon}-size.\n// For constants, a_size is disabled.\n// For source functions, we bind only one value per vertex: the value of {text,icon}-size evaluated for the current feature.\n// For composite functions:\n// [ text-size(lowerZoomStop, feature),\n//   text-size(upperZoomStop, feature) ]\nuniform bool u_is_size_zoom_constant;\nuniform bool u_is_size_feature_constant;\nuniform highp float u_size_t; // used to interpolate between zoom stops when size is a composite function\nuniform highp float u_size; // used when size is both zoom and feature constant\n\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\n\nuniform mat4 u_matrix;\nuniform mat4 u_label_plane_matrix;\nuniform mat4 u_gl_coord_matrix;\n\nuniform bool u_is_text;\nuniform bool u_pitch_with_map;\nuniform highp float u_pitch;\nuniform bool u_rotate_symbol;\nuniform highp float u_aspect_ratio;\nuniform highp float u_camera_to_center_distance;\nuniform float u_fade_change;\n\nuniform vec2 u_texsize;\n\nvarying vec2 v_data0;\nvarying vec3 v_data1;\n\nvoid main() {\n    #pragma mapbox: initialize highp vec4 fill_color\n    #pragma mapbox: initialize highp vec4 halo_color\n    #pragma mapbox: initialize lowp float opacity\n    #pragma mapbox: initialize lowp float halo_width\n    #pragma mapbox: initialize lowp float halo_blur\n\n    vec2 a_pos = a_pos_offset.xy;\n    vec2 a_offset = a_pos_offset.zw;\n\n    vec2 a_tex = a_data.xy;\n    vec2 a_size = a_data.zw;\n\n    highp float segment_angle = -a_projected_pos[2];\n    float size;\n\n    if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {\n        size = mix(a_size[0], a_size[1], u_size_t) / 10.0;\n    } else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {\n        size = a_size[0] / 10.0;\n    } else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {\n        size = u_size;\n    } else {\n        size = u_size;\n    }\n\n    vec4 projectedPoint = u_matrix * vec4(a_pos, 0, 1);\n    highp float camera_to_anchor_distance = projectedPoint.w;\n    // If the label is pitched with the map, layout is done in pitched space,\n    // which makes labels in the distance smaller relative to viewport space.\n    // We counteract part of that effect by multiplying by the perspective ratio.\n    // If the label isn't pitched with the map, we do layout in viewport space,\n    // which makes labels in the distance larger relative to the features around\n    // them. We counteract part of that effect by dividing by the perspective ratio.\n    highp float distance_ratio = u_pitch_with_map ?\n        camera_to_anchor_distance / u_camera_to_center_distance :\n        u_camera_to_center_distance / camera_to_anchor_distance;\n    highp float perspective_ratio = clamp(\n        0.5 + 0.5 * distance_ratio,\n        0.0, // Prevents oversized near-field symbols in pitched/overzoomed tiles\n        4.0);\n\n    size *= perspective_ratio;\n\n    float fontScale = u_is_text ? size / 24.0 : size;\n\n    highp float symbol_rotation = 0.0;\n    if (u_rotate_symbol) {\n        // Point labels with 'rotation-alignment: map' are horizontal with respect to tile units\n        // To figure out that angle in projected space, we draw a short horizontal line in tile\n        // space, project it, and measure its angle in projected space.\n        vec4 offsetProjectedPoint = u_matrix * vec4(a_pos + vec2(1, 0), 0, 1);\n\n        vec2 a = projectedPoint.xy / projectedPoint.w;\n        vec2 b = offsetProjectedPoint.xy / offsetProjectedPoint.w;\n\n        symbol_rotation = atan((b.y - a.y) / u_aspect_ratio, b.x - a.x);\n    }\n\n    highp float angle_sin = sin(segment_angle + symbol_rotation);\n    highp float angle_cos = cos(segment_angle + symbol_rotation);\n    mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n\n    vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);\n    gl_Position = u_gl_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale), 0.0, 1.0);\n    float gamma_scale = gl_Position.w;\n\n    vec2 tex = a_tex / u_texsize;\n    vec2 fade_opacity = unpack_opacity(a_fade_opacity);\n    float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;\n    float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));\n\n    v_data0 = vec2(tex.x, tex.y);\n    v_data1 = vec3(gamma_scale, size, interpolated_fade_opacity);\n}\n"}},$e=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,Ze=function(t){var e=qe[t],r={};e.fragmentSource=e.fragmentSource.replace($e,(function(t,e,i,n,o){return r[o]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nvarying "+i+" "+n+" "+o+";\n#else\nuniform "+i+" "+n+" u_"+o+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+o+"\n    "+i+" "+n+" "+o+" = u_"+o+";\n#endif\n"})),e.vertexSource=e.vertexSource.replace($e,(function(t,e,i,n,o){var a="float"===n?"vec2":"vec4";return r[o]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float a_"+o+"_t;\nattribute "+i+" "+a+" a_"+o+";\nvarying "+i+" "+n+" "+o+";\n#else\nuniform "+i+" "+n+" u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n    "+o+" = unpack_mix_"+a+"(a_"+o+", a_"+o+"_t);\n#else\n    "+i+" "+n+" "+o+" = u_"+o+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float a_"+o+"_t;\nattribute "+i+" "+a+" a_"+o+";\n#else\nuniform "+i+" "+n+" u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n    "+i+" "+n+" "+o+" = unpack_mix_"+a+"(a_"+o+", a_"+o+"_t);\n#else\n    "+i+" "+n+" "+o+" = u_"+o+";\n#endif\n"}))};for(var Ge in qe)Ze(Ge);var We=qe,Xe=function(e,r,i,n){var o=e.gl;this.program=o.createProgram();var a=i.defines().concat("#define DEVICE_PIXEL_RATIO "+t.default$2.devicePixelRatio.toFixed(1));n&&a.push("#define OVERDRAW_INSPECTOR;");var s=a.concat(We.prelude.fragmentSource,r.fragmentSource).join("\n"),l=a.concat(We.prelude.vertexSource,r.vertexSource).join("\n"),u=o.createShader(o.FRAGMENT_SHADER);o.shaderSource(u,s),o.compileShader(u),o.attachShader(this.program,u);var c=o.createShader(o.VERTEX_SHADER);o.shaderSource(c,l),o.compileShader(c),o.attachShader(this.program,c);for(var h=i.layoutAttributes||[],p=0;p<h.length;p++)o.bindAttribLocation(this.program,p,h[p].name);o.linkProgram(this.program),this.numAttributes=o.getProgramParameter(this.program,o.ACTIVE_ATTRIBUTES),this.attributes={},this.uniforms={};for(var f=0;f<this.numAttributes;f++){var d=o.getActiveAttrib(this.program,f);d&&(this.attributes[d.name]=o.getAttribLocation(this.program,d.name))}for(var m=o.getProgramParameter(this.program,o.ACTIVE_UNIFORMS),y=0;y<m;y++){var v=o.getActiveUniform(this.program,y);v&&(this.uniforms[v.name]=o.getUniformLocation(this.program,v.name))}};function He(e,r,i,n,o){for(var a=0;a<i.length;a++){var s=i[a];if(n.isLessThan(s.tileID))break;if(r.key===s.tileID.key)return;if(s.tileID.isChildOf(r)){for(var l=r.children(1/0),u=0;u<l.length;u++){He(e,l[u],i.slice(a),n,o)}return}}var c=r.overscaledZ-e.overscaledZ,h=new t.CanonicalTileID(c,r.canonical.x-(e.canonical.x<<c),r.canonical.y-(e.canonical.y<<c));o[h.key]=o[h.key]||h}function Ke(t,e,r,i,n){var o=t.context,a=o.gl,s=n?t.useProgram("collisionCircle"):t.useProgram("collisionBox");o.setDepthMode(Ct.disabled),o.setStencilMode(Pt.disabled),o.setColorMode(t.colorModeForRenderPass());for(var l=0;l<i.length;l++){var u=i[l],c=e.getTile(u),h=c.getBucket(r);if(h){var p=n?h.collisionCircle:h.collisionBox;if(p){a.uniformMatrix4fv(s.uniforms.u_matrix,!1,u.posMatrix),a.uniform1f(s.uniforms.u_camera_to_center_distance,t.transform.cameraToCenterDistance);var f=me(c,1,t.transform.zoom),d=Math.pow(2,t.transform.zoom-c.tileID.overscaledZ);a.uniform1f(s.uniforms.u_pixels_to_tile_units,f),a.uniform2f(s.uniforms.u_extrude_scale,t.transform.pixelsToGLUnits[0]/(f*d),t.transform.pixelsToGLUnits[1]/(f*d)),a.uniform1f(s.uniforms.u_overscale_factor,c.tileID.overscaleFactor()),s.draw(o,n?a.TRIANGLES:a.LINES,r.id,p.layoutVertexBuffer,p.indexBuffer,p.segments,null,p.collisionVertexBuffer,null)}}}}Xe.prototype.draw=function(t,e,r,i,n,o,a,s,l){for(var u,c=t.gl,h=(u={},u[c.LINES]=2,u[c.TRIANGLES]=3,u)[e],p=0,f=o.get();p<f.length;p+=1){var d=f[p],m=d.vaos||(d.vaos={});(m[r]||(m[r]=new q)).bind(t,this,i,a?a.getPaintVertexBuffers():[],n,d.vertexOffset,s,l),c.drawElements(e,d.primitiveLength*h,c.UNSIGNED_SHORT,d.primitiveOffset*h*2)}};var Je=t.identity(new Float32Array(16)),Ye=t.default$18.layout;function Qe(t,e,r,i,n,o,a,s,l,u){var c,h=t.context,p=h.gl,f=t.transform,d="map"===s,m="map"===l,y=d&&"point"!==r.layout.get("symbol-placement"),v=d&&!m&&!y,g=m;h.setDepthMode(g?t.depthModeForSublayer(0,Ct.ReadOnly):Ct.disabled);for(var _=0,x=i;_<x.length;_+=1){var b=x[_],w=e.getTile(b),E=w.getBucket(r);if(E){var S=n?E.text:E.icon;if(S&&S.segments.get().length){var T=S.programConfigurations.get(r.id),A=n||E.sdfIcons,z=n?E.textSizeData:E.iconSizeData;if(c||(c=t.useProgram(A?"symbolSDF":"symbolIcon",T),T.setUniforms(t.context,c,r.paint,{zoom:t.transform.zoom}),tr(c,t,r,n,v,m,z)),h.activeTexture.set(p.TEXTURE0),p.uniform1i(c.uniforms.u_texture,0),n)w.glyphAtlasTexture.bind(p.LINEAR,p.CLAMP_TO_EDGE),p.uniform2fv(c.uniforms.u_texsize,w.glyphAtlasTexture.size);else{var I=1!==r.layout.get("icon-size").constantOr(0)||E.iconsNeedLinear,k=m||0!==f.pitch;w.iconAtlasTexture.bind(A||t.options.rotating||t.options.zooming||I||k?p.LINEAR:p.NEAREST,p.CLAMP_TO_EDGE),p.uniform2fv(c.uniforms.u_texsize,w.iconAtlasTexture.size)}p.uniformMatrix4fv(c.uniforms.u_matrix,!1,t.translatePosMatrix(b.posMatrix,w,o,a));var M=me(w,1,t.transform.zoom),C=te(b.posMatrix,m,d,t.transform,M),P=ee(b.posMatrix,m,d,t.transform,M);p.uniformMatrix4fv(c.uniforms.u_gl_coord_matrix,!1,t.translatePosMatrix(P,w,o,a,!0)),y?(p.uniformMatrix4fv(c.uniforms.u_label_plane_matrix,!1,Je),ne(E,b.posMatrix,t,n,C,P,m,u)):p.uniformMatrix4fv(c.uniforms.u_label_plane_matrix,!1,C),p.uniform1f(c.uniforms.u_fade_change,t.options.fadeDuration?t.symbolFadeChange:1),er(c,T,t,r,w,S,n,A,m)}}}}function tr(e,r,i,n,o,a,s){var l=r.context.gl,u=r.transform;l.uniform1i(e.uniforms.u_pitch_with_map,a?1:0),l.uniform1f(e.uniforms.u_is_text,n?1:0),l.uniform1f(e.uniforms.u_pitch,u.pitch/360*2*Math.PI);var c="constant"===s.functionType||"source"===s.functionType,h="constant"===s.functionType||"camera"===s.functionType;l.uniform1i(e.uniforms.u_is_size_zoom_constant,c?1:0),l.uniform1i(e.uniforms.u_is_size_feature_constant,h?1:0),l.uniform1f(e.uniforms.u_camera_to_center_distance,u.cameraToCenterDistance);var p=t.evaluateSizeForZoom(s,u.zoom,Ye.properties[n?"text-size":"icon-size"]);void 0!==p.uSizeT&&l.uniform1f(e.uniforms.u_size_t,p.uSizeT),void 0!==p.uSize&&l.uniform1f(e.uniforms.u_size,p.uSize),l.uniform1f(e.uniforms.u_aspect_ratio,u.width/u.height),l.uniform1i(e.uniforms.u_rotate_symbol,o?1:0)}function er(t,e,r,i,n,o,a,s,l){var u=r.context,c=u.gl,h=r.transform;if(s){var p=0!==i.paint.get(a?"text-halo-width":"icon-halo-width").constantOr(1),f=l?Math.cos(h._pitch)*h.cameraToCenterDistance:1;c.uniform1f(t.uniforms.u_gamma_scale,f),p&&(c.uniform1f(t.uniforms.u_is_halo,1),rr(o,i,u,t)),c.uniform1f(t.uniforms.u_is_halo,0)}rr(o,i,u,t)}function rr(t,e,r,i){i.draw(r,r.gl.TRIANGLES,e.id,t.layoutVertexBuffer,t.indexBuffer,t.segments,t.programConfigurations.get(e.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer)}function ir(e,r,i,n,o,a,s,l,u){var c,h,p,f,d=r.context,m=d.gl,y=o.paint.get("line-dasharray"),v=o.paint.get("line-pattern");if(l||u){var g=1/me(i,1,r.transform.tileZoom);if(y){c=r.lineAtlas.getDash(y.from,"round"===o.layout.get("line-cap")),h=r.lineAtlas.getDash(y.to,"round"===o.layout.get("line-cap"));var _=c.width*y.fromScale,x=h.width*y.toScale;m.uniform2f(e.uniforms.u_patternscale_a,g/_,-c.height/2),m.uniform2f(e.uniforms.u_patternscale_b,g/x,-h.height/2),m.uniform1f(e.uniforms.u_sdfgamma,r.lineAtlas.width/(256*Math.min(_,x)*t.default$2.devicePixelRatio)/2)}else if(v){if(p=r.imageManager.getPattern(v.from),f=r.imageManager.getPattern(v.to),!p||!f)return;m.uniform2f(e.uniforms.u_pattern_size_a,p.displaySize[0]*v.fromScale/g,p.displaySize[1]),m.uniform2f(e.uniforms.u_pattern_size_b,f.displaySize[0]*v.toScale/g,f.displaySize[1]);var b=r.imageManager.getPixelSize(),w=b.width,E=b.height;m.uniform2fv(e.uniforms.u_texsize,[w,E])}m.uniform2f(e.uniforms.u_gl_units_to_pixels,1/r.transform.pixelsToGLUnits[0],1/r.transform.pixelsToGLUnits[1])}l&&(y?(m.uniform1i(e.uniforms.u_image,0),d.activeTexture.set(m.TEXTURE0),r.lineAtlas.bind(d),m.uniform1f(e.uniforms.u_tex_y_a,c.y),m.uniform1f(e.uniforms.u_tex_y_b,h.y),m.uniform1f(e.uniforms.u_mix,y.t)):v&&(m.uniform1i(e.uniforms.u_image,0),d.activeTexture.set(m.TEXTURE0),r.imageManager.bind(d),m.uniform2fv(e.uniforms.u_pattern_tl_a,p.tl),m.uniform2fv(e.uniforms.u_pattern_br_a,p.br),m.uniform2fv(e.uniforms.u_pattern_tl_b,f.tl),m.uniform2fv(e.uniforms.u_pattern_br_b,f.br),m.uniform1f(e.uniforms.u_fade,v.t))),d.setStencilMode(r.stencilModeForClipping(a));var S=r.translatePosMatrix(a.posMatrix,i,o.paint.get("line-translate"),o.paint.get("line-translate-anchor"));if(m.uniformMatrix4fv(e.uniforms.u_matrix,!1,S),m.uniform1f(e.uniforms.u_ratio,1/me(i,1,r.transform.zoom)),o.paint.get("line-gradient")){d.activeTexture.set(m.TEXTURE0);var T=o.gradientTexture;if(!o.gradient)return;T||(T=o.gradientTexture=new t.default$4(d,o.gradient,m.RGBA)),T.bind(m.LINEAR,m.CLAMP_TO_EDGE),m.uniform1i(e.uniforms.u_image,0)}e.draw(d,m.TRIANGLES,o.id,n.layoutVertexBuffer,n.indexBuffer,n.segments,s)}var nr=function(t,e){if(!t)return!1;var r=e.imageManager.getPattern(t.from),i=e.imageManager.getPattern(t.to);return!r||!i},or=function(t,e,r){var i=e.context,n=i.gl,o=e.imageManager.getPattern(t.from),a=e.imageManager.getPattern(t.to);n.uniform1i(r.uniforms.u_image,0),n.uniform2fv(r.uniforms.u_pattern_tl_a,o.tl),n.uniform2fv(r.uniforms.u_pattern_br_a,o.br),n.uniform2fv(r.uniforms.u_pattern_tl_b,a.tl),n.uniform2fv(r.uniforms.u_pattern_br_b,a.br);var s=e.imageManager.getPixelSize(),l=s.width,u=s.height;n.uniform2fv(r.uniforms.u_texsize,[l,u]),n.uniform1f(r.uniforms.u_mix,t.t),n.uniform2fv(r.uniforms.u_pattern_size_a,o.displaySize),n.uniform2fv(r.uniforms.u_pattern_size_b,a.displaySize),n.uniform1f(r.uniforms.u_scale_a,t.fromScale),n.uniform1f(r.uniforms.u_scale_b,t.toScale),i.activeTexture.set(n.TEXTURE0),e.imageManager.bind(e.context)},ar=function(t,e,r){var i=e.context.gl;i.uniform1f(r.uniforms.u_tile_units_to_pixels,1/me(t,1,e.transform.tileZoom));var n=Math.pow(2,t.tileID.overscaledZ),o=t.tileSize*Math.pow(2,e.transform.tileZoom)/n,a=o*(t.tileID.canonical.x+t.tileID.wrap*n),s=o*t.tileID.canonical.y;i.uniform2f(r.uniforms.u_pixel_coord_upper,a>>16,s>>16),i.uniform2f(r.uniforms.u_pixel_coord_lower,65535&a,65535&s)};function sr(t,e,r,i,n){if(!nr(r.paint.get("fill-pattern"),t))for(var o=!0,a=0,s=i;a<s.length;a+=1){var l=s[a],u=e.getTile(l),c=u.getBucket(r);c&&(t.context.setStencilMode(t.stencilModeForClipping(l)),n(t,e,r,u,l,c,o),o=!1)}}function lr(t,e,r,i,n,o,a){var s=t.context.gl,l=o.programConfigurations.get(r.id);cr("fill",r.paint.get("fill-pattern"),t,l,r,i,n,a).draw(t.context,s.TRIANGLES,r.id,o.layoutVertexBuffer,o.indexBuffer,o.segments,l)}function ur(t,e,r,i,n,o,a){var s=t.context.gl,l=o.programConfigurations.get(r.id),u=cr("fillOutline",r.getPaintProperty("fill-outline-color")?null:r.paint.get("fill-pattern"),t,l,r,i,n,a);s.uniform2f(u.uniforms.u_world,s.drawingBufferWidth,s.drawingBufferHeight),u.draw(t.context,s.LINES,r.id,o.layoutVertexBuffer,o.indexBuffer2,o.segments2,l)}function cr(t,e,r,i,n,o,a,s){var l,u=r.context.program.get();return e?(l=r.useProgram(t+"Pattern",i),(s||l.program!==u)&&(i.setUniforms(r.context,l,n.paint,{zoom:r.transform.zoom}),or(e,r,l)),ar(o,r,l)):(l=r.useProgram(t,i),(s||l.program!==u)&&i.setUniforms(r.context,l,n.paint,{zoom:r.transform.zoom})),r.context.gl.uniformMatrix4fv(l.uniforms.u_matrix,!1,r.translatePosMatrix(a.posMatrix,o,n.paint.get("fill-translate"),n.paint.get("fill-translate-anchor"))),l}function hr(e,r,i,n,o,a,s){var l=e.context,u=l.gl,c=i.paint.get("fill-extrusion-pattern"),h=e.context.program.get(),p=a.programConfigurations.get(i.id),f=e.useProgram(c?"fillExtrusionPattern":"fillExtrusion",p);if((s||f.program!==h)&&p.setUniforms(l,f,i.paint,{zoom:e.transform.zoom}),c){if(nr(c,e))return;or(c,e,f),ar(n,e,f),u.uniform1f(f.uniforms.u_height_factor,-Math.pow(2,o.overscaledZ)/n.tileSize/8)}e.context.gl.uniformMatrix4fv(f.uniforms.u_matrix,!1,e.translatePosMatrix(o.posMatrix,n,i.paint.get("fill-extrusion-translate"),i.paint.get("fill-extrusion-translate-anchor"))),function(e,r){var i=r.context.gl,n=r.style.light,o=n.properties.get("position"),a=[o.x,o.y,o.z],s=t.create$2();"viewport"===n.properties.get("anchor")&&t.fromRotation(s,-r.transform.angle);t.transformMat3(a,a,s);var l=n.properties.get("color");i.uniform3fv(e.uniforms.u_lightpos,a),i.uniform1f(e.uniforms.u_lightintensity,n.properties.get("intensity")),i.uniform3f(e.uniforms.u_lightcolor,l.r,l.g,l.b)}(f,e),f.draw(l,u.TRIANGLES,i.id,a.layoutVertexBuffer,a.indexBuffer,a.segments,p)}function pr(e,r,i){var n=e.context,o=n.gl,a=r.fbo;if(a){var s=e.useProgram("hillshade"),l=e.transform.calculatePosMatrix(r.tileID.toUnwrapped(),!0);!function(t,e,r){var i=r.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===r.paint.get("hillshade-illumination-anchor")&&(i-=e.transform.angle),e.context.gl.uniform2f(t.uniforms.u_light,r.paint.get("hillshade-exaggeration"),i)}(s,e,i);var u=function(e,r){var i=r.toCoordinate(),n=new t.default$15(i.column,i.row+1,i.zoom);return[e.transform.coordinateLocation(i).lat,e.transform.coordinateLocation(n).lat]}(e,r.tileID);n.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,a.colorAttachment.get()),o.uniformMatrix4fv(s.uniforms.u_matrix,!1,l),o.uniform2fv(s.uniforms.u_latrange,u),o.uniform1i(s.uniforms.u_image,0);var c=i.paint.get("hillshade-shadow-color");o.uniform4f(s.uniforms.u_shadow,c.r,c.g,c.b,c.a);var h=i.paint.get("hillshade-highlight-color");o.uniform4f(s.uniforms.u_highlight,h.r,h.g,h.b,h.a);var p=i.paint.get("hillshade-accent-color");if(o.uniform4f(s.uniforms.u_accent,p.r,p.g,p.b,p.a),r.maskedBoundsBuffer&&r.maskedIndexBuffer&&r.segments)s.draw(n,o.TRIANGLES,i.id,r.maskedBoundsBuffer,r.maskedIndexBuffer,r.segments);else{var f=e.rasterBoundsBuffer;e.rasterBoundsVAO.bind(n,s,f,[]),o.drawArrays(o.TRIANGLE_STRIP,0,f.length)}}}function fr(e,r,i){var n=e.context,o=n.gl;if(r.dem&&r.dem.level){var a=r.dem.level.dim,s=r.dem.getPixels();if(n.activeTexture.set(o.TEXTURE1),n.pixelStoreUnpackPremultiplyAlpha.set(!1),r.demTexture=r.demTexture||e.getTileTexture(r.tileSize),r.demTexture){var l=r.demTexture;l.update(s,{premultiply:!1}),l.bind(o.NEAREST,o.CLAMP_TO_EDGE)}else r.demTexture=new t.default$4(n,s,o.RGBA,{premultiply:!1}),r.demTexture.bind(o.NEAREST,o.CLAMP_TO_EDGE);n.activeTexture.set(o.TEXTURE0);var u=r.fbo;if(!u){var c=new t.default$4(n,{width:a,height:a,data:null},o.RGBA);c.bind(o.LINEAR,o.CLAMP_TO_EDGE),(u=r.fbo=n.createFramebuffer(a,a)).colorAttachment.set(c.texture)}n.bindFramebuffer.set(u.framebuffer),n.viewport.set([0,0,a,a]);var h=t.create();t.ortho(h,0,t.default$10,-t.default$10,0,0,1),t.translate(h,h,[0,-t.default$10,0]);var p=e.useProgram("hillshadePrepare");o.uniformMatrix4fv(p.uniforms.u_matrix,!1,h),o.uniform1f(p.uniforms.u_zoom,r.tileID.overscaledZ),o.uniform2fv(p.uniforms.u_dimension,[2*a,2*a]),o.uniform1i(p.uniforms.u_image,1),o.uniform1f(p.uniforms.u_maxzoom,i);var f=e.rasterBoundsBuffer;e.rasterBoundsVAO.bind(n,p,f,[]),o.drawArrays(o.TRIANGLE_STRIP,0,f.length),r.needsHillshadePrepare=!1}}function dr(e,r,i,n,o){var a=n.paint.get("raster-fade-duration");if(a>0){var s=t.default$2.now(),l=(s-e.timeAdded)/a,u=r?(s-r.timeAdded)/a:-1,c=i.getSource(),h=o.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),p=!r||Math.abs(r.tileID.overscaledZ-h)>Math.abs(e.tileID.overscaledZ-h),f=p&&e.refreshedUponExpiration?1:t.clamp(p?l:1-u,0,1);return e.refreshedUponExpiration&&l>=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-f}:{opacity:f,mix:0}}return{opacity:1,mix:0}}function mr(e,r,i){var n=e.context,o=n.gl,a=i.posMatrix,s=e.useProgram("debug");n.setDepthMode(Ct.disabled),n.setStencilMode(Pt.disabled),n.setColorMode(e.colorModeForRenderPass()),o.uniformMatrix4fv(s.uniforms.u_matrix,!1,a),o.uniform4f(s.uniforms.u_color,1,0,0,1),e.debugVAO.bind(n,s,e.debugBuffer,[]),o.drawArrays(o.LINE_STRIP,0,e.debugBuffer.length);for(var l=function(t,e,r,i){i=i||1;var n,o,a,s,l,u,c,h,p=[];for(n=0,o=t.length;n<o;n++)if(l=yr[t[n]]){for(h=null,a=0,s=l[1].length;a<s;a+=2)-1===l[1][a]&&-1===l[1][a+1]?h=null:(u=e+l[1][a]*i,c=r-l[1][a+1]*i,h&&p.push(h.x,h.y,u,c),h={x:u,y:c});e+=l[0]*i}return p}(i.toString(),50,200,5),u=new t.PosArray,c=0;c<l.length;c+=2)u.emplaceBack(l[c],l[c+1]);var h=n.createVertexBuffer(u,Ue.members);(new q).bind(n,s,h,[]),o.uniform4f(s.uniforms.u_color,1,1,1,1);for(var p=r.getTile(i).tileSize,f=t.default$10/(Math.pow(2,e.transform.zoom-i.overscaledZ)*p),d=[[-1,-1],[-1,1],[1,-1],[1,1]],m=0;m<d.length;m++){var y=d[m];o.uniformMatrix4fv(s.uniforms.u_matrix,!1,t.translate([],a,[f*y[0],f*y[1],0])),o.drawArrays(o.LINES,0,h.length)}o.uniform4f(s.uniforms.u_color,0,0,0,1),o.uniformMatrix4fv(s.uniforms.u_matrix,!1,a),o.drawArrays(o.LINES,0,h.length)}var yr={" ":[16,[]],"!":[10,[5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2]],'"':[16,[4,21,4,14,-1,-1,12,21,12,14]],"#":[21,[11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6]],$:[20,[8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],"%":[24,[21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7]],"&":[26,[23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2]],"'":[10,[5,19,4,20,5,21,6,20,6,18,5,16,4,15]],"(":[14,[11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7]],")":[14,[3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7]],"*":[16,[8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12]],"+":[26,[13,18,13,0,-1,-1,4,9,22,9]],",":[10,[6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"-":[26,[4,9,22,9]],".":[10,[5,2,4,1,5,0,6,1,5,2]],"/":[22,[20,25,2,-7]],0:[20,[9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21]],1:[20,[6,17,8,18,11,21,11,0]],2:[20,[4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0]],3:[20,[5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],4:[20,[13,21,3,7,18,7,-1,-1,13,21,13,0]],5:[20,[15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],6:[20,[16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7]],7:[20,[17,21,7,0,-1,-1,3,21,17,21]],8:[20,[8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21]],9:[20,[16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3]],":":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2]],";":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"<":[24,[20,18,4,9,20,0]],"=":[26,[4,12,22,12,-1,-1,4,6,22,6]],">":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]};var vr={symbol:function(t,e,r,i){if("translucent"===t.renderPass){var n=t.context;n.setStencilMode(Pt.disabled),n.setColorMode(t.colorModeForRenderPass()),0!==r.paint.get("icon-opacity").constantOr(1)&&Qe(t,e,r,i,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright")),0!==r.paint.get("text-opacity").constantOr(1)&&Qe(t,e,r,i,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright")),e.map.showCollisionBoxes&&function(t,e,r,i){Ke(t,e,r,i,!1),Ke(t,e,r,i,!0)}(t,e,r,i)}},circle:function(t,e,r,i){if("translucent"===t.renderPass){var n=r.paint.get("circle-opacity"),o=r.paint.get("circle-stroke-width"),a=r.paint.get("circle-stroke-opacity");if(0!==n.constantOr(1)||0!==o.constantOr(1)&&0!==a.constantOr(1)){var s=t.context,l=s.gl;s.setDepthMode(t.depthModeForSublayer(0,Ct.ReadOnly)),s.setStencilMode(Pt.disabled),s.setColorMode(t.colorModeForRenderPass());for(var u=!0,c=0;c<i.length;c++){var h=i[c],p=e.getTile(h),f=p.getBucket(r);if(f){var d=t.context.program.get(),m=f.programConfigurations.get(r.id),y=t.useProgram("circle",m);if((u||y.program!==d)&&(m.setUniforms(s,y,r.paint,{zoom:t.transform.zoom}),u=!1),l.uniform1f(y.uniforms.u_camera_to_center_distance,t.transform.cameraToCenterDistance),l.uniform1i(y.uniforms.u_scale_with_map,"map"===r.paint.get("circle-pitch-scale")?1:0),"map"===r.paint.get("circle-pitch-alignment")){l.uniform1i(y.uniforms.u_pitch_with_map,1);var v=me(p,1,t.transform.zoom);l.uniform2f(y.uniforms.u_extrude_scale,v,v)}else l.uniform1i(y.uniforms.u_pitch_with_map,0),l.uniform2fv(y.uniforms.u_extrude_scale,t.transform.pixelsToGLUnits);l.uniformMatrix4fv(y.uniforms.u_matrix,!1,t.translatePosMatrix(h.posMatrix,p,r.paint.get("circle-translate"),r.paint.get("circle-translate-anchor"))),y.draw(s,l.TRIANGLES,r.id,f.layoutVertexBuffer,f.indexBuffer,f.segments,m)}}}}},heatmap:function(e,r,i,n){if(0!==i.paint.get("heatmap-opacity"))if("offscreen"===e.renderPass){var o=e.context,a=o.gl;o.setDepthMode(e.depthModeForSublayer(0,Ct.ReadOnly)),o.setStencilMode(Pt.disabled),function(t,e,r){var i=t.gl;t.activeTexture.set(i.TEXTURE1),t.viewport.set([0,0,e.width/4,e.height/4]);var n=r.heatmapFbo;if(n)i.bindTexture(i.TEXTURE_2D,n.colorAttachment.get()),t.bindFramebuffer.set(n.framebuffer);else{var o=i.createTexture();i.bindTexture(i.TEXTURE_2D,o),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),n=r.heatmapFbo=t.createFramebuffer(e.width/4,e.height/4),function a(t,e,r,i){var n=t.gl;n.texImage2D(n.TEXTURE_2D,0,n.RGBA,e.width/4,e.height/4,0,n.RGBA,t.extTextureHalfFloat?t.extTextureHalfFloat.HALF_FLOAT_OES:n.UNSIGNED_BYTE,null),i.colorAttachment.set(r),t.extTextureHalfFloat&&n.checkFramebufferStatus(n.FRAMEBUFFER)!==n.FRAMEBUFFER_COMPLETE&&(t.extTextureHalfFloat=null,i.colorAttachment.setDirty(),a(t,e,r,i))}(t,e,o,n)}}(o,e,i),o.clear({color:t.default$8.transparent}),o.setColorMode(new Lt([a.ONE,a.ONE],t.default$8.transparent,[!0,!0,!0,!0]));for(var s=!0,l=0;l<n.length;l++){var u=n[l];if(!r.hasRenderableParent(u)){var c=r.getTile(u),h=c.getBucket(i);if(h){var p=e.context.program.get(),f=h.programConfigurations.get(i.id),d=e.useProgram("heatmap",f),m=e.transform.zoom;(s||d.program!==p)&&(f.setUniforms(e.context,d,i.paint,{zoom:m}),s=!1),a.uniform1f(d.uniforms.u_extrude_scale,me(c,1,m)),a.uniform1f(d.uniforms.u_intensity,i.paint.get("heatmap-intensity")),a.uniformMatrix4fv(d.uniforms.u_matrix,!1,u.posMatrix),d.draw(o,a.TRIANGLES,i.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,f)}}}o.viewport.set([0,0,e.width,e.height])}else"translucent"===e.renderPass&&(e.context.setColorMode(e.colorModeForRenderPass()),function(e,r){var i=e.context,n=i.gl,o=r.heatmapFbo;if(o){i.activeTexture.set(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,o.colorAttachment.get()),i.activeTexture.set(n.TEXTURE1);var a=r.colorRampTexture;a||(a=r.colorRampTexture=new t.default$4(i,r.colorRamp,n.RGBA)),a.bind(n.LINEAR,n.CLAMP_TO_EDGE),i.setDepthMode(Ct.disabled),i.setStencilMode(Pt.disabled);var s=e.useProgram("heatmapTexture"),l=r.paint.get("heatmap-opacity");n.uniform1f(s.uniforms.u_opacity,l),n.uniform1i(s.uniforms.u_image,0),n.uniform1i(s.uniforms.u_color_ramp,1);var u=t.create();t.ortho(u,0,e.width,e.height,0,0,1),n.uniformMatrix4fv(s.uniforms.u_matrix,!1,u),n.uniform2f(s.uniforms.u_world,n.drawingBufferWidth,n.drawingBufferHeight),e.viewportVAO.bind(e.context,s,e.viewportBuffer,[]),n.drawArrays(n.TRIANGLE_STRIP,0,4)}}(e,i))},line:function(t,e,r,i){if("translucent"===t.renderPass){var n=r.paint.get("line-opacity"),o=r.paint.get("line-width");if(0!==n.constantOr(1)&&0!==o.constantOr(1)){var a=t.context;a.setDepthMode(t.depthModeForSublayer(0,Ct.ReadOnly)),a.setColorMode(t.colorModeForRenderPass());for(var s,l=r.paint.get("line-dasharray")?"lineSDF":r.paint.get("line-pattern")?"linePattern":r.paint.get("line-gradient")?"lineGradient":"line",u=!0,c=0,h=i;c<h.length;c+=1){var p=h[c],f=e.getTile(p),d=f.getBucket(r);if(d){var m=d.programConfigurations.get(r.id),y=t.context.program.get(),v=t.useProgram(l,m),g=u||v.program!==y,_=s!==f.tileID.overscaledZ;g&&m.setUniforms(t.context,v,r.paint,{zoom:t.transform.zoom}),ir(v,t,f,d,r,p,m,g,_),s=f.tileID.overscaledZ,u=!1}}}}},fill:function(e,r,i,n){var o=i.paint.get("fill-color"),a=i.paint.get("fill-opacity");if(0!==a.constantOr(1)){var s=e.context;s.setColorMode(e.colorModeForRenderPass());var l=i.paint.get("fill-pattern")||1!==o.constantOr(t.default$8.transparent).a||1!==a.constantOr(0)?"translucent":"opaque";e.renderPass===l&&(s.setDepthMode(e.depthModeForSublayer(1,"opaque"===e.renderPass?Ct.ReadWrite:Ct.ReadOnly)),sr(e,r,i,n,lr)),"translucent"===e.renderPass&&i.paint.get("fill-antialias")&&(s.setDepthMode(e.depthModeForSublayer(i.getPaintProperty("fill-outline-color")?2:0,Ct.ReadOnly)),sr(e,r,i,n,ur))}},"fill-extrusion":function(e,r,i,n){if(0!==i.paint.get("fill-extrusion-opacity"))if("offscreen"===e.renderPass){!function(e,r){var i=e.context,n=i.gl,o=r.viewportFrame;if(e.depthRboNeedsClear&&e.setupOffscreenDepthRenderbuffer(),!o){var a=new t.default$4(i,{width:e.width,height:e.height,data:null},n.RGBA);a.bind(n.LINEAR,n.CLAMP_TO_EDGE),(o=r.viewportFrame=i.createFramebuffer(e.width,e.height)).colorAttachment.set(a.texture)}i.bindFramebuffer.set(o.framebuffer),o.depthAttachment.set(e.depthRbo),e.depthRboNeedsClear&&(i.clear({depth:1}),e.depthRboNeedsClear=!1),i.clear({color:t.default$8.transparent}),i.setStencilMode(Pt.disabled),i.setDepthMode(new Ct(n.LEQUAL,Ct.ReadWrite,[0,1])),i.setColorMode(e.colorModeForRenderPass())}(e,i);for(var o=!0,a=0,s=n;a<s.length;a+=1){var l=s[a],u=r.getTile(l),c=u.getBucket(i);c&&(hr(e,0,i,u,l,c,o),o=!1)}}else"translucent"===e.renderPass&&function(e,r){var i=r.viewportFrame;if(i){var n=e.context,o=n.gl,a=e.useProgram("extrusionTexture");n.setStencilMode(Pt.disabled),n.setDepthMode(Ct.disabled),n.setColorMode(e.colorModeForRenderPass()),n.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,i.colorAttachment.get()),o.uniform1f(a.uniforms.u_opacity,r.paint.get("fill-extrusion-opacity")),o.uniform1i(a.uniforms.u_image,0);var s=t.create();t.ortho(s,0,e.width,e.height,0,0,1),o.uniformMatrix4fv(a.uniforms.u_matrix,!1,s),o.uniform2f(a.uniforms.u_world,o.drawingBufferWidth,o.drawingBufferHeight),e.viewportVAO.bind(n,a,e.viewportBuffer,[]),o.drawArrays(o.TRIANGLE_STRIP,0,4)}}(e,i)},hillshade:function(t,e,r,i){if("offscreen"===t.renderPass||"translucent"===t.renderPass){var n=t.context,o=e.getSource().maxzoom;n.setDepthMode(t.depthModeForSublayer(0,Ct.ReadOnly)),n.setStencilMode(Pt.disabled),n.setColorMode(t.colorModeForRenderPass());for(var a=0,s=i;a<s.length;a+=1){var l=s[a],u=e.getTile(l);u.needsHillshadePrepare&&"offscreen"===t.renderPass?fr(t,u,o):"translucent"===t.renderPass&&pr(t,u,r)}n.viewport.set([0,0,t.width,t.height])}},raster:function(t,e,r,i){if("translucent"===t.renderPass&&0!==r.paint.get("raster-opacity")){var n,o,a=t.context,s=a.gl,l=e.getSource(),u=t.useProgram("raster");a.setStencilMode(Pt.disabled),a.setColorMode(t.colorModeForRenderPass()),s.uniform1f(u.uniforms.u_brightness_low,r.paint.get("raster-brightness-min")),s.uniform1f(u.uniforms.u_brightness_high,r.paint.get("raster-brightness-max")),s.uniform1f(u.uniforms.u_saturation_factor,(n=r.paint.get("raster-saturation"))>0?1-1/(1.001-n):-n),s.uniform1f(u.uniforms.u_contrast_factor,(o=r.paint.get("raster-contrast"))>0?1/(1-o):1+o),s.uniform3fv(u.uniforms.u_spin_weights,function(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}(r.paint.get("raster-hue-rotate"))),s.uniform1f(u.uniforms.u_buffer_scale,1),s.uniform1i(u.uniforms.u_image0,0),s.uniform1i(u.uniforms.u_image1,1);for(var c=i.length&&i[0].overscaledZ,h=0,p=i;h<p.length;h+=1){var f=p[h];a.setDepthMode(t.depthModeForSublayer(f.overscaledZ-c,1===r.paint.get("raster-opacity")?Ct.ReadWrite:Ct.ReadOnly,s.LESS));var d=e.getTile(f),m=t.transform.calculatePosMatrix(f.toUnwrapped(),!0);d.registerFadeDuration(r.paint.get("raster-fade-duration")),s.uniformMatrix4fv(u.uniforms.u_matrix,!1,m);var y=e.findLoadedParent(f,0,{}),v=dr(d,y,e,r,t.transform),g=void 0,_=void 0,x="nearest"===r.paint.get("raster-resampling")?s.NEAREST:s.LINEAR;if(a.activeTexture.set(s.TEXTURE0),d.texture.bind(x,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),a.activeTexture.set(s.TEXTURE1),y?(y.texture.bind(x,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),g=Math.pow(2,y.tileID.overscaledZ-d.tileID.overscaledZ),_=[d.tileID.canonical.x*g%1,d.tileID.canonical.y*g%1]):d.texture.bind(x,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),s.uniform2fv(u.uniforms.u_tl_parent,_||[0,0]),s.uniform1f(u.uniforms.u_scale_parent,g||1),s.uniform1f(u.uniforms.u_fade_t,v.mix),s.uniform1f(u.uniforms.u_opacity,v.opacity*r.paint.get("raster-opacity")),l instanceof $){var b=l.boundsBuffer;l.boundsVAO.bind(a,u,b,[]),s.drawArrays(s.TRIANGLE_STRIP,0,b.length)}else if(d.maskedBoundsBuffer&&d.maskedIndexBuffer&&d.segments)u.draw(a,s.TRIANGLES,r.id,d.maskedBoundsBuffer,d.maskedIndexBuffer,d.segments);else{var w=t.rasterBoundsBuffer;t.rasterBoundsVAO.bind(a,u,w,[]),s.drawArrays(s.TRIANGLE_STRIP,0,w.length)}}}},background:function(t,e,r){var i=r.paint.get("background-color"),n=r.paint.get("background-opacity");if(0!==n){var o=t.context,a=o.gl,s=t.transform,l=s.tileSize,u=r.paint.get("background-pattern"),c=u||1!==i.a||1!==n?"translucent":"opaque";if(t.renderPass===c){var h;if(o.setStencilMode(Pt.disabled),o.setDepthMode(t.depthModeForSublayer(0,"opaque"===c?Ct.ReadWrite:Ct.ReadOnly)),o.setColorMode(t.colorModeForRenderPass()),u){if(nr(u,t))return;h=t.useProgram("backgroundPattern"),or(u,t,h),t.tileExtentPatternVAO.bind(o,h,t.tileExtentBuffer,[])}else h=t.useProgram("background"),a.uniform4fv(h.uniforms.u_color,[i.r,i.g,i.b,i.a]),t.tileExtentVAO.bind(o,h,t.tileExtentBuffer,[]);a.uniform1f(h.uniforms.u_opacity,n);for(var p=0,f=s.coveringTiles({tileSize:l});p<f.length;p+=1){var d=f[p];u&&ar({tileID:d,tileSize:l},t,h),a.uniformMatrix4fv(h.uniforms.u_matrix,!1,t.transform.calculatePosMatrix(d.toUnwrapped())),a.drawArrays(a.TRIANGLE_STRIP,0,t.tileExtentBuffer.length)}}}},debug:function(t,e,r){for(var i=0;i<r.length;i++)mr(t,e,r[i])}},gr=function(e,r){this.context=new Dt(e),this.transform=r,this._tileTextures={},this.setup(),this.numSublayers=Rt.maxUnderzooming+Rt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.depthRboNeedsClear=!0,this.emptyProgramConfiguration=new t.default$22,this.crossTileSymbolIndex=new Oe};function _r(t,e){if(t.row>e.row){var r=t;t=e,e=r}return{x0:t.column,y0:t.row,x1:e.column,y1:e.row,dx:e.column-t.column,dy:e.row-t.row}}function xr(t,e,r,i,n){var o=Math.max(r,Math.floor(e.y0)),a=Math.min(i,Math.ceil(e.y1));if(t.x0===e.x0&&t.y0===e.y0?t.x0+e.dy/t.dy*t.dx<e.x1:t.x1-e.dy/t.dy*t.dx<e.x0){var s=t;t=e,e=s}for(var l=t.dx/t.dy,u=e.dx/e.dy,c=t.dx>0,h=e.dx<0,p=o;p<a;p++){var f=l*Math.max(0,Math.min(t.dy,p+c-t.y0))+t.x0,d=u*Math.max(0,Math.min(e.dy,p+h-e.y0))+e.x0;n(Math.floor(d),Math.ceil(f),p)}}function br(t,e,r,i,n,o){var a,s=_r(t,e),l=_r(e,r),u=_r(r,t);s.dy>l.dy&&(a=s,s=l,l=a),s.dy>u.dy&&(a=s,s=u,u=a),l.dy>u.dy&&(a=l,l=u,u=a),s.dy&&xr(u,s,i,n,o),l.dy&&xr(u,l,i,n,o)}gr.prototype.resize=function(e,r){var i=this.context.gl;if(this.width=e*t.default$2.devicePixelRatio,this.height=r*t.default$2.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var n=0,o=this.style._order;n<o.length;n+=1){var a=o[n];this.style._layers[a].resize()}this.depthRbo&&(i.deleteRenderbuffer(this.depthRbo),this.depthRbo=null)},gr.prototype.setup=function(){var e=this.context,r=new t.PosArray;r.emplaceBack(0,0),r.emplaceBack(t.default$10,0),r.emplaceBack(0,t.default$10),r.emplaceBack(t.default$10,t.default$10),this.tileExtentBuffer=e.createVertexBuffer(r,Ue.members),this.tileExtentVAO=new q,this.tileExtentPatternVAO=new q;var i=new t.PosArray;i.emplaceBack(0,0),i.emplaceBack(t.default$10,0),i.emplaceBack(t.default$10,t.default$10),i.emplaceBack(0,t.default$10),i.emplaceBack(0,0),this.debugBuffer=e.createVertexBuffer(i,Ue.members),this.debugVAO=new q;var n=new t.RasterBoundsArray;n.emplaceBack(0,0,0,0),n.emplaceBack(t.default$10,0,t.default$10,0),n.emplaceBack(0,t.default$10,0,t.default$10),n.emplaceBack(t.default$10,t.default$10,t.default$10,t.default$10),this.rasterBoundsBuffer=e.createVertexBuffer(n,t.default$11.members),this.rasterBoundsVAO=new q;var o=new t.PosArray;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(o,Ue.members),this.viewportVAO=new q},gr.prototype.clearStencil=function(){var e=this.context,r=e.gl;e.setColorMode(Lt.disabled),e.setDepthMode(Ct.disabled),e.setStencilMode(new Pt({func:r.ALWAYS,mask:0},0,255,r.ZERO,r.ZERO,r.ZERO));var i=t.create();t.ortho(i,0,this.width,this.height,0,0,1),t.scale(i,i,[r.drawingBufferWidth,r.drawingBufferHeight,0]);var n=this.useProgram("clippingMask");r.uniformMatrix4fv(n.uniforms.u_matrix,!1,i),this.viewportVAO.bind(e,n,this.viewportBuffer,[]),r.drawArrays(r.TRIANGLE_STRIP,0,4)},gr.prototype._renderTileClippingMasks=function(t){var e=this.context,r=e.gl;e.setColorMode(Lt.disabled),e.setDepthMode(Ct.disabled);var i=1;this._tileClippingMaskIDs={};for(var n=0,o=t;n<o.length;n+=1){var a=o[n],s=this._tileClippingMaskIDs[a.key]=i++;e.setStencilMode(new Pt({func:r.ALWAYS,mask:0},s,255,r.KEEP,r.KEEP,r.REPLACE));var l=this.useProgram("clippingMask");r.uniformMatrix4fv(l.uniforms.u_matrix,!1,a.posMatrix),this.tileExtentVAO.bind(this.context,l,this.tileExtentBuffer,[]),r.drawArrays(r.TRIANGLE_STRIP,0,this.tileExtentBuffer.length)}},gr.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new Pt({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},gr.prototype.colorModeForRenderPass=function(){var e=this.context.gl;if(this._showOverdrawInspector){return new Lt([e.CONSTANT_COLOR,e.ONE],new t.default$8(1/8,1/8,1/8,0),[!0,!0,!0,!0])}return"opaque"===this.renderPass?Lt.unblended:Lt.alphaBlended},gr.prototype.depthModeForSublayer=function(t,e,r){var i=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon,n=i-1+this.depthRange;return new Ct(r||this.context.gl.LEQUAL,e,[n,i])},gr.prototype.render=function(e,r){var i=this;for(var n in this.style=e,this.options=r,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(t.default$2.now()),e.sourceCaches){var o=i.style.sourceCaches[n];o.used&&o.prepare(i.context)}var a=this.style._order,s=t.filterObject(this.style.sourceCaches,(function(t){return"raster"===t.getSource().type||"raster-dem"===t.getSource().type})),l=function(e){var r=s[e];!function(e,r){for(var i=e.sort((function(t,e){return t.tileID.isLessThan(e.tileID)?-1:e.tileID.isLessThan(t.tileID)?1:0})),n=0;n<i.length;n++){var o={},a=i[n],s=i.slice(n+1);He(a.tileID.wrapped(),a.tileID,s,new t.OverscaledTileID(0,a.tileID.wrap+1,0,0,0),o),a.setMask(o,r)}}(r.getVisibleCoordinates().map((function(t){return r.getTile(t)})),i.context)};for(var u in s)l(u);this.renderPass="offscreen";var c,h=[];this.depthRboNeedsClear=!0;for(var p=0;p<a.length;p++){var f=i.style._layers[a[p]];f.hasOffscreenPass()&&!f.isHidden(i.transform.zoom)&&(f.source!==(c&&c.id)&&(h=[],(c=i.style.sourceCaches[f.source])&&(h=c.getVisibleCoordinates()).reverse()),h.length&&i.renderLayer(i,c,f,h))}this.context.bindFramebuffer.set(null),this.context.clear({color:r.showOverdrawInspector?t.default$8.black:t.default$8.transparent,depth:1}),this._showOverdrawInspector=r.showOverdrawInspector,this.depthRange=(e._order.length+2)*this.numSublayers*this.depthEpsilon,this.renderPass="opaque";var d,m=[];for(this.currentLayer=a.length-1,this.currentLayer;this.currentLayer>=0;this.currentLayer--){var y=i.style._layers[a[i.currentLayer]];y.source!==(d&&d.id)&&(m=[],(d=i.style.sourceCaches[y.source])&&(i.clearStencil(),m=d.getVisibleCoordinates(),d.getSource().isTileClipped&&i._renderTileClippingMasks(m))),i.renderLayer(i,d,y,m)}this.renderPass="translucent";var v,g=[];for(this.currentLayer=0,this.currentLayer;this.currentLayer<a.length;this.currentLayer++){var _=i.style._layers[a[i.currentLayer]];_.source!==(v&&v.id)&&(g=[],(v=i.style.sourceCaches[_.source])&&(i.clearStencil(),g=v.getVisibleCoordinates(),v.getSource().isTileClipped&&i._renderTileClippingMasks(g)),g.reverse()),i.renderLayer(i,v,_,g)}if(this.options.showTileBoundaries){var x=this.style.sourceCaches[Object.keys(this.style.sourceCaches)[0]];x&&vr.debug(this,x,x.getVisibleCoordinates())}},gr.prototype.setupOffscreenDepthRenderbuffer=function(){var t=this.context;this.depthRbo||(this.depthRbo=t.createRenderbuffer(t.gl.DEPTH_COMPONENT16,this.width,this.height))},gr.prototype.renderLayer=function(t,e,r,i){r.isHidden(this.transform.zoom)||("background"===r.type||i.length)&&(this.id=r.id,vr[r.type](t,e,r,i))},gr.prototype.translatePosMatrix=function(e,r,i,n,o){if(!i[0]&&!i[1])return e;var a=o?"map"===n?this.transform.angle:0:"viewport"===n?-this.transform.angle:0;if(a){var s=Math.sin(a),l=Math.cos(a);i=[i[0]*l-i[1]*s,i[0]*s+i[1]*l]}var u=[o?i[0]:me(r,i[0],this.transform.zoom),o?i[1]:me(r,i[1],this.transform.zoom),0],c=new Float32Array(16);return t.translate(c,e,u),c},gr.prototype.saveTileTexture=function(t){var e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t]},gr.prototype.getTileTexture=function(t){var e=this._tileTextures[t];return e&&e.length>0?e.pop():null},gr.prototype._createProgramCached=function(t,e){this.cache=this.cache||{};var r=""+t+(e.cacheKey||"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new Xe(this.context,We[t],e,this._showOverdrawInspector)),this.cache[r]},gr.prototype.useProgram=function(t,e){var r=this._createProgramCached(t,e||this.emptyProgramConfiguration);return this.context.program.set(r.program),r};var wr=function(t,e,r){this.tileSize=512,this._renderWorldCopies=void 0===r||r,this._minZoom=t||0,this._maxZoom=e||22,this.latRange=[-85.05113,85.05113],this.width=0,this.height=0,this._center=new B(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._posMatrixCache={},this._alignedPosMatrixCache={}},Er={minZoom:{configurable:!0},maxZoom:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerPoint:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},unmodified:{configurable:!0},x:{configurable:!0},y:{configurable:!0},point:{configurable:!0}};wr.prototype.clone=function(){var t=new wr(this._minZoom,this._maxZoom,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._calcMatrices(),t},Er.minZoom.get=function(){return this._minZoom},Er.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},Er.maxZoom.get=function(){return this._maxZoom},Er.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},Er.renderWorldCopies.get=function(){return this._renderWorldCopies},Er.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},Er.worldSize.get=function(){return this.tileSize*this.scale},Er.centerPoint.get=function(){return this.size._div(2)},Er.size.get=function(){return new t["default"](this.width,this.height)},Er.bearing.get=function(){return-this.angle/Math.PI*180},Er.bearing.set=function(e){var r=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=t.create$4(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Er.pitch.get=function(){return this._pitch/Math.PI*180},Er.pitch.set=function(e){var r=t.clamp(e,0,60)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},Er.fov.get=function(){return this._fov/Math.PI*180},Er.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},Er.zoom.get=function(){return this._zoom},Er.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},Er.center.get=function(){return this._center},Er.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},wr.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},wr.prototype.getVisibleUnwrappedCoordinates=function(e){var r=this.pointCoordinate(new t["default"](0,0),0),i=this.pointCoordinate(new t["default"](this.width,0),0),n=Math.floor(r.column),o=Math.floor(i.column),a=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var s=n;s<=o;s++)0!==s&&a.push(new t.UnwrappedTileID(s,e));return a},wr.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),i=r;if(void 0!==e.minzoom&&r<e.minzoom)return[];void 0!==e.maxzoom&&r>e.maxzoom&&(r=e.maxzoom);var n=this.pointCoordinate(this.centerPoint,r),o=new t["default"](n.column-.5,n.row-.5);return function(e,r,i,n){void 0===n&&(n=!0);var o=1<<e,a={};function s(r,s,l){var u,c,h,p;if(l>=0&&l<=o)for(u=r;u<s;u++)c=Math.floor(u/o),h=(u%o+o)%o,0!==c&&!0!==n||(p=new t.OverscaledTileID(i,c,e,h,l),a[p.key]=p)}return br(r[0],r[1],r[2],0,o,s),br(r[2],r[3],r[0],0,o,s),Object.keys(a).map((function(t){return a[t]}))}(r,[this.pointCoordinate(new t["default"](0,0),r),this.pointCoordinate(new t["default"](this.width,0),r),this.pointCoordinate(new t["default"](this.width,this.height),r),this.pointCoordinate(new t["default"](0,this.height),r)],e.reparseOverscaled?i:r,this._renderWorldCopies).sort((function(t,e){return o.dist(t.canonical)-o.dist(e.canonical)}))},wr.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},Er.unmodified.get=function(){return this._unmodified},wr.prototype.zoomScale=function(t){return Math.pow(2,t)},wr.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},wr.prototype.project=function(e){return new t["default"](this.lngX(e.lng),this.latY(e.lat))},wr.prototype.unproject=function(t){return new B(this.xLng(t.x),this.yLat(t.y))},Er.x.get=function(){return this.lngX(this.center.lng)},Er.y.get=function(){return this.latY(this.center.lat)},Er.point.get=function(){return new t["default"](this.x,this.y)},wr.prototype.lngX=function(t){return(180+t)*this.worldSize/360},wr.prototype.latY=function(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))*this.worldSize/360},wr.prototype.xLng=function(t){return 360*t/this.worldSize-180},wr.prototype.yLat=function(t){var e=180-360*t/this.worldSize;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90},wr.prototype.setLocationAtPoint=function(t,e){var r=this.pointCoordinate(e)._sub(this.pointCoordinate(this.centerPoint));this.center=this.coordinateLocation(this.locationCoordinate(t)._sub(r)),this._renderWorldCopies&&(this.center=this.center.wrap())},wr.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},wr.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},wr.prototype.locationCoordinate=function(e){return new t.default$15(this.lngX(e.lng)/this.tileSize,this.latY(e.lat)/this.tileSize,this.zoom).zoomTo(this.tileZoom)},wr.prototype.coordinateLocation=function(t){var e=t.zoomTo(this.zoom);return new B(this.xLng(e.column*this.tileSize),this.yLat(e.row*this.tileSize))},wr.prototype.pointCoordinate=function(e,r){void 0===r&&(r=this.tileZoom);var i=[e.x,e.y,0,1],n=[e.x,e.y,1,1];t.transformMat4(i,i,this.pixelMatrixInverse),t.transformMat4(n,n,this.pixelMatrixInverse);var o=i[3],a=n[3],s=i[0]/o,l=n[0]/a,u=i[1]/o,c=n[1]/a,h=i[2]/o,p=n[2]/a,f=h===p?0:(0-h)/(p-h);return new t.default$15(t.number(s,l,f)/this.tileSize,t.number(u,c,f)/this.tileSize,this.zoom)._zoomTo(r)},wr.prototype.coordinatePoint=function(e){var r=e.zoomTo(this.zoom),i=[r.column*this.tileSize,r.row*this.tileSize,0,1];return t.transformMat4(i,i,this.pixelMatrix),new t["default"](i[0]/i[3],i[1]/i[3])},wr.prototype.calculatePosMatrix=function(e,r){void 0===r&&(r=!1);var i=e.key,n=r?this._alignedPosMatrixCache:this._posMatrixCache;if(n[i])return n[i];var o=e.canonical,a=this.worldSize/this.zoomScale(o.z),s=o.x+Math.pow(2,o.z)*e.wrap,l=t.identity(new Float64Array(16));return t.translate(l,l,[s*a,o.y*a,0]),t.scale(l,l,[a/t.default$10,a/t.default$10,1]),t.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),n[i]=new Float32Array(l),n[i]},wr.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,r,i,n,o=-90,a=90,s=-180,l=180,u=this.size,c=this._unmodified;if(this.latRange){var h=this.latRange;o=this.latY(h[1]),e=(a=this.latY(h[0]))-o<u.y?u.y/(a-o):0}if(this.lngRange){var p=this.lngRange;s=this.lngX(p[0]),r=(l=this.lngX(p[1]))-s<u.x?u.x/(l-s):0}var f=Math.max(r||0,e||0);if(f)return this.center=this.unproject(new t["default"](r?(l+s)/2:this.x,e?(a+o)/2:this.y)),this.zoom+=this.scaleZoom(f),this._unmodified=c,void(this._constraining=!1);if(this.latRange){var d=this.y,m=u.y/2;d-m<o&&(n=o+m),d+m>a&&(n=a-m)}if(this.lngRange){var y=this.x,v=u.x/2;y-v<s&&(i=s+v),y+v>l&&(i=l-v)}void 0===i&&void 0===n||(this.center=this.unproject(new t["default"](void 0!==i?i:this.x,void 0!==n?n:this.y))),this._unmodified=c,this._constraining=!1}},wr.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var e=this._fov/2,r=Math.PI/2+this._pitch,i=Math.sin(e)*this.cameraToCenterDistance/Math.sin(Math.PI-r-e),n=this.x,o=this.y,a=1.01*(Math.cos(Math.PI/2-this._pitch)*i+this.cameraToCenterDistance),s=new Float64Array(16);t.perspective(s,this._fov,this.width/this.height,1,a),t.scale(s,s,[1,-1,1]),t.translate(s,s,[0,0,-this.cameraToCenterDistance]),t.rotateX(s,s,this._pitch),t.rotateZ(s,s,this.angle),t.translate(s,s,[-n,-o,0]);var l=this.worldSize/(2*Math.PI*6378137*Math.abs(Math.cos(this.center.lat*(Math.PI/180))));t.scale(s,s,[1,1,l,1]),this.projMatrix=s;var u=this.width%2/2,c=this.height%2/2,h=Math.cos(this.angle),p=Math.sin(this.angle),f=n-Math.round(n)+h*u+p*c,d=o-Math.round(o)+h*c+p*u,m=new Float64Array(s);if(t.translate(m,m,[f>.5?f-1:f,d>.5?d-1:d,0]),this.alignedProjMatrix=m,s=t.create(),t.scale(s,s,[this.width/2,-this.height/2,1]),t.translate(s,s,[1,-1,0]),this.pixelMatrix=t.multiply(new Float64Array(16),s,this.projMatrix),!(s=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=s,this._posMatrixCache={},this._alignedPosMatrixCache={}}},wr.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t["default"](0,0)).zoomTo(this.zoom),r=[e.column*this.tileSize,e.row*this.tileSize,0,1];return t.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},Object.defineProperties(wr.prototype,Er);var Sr=function(){var e,r,i,n,o;t.bindAll(["_onHashChange","_updateHash"],this),this._updateHash=(e=this._updateHashUnthrottled.bind(this),r=300,i=!1,n=0,o=function(){n=0,i&&(e(),n=setTimeout(o,r),i=!1)},function(){return i=!0,n||o(),n})};Sr.prototype.addTo=function(e){return this._map=e,t.default$1.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Sr.prototype.remove=function(){return t.default$1.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Sr.prototype.getHashString=function(t){var e=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,i=Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10),n=Math.pow(10,i),o=Math.round(e.lng*n)/n,a=Math.round(e.lat*n)/n,s=this._map.getBearing(),l=this._map.getPitch(),u="";return u+=t?"#/"+o+"/"+a+"/"+r:"#"+r+"/"+a+"/"+o,(s||l)&&(u+="/"+Math.round(10*s)/10),l&&(u+="/"+Math.round(l)),u},Sr.prototype._onHashChange=function(){var e=t.default$1.location.hash.replace("#","").split("/");return e.length>=3&&(this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:+(e[3]||0),pitch:+(e[4]||0)}),!0)},Sr.prototype._updateHashUnthrottled=function(){var e=this.getHashString();t.default$1.history.replaceState(t.default$1.history.state,"",e)};var Tr=function(e){function i(i,n,o,a){void 0===a&&(a={});var s=r.mousePos(n.getCanvasContainer(),o),l=n.unproject(s);e.call(this,i,t.extend({point:s,lngLat:l,originalEvent:o},a)),this._defaultPrevented=!1,this.target=n}e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i;var n={defaultPrevented:{configurable:!0}};return i.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(i.prototype,n),i}(t.Event),Ar=function(e){function i(i,n,o){var a=r.touchPos(n.getCanvasContainer(),o),s=a.map((function(t){return n.unproject(t)})),l=a.reduce((function(t,e,r,i){return t.add(e.div(i.length))}),new t["default"](0,0)),u=n.unproject(l);e.call(this,i,{points:a,point:l,lngLats:s,lngLat:u,originalEvent:o}),this._defaultPrevented=!1}e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i;var n={defaultPrevented:{configurable:!0}};return i.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(i.prototype,n),i}(t.Event),zr=function(t){function e(e,r,i){t.call(this,e,{originalEvent:i}),this._defaultPrevented=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,r),e}(t.Event),Ir=function(e){this._map=e,this._el=e.getCanvasContainer(),this._delta=0,t.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};Ir.prototype.isEnabled=function(){return!!this._enabled},Ir.prototype.isActive=function(){return!!this._active},Ir.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},Ir.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Ir.prototype.onWheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.default$1.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,i=t.default$2.now(),n=i-(this._lastWheelEventTime||0);this._lastWheelEventTime=i,0!==r&&r%4.000244140625==0?this._type="wheel":0!==r&&Math.abs(r)<4?this._type="trackpad":n>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(n*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=e,this._delta-=r,this.isActive()||this._start(e)),e.preventDefault()}},Ir.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this.isActive()||this._start(t)},Ir.prototype._start=function(e){if(this._delta){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),this._active=!0,this._map.fire(new t.Event("movestart",{originalEvent:e})),this._map.fire(new t.Event("zoomstart",{originalEvent:e})),this._finishTimeout&&clearTimeout(this._finishTimeout);var i=r.mousePos(this._el,e);this._around=B.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(i)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame))}},Ir.prototype._onScrollFrame=function(){var e=this;if(this._frameId=null,this.isActive()){var r=this._map.transform;if(0!==this._delta){var i="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?1/450:.01,n=2/(1+Math.exp(-Math.abs(this._delta*i)));this._delta<0&&0!==n&&(n=1/n);var o="number"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(o*n))),"wheel"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var a="number"==typeof this._targetZoom?this._targetZoom:r.zoom,s=this._startZoom,l=this._easing,u=!1;if("wheel"===this._type&&s&&l){var c=Math.min((t.default$2.now()-this._lastWheelEventTime)/200,1),h=l(c);r.zoom=t.number(s,a,h),c<1?this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame)):u=!0}else r.zoom=a,u=!0;r.setLocationAtPoint(this._around,this._aroundPoint),this._map.fire(new t.Event("move",{originalEvent:this._lastWheelEvent})),this._map.fire(new t.Event("zoom",{originalEvent:this._lastWheelEvent})),u&&(this._active=!1,this._finishTimeout=setTimeout((function(){e._map.fire(new t.Event("zoomend",{originalEvent:e._lastWheelEvent})),e._map.fire(new t.Event("moveend",{originalEvent:e._lastWheelEvent})),delete e._targetZoom}),200))}},Ir.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var i=this._prevEase,n=(t.default$2.now()-i.start)/i.duration,o=i.easing(n+.01)-i.easing(n),a=.27/Math.sqrt(o*o+1e-4)*.01,s=Math.sqrt(.0729-a*a);r=t.bezier(a,s,.25,1)}return this._prevEase={start:t.default$2.now(),duration:e,easing:r},r};var kr=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=r.clickTolerance||1,t.bindAll(["_onMouseMove","_onMouseUp","_onKeyDown"],this)};kr.prototype.isEnabled=function(){return!!this._enabled},kr.prototype.isActive=function(){return!!this._active},kr.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},kr.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},kr.prototype.onMouseDown=function(e){this.isEnabled()&&e.shiftKey&&0===e.button&&(t.default$1.document.addEventListener("mousemove",this._onMouseMove,!1),t.default$1.document.addEventListener("keydown",this._onKeyDown,!1),t.default$1.document.addEventListener("mouseup",this._onMouseUp,!1),r.disableDrag(),this._startPos=this._lastPos=r.mousePos(this._el,e),this._active=!0)},kr.prototype._onMouseMove=function(t){var e=r.mousePos(this._el,t);if(!(this._lastPos.equals(e)||!this._box&&e.dist(this._startPos)<this._clickTolerance)){var i=this._startPos;this._lastPos=e,this._box||(this._box=r.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var n=Math.min(i.x,e.x),o=Math.max(i.x,e.x),a=Math.min(i.y,e.y),s=Math.max(i.y,e.y);r.setTransform(this._box,"translate("+n+"px,"+a+"px)"),this._box.style.width=o-n+"px",this._box.style.height=s-a+"px"}},kr.prototype._onMouseUp=function(e){if(0===e.button){var i=this._startPos,n=r.mousePos(this._el,e),o=(new O).extend(this._map.unproject(i)).extend(this._map.unproject(n));this._finish(),r.suppressClick(),i.x===n.x&&i.y===n.y?this._fireEvent("boxzoomcancel",e):this._map.fitBounds(o,{linear:!0}).fire(new t.Event("boxzoomend",{originalEvent:e,boxZoomBounds:o}))}},kr.prototype._onKeyDown=function(t){27===t.keyCode&&(this._finish(),this._fireEvent("boxzoomcancel",t))},kr.prototype._finish=function(){this._active=!1,t.default$1.document.removeEventListener("mousemove",this._onMouseMove,!1),t.default$1.document.removeEventListener("keydown",this._onKeyDown,!1),t.default$1.document.removeEventListener("mouseup",this._onMouseUp,!1),this._container.classList.remove("mapboxgl-crosshair"),this._box&&(r.remove(this._box),this._box=null),r.enableDrag(),delete this._startPos,delete this._lastPos},kr.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,{originalEvent:r}))};var Mr=t.bezier(0,0,.25,1),Cr=function(e,r){this._map=e,this._el=r.element||e.getCanvasContainer(),this._state="disabled",this._button=r.button||"right",this._bearingSnap=r.bearingSnap||0,this._pitchWithRotate=!1!==r.pitchWithRotate,t.bindAll(["onMouseDown","_onMouseMove","_onMouseUp","_onBlur","_onDragFrame"],this)};Cr.prototype.isEnabled=function(){return"disabled"!==this._state},Cr.prototype.isActive=function(){return"active"===this._state},Cr.prototype.enable=function(){this.isEnabled()||(this._state="enabled")},Cr.prototype.disable=function(){if(this.isEnabled())switch(this._state){case"active":this._state="disabled",this._unbind(),this._deactivate(),this._fireEvent("rotateend"),this._pitchWithRotate&&this._fireEvent("pitchend"),this._fireEvent("moveend");break;case"pending":this._state="disabled",this._unbind();break;default:this._state="disabled"}},Cr.prototype.onMouseDown=function(e){if("enabled"===this._state){if("right"===this._button){if(this._eventButton=r.mouseButton(e),this._eventButton!==(e.ctrlKey?0:2))return}else{if(e.ctrlKey||0!==r.mouseButton(e))return;this._eventButton=0}r.disableDrag(),t.default$1.document.addEventListener("mousemove",this._onMouseMove,{capture:!0}),t.default$1.document.addEventListener("mouseup",this._onMouseUp),t.default$1.addEventListener("blur",this._onBlur),this._state="pending",this._inertia=[[t.default$2.now(),this._map.getBearing()]],this._startPos=this._lastPos=r.mousePos(this._el,e),this._center=this._map.transform.centerPoint,e.preventDefault()}},Cr.prototype._onMouseMove=function(t){var e=r.mousePos(this._el,t);this._lastPos.equals(e)||(this._lastMoveEvent=t,this._lastPos=e,"pending"===this._state&&(this._state="active",this._fireEvent("rotatestart",t),this._fireEvent("movestart",t),this._pitchWithRotate&&this._fireEvent("pitchstart",t)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame)))},Cr.prototype._onDragFrame=function(){this._frameId=null;var e=this._lastMoveEvent;if(e){var r=this._map.transform,i=this._startPos,n=this._lastPos,o=.8*(i.x-n.x),a=-.5*(i.y-n.y),s=r.bearing-o,l=r.pitch-a,u=this._inertia,c=u[u.length-1];this._drainInertiaBuffer(),u.push([t.default$2.now(),this._map._normalizeBearing(s,c[1])]),r.bearing=s,this._pitchWithRotate&&(this._fireEvent("pitch",e),r.pitch=l),this._fireEvent("rotate",e),this._fireEvent("move",e),delete this._lastMoveEvent,this._startPos=this._lastPos}},Cr.prototype._onMouseUp=function(t){if(r.mouseButton(t)===this._eventButton)switch(this._state){case"active":this._state="enabled",r.suppressClick(),this._unbind(),this._deactivate(),this._inertialRotate(t);break;case"pending":this._state="enabled",this._unbind()}},Cr.prototype._onBlur=function(t){switch(this._state){case"active":this._state="enabled",this._unbind(),this._deactivate(),this._fireEvent("rotateend",t),this._pitchWithRotate&&this._fireEvent("pitchend",t),this._fireEvent("moveend",t);break;case"pending":this._state="enabled",this._unbind()}},Cr.prototype._unbind=function(){t.default$1.document.removeEventListener("mousemove",this._onMouseMove,{capture:!0}),t.default$1.document.removeEventListener("mouseup",this._onMouseUp),t.default$1.removeEventListener("blur",this._onBlur),r.enableDrag()},Cr.prototype._deactivate=function(){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._startPos,delete this._lastPos},Cr.prototype._inertialRotate=function(t){var e=this;this._fireEvent("rotateend",t),this._drainInertiaBuffer();var r=this._map,i=r.getBearing(),n=this._inertia,o=function(){Math.abs(i)<e._bearingSnap?r.resetNorth({noMoveStart:!0},{originalEvent:t}):e._fireEvent("moveend",t),e._pitchWithRotate&&e._fireEvent("pitchend",t)};if(n.length<2)o();else{var a=n[0],s=n[n.length-1],l=n[n.length-2],u=r._normalizeBearing(i,l[1]),c=s[1]-a[1],h=c<0?-1:1,p=(s[0]-a[0])/1e3;if(0!==c&&0!==p){var f=Math.abs(c*(.25/p));f>180&&(f=180);var d=f/180;u+=h*f*(d/2),Math.abs(r._normalizeBearing(u,0))<this._bearingSnap&&(u=r._normalizeBearing(0,u)),r.rotateTo(u,{duration:1e3*d,easing:Mr,noMoveStart:!0},{originalEvent:t})}else o()}},Cr.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},Cr.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,r=t.default$2.now();e.length>0&&r-e[0][0]>160;)e.shift()};var Pr=t.bezier(0,0,.3,1),Lr=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._state="disabled",this._clickTolerance=r.clickTolerance||1,t.bindAll(["_onMove","_onMouseUp","_onTouchEnd","_onBlur","_onDragFrame"],this)};Lr.prototype.isEnabled=function(){return"disabled"!==this._state},Lr.prototype.isActive=function(){return"active"===this._state},Lr.prototype.enable=function(){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-drag-pan"),this._state="enabled")},Lr.prototype.disable=function(){if(this.isEnabled())switch(this._el.classList.remove("mapboxgl-touch-drag-pan"),this._state){case"active":this._state="disabled",this._unbind(),this._deactivate(),this._fireEvent("dragend"),this._fireEvent("moveend");break;case"pending":this._state="disabled",this._unbind();break;default:this._state="disabled"}},Lr.prototype.onMouseDown=function(e){"enabled"===this._state&&(e.ctrlKey||0!==r.mouseButton(e)||(r.addEventListener(t.default$1.document,"mousemove",this._onMove,{capture:!0}),r.addEventListener(t.default$1.document,"mouseup",this._onMouseUp),this._start(e)))},Lr.prototype.onTouchStart=function(e){"enabled"===this._state&&(e.touches.length>1||(r.addEventListener(t.default$1.document,"touchmove",this._onMove,{capture:!0,passive:!1}),r.addEventListener(t.default$1.document,"touchend",this._onTouchEnd),this._start(e)))},Lr.prototype._start=function(e){t.default$1.addEventListener("blur",this._onBlur),this._state="pending",this._startPos=this._mouseDownPos=this._lastPos=r.mousePos(this._el,e),this._inertia=[[t.default$2.now(),this._startPos]]},Lr.prototype._onMove=function(e){e.preventDefault();var i=r.mousePos(this._el,e);this._lastPos.equals(i)||"pending"===this._state&&i.dist(this._mouseDownPos)<this._clickTolerance||(this._lastMoveEvent=e,this._lastPos=i,this._drainInertiaBuffer(),this._inertia.push([t.default$2.now(),this._lastPos]),"pending"===this._state&&(this._state="active",this._fireEvent("dragstart",e),this._fireEvent("movestart",e)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame)))},Lr.prototype._onDragFrame=function(){this._frameId=null;var t=this._lastMoveEvent;if(t){var e=this._map.transform;e.setLocationAtPoint(e.pointLocation(this._startPos),this._lastPos),this._fireEvent("drag",t),this._fireEvent("move",t),this._startPos=this._lastPos,delete this._lastMoveEvent}},Lr.prototype._onMouseUp=function(t){if(0===r.mouseButton(t))switch(this._state){case"active":this._state="enabled",r.suppressClick(),this._unbind(),this._deactivate(),this._inertialPan(t);break;case"pending":this._state="enabled",this._unbind()}},Lr.prototype._onTouchEnd=function(t){switch(this._state){case"active":this._state="enabled",this._unbind(),this._deactivate(),this._inertialPan(t);break;case"pending":this._state="enabled",this._unbind()}},Lr.prototype._onBlur=function(t){switch(this._state){case"active":this._state="enabled",this._unbind(),this._deactivate(),this._fireEvent("dragend",t),this._fireEvent("moveend",t);break;case"pending":this._state="enabled",this._unbind()}},Lr.prototype._unbind=function(){r.removeEventListener(t.default$1.document,"touchmove",this._onMove,{capture:!0,passive:!1}),r.removeEventListener(t.default$1.document,"touchend",this._onTouchEnd),r.removeEventListener(t.default$1.document,"mousemove",this._onMove,{capture:!0}),r.removeEventListener(t.default$1.document,"mouseup",this._onMouseUp),r.removeEventListener(t.default$1,"blur",this._onBlur)},Lr.prototype._deactivate=function(){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._startPos,delete this._mouseDownPos,delete this._lastPos},Lr.prototype._inertialPan=function(t){this._fireEvent("dragend",t),this._drainInertiaBuffer();var e=this._inertia;if(e.length<2)this._fireEvent("moveend",t);else{var r=e[e.length-1],i=e[0],n=r[1].sub(i[1]),o=(r[0]-i[0])/1e3;if(0===o||r[1].equals(i[1]))this._fireEvent("moveend",t);else{var a=n.mult(.3/o),s=a.mag();s>1400&&(s=1400,a._unit()._mult(s));var l=s/750,u=a.mult(-l/2);this._map.panBy(u,{duration:1e3*l,easing:Pr,noMoveStart:!0},{originalEvent:t})}}},Lr.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},Lr.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,r=t.default$2.now();e.length>0&&r-e[0][0]>160;)e.shift()};var Dr=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll(["_onKeyDown"],this)};function Rr(t){return t*(2-t)}Dr.prototype.isEnabled=function(){return!!this._enabled},Dr.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},Dr.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},Dr.prototype._onKeyDown=function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=0,r=0,i=0,n=0,o=0;switch(t.keyCode){case 61:case 107:case 171:case 187:e=1;break;case 189:case 109:case 173:e=-1;break;case 37:t.shiftKey?r=-1:(t.preventDefault(),n=-1);break;case 39:t.shiftKey?r=1:(t.preventDefault(),n=1);break;case 38:t.shiftKey?i=1:(t.preventDefault(),o=-1);break;case 40:t.shiftKey?i=-1:(o=1,t.preventDefault());break;default:return}var a=this._map,s=a.getZoom(),l={duration:300,delayEndEvents:500,easing:Rr,zoom:e?Math.round(s)+e*(t.shiftKey?2:1):s,bearing:a.getBearing()+15*r,pitch:a.getPitch()+10*i,offset:[100*-n,100*-o],center:a.getCenter()};a.easeTo(l,{originalEvent:t})}};var Br=function(e){this._map=e,t.bindAll(["_onDblClick","_onZoomEnd"],this)};Br.prototype.isEnabled=function(){return!!this._enabled},Br.prototype.isActive=function(){return!!this._active},Br.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Br.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Br.prototype.onTouchStart=function(t){var e=this;this.isEnabled()&&(t.points.length>1||(this._tapped?(clearTimeout(this._tapped),this._tapped=null,this._zoom(t)):this._tapped=setTimeout((function(){e._tapped=null}),300)))},Br.prototype.onDblClick=function(t){this.isEnabled()&&(t.originalEvent.preventDefault(),this._zoom(t))},Br.prototype._zoom=function(t){this._active=!0,this._map.on("zoomend",this._onZoomEnd),this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)},Br.prototype._onZoomEnd=function(){this._active=!1,this._map.off("zoomend",this._onZoomEnd)};var Or=t.bezier(0,0,.15,1),Fr=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll(["_onMove","_onEnd","_onTouchFrame"],this)};Fr.prototype.isEnabled=function(){return!!this._enabled},Fr.prototype.enable=function(t){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-zoom-rotate"),this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around)},Fr.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-zoom-rotate"),this._enabled=!1)},Fr.prototype.disableRotation=function(){this._rotationDisabled=!0},Fr.prototype.enableRotation=function(){this._rotationDisabled=!1},Fr.prototype.onStart=function(e){if(this.isEnabled()&&2===e.touches.length){var i=r.mousePos(this._el,e.touches[0]),n=r.mousePos(this._el,e.touches[1]);this._startVec=i.sub(n),this._gestureIntent=void 0,this._inertia=[],r.addEventListener(t.default$1.document,"touchmove",this._onMove,{passive:!1}),r.addEventListener(t.default$1.document,"touchend",this._onEnd)}},Fr.prototype._getTouchEventData=function(t){var e=r.mousePos(this._el,t.touches[0]),i=r.mousePos(this._el,t.touches[1]),n=e.sub(i);return{vec:n,center:e.add(i).div(2),scale:n.mag()/this._startVec.mag(),bearing:this._rotationDisabled?0:180*n.angleWith(this._startVec)/Math.PI}},Fr.prototype._onMove=function(e){if(2===e.touches.length){var r=this._getTouchEventData(e),i=r.vec,n=r.scale,o=r.bearing;if(!this._gestureIntent){var a=Math.abs(1-n)>.15;Math.abs(o)>10?this._gestureIntent="rotate":a&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._map.fire(new t.Event(this._gestureIntent+"start",{originalEvent:e})),this._map.fire(new t.Event("movestart",{originalEvent:e})),this._startVec=i)}this._lastTouchEvent=e,this._frameId||(this._frameId=this._map._requestRenderFrame(this._onTouchFrame)),e.preventDefault()}},Fr.prototype._onTouchFrame=function(){this._frameId=null;var e=this._gestureIntent;if(e){var r=this._map.transform;this._startScale||(this._startScale=r.scale,this._startBearing=r.bearing);var i=this._getTouchEventData(this._lastTouchEvent),n=i.center,o=i.bearing,a=i.scale,s=r.pointLocation(n),l=r.locationPoint(s);"rotate"===e&&(r.bearing=this._startBearing+o),r.zoom=r.scaleZoom(this._startScale*a),r.setLocationAtPoint(s,l),this._map.fire(new t.Event(e,{originalEvent:this._lastTouchEvent})),this._map.fire(new t.Event("move",{originalEvent:this._lastTouchEvent})),this._drainInertiaBuffer(),this._inertia.push([t.default$2.now(),a,n])}},Fr.prototype._onEnd=function(e){r.removeEventListener(t.default$1.document,"touchmove",this._onMove,{passive:!1}),r.removeEventListener(t.default$1.document,"touchend",this._onEnd);var i=this._gestureIntent,n=this._startScale;if(this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._gestureIntent,delete this._startScale,delete this._startBearing,delete this._lastTouchEvent,i){this._map.fire(new t.Event(i+"end",{originalEvent:e})),this._drainInertiaBuffer();var o=this._inertia,a=this._map;if(o.length<2)a.snapToNorth({},{originalEvent:e});else{var s=o[o.length-1],l=o[0],u=a.transform.scaleZoom(n*s[1]),c=a.transform.scaleZoom(n*l[1]),h=u-c,p=(s[0]-l[0])/1e3,f=s[2];if(0!==p&&u!==c){var d=.15*h/p;Math.abs(d)>2.5&&(d=d>0?2.5:-2.5);var m=1e3*Math.abs(d/(12*.15)),y=u+d*m/2e3;y<0&&(y=0),a.easeTo({zoom:y,duration:m,easing:Or,around:this._aroundCenter?a.getCenter():a.unproject(f),noMoveStart:!0},{originalEvent:e})}else a.snapToNorth({},{originalEvent:e})}}},Fr.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,r=t.default$2.now();e.length>2&&r-e[0][0]>160;)e.shift()};var Vr={scrollZoom:Ir,boxZoom:kr,dragRotate:Cr,dragPan:Lr,keyboard:Dr,doubleClickZoom:Br,touchZoomRotate:Fr};var Nr=function(e){function r(r,i){e.call(this),this._moving=!1,this._zooming=!1,this.transform=r,this._bearingSnap=i.bearingSnap,t.bindAll(["_renderFrameCallback"],this)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getCenter=function(){return this.transform.center},r.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},r.prototype.panBy=function(e,r,i){return e=t["default"].convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},r),i)},r.prototype.panTo=function(e,r,i){return this.easeTo(t.extend({center:e},r),i)},r.prototype.getZoom=function(){return this.transform.zoom},r.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},r.prototype.zoomTo=function(e,r,i){return this.easeTo(t.extend({zoom:e},r),i)},r.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},r.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},r.prototype.getBearing=function(){return this.transform.bearing},r.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},r.prototype.rotateTo=function(e,r,i){return this.easeTo(t.extend({bearing:e},r),i)},r.prototype.resetNorth=function(e,r){return this.rotateTo(0,t.extend({duration:1e3},e),r),this},r.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this},r.prototype.getPitch=function(){return this.transform.pitch},r.prototype.setPitch=function(t,e){return this.jumpTo({pitch:t},e),this},r.prototype.cameraForBounds=function(e,r){if("number"==typeof(r=t.extend({padding:{top:0,bottom:0,right:0,left:0},offset:[0,0],maxZoom:this.transform.maxZoom},r)).padding){var i=r.padding;r.padding={top:i,bottom:i,right:i,left:i}}if(t.default$13(Object.keys(r.padding).sort((function(t,e){return t<e?-1:t>e?1:0})),["bottom","left","right","top"])){e=O.convert(e);var n=[(r.padding.left-r.padding.right)/2,(r.padding.top-r.padding.bottom)/2],o=Math.min(r.padding.right,r.padding.left),a=Math.min(r.padding.top,r.padding.bottom);r.offset=[r.offset[0]+n[0],r.offset[1]+n[1]];var s=t["default"].convert(r.offset),l=this.transform,u=l.project(e.getNorthWest()),c=l.project(e.getSouthEast()),h=c.sub(u),p=(l.width-2*o-2*Math.abs(s.x))/h.x,f=(l.height-2*a-2*Math.abs(s.y))/h.y;if(!(f<0||p<0))return r.center=l.unproject(u.add(c).div(2)),r.zoom=Math.min(l.scaleZoom(l.scale*Math.min(p,f)),r.maxZoom),r.bearing=0,r;t.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}else t.warnOnce("options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'")},r.prototype.fitBounds=function(e,r,i){var n=this.cameraForBounds(e,r);return n?(r=t.extend(n,r)).linear?this.easeTo(r,i):this.flyTo(r,i):this},r.prototype.jumpTo=function(e,r){this.stop();var i=this.transform,n=!1,o=!1,a=!1;return"zoom"in e&&i.zoom!==+e.zoom&&(n=!0,i.zoom=+e.zoom),void 0!==e.center&&(i.center=B.convert(e.center)),"bearing"in e&&i.bearing!==+e.bearing&&(o=!0,i.bearing=+e.bearing),"pitch"in e&&i.pitch!==+e.pitch&&(a=!0,i.pitch=+e.pitch),this.fire(new t.Event("movestart",r)).fire(new t.Event("move",r)),n&&this.fire(new t.Event("zoomstart",r)).fire(new t.Event("zoom",r)).fire(new t.Event("zoomend",r)),o&&this.fire(new t.Event("rotatestart",r)).fire(new t.Event("rotate",r)).fire(new t.Event("rotateend",r)),a&&this.fire(new t.Event("pitchstart",r)).fire(new t.Event("pitch",r)).fire(new t.Event("pitchend",r)),this.fire(new t.Event("moveend",r))},r.prototype.easeTo=function(e,r){var i=this;this.stop(),!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate&&(e.duration=0);var n=this.transform,o=this.getZoom(),a=this.getBearing(),s=this.getPitch(),l="zoom"in e?+e.zoom:o,u="bearing"in e?this._normalizeBearing(e.bearing,a):a,c="pitch"in e?+e.pitch:s,h=n.centerPoint.add(t["default"].convert(e.offset)),p=n.pointLocation(h),f=B.convert(e.center||p);this._normalizeCenter(f);var d,m,y=n.project(p),v=n.project(f).sub(y),g=n.zoomScale(l-o);return e.around&&(d=B.convert(e.around),m=n.locationPoint(d)),this._zooming=l!==o,this._rotating=a!==u,this._pitching=c!==s,this._prepareEase(r,e.noMoveStart),clearTimeout(this._easeEndTimeoutID),this._ease((function(e){if(i._zooming&&(n.zoom=t.number(o,l,e)),i._rotating&&(n.bearing=t.number(a,u,e)),i._pitching&&(n.pitch=t.number(s,c,e)),d)n.setLocationAtPoint(d,m);else{var p=n.zoomScale(n.zoom-o),f=l>o?Math.min(2,g):Math.max(.5,g),_=Math.pow(f,1-e),x=n.unproject(y.add(v.mult(e*_)).mult(p));n.setLocationAtPoint(n.renderWorldCopies?x.wrap():x,h)}i._fireMoveEvents(r)}),(function(){e.delayEndEvents?i._easeEndTimeoutID=setTimeout((function(){return i._afterEase(r)}),e.delayEndEvents):i._afterEase(r)}),e),this},r.prototype._prepareEase=function(e,r){this._moving=!0,r||this.fire(new t.Event("movestart",e)),this._zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&this.fire(new t.Event("pitchstart",e))},r.prototype._fireMoveEvents=function(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))},r.prototype._afterEase=function(e){var r=this._zooming,i=this._rotating,n=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,r&&this.fire(new t.Event("zoomend",e)),i&&this.fire(new t.Event("rotateend",e)),n&&this.fire(new t.Event("pitchend",e)),this.fire(new t.Event("moveend",e))},r.prototype.flyTo=function(e,r){var i=this;this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var n=this.transform,o=this.getZoom(),a=this.getBearing(),s=this.getPitch(),l="zoom"in e?t.clamp(+e.zoom,n.minZoom,n.maxZoom):o,u="bearing"in e?this._normalizeBearing(e.bearing,a):a,c="pitch"in e?+e.pitch:s,h=n.zoomScale(l-o),p=n.centerPoint.add(t["default"].convert(e.offset)),f=n.pointLocation(p),d=B.convert(e.center||f);this._normalizeCenter(d);var m=n.project(f),y=n.project(d).sub(m),v=e.curve,g=Math.max(n.width,n.height),_=g/h,x=y.mag();if("minZoom"in e){var b=t.clamp(Math.min(e.minZoom,o,l),n.minZoom,n.maxZoom),w=g/n.zoomScale(b-o);v=Math.sqrt(w/x*2)}var E=v*v;function S(t){var e=(_*_-g*g+(t?-1:1)*E*E*x*x)/(2*(t?_:g)*E*x);return Math.log(Math.sqrt(e*e+1)-e)}function T(t){return(Math.exp(t)-Math.exp(-t))/2}function A(t){return(Math.exp(t)+Math.exp(-t))/2}var z=S(0),I=function(t){return A(z)/A(z+v*t)},k=function(t){return g*((A(z)*(T(e=z+v*t)/A(e))-T(z))/E)/x;var e},M=(S(1)-z)/v;if(Math.abs(x)<1e-6||!isFinite(M)){if(Math.abs(g-_)<1e-6)return this.easeTo(e,r);var C=_<g?-1:1;M=Math.abs(Math.log(_/g))/v,k=function(){return 0},I=function(t){return Math.exp(C*v*t)}}if("duration"in e)e.duration=+e.duration;else{var P="screenSpeed"in e?+e.screenSpeed/v:+e.speed;e.duration=1e3*M/P}return e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=a!==u,this._pitching=c!==s,this._prepareEase(r,!1),this._ease((function(e){var h=e*M,f=1/I(h);n.zoom=1===e?l:o+n.scaleZoom(f),i._rotating&&(n.bearing=t.number(a,u,e)),i._pitching&&(n.pitch=t.number(s,c,e));var d=n.unproject(m.add(y.mult(k(h))).mult(f));n.setLocationAtPoint(n.renderWorldCopies?d.wrap():d,p),i._fireMoveEvents(r)}),(function(){return i._afterEase(r)}),e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var t=this._onEaseEnd;delete this._onEaseEnd,t.call(this)}return this},r.prototype._ease=function(e,r,i){!1===i.animate||0===i.duration?(e(1),r()):(this._easeStart=t.default$2.now(),this._easeOptions=i,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var e=Math.min((t.default$2.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(e,r){e=t.wrap(e,-180,180);var i=Math.abs(e-r);return Math.abs(e-360-r)<i&&(e-=360),Math.abs(e+360-r)<i&&(e+=360),e},r.prototype._normalizeCenter=function(t){var e=this.transform;if(e.renderWorldCopies&&!e.lngRange){var r=t.lng-e.center.lng;t.lng+=r>180?-360:r<-180?360:0}},r}(t.Evented),jr=function(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};jr.prototype.getDefaultPosition=function(){return"bottom-right"},jr.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),e&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===e&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},jr.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0},jr.prototype._updateEditLink=function(){var t=this._editLink;t||(t=this._editLink=this._container.querySelector(".mapbox-improve-map"));var e=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:h.ACCESS_TOKEN}];if(t){var r=e.reduce((function(t,r,i){return r.value&&(t+=r.key+"="+r.value+(i<e.length-1?"&":"")),t}),"?");t.href="https://www.mapbox.com/feedback/"+r+(this._map._hash?this._map._hash.getHashString(!0):"")}},jr.prototype._updateData=function(t){t&&"metadata"===t.sourceDataType&&(this._updateAttributions(),this._updateEditLink())},jr.prototype._updateAttributions=function(){if(this._map.style){var t=[];if(this._map.style.stylesheet){var e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}var r=this._map.style.sourceCaches;for(var i in r){var n=r[i].getSource();n.attribution&&t.indexOf(n.attribution)<0&&t.push(n.attribution)}t.sort((function(t,e){return t.length-e.length})),(t=t.filter((function(e,r){for(var i=r+1;i<t.length;i++)if(t[i].indexOf(e)>=0)return!1;return!0}))).length?(this._container.innerHTML=t.join(" | "),this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null}},jr.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var Ur=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};Ur.prototype.onAdd=function(t){this._map=t,this._container=r.create("div","mapboxgl-ctrl");var e=r.create("a","mapboxgl-ctrl-logo");return e.target="_blank",e.href="https://www.mapbox.com/",e.setAttribute("aria-label","Mapbox logo"),e.setAttribute("rel","noopener"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Ur.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Ur.prototype.getDefaultPosition=function(){return"bottom-left"},Ur.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},Ur.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t){if(t[e].getSource().mapbox_logo)return!0}return!1}},Ur.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add("mapboxgl-compact"):e.classList.remove("mapboxgl-compact")}};var qr=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};qr.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},qr.prototype.remove=function(t){for(var e=this._currentlyRunning,r=0,i=e?this._queue.concat(e):this._queue;r<i.length;r+=1){var n=i[r];if(n.id===t)return void(n.cancelled=!0)}},qr.prototype.run=function(){var t=this._currentlyRunning=this._queue;this._queue=[];for(var e=0,r=t;e<r.length;e+=1){var i=r[e];if(!i.cancelled&&(i.callback(),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},qr.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var $r=t.default$1.HTMLImageElement,Zr=t.default$1.HTMLElement,Gr={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:22,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,clickTolerance:3,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,transformRequest:null,fadeDuration:300,crossSourceCollisions:!0},Wr=function(i){function n(e){if(null!=(e=t.extend({},Gr,e)).minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error("maxZoom must be greater than minZoom");var n=new wr(e.minZoom,e.maxZoom,e.renderWorldCopies);i.call(this,n,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new qr;var o=e.transformRequest;if(this._transformRequest=o?function(t,e){return o(t,e)||{url:t}}:function(t){return{url:t}},"string"==typeof e.container){var a=t.default$1.document.getElementById(e.container);if(!a)throw new Error("Container '"+e.container+"' not found.");this._container=a}else{if(!(e.container instanceof Zr))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored","_update","_render","_onData","_onDataLoading"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",this._update.bind(this,!1)),this.on("zoom",this._update.bind(this,!0)),void 0!==t.default$1&&(t.default$1.addEventListener("online",this._onWindowOnline,!1),t.default$1.addEventListener("resize",this._onWindowResize,!1)),function(t,e){var i=t.getCanvasContainer(),n=null,o=!1,a=null;for(var s in Vr)t[s]=new Vr[s](t,e),e.interactive&&e[s]&&t[s].enable(e[s]);r.addEventListener(i,"mouseout",(function(e){t.fire(new Tr("mouseout",t,e))})),r.addEventListener(i,"mousedown",(function(n){o=!0,a=r.mousePos(i,n);var s=new Tr("mousedown",t,n);t.fire(s),s.defaultPrevented||(e.interactive&&!t.doubleClickZoom.isActive()&&t.stop(),t.boxZoom.onMouseDown(n),t.boxZoom.isActive()||t.dragPan.isActive()||t.dragRotate.onMouseDown(n),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onMouseDown(n))})),r.addEventListener(i,"mouseup",(function(e){var r=t.dragRotate.isActive();n&&!r&&t.fire(new Tr("contextmenu",t,n)),n=null,o=!1,t.fire(new Tr("mouseup",t,e))})),r.addEventListener(i,"mousemove",(function(e){if(!t.dragPan.isActive()&&!t.dragRotate.isActive()){for(var r=e.target;r&&r!==i;)r=r.parentNode;r===i&&t.fire(new Tr("mousemove",t,e))}})),r.addEventListener(i,"mouseover",(function(e){for(var r=e.target;r&&r!==i;)r=r.parentNode;r===i&&t.fire(new Tr("mouseover",t,e))})),r.addEventListener(i,"touchstart",(function(r){var i=new Ar("touchstart",t,r);t.fire(i),i.defaultPrevented||(e.interactive&&t.stop(),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onTouchStart(r),t.touchZoomRotate.onStart(r),t.doubleClickZoom.onTouchStart(i))}),{passive:!1}),r.addEventListener(i,"touchmove",(function(e){t.fire(new Ar("touchmove",t,e))}),{passive:!1}),r.addEventListener(i,"touchend",(function(e){t.fire(new Ar("touchend",t,e))})),r.addEventListener(i,"touchcancel",(function(e){t.fire(new Ar("touchcancel",t,e))})),r.addEventListener(i,"click",(function(n){var o=r.mousePos(i,n);(o.equals(a)||o.dist(a)<e.clickTolerance)&&t.fire(new Tr("click",t,n))})),r.addEventListener(i,"dblclick",(function(e){var r=new Tr("dblclick",t,e);t.fire(r),r.defaultPrevented||t.doubleClickZoom.onDblClick(r)})),r.addEventListener(i,"contextmenu",(function(e){var r=t.dragRotate.isActive();o||r?o&&(n=e):t.fire(new Tr("contextmenu",t,e)),e.preventDefault()})),r.addEventListener(i,"wheel",(function(r){e.interactive&&t.stop();var i=new zr("wheel",t,r);t.fire(i),i.defaultPrevented||t.scrollZoom.onWheel(r)}),{passive:!1})}(this,e),this._hash=e.hash&&(new Sr).addTo(this),this._hash&&this._hash._onHashChange()||this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),this.resize(),e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new jr),this.addControl(new Ur,e.logoPosition),this.on("style.load",(function(){this.transform.unmodified&&this.jumpTo(this.style.stylesheet)})),this.on("data",this._onData),this.on("dataloading",this._onDataLoading)}i&&(n.__proto__=i),n.prototype=Object.create(i&&i.prototype),n.prototype.constructor=n;var o={showTileBoundaries:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0}};return n.prototype.addControl=function(t,e){void 0===e&&t.getDefaultPosition&&(e=t.getDefaultPosition()),void 0===e&&(e="top-right");var r=t.onAdd(this),i=this._controlPositions[e];return-1!==e.indexOf("bottom")?i.insertBefore(r,i.firstChild):i.appendChild(r),this},n.prototype.removeControl=function(t){return t.onRemove(this),this},n.prototype.resize=function(e){var r=this._containerDimensions(),i=r[0],n=r[1];return this._resizeCanvas(i,n),this.transform.resize(i,n),this.painter.resize(i,n),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e)).fire(new t.Event("resize",e)).fire(new t.Event("moveend",e)),this},n.prototype.getBounds=function(){return(new O).extend(this.transform.pointLocation(new t["default"](0,0))).extend(this.transform.pointLocation(new t["default"](this.transform.width,0))).extend(this.transform.pointLocation(new t["default"](this.transform.width,this.transform.height))).extend(this.transform.pointLocation(new t["default"](0,this.transform.height)))},n.prototype.getMaxBounds=function(){return this.transform.latRange&&2===this.transform.latRange.length&&this.transform.lngRange&&2===this.transform.lngRange.length?new O([this.transform.lngRange[0],this.transform.latRange[0]],[this.transform.lngRange[1],this.transform.latRange[1]]):null},n.prototype.setMaxBounds=function(t){if(t){var e=O.convert(t);this.transform.lngRange=[e.getWest(),e.getEast()],this.transform.latRange=[e.getSouth(),e.getNorth()],this.transform._constrain(),this._update()}else null==t&&(this.transform.lngRange=null,this.transform.latRange=null,this._update());return this},n.prototype.setMinZoom=function(t){if((t=null==t?0:t)>=0&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()<t&&this.setZoom(t),this;throw new Error("minZoom must be between 0 and the current maxZoom, inclusive")},n.prototype.getMinZoom=function(){return this.transform.minZoom},n.prototype.setMaxZoom=function(t){if((t=null==t?22:t)>=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")},n.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},n.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update(),this},n.prototype.getMaxZoom=function(){return this.transform.maxZoom},n.prototype.project=function(t){return this.transform.locationPoint(B.convert(t))},n.prototype.unproject=function(e){return this.transform.pointLocation(t["default"].convert(e))},n.prototype.isMoving=function(){return this._moving||this.dragPan.isActive()||this.dragRotate.isActive()||this.scrollZoom.isActive()},n.prototype.isZooming=function(){return this._zooming||this.scrollZoom.isActive()},n.prototype.isRotating=function(){return this._rotating||this.dragRotate.isActive()},n.prototype.on=function(t,e,r){var n,o=this;if(void 0===r)return i.prototype.on.call(this,t,e);var a=function(){if("mouseenter"===t||"mouseover"===t){var i=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){var a=o.getLayer(e)?o.queryRenderedFeatures(n.point,{layers:[e]}):[];a.length?i||(i=!0,r.call(o,new Tr(t,o,n.originalEvent,{features:a}))):i=!1},mouseout:function(){i=!1}}}}if("mouseleave"===t||"mouseout"===t){var a=!1;return{layer:e,listener:r,delegates:{mousemove:function(i){(o.getLayer(e)?o.queryRenderedFeatures(i.point,{layers:[e]}):[]).length?a=!0:a&&(a=!1,r.call(o,new Tr(t,o,i.originalEvent)))},mouseout:function(e){a&&(a=!1,r.call(o,new Tr(t,o,e.originalEvent)))}}}}return{layer:e,listener:r,delegates:(n={},n[t]=function(t){var i=o.getLayer(e)?o.queryRenderedFeatures(t.point,{layers:[e]}):[];i.length&&(t.features=i,r.call(o,t),delete t.features)},n)}}();for(var s in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(a),a.delegates)o.on(s,a.delegates[s]);return this},n.prototype.off=function(t,e,r){if(void 0===r)return i.prototype.off.call(this,t,e);if(this._delegatedListeners&&this._delegatedListeners[t])for(var n=this._delegatedListeners[t],o=0;o<n.length;o++){var a=n[o];if(a.layer===e&&a.listener===r){for(var s in a.delegates)this.off(s,a.delegates[s]);return n.splice(o,1),this}}return this},n.prototype.queryRenderedFeatures=function(e,r){var i;return 2===arguments.length?(e=arguments[0],r=arguments[1]):1===arguments.length&&((i=arguments[0])instanceof t["default"]||Array.isArray(i))?(e=arguments[0],r={}):1===arguments.length?(e=void 0,r=arguments[0]):(e=void 0,r={}),this.style?this.style.queryRenderedFeatures(this._makeQueryGeometry(e),r,this.transform):[]},n.prototype._makeQueryGeometry=function(e){var r,i=this;if(void 0===e&&(e=[t["default"].convert([0,0]),t["default"].convert([this.transform.width,this.transform.height])]),e instanceof t["default"]||"number"==typeof e[0]){r=[t["default"].convert(e)]}else{var n=[t["default"].convert(e[0]),t["default"].convert(e[1])];r=[n[0],new t["default"](n[1].x,n[0].y),n[1],new t["default"](n[0].x,n[1].y),n[0]]}return{viewport:r,worldCoordinate:r.map((function(t){return i.transform.pointCoordinate(t)}))}},n.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},n.prototype.setStyle=function(e,r){if((!r||!1!==r.diff&&!r.localIdeographFontFamily)&&this.style&&e&&"object"==typeof e)try{return this.style.setState(e)&&this._update(!0),this}catch(e){t.warnOnce("Unable to perform style diff: "+(e.message||e.error||e)+".  Rebuilding the style from scratch.")}return this.style&&(this.style.setEventedParent(null),this.style._remove()),e?(this.style=new je(this,r||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof e?this.style.loadURL(e):this.style.loadJSON(e),this):(delete this.style,this)},n.prototype.getStyle=function(){if(this.style)return this.style.serialize()},n.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():t.warnOnce("There is no style added to the map.")},n.prototype.addSource=function(t,e){return this.style.addSource(t,e),this._update(!0),this},n.prototype.isSourceLoaded=function(e){var r=this.style&&this.style.sourceCaches[e];if(void 0!==r)return r.loaded();this.fire(new t.ErrorEvent(new Error("There is no source with ID '"+e+"'")))},n.prototype.areTilesLoaded=function(){var t=this.style&&this.style.sourceCaches;for(var e in t){var r=t[e]._tiles;for(var i in r){var n=r[i];if("loaded"!==n.state&&"errored"!==n.state)return!1}}return!0},n.prototype.addSourceType=function(t,e,r){return this.style.addSourceType(t,e,r)},n.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0),this},n.prototype.getSource=function(t){return this.style.getSource(t)},n.prototype.addImage=function(e,r,i){void 0===i&&(i={});var n=i.pixelRatio;void 0===n&&(n=1);var o=i.sdf;if(void 0===o&&(o=!1),r instanceof $r){var a=t.default$2.getImageData(r),s=a.width,l=a.height,u=a.data;this.style.addImage(e,{data:new t.RGBAImage({width:s,height:l},u),pixelRatio:n,sdf:o})}else{if(void 0===r.width||void 0===r.height)return this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var c=r.width,h=r.height,p=r.data;this.style.addImage(e,{data:new t.RGBAImage({width:c,height:h},new Uint8Array(p)),pixelRatio:n,sdf:o})}},n.prototype.hasImage=function(e){return e?!!this.style.getImage(e):(this.fire(new t.ErrorEvent(new Error("Missing required image id"))),!1)},n.prototype.removeImage=function(t){this.style.removeImage(t)},n.prototype.loadImage=function(e,r){t.getImage(this._transformRequest(e,t.ResourceType.Image),r)},n.prototype.listImages=function(){return this.style.listImages()},n.prototype.addLayer=function(t,e){return this.style.addLayer(t,e),this._update(!0),this},n.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0),this},n.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0),this},n.prototype.getLayer=function(t){return this.style.getLayer(t)},n.prototype.setFilter=function(t,e){return this.style.setFilter(t,e),this._update(!0),this},n.prototype.setLayerZoomRange=function(t,e,r){return this.style.setLayerZoomRange(t,e,r),this._update(!0),this},n.prototype.getFilter=function(t){return this.style.getFilter(t)},n.prototype.setPaintProperty=function(t,e,r){return this.style.setPaintProperty(t,e,r),this._update(!0),this},n.prototype.getPaintProperty=function(t,e){return this.style.getPaintProperty(t,e)},n.prototype.setLayoutProperty=function(t,e,r){return this.style.setLayoutProperty(t,e,r),this._update(!0),this},n.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},n.prototype.setLight=function(t){return this.style.setLight(t),this._update(!0),this},n.prototype.getLight=function(){return this.style.getLight()},n.prototype.setFeatureState=function(t,e){this.style.setFeatureState(t,e),this._update()},n.prototype.getFeatureState=function(t){return this.style.getFeatureState(t)},n.prototype.getContainer=function(){return this._container},n.prototype.getCanvasContainer=function(){return this._canvasContainer},n.prototype.getCanvas=function(){return this._canvas},n.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.offsetWidth||400,e=this._container.offsetHeight||300),[t,e]},n.prototype._detectMissingCSS=function(){"rgb(250, 128, 114)"!==t.default$1.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&t.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")},n.prototype._setupContainer=function(){var t=this._container;t.classList.add("mapboxgl-map"),(this._missingCSSCanary=r.create("div","mapboxgl-canary",t)).style.visibility="hidden",this._detectMissingCSS();var e=this._canvasContainer=r.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=r.create("canvas","mapboxgl-canvas",e),this._canvas.style.position="absolute",this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map");var i=this._containerDimensions();this._resizeCanvas(i[0],i[1]);var n=this._controlContainer=r.create("div","mapboxgl-control-container",t),o=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((function(t){o[t]=r.create("div","mapboxgl-ctrl-"+t,n)}))},n.prototype._resizeCanvas=function(e,r){var i=t.default$1.devicePixelRatio||1;this._canvas.width=i*e,this._canvas.height=i*r,this._canvas.style.width=e+"px",this._canvas.style.height=r+"px"},n.prototype._setupPainter=function(){var r=t.extend({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer},e.webGLContextAttributes),i=this._canvas.getContext("webgl",r)||this._canvas.getContext("experimental-webgl",r);i?this.painter=new gr(i,this.transform):this.fire(new t.ErrorEvent(new Error("Failed to initialize WebGL")))},n.prototype._contextLost=function(e){e.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new t.Event("webglcontextlost",{originalEvent:e}))},n.prototype._contextRestored=function(e){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event("webglcontextrestored",{originalEvent:e}))},n.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!(!this.style||!this.style.loaded())},n.prototype._update=function(t){this.style&&(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this._rerender())},n.prototype._requestRenderFrame=function(t){return this._update(),this._renderTaskQueue.add(t)},n.prototype._cancelRenderFrame=function(t){this._renderTaskQueue.remove(t)},n.prototype._render=function(){this._renderTaskQueue.run();var e=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var r=this.transform.zoom,i=t.default$2.now();this.style.zoomHistory.update(r,i);var n=new t.default$23(r,{now:i,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),o=n.crossFadingFactor();1===o&&o===this._crossFadingFactor||(e=!0,this._crossFadingFactor=o),this.style.update(n)}return this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),fadeDuration:this._fadeDuration}),this.fire(new t.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.Event("load"))),this.style&&(this.style.hasTransitions()||e)&&(this._styleDirty=!0),(this._sourcesDirty||this._repaint||this._styleDirty||this._placementDirty)&&this._rerender(),this},n.prototype.remove=function(){this._hash&&this._hash.remove(),this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.setStyle(null),void 0!==t.default$1&&(t.default$1.removeEventListener("resize",this._onWindowResize,!1),t.default$1.removeEventListener("online",this._onWindowOnline,!1));var e=this.painter.context.gl.getExtension("WEBGL_lose_context");e&&e.loseContext(),Xr(this._canvasContainer),Xr(this._controlContainer),Xr(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this.fire(new t.Event("remove"))},n.prototype._rerender=function(){var e=this;this.style&&!this._frame&&(this._frame=t.default$2.frame((function(){e._frame=null,e._render()})))},n.prototype._onWindowOnline=function(){this._update()},n.prototype._onWindowResize=function(){this._trackResize&&this.resize()._update()},o.showTileBoundaries.get=function(){return!!this._showTileBoundaries},o.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},o.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},o.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update())},o.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},o.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},o.repaint.get=function(){return!!this._repaint},o.repaint.set=function(t){this._repaint=t,this._update()},o.vertices.get=function(){return!!this._vertices},o.vertices.set=function(t){this._vertices=t,this._update()},n.prototype._onData=function(e){this._update("style"===e.dataType),this.fire(new t.Event(e.dataType+"data",e))},n.prototype._onDataLoading=function(e){this.fire(new t.Event(e.dataType+"dataloading",e))},Object.defineProperties(n.prototype,o),n}(Nr);function Xr(t){t.parentNode&&t.parentNode.removeChild(t)}var Hr={showCompass:!0,showZoom:!0},Kr=function(e){var i=this;this.options=t.extend({},Hr,e),this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",(function(t){return t.preventDefault()})),this.options.showZoom&&(this._zoomInButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-in","Zoom In",(function(){return i._map.zoomIn()})),this._zoomOutButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-out","Zoom Out",(function(){return i._map.zoomOut()}))),this.options.showCompass&&(t.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-compass","Reset North",(function(){return i._map.resetNorth()})),this._compassArrow=r.create("span","mapboxgl-ctrl-compass-arrow",this._compass))};function Jr(t,e,r){if(t=new B(t.lng,t.lat),e){var i=new B(t.lng-360,t.lat),n=new B(t.lng+360,t.lat),o=r.locationPoint(t).distSqr(e);r.locationPoint(i).distSqr(e)<o?t=i:r.locationPoint(n).distSqr(e)<o&&(t=n)}for(;Math.abs(t.lng-r.center.lng)>180;){var a=r.locationPoint(t);if(a.x>=0&&a.y>=0&&a.x<=r.width&&a.y<=r.height)break;t.lng>r.center.lng?t.lng-=360:t.lng+=360}return t}Kr.prototype._rotateCompassArrow=function(){var t="rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=t},Kr.prototype.onAdd=function(t){return this._map=t,this.options.showCompass&&(this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Cr(t,{button:"left",element:this._compass}),r.addEventListener(this._compass,"mousedown",this._handler.onMouseDown),this._handler.enable()),this._container},Kr.prototype.onRemove=function(){r.remove(this._container),this.options.showCompass&&(this._map.off("rotate",this._rotateCompassArrow),r.removeEventListener(this._compass,"mousedown",this._handler.onMouseDown),this._handler.disable(),delete this._handler),delete this._map},Kr.prototype._createButton=function(t,e,i){var n=r.create("button",t,this._container);return n.type="button",n.setAttribute("aria-label",e),n.addEventListener("click",i),n};var Yr={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Qr(t,e,r){var i=t.classList;for(var n in Yr)i.remove("mapboxgl-"+r+"-anchor-"+n);i.add("mapboxgl-"+r+"-anchor-"+e)}var ti,ei=function(e){function i(i){if(e.call(this),(arguments[0]instanceof t.default$1.HTMLElement||2===arguments.length)&&(i=t.extend({element:i},arguments[1])),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick"],this),this._anchor=i&&i.anchor||"center",this._color=i&&i.color||"#3FB1CE",this._draggable=i&&i.draggable||!1,this._state="inactive",i&&i.element)this._element=i.element,this._offset=t["default"].convert(i&&i.offset||[0,0]);else{this._defaultMarker=!0,this._element=r.create("div");var n=r.createNS("http://www.w3.org/2000/svg","svg");n.setAttributeNS(null,"height","41px"),n.setAttributeNS(null,"width","27px"),n.setAttributeNS(null,"viewBox","0 0 27 41");var o=r.createNS("http://www.w3.org/2000/svg","g");o.setAttributeNS(null,"stroke","none"),o.setAttributeNS(null,"stroke-width","1"),o.setAttributeNS(null,"fill","none"),o.setAttributeNS(null,"fill-rule","evenodd");var a=r.createNS("http://www.w3.org/2000/svg","g");a.setAttributeNS(null,"fill-rule","nonzero");var s=r.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"transform","translate(3.0, 29.0)"),s.setAttributeNS(null,"fill","#000000");for(var l=0,u=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];l<u.length;l+=1){var c=u[l],h=r.createNS("http://www.w3.org/2000/svg","ellipse");h.setAttributeNS(null,"opacity","0.04"),h.setAttributeNS(null,"cx","10.5"),h.setAttributeNS(null,"cy","5.80029008"),h.setAttributeNS(null,"rx",c.rx),h.setAttributeNS(null,"ry",c.ry),s.appendChild(h)}var p=r.createNS("http://www.w3.org/2000/svg","g");p.setAttributeNS(null,"fill",this._color);var f=r.createNS("http://www.w3.org/2000/svg","path");f.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),p.appendChild(f);var d=r.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"opacity","0.25"),d.setAttributeNS(null,"fill","#000000");var m=r.createNS("http://www.w3.org/2000/svg","path");m.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),d.appendChild(m);var y=r.createNS("http://www.w3.org/2000/svg","g");y.setAttributeNS(null,"transform","translate(6.0, 7.0)"),y.setAttributeNS(null,"fill","#FFFFFF");var v=r.createNS("http://www.w3.org/2000/svg","g");v.setAttributeNS(null,"transform","translate(8.0, 8.0)");var g=r.createNS("http://www.w3.org/2000/svg","circle");g.setAttributeNS(null,"fill","#000000"),g.setAttributeNS(null,"opacity","0.25"),g.setAttributeNS(null,"cx","5.5"),g.setAttributeNS(null,"cy","5.5"),g.setAttributeNS(null,"r","5.4999962");var _=r.createNS("http://www.w3.org/2000/svg","circle");_.setAttributeNS(null,"fill","#FFFFFF"),_.setAttributeNS(null,"cx","5.5"),_.setAttributeNS(null,"cy","5.5"),_.setAttributeNS(null,"r","5.4999962"),v.appendChild(g),v.appendChild(_),a.appendChild(s),a.appendChild(p),a.appendChild(d),a.appendChild(y),a.appendChild(v),n.appendChild(a),this._element.appendChild(n),this._offset=t["default"].convert(i&&i.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._popup=null}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},i.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),delete this._map),r.remove(this._element),this._popup&&this._popup.remove(),this},i.prototype.getLngLat=function(){return this._lngLat},i.prototype.setLngLat=function(t){return this._lngLat=B.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},i.prototype.getElement=function(){return this._element},i.prototype.setPopup=function(t){if(this._popup&&(this._popup.remove(),this._popup=null),t){if(!("offset"in t.options)){var e=Math.sqrt(Math.pow(13.5,2)/2);t.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[e,-1*(24.6+e)],"bottom-right":[-e,-1*(24.6+e)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=t,this._lngLat&&this._popup.setLngLat(this._lngLat)}return this},i.prototype._onMapClick=function(t){var e=t.originalEvent.target,r=this._element;this._popup&&(e===r||r.contains(e))&&this.togglePopup()},i.prototype.getPopup=function(){return this._popup},i.prototype.togglePopup=function(){var t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this},i.prototype._update=function(t){this._map&&(this._map.transform.renderWorldCopies&&(this._lngLat=Jr(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset),t&&"moveend"!==t.type||(this._pos=this._pos.round()),r.setTransform(this._element,Yr[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px)"),Qr(this._element,this._anchor,"marker"))},i.prototype.getOffset=function(){return this._offset},i.prototype.setOffset=function(e){return this._offset=t["default"].convert(e),this._update(),this},i.prototype._onMove=function(e){this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new t.Event("dragstart"))),this.fire(new t.Event("drag"))},i.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new t.Event("dragend")),this._state="inactive"},i.prototype._addDragHandler=function(t){this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(this._pos).add(this._offset),this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},i.prototype.setDraggable=function(t){return this._draggable=!!t,this._map&&(t?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},i.prototype.isDraggable=function(){return this._draggable},i}(t.Evented),ri={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showUserLocation:!0};var ii=function(e){function i(r){e.call(this),this.options=t.extend({},ri,r),t.bindAll(["_onSuccess","_onError","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.onAdd=function(e){var i;return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),i=this._setupUI,void 0!==ti?i(ti):void 0!==t.default$1.navigator.permissions?t.default$1.navigator.permissions.query({name:"geolocation"}).then((function(t){ti="denied"!==t.state,i(ti)})):(ti=!!t.default$1.navigator.geolocation,i(ti)),this._container},i.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(t.default$1.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker.remove(),r.remove(this._container),this._map=void 0},i.prototype._onSuccess=function(e){if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",e)),this._finish()},i.prototype._updateCamera=function(t){var e=new B(t.coords.longitude,t.coords.latitude),r=t.coords.accuracy;this._map.fitBounds(e.toBounds(r),this.options.fitBoundsOptions,{geolocateSource:!0})},i.prototype._updateMarker=function(t){t?this._userLocationDotMarker.setLngLat([t.coords.longitude,t.coords.latitude]).addTo(this._map):this._userLocationDotMarker.remove()},i.prototype._onError=function(e){if(this.options.trackUserLocation)if(1===e.code)this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),void 0!==this._geolocationWatchID&&this._clearWatch();else switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",e)),this._finish()},i.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},i.prototype._setupUI=function(e){var i=this;!1!==e?(this._container.addEventListener("contextmenu",(function(t){return t.preventDefault()})),this._geolocateButton=r.create("button","mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",this._container),this._geolocateButton.type="button",this._geolocateButton.setAttribute("aria-label","Geolocate"),this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new ei(this._dotElement),this.options.trackUserLocation&&(this._watchState="OFF")),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(function(e){e.geolocateSource||"ACTIVE_LOCK"!==i._watchState||(i._watchState="BACKGROUND",i._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),i._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),i.fire(new t.Event("trackuserlocationend")))}))):t.warnOnce("Geolocation support is not available, the GeolocateControl will not be visible.")},i.prototype.trigger=function(){if(!this._setup)return t.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new t.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}"OFF"===this._watchState&&void 0!==this._geolocationWatchID?this._clearWatch():void 0===this._geolocationWatchID&&(this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._geolocationWatchID=t.default$1.navigator.geolocation.watchPosition(this._onSuccess,this._onError,this.options.positionOptions))}else t.default$1.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},i.prototype._clearWatch=function(){t.default$1.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},i}(t.Evented),ni={maxWidth:100,unit:"metric"},oi=function(e){this.options=t.extend({},ni,e),t.bindAll(["_onMove","setUnit"],this)};function ai(t,e,r){var i,n,o,a,s,l,u=r&&r.maxWidth||100,c=t._container.clientHeight/2,h=(i=t.unproject([0,c]),n=t.unproject([u,c]),o=Math.PI/180,a=i.lat*o,s=n.lat*o,l=Math.sin(a)*Math.sin(s)+Math.cos(a)*Math.cos(s)*Math.cos((n.lng-i.lng)*o),6371e3*Math.acos(Math.min(l,1)));if(r&&"imperial"===r.unit){var p=3.2808*h;if(p>5280)si(e,u,p/5280,"mi");else si(e,u,p,"ft")}else if(r&&"nautical"===r.unit){si(e,u,h/1852,"nm")}else si(e,u,h,"m")}function si(t,e,r,i){var n,o,a,s=(n=r,(o=Math.pow(10,(""+Math.floor(n)).length-1))*(a=(a=n/o)>=10?10:a>=5?5:a>=3?3:a>=2?2:1)),l=s/r;"m"===i&&s>=1e3&&(s/=1e3,i="km"),t.style.width=e*l+"px",t.innerHTML=s+i}oi.prototype.getDefaultPosition=function(){return"bottom-left"},oi.prototype._onMove=function(){ai(this._map,this._container,this.options)},oi.prototype.onAdd=function(t){return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},oi.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},oi.prototype.setUnit=function(t){this.options.unit=t,ai(this._map,this._container,this.options)};var li=function(){this._fullscreen=!1,t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.default$1.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.default$1.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.default$1.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.default$1.document&&(this._fullscreenchange="MSFullscreenChange"),this._className="mapboxgl-ctrl"};li.prototype.onAdd=function(e){return this._map=e,this._mapContainer=this._map.getContainer(),this._container=r.create("div",this._className+" mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._container.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._container},li.prototype.onRemove=function(){r.remove(this._container),this._map=null,t.default$1.document.removeEventListener(this._fullscreenchange,this._changeIcon)},li.prototype._checkFullscreenSupport=function(){return!!(t.default$1.document.fullscreenEnabled||t.default$1.document.mozFullScreenEnabled||t.default$1.document.msFullscreenEnabled||t.default$1.document.webkitFullscreenEnabled)},li.prototype._setupUI=function(){var e=this._fullscreenButton=r.create("button",this._className+"-icon "+this._className+"-fullscreen",this._container);e.setAttribute("aria-label","Toggle fullscreen"),e.type="button",this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.default$1.document.addEventListener(this._fullscreenchange,this._changeIcon)},li.prototype._isFullscreen=function(){return this._fullscreen},li.prototype._changeIcon=function(){(t.default$1.document.fullscreenElement||t.default$1.document.mozFullScreenElement||t.default$1.document.webkitFullscreenElement||t.default$1.document.msFullscreenElement)===this._mapContainer!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(this._className+"-shrink"),this._fullscreenButton.classList.toggle(this._className+"-fullscreen"))},li.prototype._onClickFullscreen=function(){this._isFullscreen()?t.default$1.document.exitFullscreen?t.default$1.document.exitFullscreen():t.default$1.document.mozCancelFullScreen?t.default$1.document.mozCancelFullScreen():t.default$1.document.msExitFullscreen?t.default$1.document.msExitFullscreen():t.default$1.document.webkitCancelFullScreen&&t.default$1.document.webkitCancelFullScreen():this._mapContainer.requestFullscreen?this._mapContainer.requestFullscreen():this._mapContainer.mozRequestFullScreen?this._mapContainer.mozRequestFullScreen():this._mapContainer.msRequestFullscreen?this._mapContainer.msRequestFullscreen():this._mapContainer.webkitRequestFullscreen&&this._mapContainer.webkitRequestFullscreen()};var ui={closeButton:!0,closeOnClick:!0,className:""},ci=function(e){function i(r){e.call(this),this.options=t.extend(Object.create(ui),r),t.bindAll(["_update","_onClickClose"],this)}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.addTo=function(e){return this._map=e,this._map.on("move",this._update),this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._update(),this.fire(new t.Event("open")),this},i.prototype.isOpen=function(){return!!this._map},i.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("click",this._onClickClose),delete this._map),this.fire(new t.Event("close")),this},i.prototype.getLngLat=function(){return this._lngLat},i.prototype.setLngLat=function(t){return this._lngLat=B.convert(t),this._pos=null,this._update(),this},i.prototype.setText=function(e){return this.setDOMContent(t.default$1.document.createTextNode(e))},i.prototype.setHTML=function(e){var r,i=t.default$1.document.createDocumentFragment(),n=t.default$1.document.createElement("body");for(n.innerHTML=e;r=n.firstChild;)i.appendChild(r);return this.setDOMContent(i)},i.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},i.prototype._createContent=function(){this._content&&r.remove(this._content),this._content=r.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClickClose))},i.prototype._update=function(){var e=this;if(this._map&&this._lngLat&&this._content){this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(t){return e._container.classList.add(t)}))),this._map.transform.renderWorldCopies&&(this._lngLat=Jr(this._lngLat,this._pos,this._map.transform));var i=this._pos=this._map.project(this._lngLat),n=this.options.anchor,o=function c(e){if(e){if("number"==typeof e){var r=Math.round(Math.sqrt(.5*Math.pow(e,2)));return{center:new t["default"](0,0),top:new t["default"](0,e),"top-left":new t["default"](r,r),"top-right":new t["default"](-r,r),bottom:new t["default"](0,-e),"bottom-left":new t["default"](r,-r),"bottom-right":new t["default"](-r,-r),left:new t["default"](e,0),right:new t["default"](-e,0)}}if(e instanceof t["default"]||Array.isArray(e)){var i=t["default"].convert(e);return{center:i,top:i,"top-left":i,"top-right":i,bottom:i,"bottom-left":i,"bottom-right":i,left:i,right:i}}return{center:t["default"].convert(e.center||[0,0]),top:t["default"].convert(e.top||[0,0]),"top-left":t["default"].convert(e["top-left"]||[0,0]),"top-right":t["default"].convert(e["top-right"]||[0,0]),bottom:t["default"].convert(e.bottom||[0,0]),"bottom-left":t["default"].convert(e["bottom-left"]||[0,0]),"bottom-right":t["default"].convert(e["bottom-right"]||[0,0]),left:t["default"].convert(e.left||[0,0]),right:t["default"].convert(e.right||[0,0])}}return c(new t["default"](0,0))}(this.options.offset);if(!n){var a,s=this._container.offsetWidth,l=this._container.offsetHeight;a=i.y+o.bottom.y<l?["top"]:i.y>this._map.transform.height-l?["bottom"]:[],i.x<s/2?a.push("left"):i.x>this._map.transform.width-s/2&&a.push("right"),n=0===a.length?"bottom":a.join("-")}var u=i.add(o[n]).round();r.setTransform(this._container,Yr[n]+" translate("+u.x+"px,"+u.y+"px)"),Qr(this._container,n,"popup")}},i.prototype._onClickClose=function(){this.remove()},i}(t.Evented);var hi={version:"0.47.0",supported:e,workerCount:Math.max(Math.floor(t.default$2.hardwareConcurrency/2),1),setRTLTextPlugin:t.setRTLTextPlugin,Map:Wr,NavigationControl:Kr,GeolocateControl:ii,AttributionControl:jr,ScaleControl:oi,FullscreenControl:li,Popup:ci,Marker:ei,Style:je,LngLat:B,LngLatBounds:O,Point:t["default"],Evented:t.Evented,config:h,get accessToken(){return h.ACCESS_TOKEN},set accessToken(t){h.ACCESS_TOKEN=t},workerUrl:""};return hi}));return r}));/**
 * 2007-2022 PrestaShop
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 * @author    Boxtal <api@boxtal.com>
 *
 * @copyright 2007-2022 PrestaShop SA / 2018-2022 Boxtal
 *
 * @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 * International Registered Trademark & Property of PrestaShop SA
 */
var bxParcelPoint={trigger:".bx-select-parcel",initialized:!1,mapContainer:null,map:null,markers:[],carrierTextCache:{},init:function(){const e=this;e.initialized||(e.initialized=!0,e.mapContainer=document.querySelector("#bx-map"),e.mapContainer||e.initMap(),e.initCarriers(),e.on("body","click",e.trigger,(function(){e.openMap(),e.getPoints()})),window.MutationObserver?(e.observeDomMutations(e.getAllCarrierInputsSelector(),(function(){e.initCarriers()})),e.on("body","click",e.getAllCarrierInputsSelector(),(function(){e.initCarriers()}))):e.on("body","change",e.getAllCarrierInputsSelector(),(function(){e.initCarriers()})),e.on("body","click",".bx-parcel-point-button",(function(t){e.selectPoint(this.getAttribute("data-code"),unescape(this.getAttribute("data-name")),this.getAttribute("data-network"),unescape(this.getAttribute("data-street")),unescape(this.getAttribute("data-zipcode")),unescape(this.getAttribute("data-city")),unescape(this.getAttribute("data-country")),unescape(this.getAttribute("data-openinghours")),unescape(this.getAttribute("data-distance"))).then((function(){e.initCarriers(),e.closeMap()}))["catch"]((function(t){e.showError(t)}))})))},initMap:function(){const e=this,t=document.createElement("div");t.setAttribute("class","bx-close"),t.setAttribute("title",bxTranslation.text.closeMap),t.addEventListener("click",(function(){e.closeMap()}));const n=document.createElement("div");n.setAttribute("id","bx-map-canvas");const o=document.createElement("div");o.setAttribute("id","bx-map-container"),o.appendChild(n);const r=document.createElement("div");r.setAttribute("id","bx-pp-container");const i=document.createElement("div");i.setAttribute("id","bx-map-inner"),i.appendChild(t),i.appendChild(o),i.appendChild(r),e.mapContainer=document.createElement("div"),e.mapContainer.setAttribute("id","bx-map"),e.mapContainer.appendChild(i),document.body.appendChild(e.mapContainer),mapboxgl.accessToken="whatever",e.map=new mapboxgl.Map({container:"bx-map-canvas",style:bxMapUrl,zoom:14}),e.map.addControl(new mapboxgl.NavigationControl);const a=document.createElement("img");a.setAttribute("src",bxMapLogoImageUrl);const c=document.createElement("a");c.setAttribute("href",bxMapLogoHrefUrl),c.setAttribute("target","_blank"),c.appendChild(a);const s=document.createElement("div");s.setAttribute("id","bx-boxtal-logo"),s.appendChild(c);const l=document.querySelector(".mapboxgl-ctrl-top-left");l&&l.appendChild(s)},initCarriers:function(){const e=this,t=e.getCarriers(),n=e.getSelectedCarrier();for(let o=0;o<t.length;o++){const r=t[o];if(null===r.querySelector(".bx-extra-content")){const e=document.createElement("div");e.setAttribute("class","col-sm-12 bx-extra-content"),r.appendChild(e)}const i=r.querySelector(".bx-extra-content");n===e.getCarrierId(r)?e.getSelectedCarrierText(n,i):i.innerHTML=""}},getCarriers:function(){let e=document.querySelectorAll(".delivery-option");return 0===e.length&&(e=document.querySelectorAll("td.delivery_option_radio")),0===e.length&&(e=document.querySelectorAll(".delivery_option")),e},openMap:function(){this.mapContainer.classList.add("bx-modal-show");let e=window.pageYOffset+(window.innerHeight-this.mapContainer.offsetHeight)/2;e<window.pageYOffset&&(e=window.pageYOffset),this.mapContainer.style.top=e+"px",this.map.resize()},closeMap:function(){this.mapContainer.classList.remove("bx-modal-show"),this.clearMarkers()},getPoints:function(){const e=this;e.getParcelPoints().then((function(t){e.addParcelPointMarkers(t.nearbyParcelPoints),e.fillParcelPointPanel(t.nearbyParcelPoints),e.addRecipientMarker(t.searchLocation),e.setMapBounds()}))["catch"]((function(t){e.showError(t)}))},getParcelPoints:function(){const e=this;return new Promise((function(t,n){const o=e.getSelectedCarrier();o||n(bxTranslation.error.carrierNotFound);const r=new XMLHttpRequest;r.onreadystatechange=function(){if(4===r.readyState)if(200!==r.status)n();else{const e="object"==typeof r.response&&null!==r.response?r.response:JSON.parse(r.response);t(e)}},r.open("POST",bxAjaxUrl),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.responseType="json",r.send("route=getPoints&carrier="+encodeURIComponent(o)+"&cartId="+encodeURIComponent(bxCartId)+"&token="+encodeURIComponent(bxToken))}))},addParcelPointMarkers:function(e){for(let t=0;t<e.length;t++)e[t].index=t,this.addParcelPointMarker(e[t])},generateParcelPointTagData:function(e){return' data-code="'+e.parcelPoint.code+'" data-name="'+escape(e.parcelPoint.name)+'" data-network="'+e.parcelPoint.network+'" data-zipcode="'+escape(e.parcelPoint.location.zipCode)+'" data-country="'+escape(e.parcelPoint.location.country)+'" data-city="'+escape(e.parcelPoint.location.city)+'" data-street="'+escape(e.parcelPoint.location.street)+'" data-openinghours="'+escape(JSON.stringify(e.parcelPoint.openingDays))+'" data-distance="'+escape(JSON.stringify(e.distanceFromSearchLocation))+'" '},formatOpeningDays:function(e){for(var t=[],n=0;n<e.length;n++){var o=e[n];if(o.weekday){for(var r=o.weekday[0]+" ",i=o.openingPeriods,a=[],c=0;c<i.length;c++){var s=i[c],l=s.openingTime===undefined?"":s.openingTime,d=s.closingTime===undefined?"":s.closingTime;""!==l&&""!==d&&a.push(l+"-"+d)}for(;a.length<2;)a.push(bxTranslation.text.closedLabel);r+=a.join(" "),n%2==1&&(r='<span style="background-color: #d8d8d8;">'+r+"</span>"),t.push(r)}}return t.join("\n")},addParcelPointMarker:function(e){const t=this;let n=null;"number"==typeof e.distanceFromSearchLocation&&(n=Math.round(e.distanceFromSearchLocation/100)/10);let o="<div class='bx-marker-popup'><b>"+e.parcelPoint.name+"</b><br/>"+e.parcelPoint.location.street+"<br/>"+e.parcelPoint.location.zipCode+" "+e.parcelPoint.location.city+(null===n?"":" ("+bxTranslation.distance.replace("%s",n)+")")+'<br/><a href="#" class="bx-parcel-point-button" '+this.generateParcelPointTagData(e)+"><b>"+bxTranslation.text.chooseParcelPoint+'</b></a><pre class="bx-parcel-point-schedule">'+this.formatOpeningDays(e.parcelPoint.openingDays)+"</pre>";const r=this.getMarkerHtmlElement(e.index+1),i=new mapboxgl.Popup({offset:25}).setHTML(o),a=new mapboxgl.Marker({element:r,anchor:"bottom"}).setLngLat(new mapboxgl.LngLat(parseFloat(e.parcelPoint.location.position.longitude),parseFloat(e.parcelPoint.location.position.latitude))).setPopup(i).addTo(t.map);t.markers.push(a),t.addRightColMarkerEvent(a,e.parcelPoint.code)},addRightColMarkerEvent:function(e,t){this.on("body","click",".bx-show-info-"+t,(function(){e.togglePopup()}))},formatHours:function(e){const t=e.split(":");return 3===t.length&&(e=t[0]+":"+t[1]),e},addRecipientMarker:function(e){const t=document.createElement("div");t.className="bx-marker-recipient";const n=new mapboxgl.Marker({element:t,anchor:"bottom"}).setLngLat(new mapboxgl.LngLat(parseFloat(e.position.longitude),parseFloat(e.position.latitude))).addTo(this.map);this.markers.push(n)},setMapBounds:function(){let e=new mapboxgl.LngLatBounds;for(let t=0;t<this.markers.length;t++){const n=this.markers[t];e=e.extend(n.getLngLat())}this.map.fitBounds(e,{padding:30,linear:!0})},fillParcelPointPanel:function(e){let t="";t+="<table><tbody>";for(let n=0;n<e.length;n++){const o=e[n];let r=null;"number"==typeof o.distanceFromSearchLocation&&(r=Math.round(o.distanceFromSearchLocation/100)/10),t+="<tr>",t+="<td>"+this.getMarkerHtmlElement(n+1).outerHTML,t+='<div class="bx-parcel-point-title"><a class="bx-show-info-'+o.parcelPoint.code+'">'+o.parcelPoint.name+"</a></div><br/>",t+=o.parcelPoint.location.street+"<br/>",t+=o.parcelPoint.location.zipCode+" "+o.parcelPoint.location.city+(null===r?"":" ("+bxTranslation.distance.replace("%s",r)+")")+"<br/>",t+='<a class="bx-parcel-point-button" '+this.generateParcelPointTagData(o)+'"><b>'+bxTranslation.text.chooseParcelPoint+"</b></a>",t+="</td>",t+="</tr>"}t+="</tbody></table>",document.querySelector("#bx-pp-container").innerHTML=t},getMarkerHtmlElement:function(e){const t=document.createElement("div");return t.className="bx-marker",t.innerHTML=e,t},selectPoint:function(e,t,n,o,r,i,a,c,s){const l=this;return new Promise((function(d,p){const u=l.getSelectedCarrier();u||p(bxTranslation.error.carrierNotFound);const m=new XMLHttpRequest;m.onreadystatechange=function(){4===m.readyState&&(200!==m.status?p(bxTranslation.error.couldNotSelectPoint):d())},m.open("POST",bxAjaxUrl),m.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),m.responseType="json",m.send("route=setPoint&carrier="+encodeURIComponent(u)+"&code="+encodeURIComponent(e)+"&name="+encodeURIComponent(t)+"&address="+encodeURIComponent(o)+"&zipcode="+encodeURIComponent(r)+"&city="+encodeURIComponent(i)+"&country="+encodeURIComponent(a)+"&openingHours="+encodeURIComponent(c)+"&distance="+encodeURIComponent(s)+"&network="+encodeURIComponent(n)+"&cartId="+encodeURIComponent(bxCartId)+"&token="+encodeURIComponent(bxToken))}))},clearMarkers:function(){for(let e=0;e<this.markers.length;e++)this.markers[e].remove();this.markers=[]},getUniqueCarrier:function(){return document.querySelector('input[type="hidden"].shipping_method')},hasUniqueCarrier:function(){return null!==this.getUniqueCarrier()},getCarrierId:function(e){if(this.hasUniqueCarrier()){return this.getUniqueCarrier().getAttribute("value")}{const t=e.querySelector("input[type=radio]");return null===t?null:t.getAttribute("value")}},getSelectedCarrier:function(){let e;if(this.hasUniqueCarrier()){e=this.getUniqueCarrier().getAttribute("value")}else{e=this.getSelectedInput().getAttribute("value")}return e},getSelectedCarrierText:function(e,t){if(null===e)return"";const n=this.carrierTextCache;n[e]!==undefined&&(t.innerHTML=n[e]);const o=new XMLHttpRequest;o.onreadystatechange=function(){if(4===o.readyState){if(200!==o.status)t.innerHTML="";else{const e="object"==typeof o.response&&null!==o.response?o.response:JSON.parse(o.response);t.innerHTML=e.text}n[e]=t.innerHTML}},o.open("POST",bxAjaxUrl),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.responseType="json",o.send("route=getSelectedCarrierText&carrier="+encodeURIComponent(e)+"&cartId="+encodeURIComponent(bxCartId)+"&token="+encodeURIComponent(bxToken))},getSelectedInput:function(){var e=document.querySelector(".delivery-option input[type='radio']:checked");return null===e&&(e=document.querySelector(".delivery_option_radio input[type='radio']:checked")),null===e&&(e=document.querySelector(".delivery_option input[type='radio']:checked")),e},getAllCarrierInputsSelector:function(){let e=".delivery-option input[type='radio']";return e+=", .delivery_option_radio input[type='radio']",e+=", .delivery_option input[type='radio']",".delivery-option input[type='radio'], .delivery_option_radio input[type='radio'], .delivery_option input[type='radio']"},showError:function(e){this.closeMap(),alert(e)},isDescendant:function(e,t){for(var n=t.parentNode;null!=n;){if(n==e)return!0;n=n.parentNode}return!1},on:function(e,t,n,o){const r=document.querySelector(e);r.addEventListener(t,(function(e){const t=r.querySelectorAll(n),i=e.target;for(let n=0,a=t.length;n<a;n++){let a=i;const c=t[n];for(;a&&a!==r;){if(a===c)return o.call(c,e);a=a.parentNode}}}))},observeDomMutations:function(e,t){window.MutationObserver&&new MutationObserver((function(n){const o=[];for(let t of n)if("childList"===t.type){const n=Array.from(document.body.querySelectorAll(e)),r=Array.from(t.addedNodes);-1===n.indexOf(t.target)&&r.find((e=>-1!==n.indexOf(e)))===undefined&&r.find((t=>!(t instanceof Text)&&t.querySelector&&null!==t.querySelector(e)))===undefined&&n.find((e=>r.find((t=>bxParcelPoint.isDescendant(e,t)))!==undefined))===undefined||o.push(t)}o.length>0&&t(o)})).observe(document.body,{attributes:!0,childList:!0,subtree:!0})}};/*
 * NOTICE OF LICENSE
 *
 * This product is licensed for one customer to use on one installation (test stores and multishop included).
 * Site developer has the right to modify this module to suit their needs, but can not redistribute the module in
 * whole or in part. Any other use of this module constitutes a violation of the user agreement.
 *
 * DISCLAIMER
 *
 * NO WARRANTIES OF DATA SAFETY OR MODULE SECURITY
 * ARE EXPRESSED OR IMPLIED. USE THIS MODULE IN ACCORDANCE
 * WITH YOUR MERCHANT AGREEMENT, KNOWING THAT VIOLATIONS OF
 * PCI COMPLIANCY OR A DATA BREACH CAN COST THOUSANDS OF DOLLARS
 * IN FINES AND DAMAGE A STORES REPUTATION. USE AT YOUR OWN RISK.
 *
 * @author    idnovate.com <info@idnovate.com>
 * @copyright 2022 idnovate.com
 * @license   See above
 */
function getQueryString(){var key=!1,res={},itm=null;var qs=location.search.substring(1);if(arguments.length>0&&arguments[0].length>1)
key=arguments[0];var pattern=/([^&=]+)=([^&]*)/g;while(itm=pattern.exec(qs)){if(key!==!1&&decodeURIComponent(itm[1])===key)
return decodeURIComponent(itm[2]);else if(key===!1)
res[decodeURIComponent(itm[1])]=decodeURIComponent(itm[2])}
return key===!1?res:null}
$(document).ready(function(){if(getQueryString('previewPopup')){displayPopup(getQueryString('popupId'));return}
updateVisits();getPopup(1);getPopup(4);if(typeof ajaxCart!=="undefined"){ajaxCart.add=(function(){var ajaxCartaddCached=ajaxCart.add;return function(idProduct){ajaxCartaddCached.apply(this,arguments);setTimeout(function(){productAddedToTheCart(idProduct)},100)}})()}else if(typeof prestashop!=="undefined"){prestashop.on('updateCart',function(event){if(event.reason.linkAction=="add-to-cart"){productAddedToTheCart(event.reason.idProduct,event.reason.idProductAttribute)}});prestashop.on('stUpdateCart',function(event){if(event.reason.linkAction=="add-to-cart"){productAddedToTheCart(event.reason.idProduct,event.reason.idProductAttribute)}});$('body').on('click','.add1',function(){idProduct=$(this).parents('.product-actions').find('input[name="id_product"]').val();productAddedToTheCart(idProduct)})}else if($('#layer_cart').length||$('.layer_cart_overlay').length||$('.mfp-container').length){$(document).on('click','#layer_cart .cross, #layer_cart .continue, .layer_cart_overlay, #blockcart-modal, .mfp-container',function(){productAddedToTheCart()})}else{$(document).on('click','.add-to-cart, .product-add-to-cart',function(){productAddedToTheCart()})}
if(apc_exit_popups){_html=document.documentElement;_html.addEventListener('mouseout',handleMouseleave)}});function productAddedToTheCart(idProduct,idProductAttribute){getPopup(2,idProduct,idProductAttribute)}
function handleMouseleave(e){e=e?e:window.event;if(e.target.tagName.toLowerCase()==="input"||e.target.tagName.toLowerCase()==="select"){return}
var vpWidth=Math.max(document.documentElement.clientWidth,window.innerWidth||0);if(e.clientX>=(vpWidth-50)){return}
if(e.clientY>=50){return}
var from=e.relatedTarget||e.toElement;if(!from){getPopup(3)}}
function updateVisits(){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:apc_link,async:!0,cache:!1,dataType:"json",data:{token:apc_token,responsiveWidth:window.innerWidth,url:encodeURIComponent(window.location.href),referrer:encodeURIComponent(document.referrer),updateVisits:1,time:(new Date()).getTime(),fromController:apc_controller,id_product:apc_product,id_category:apc_category,id_manufacturer:apc_manufacturer,id_supplier:apc_supplier,id_cms:apc_cms,},error:function(errorThrown){console.log(errorThrown)}})}
function getPopup(event,idProduct,idProductAttribute){var availablePopups=[];$('.apc_modal').each(function(){availablePopups.push($(this).data('popupId'))});availablePopups=availablePopups.join(',');if(!availablePopups){return}
if(!idProduct){idProduct=apc_product}
$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:apc_link,async:!0,cache:!1,dataType:"json",data:{token:apc_token,responsiveWidth:window.innerWidth,url:encodeURIComponent(window.location.href),referrer:encodeURIComponent(document.referrer),getPopup:1,event:event,time:(new Date()).getTime(),fromController:apc_controller,id_product:idProduct,id_product_attribute:idProductAttribute,id_category:apc_category,id_manufacturer:apc_manufacturer,id_supplier:apc_supplier,availablePopups:availablePopups},success:function(jsonData){if(!jsonData.hasError&&typeof jsonData.popups!="undefined"){$.each(jsonData.popups,function(i,item){var popup=JSON.parse(item);if(event==4&&popup.selector){var popupSelector=eval(popup.selector);if(popupSelector.length){popupSelector.css('cursor','pointer');popupSelector.on('click touch',function(){displayPopup(popup.id,event)})}}else{displayPopup(popup.id,event)}})}},error:function(errorThrown){console.log(errorThrown)}})}
function displayPopup(popupId,event){if(!$.prototype.fancybox){console.log('Fancybox library does not exist!');return}
var $apcFancybox='';if(typeof $.fancyboxPopup!="undefined"){$apcFancybox=$.fancyboxPopup}else{$apcFancybox=$.fancybox}
if($apcFancybox.current){return}
var content=$('#apc_modal_'+popupId);var popupProperties=content.data();if(typeof popupProperties==="undefined"){return}
var preview=!1;if(getQueryString('previewPopup')!==null){preview=!0}
var maxWidth='90%';var maxHeight='90%';if(typeof(popupProperties.height)=="undefined"||typeof(popupProperties.width)=="undefined"){maxWidth='auto';maxHeight='auto'}else if(popupProperties.height==='100%'&&popupProperties.width==='100%'){maxWidth='100%';maxHeight='100%'}
var autoSize=!1;if(!popupProperties.height&&!popupProperties.width){autoSize=!0}
if(!popupProperties.height){popupProperties.height='auto'}
if(!popupProperties.width){popupProperties.width='auto'}
if(!popupProperties.openEffect){popupProperties.openEffect='zoom'}
var secsDisplay=0;if(event===1){if(popupProperties.secsDisplay){secsDisplay=popupProperties.secsDisplay}}
if(event===2){if(popupProperties.secsDisplayCart){secsDisplay=popupProperties.secsDisplayCart}}
setTimeout(function(){$apcFancybox.open({href:'#apc_modal_'+popupId,src:'#apc_modal_'+popupId,autoSize:autoSize,width:popupProperties.width,height:popupProperties.height,padding:popupProperties.padding,autoCenter:!0,aspectRatio:!1,wrapCSS:'apc-popup apc-popup-'+popupProperties.popupId+' '+popupProperties.css,margin:0,maxWidth:maxWidth,maxHeight:maxHeight,openMethod:popupProperties.openEffect+'In',closeMethod:popupProperties.openEffect+'Out',beforeShow:function(){if(!preview){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:apc_link,async:!0,cache:!1,dataType:"json",data:'markAsSeen=1&popupId='+popupProperties.popupId+'&time='+(new Date()).getTime()+'&token='+apc_token})}
if(popupProperties.blurBackground){$("main, header, body > section, footer, #page").addClass("apc-effect-blur")}
if(typeof $.fn.uniform==='function'){$("select.form-control,input[type='checkbox']:not(.comparator), input[type='radio'],input#id_carrier2, input[type='file']").not(".not_unifrom, .not_uniform").uniform()}
$('.apc-popup-'+popupProperties.popupId+' #apc-popup-'+popupProperties.popupId+'-dont-show-again').detach().appendTo('.apc-popup-'+popupProperties.popupId+' .fancybox-outer')},afterShow:function(){if(popupProperties.opacity==0&&!popupProperties.locked){$('.fancybox-overlay').attr('style',function(i,s){if(s==undefined){s=''}return s+'display: none !important;'})}
$('.modal').removeAttr('tabindex');if(!iOS()){$apcFancybox.toggle()}
if($('.apc-popup-'+popupProperties.popupId+' .modal-img').length>0){var img=$('.apc-popup-'+popupProperties.popupId+' .modal-img');if(img.get(0).height<=$('.apc-popup-'+popupProperties.popupId+' .fancybox-inner').height()){$('.apc-popup-'+popupProperties.popupId+' .fancybox-inner').attr('style','overflow: hidden !important;')}}},afterClose:function(){if(popupProperties.blurBackground){$("main, header, body > section, footer, #page").removeClass("apc-effect-blur")}
$('.modal').attr('tabindex',-1)},helpers:{overlay:{css:{'background':'rgba(0, 0, 0, '+popupProperties.opacity+')',},locked:popupProperties.locked,closeClick:popupProperties.closeBackground}}})},secsDisplay);if(typeof(popupProperties.secsClose)!="undefined"&&popupProperties.secsClose>0){setTimeout(function(){$apcFancybox.close()},popupProperties.secsClose+secsDisplay)}}
function dontDisplayAgain(popupId){if(typeof $.fancyboxPopup!="undefined"){var $apcFancybox=$.fancyboxPopup}else{$apcFancybox=$.fancybox}
$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:apc_link,async:!0,cache:!1,dataType:"json",data:'dontDisplayAgain=1&popupId='+popupId+'&time='+(new Date()).getTime()+'&token='+apc_token});$apcFancybox.close()}
function iOS(){return['iPad Simulator','iPhone Simulator','iPod Simulator','iPad','iPhone','iPod'].includes(navigator.platform)||(navigator.userAgent.includes("Mac")&&"ontouchend" in document)};(function(){$.fn.lofCountDown=function(options){return this.each(function(){new $.lofCountDown(this,options)})}
$.lofCountDown=function(obj,options){this.options=$.extend({autoStart:!0,LeadingZero:!0,DisplayFormat:"<div>%%D%% Days</div><div>%%H%% Hours</div><div>%%M%% Minutes</div><div>%%S%% Seconds</div>",FinishMessage:"Expired",CountActive:!0,TargetDate:null},options||{});if(this.options.TargetDate==null||this.options.TargetDate==''){return}
this.timer=null;this.element=obj;this.CountStepper=-1;this.CountStepper=Math.ceil(this.CountStepper);this.SetTimeOutPeriod=(Math.abs(this.CountStepper)-1)*1000+990;var dthen=new Date(this.options.TargetDate);var dnow=new Date();if(this.CountStepper>0){ddiff=new Date(dnow-dthen)}else{ddiff=new Date(dthen-dnow)}
gsecs=Math.floor(ddiff.valueOf()/1000);this.CountBack(gsecs,this)};$.lofCountDown.fn=$.lofCountDown.prototype;$.lofCountDown.fn.extend=$.lofCountDown.extend=$.extend;$.lofCountDown.fn.extend({calculateDate:function(secs,num1,num2){var s=((Math.floor(secs/num1))%num2).toString();if(this.options.LeadingZero&&s.length<2){s="0"+s}
return"<b>"+s+"</b>"},CountBack:function(secs,self){if(secs<0){return}
clearInterval(self.timer);DisplayStr=self.options.DisplayFormat.replace(/%%D%%/g,self.calculateDate(secs,86400,100000));DisplayStr=DisplayStr.replace(/%%H%%/g,self.calculateDate(secs,3600,24));DisplayStr=DisplayStr.replace(/%%M%%/g,self.calculateDate(secs,60,60));DisplayStr=DisplayStr.replace(/%%S%%/g,self.calculateDate(secs,1,60));self.element.innerHTML=DisplayStr;if(self.options.CountActive){self.timer=null;self.timer=setTimeout(function(){self.CountBack((secs+self.CountStepper),self)},(self.SetTimeOutPeriod))}}})})(jQuery);/**
* NOTICE OF LICENSE
*
* This product is licensed for one customer to use on one installation (test stores and multishop included).
* Site developer has the right to modify this module to suit their needs, but can not redistribute the module in
* whole or in part. Any other use of this module constitues a violation of the user agreement.
*
* DISCLAIMER
*
* NO WARRANTIES OF DATA SAFETY OR MODULE SECURITY
* ARE EXPRESSED OR IMPLIED. USE THIS MODULE IN ACCORDANCE
* WITH YOUR MERCHANT AGREEMENT, KNOWING THAT VIOLATIONS OF
* PCI COMPLIANCY OR A DATA BREACH CAN COST THOUSANDS OF DOLLARS
* IN FINES AND DAMAGE A STORES REPUTATION. USE AT YOUR OWN RISK.
*
*  @author    idnovate.com <info@idnovate.com>
*  @copyright 2022 idnovate.com
*  @license   See above
*/
if(typeof updateCartSummary==='function'){updateCartSummary=(function(){var updateCartSummaryCached=updateCartSummary;return function(json){updateCartSummaryCached.apply(this,arguments);if(json&&!$.isEmptyObject(json.discounts)){for(i=0;i<json.discounts.length;i++){if($('#cart_discount_'+json.discounts[i].id_cart_rule).length===0){if(priceDisplayMethod!==0)
var discountedPrice=formatCurrency(json.discounts[i].value_tax_exc*-1,currencyFormat,currencySign,currencyBlank);else discountedPrice=formatCurrency(json.discounts[i].value_real*-1,currencyFormat,currencySign,currencyBlank);if($('.cart-summary').length){var discountTd=" \
                                <li class='cart_discount cart-summary-line clearfix' id='cart_discount_"+json.discounts[i].id_cart_rule+"'> \
                                    <span class='cart_discount_name'>"+json.discounts[i].name+"</span>\
                                    <span class='cart_discount_price value float-right'>"+discountedPrice+"</span>\
                                </li>";$('.promo-name').append(discountTd)}else if($('#cart_summary').length){var discountTd=" \
                                <tbody> \
                                    <tr class='cart_discount last_item' id='cart_discount_"+json.discounts[i].id_cart_rule+"'> \
                                        <td class='cart_discount_name' colspan='3'>"+json.discounts[i].name+"</td> \
                                        <td class='cart_discount_price'><span class='price-discount'>"+discountedPrice+"</span></td> \
                                        <td class='cart_discount_delete'>1</td> \
                                        <td class='cart_discount_price'><span class='price-discount price'>"+discountedPrice+"</span></td> \
                                        <td class='price_discount_del'></td> \
                                    </tr> \
                                </tbody>";$('#cart_summary').append(discountTd)}else if($('#opc-cart_summary').length){var discountTd=" \
                                <tbody> \
                                    <tr class='cart_discount' id='cart_discount_"+json.discounts[i].id_cart_rule+"'> \
                                        <td class='cart_discount_name cart_description' colspan='3'>"+json.discounts[i].name+"</td> \
                                        <td class='cart_unit'> \
                                            <!-- <div class='mobile_table_title visible-phone'>Unit price b</div> \
                                            <div class='mobile_table_content'> \
                                                <span class='price-discount price'> \
                                                    "+discountedPrice+" \
                                                </span> \
                                            </div> --> \
                                        </td> \
                                        <td></td> \
                                        <td class='cart_discount_delete'> \
                                            <!-- <div class='mobile_table_title visible-phone'>Qty</div> \
                                            <div class='mobile_table_content'>1</div> --> \
                                        </td> \
                                        <td class='cart_total'> \
                                            <div class='mobile_table_title visible-phone'>Total</div> \
                                            <div class='mobile_table_content'> \
                                                <span class='price-discount price'> \
                                                    "+discountedPrice+" \
                                                </span> \
                                            </div> \
                                        </td> \
                                        <td class='price_discount_del'> \
                                            <div class='mobile_table_title visible-phone'></div> \
                                            <div class='mobile_table_content'> \
                                                "+(json.discounts[i].code?"<a onclick='deldisc("+json.discounts[i].id_cart_rule+")' class='price_discount_delete'><i class='fa-trash  fa'></i></a>":"")+" \
                                            </div> \
                                        </td> \
                                    </tr> \
                                </tbody>";$('#opc-cart_summary').append(discountTd)}}}}
if(json&&$.isEmptyObject(json.gift_products)){$('#cart_summary [id ^=product_][id $=gift]').remove()}}})()}
if(typeof prestashop==='object'){$('body.page-cart .btn-touchspin').on('click',function(){$('.btn-touchspin').attr('disabled','disabled')});prestashop.on('updatedProduct',function(){$('.btn-touchspin').removeAttr("disabled")})}
if(typeof upQuantity==="function"){function upQuantity(id,qty){$('.cart_quantity_up').off('click').on('click',function(e){e.preventDefault()});if(typeof(qty)=='undefined'||!qty)
qty=1;var customizationId=0;var productId=0;var productAttributeId=0;var id_address_delivery=0;var ids=0;ids=id.split('_');productId=parseInt(ids[0]);if(typeof(ids[1])!=='undefined')
productAttributeId=parseInt(ids[1]);if(typeof(ids[2])!=='undefined'&&ids[2]!=='nocustom')
customizationId=parseInt(ids[2]);if(typeof(ids[3])!=='undefined')
id_address_delivery=parseInt(ids[3]);$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseUri+'?rand='+new Date().getTime(),async:!0,cache:!1,dataType:'json',data:'controller=cart'+'&ajax=true'+'&add=true'+'&getproductprice=true'+'&summary=true'+'&id_product='+productId+'&ipa='+productAttributeId+'&id_address_delivery='+id_address_delivery+((customizationId!==0)?'&id_customization='+customizationId:'')+'&qty='+qty+'&token='+static_token+'&allow_refresh=1',success:function(jsonData){if(jsonData.hasError){var errors='';for(var error in jsonData.errors)
if(error!=='indexOf')
errors+=$('<div />').html(jsonData.errors[error]).text()+"\n";if(!!$.prototype.fancybox)
$.fancybox.open([{type:'inline',autoScale:!0,minHeight:30,content:'<p class="fancybox-error">'+errors+'</p>'}],{padding:0});else alert(errors);$('input[name=quantity_'+id+']').val($('input[name=quantity_'+id+'_hidden]').val())}else{if(jsonData.refresh)
window.location.href=window.location.href;updateCartSummary(jsonData.summary);if(window.ajaxCart!=undefined)
ajaxCart.updateCart(jsonData);if(customizationId!==0)
updateCustomizedDatas(jsonData.customizedDatas);updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART);updateHookShoppingCartExtra(jsonData.HOOK_SHOPPING_CART_EXTRA);if(typeof(getCarrierListAndUpdate)!=='undefined')
getCarrierListAndUpdate();if(typeof(updatePaymentMethodsDisplay)!=='undefined')
updatePaymentMethodsDisplay()}},error:function(XMLHttpRequest,textStatus,errorThrown){if(textStatus!=='abort'){error="TECHNICAL ERROR: unable to save update quantity \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus;if(!!$.prototype.fancybox)
$.fancybox.open([{type:'inline',autoScale:!0,minHeight:30,content:'<p class="fancybox-error">'+error+'</p>'}],{padding:0});else alert(error)}}}).done(function(){$('.cart_quantity_up').off('click').on('click',function(e){e.preventDefault();upQuantity($(this).attr('id').replace('cart_quantity_up_',''));$('#'+$(this).attr('id').replace('_up_','_down_')).removeClass('disabled')})}).fail(function(){$('.cart_quantity_up').off('click').on('click',function(e){e.preventDefault();upQuantity($(this).attr('id').replace('cart_quantity_up_',''));$('#'+$(this).attr('id').replace('_up_','_down_')).removeClass('disabled')})})}};if(typeof downQuantity==="function"){function downQuantity(id,qty){$('.cart_quantity_down').off('click').on('click',function(e){e.preventDefault()});var val=$('input[name=quantity_'+id+']').val();var newVal=val;if(typeof(qty)=='undefined'||!qty){qty=1;newVal=val-1}else if(qty<0)
qty=-qty;var customizationId=0;var productId=0;var productAttributeId=0;var id_address_delivery=0;var ids=0;ids=id.split('_');productId=parseInt(ids[0]);if(typeof(ids[1])!=='undefined')
productAttributeId=parseInt(ids[1]);if(typeof(ids[2])!=='undefined'&&ids[2]!=='nocustom')
customizationId=parseInt(ids[2]);if(typeof(ids[3])!=='undefined')
id_address_delivery=parseInt(ids[3]);if(newVal>0||$('#product_'+id+'_gift').length){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:baseUri+'?rand='+new Date().getTime(),async:!0,cache:!1,dataType:'json',data:'controller=cart'+'&ajax=true'+'&add=true'+'&getproductprice=true'+'&summary=true'+'&id_product='+productId+'&ipa='+productAttributeId+'&id_address_delivery='+id_address_delivery+'&op=down'+((customizationId!==0)?'&id_customization='+customizationId:'')+'&qty='+qty+'&token='+static_token+'&allow_refresh=1',success:function(jsonData){if(jsonData.hasError){var errors='';for(var error in jsonData.errors)
if(error!=='indexOf')
errors+=$('<div />').html(jsonData.errors[error]).text()+"\n";if(!!$.prototype.fancybox)
$.fancybox.open([{type:'inline',autoScale:!0,minHeight:30,content:'<p class="fancybox-error">'+errors+'</p>'}],{padding:0});else alert(errors);$('input[name=quantity_'+id+']').val($('input[name=quantity_'+id+'_hidden]').val())}else{if(jsonData.refresh)
window.location.href=window.location.href;updateCartSummary(jsonData.summary);if(window.ajaxCart!==undefined)
ajaxCart.updateCart(jsonData);if(customizationId!==0)
updateCustomizedDatas(jsonData.customizedDatas);updateHookShoppingCart(jsonData.HOOK_SHOPPING_CART);updateHookShoppingCartExtra(jsonData.HOOK_SHOPPING_CART_EXTRA);if(newVal==0)
$('#product_'+id).hide();if(typeof(getCarrierListAndUpdate)!=='undefined')
getCarrierListAndUpdate();if(typeof(updatePaymentMethodsDisplay)!=='undefined')
updatePaymentMethodsDisplay()}},error:function(XMLHttpRequest,textStatus,errorThrown){if(textStatus!=='abort')
alert("TECHNICAL ERROR: unable to save update quantity \n\nDetails:\nError thrown: "+XMLHttpRequest+"\n"+'Text status: '+textStatus)}}).done(function(){$('.cart_quantity_down').off('click').on('click',function(e){e.preventDefault();downQuantity($(this).attr('id').replace('cart_quantity_down_',''))})}).fail(function(){$('.cart_quantity_down').off('click').on('click',function(e){e.preventDefault();downQuantity($(this).attr('id').replace('cart_quantity_down_',''))})})}else{deleteProductFromSummary(id);$('.cart_quantity_down').off('click').on('click',function(e){e.preventDefault();downQuantity($(this).attr('id').replace('cart_quantity_down_',''))})}}};/*
* 2018 Areama
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@areama.net so we can send you a copy immediately.
*
*
*  @author Areama <support@areama.net>
*  @copyright  2018 Areama

*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of Areama
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(c,d,a){c instanceof String&&(c=String(c));for(var b=c.length,e=0;e<b;e++){var k=c[e];if(d.call(a,k,e,c))return{i:e,v:k}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(c,d,a){c!=Array.prototype&&c!=Object.prototype&&(c[d]=a.value)};$jscomp.getGlobal=function(c){return"undefined"!=typeof window&&window===c?c:"undefined"!=typeof global&&null!=global?global:c};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(c,d,a,b){if(d){a=$jscomp.global;c=c.split(".");for(b=0;b<c.length-1;b++){var e=c[b];e in a||(a[e]={});a=a[e]}c=c[c.length-1];b=a[c];d=d(b);d!=b&&null!=d&&$jscomp.defineProperty(a,c,{configurable:!0,writable:!0,value:d})}};$jscomp.polyfill("Array.prototype.find",function(c){return c?c:function(c,a){return $jscomp.findInternal(this,c,a).v}},"es6","es3");$jscomp.arrayIteratorImpl=function(c){var d=0;return function(){return d<c.length?{done:!1,value:c[d++]}:{done:!0}}};$jscomp.arrayIterator=function(c){return{next:$jscomp.arrayIteratorImpl(c)}};$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.Symbol=function(){var c=0;return function(d){return $jscomp.SYMBOL_PREFIX+(d||"")+c++}}();$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var c=$jscomp.global.Symbol.iterator;c||(c=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[c]&&$jscomp.defineProperty(Array.prototype,c,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}});$jscomp.initSymbolIterator=function(){}};$jscomp.initSymbolAsyncIterator=function(){$jscomp.initSymbol();var c=$jscomp.global.Symbol.asyncIterator;c||(c=$jscomp.global.Symbol.asyncIterator=$jscomp.global.Symbol("asyncIterator"));$jscomp.initSymbolAsyncIterator=function(){}};$jscomp.iteratorPrototype=function(c){$jscomp.initSymbolIterator();c={next:c};c[$jscomp.global.Symbol.iterator]=function(){return this};return c};$jscomp.iteratorFromArray=function(c,d){$jscomp.initSymbolIterator();c instanceof String&&(c+="");var a=0,b={next:function(){if(a<c.length){var e=a++;return{value:d(e,c[e]),done:!1}}b.next=function(){return{done:!0,value:void 0}};return b.next()}};b[Symbol.iterator]=function(){return b};return b};$jscomp.polyfill("Array.prototype.values",function(c){return c?c:function(){return $jscomp.iteratorFromArray(this,function(c,a){return a})}},"es8","es3");(function(c){function d(a,b){this._initialized=!1;this.settings=null;this.popups=[];this.options=c.extend({},d.Defaults,b);this.$element=c(a);this.y=this.x=0;this._interval;this._callbackOpened=this._popupOpened=this._menuOpened=!1;this.svgPath=this.countdown=null;this.svgSteps=[];this.svgInitialPath=this.svgPathOpen=null;this.isAnimating=!1;this.init()}d.Defaults={activated:!1,pluginVersion:"2.1.3",wordpressPluginVersion:!1,align:"right",mode:"regular",countdown:0,drag:!1,buttonText:"Contact us",buttonSize:"large",buttonIconSize:24,menuSize:"normal",buttonIcon:'<svg width="20" height="20" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g transform="translate(-825 -308)"><g><path transform="translate(825 308)" fill="#FFFFFF" d="M 19 4L 17 4L 17 13L 4 13L 4 15C 4 15.55 4.45 16 5 16L 16 16L 20 20L 20 5C 20 4.45 19.55 4 19 4ZM 15 10L 15 1C 15 0.45 14.55 0 14 0L 1 0C 0.45 0 0 0.45 0 1L 0 15L 4 11L 14 11C 14.55 11 15 10.55 15 10Z"/></g></g></svg>',ajaxUrl:"server.php",action:"callback",phonePlaceholder:"+X-XXX-XXX-XX-XX",callbackSubmitText:"Waiting for call",reCaptcha:!1,reCaptchaAction:"callbackRequest",reCaptchaKey:"",errorMessage:"Connection error. Please try again.",callProcessText:"We are calling you to phone",callSuccessText:"Thank you.<br>We are call you back soon.",showMenuHeader:!1,menuHeaderText:"How would you like to contact us?",showHeaderCloseBtn:!0,menuInAnimationClass:"show-messageners-block",menuOutAnimationClass:"",eaderCloseBtnBgColor:"#787878",eaderCloseBtnColor:"#FFFFFF",items:[],itemsIconType:"rounded",iconsAnimationSpeed:800,iconsAnimationPause:2E3,promptPosition:"side",style:null,itemsAnimation:null,popupAnimation:"scale",callbackFormFields:{name:{name:"name",enabled:!0,required:!0,type:"text",label:"Please enter your name",placeholder:"Your full name"},email:{name:"email",enabled:!0,required:!1,type:"email",label:"Enter your email address",placeholder:"Optional field. Example: email@domain.com"},time:{name:"time",enabled:!0,required:!1,type:"dropdown",label:"Please choose schedule time",values:[{value:"asap",label:"Call me ASAP"},"00:00","01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00","13:00","14:00","15:00","16:00","17:00","18:00","19:00","20:00","21:00","22:00","23:00"]},phone:{name:"phone",enabled:!0,required:!0,type:"tel",label:"Please enter your phone number",placeholder:"+X-XXX-XXX-XX-XX"},description:{name:"description",enabled:!0,required:!1,type:"textarea",label:"Please leave a message with your request"}},theme:"#000000",callbackFormText:"Please enter your phone number<br>and we call you back soon",closeIcon:'<svg width="12" height="13" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g transform="translate(-4087 108)"><g><path transform="translate(4087 -108)" fill="currentColor" d="M 14 1.41L 12.59 0L 7 5.59L 1.41 0L 0 1.41L 5.59 7L 0 12.59L 1.41 14L 7 8.41L 12.59 14L 14 12.59L 8.41 7L 14 1.41Z"></path></g></g></svg>',callbackStateIcon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M493.4 24.6l-104-24c-11.3-2.6-22.9 3.3-27.5 13.9l-48 112c-4.2 9.8-1.4 21.3 6.9 28l60.6 49.6c-36 76.7-98.9 140.5-177.2 177.2l-49.6-60.6c-6.8-8.3-18.2-11.1-28-6.9l-112 48C3.9 366.5-2 378.1.6 389.4l24 104C27.1 504.2 36.7 512 48 512c256.1 0 464-207.5 464-464 0-11.2-7.7-20.9-18.6-23.4z"></path></svg>'};d.prototype.init=function(){if(this._initialized)return!1;this.destroy();this.settings=c.extend({},this.options);this.$element.addClass("arcontactus-widget").addClass("arcontactus-message");"elastic"==this.settings.style&&this.$element.addClass("arcu-elastic");"bubble"==this.settings.style&&this.$element.addClass("arcu-bubble");0==this.settings.style.length&&this.settings.popupAnimation&&this.$element.addClass("arcu-"+this.settings.popupAnimation);"left"===this.settings.align?this.$element.addClass("left"):this.$element.addClass("right");if(this.settings.items.length){this.$element.append("\x3c!--noindex--\x3e");this._initCallbackBlock();"regular"==this.settings.mode&&this._initMessengersBlock();this.popups.length&&this._initPopups();this._initMessageButton();this._initPrompt();this._initEvents();var a=this;setTimeout(function(){a.startAnimation()},this.settings.iconsAnimationPause?this.settings.iconsAnimationPause:2E3);this.$element.append("\x3c!--/noindex--\x3e");this.$element.addClass("active")}else console.info("jquery.contactus:no items");if("elastic"==this.settings.style||"bubble"==this.settings.style){var b=document.getElementById("arcu-morph-shape");this.svgPath=Snap(b.querySelector("svg")).select("path");this.svgPathOpen=b.getAttribute("data-morph-open");this.svgInitialPath=this.svgPath.attr("d");this.svgSteps=this.svgPathOpen.split(";");this.svgStepsTotal=this.svgSteps.length}this._initialized=!0;this.$element.trigger("arcontactus.init")};d.prototype.destroy=function(){if(!this._initialized)return!1;this.stopAnimation();this._removeEvents();this.$element.find(".arcontactus-message-button").unbind();this.$element.html("");this.$element.removeClass();this.$element.unbind().removeData("ar.contactus");this._initialized=!1;this.$element.trigger("arcontactus.destroy")};d.prototype._initCallbackBlock=function(){var a=c("<div>",{class:"callback-countdown-block",style:this._colorStyle()}),b=c("<div>",{class:"callback-countdown-block-close",style:"background-color:"+this.settings.theme+"; color: #FFFFFF"});b.append(this.settings.closeIcon);var e=c("<div>",{class:"callback-countdown-block-phone"});e.append("<p>"+this.settings.callbackFormText+"</p>");var k=c("<form>",{id:"arcu-callback-form",action:this.settings.ajaxUrl,method:"POST"}),d=c("<div>",{class:"callback-countdown-block-form-group"}),f=c("<input>",{name:"action",type:"hidden",value:this.settings.action}),g=c("<input>",{name:"gtoken",class:"ar-g-token",type:"hidden",value:""});d.append(f);d.append(g);this._initCallbackFormFields(d);f=c("<div>",{class:"arcu-form-group arcu-form-button"});g=c("<button>",{id:"arcontactus-message-callback-phone-submit",type:"submit",style:this._backgroundStyle()});g.text(this.settings.callbackSubmitText);f.append(g);d.append(f);f=c("<div>",{class:"callback-countdown-block-timer"});g=c("<p>"+this.settings.callProcessText+"</p>");var l=c("<div>",{class:"callback-countdown-block-timer_timer"});f.append(g);f.append(l);g=c("<div>",{class:"callback-countdown-block-sorry"});l=c("<p>"+this.settings.callSuccessText+"</p>");g.append(l);k.append(d);e.append(k);a.append(b);a.append(e);a.append(f);a.append(g);this.$element.append(a)};d.prototype._initCallbackFormFields=function(a){var b=this;c.each(b.settings.callbackFormFields,function(e){var d=c("<div>",{class:"arcu-form-group arcu-form-group-type-"+b.settings.callbackFormFields[e].type+" arcu-form-group-"+b.settings.callbackFormFields[e].name+(b.settings.callbackFormFields[e].required?" arcu-form-group-required":"")}),h="<input>";switch(b.settings.callbackFormFields[e].type){case "textarea":h="<textarea>";break;case "dropdown":h="<select>"}if(b.settings.callbackFormFields[e].label){var f=c("<div>",{class:"arcu-form-label"});f.html(b.settings.callbackFormFields[e].label);d.append(f)}var g=c(h,{name:b.settings.callbackFormFields[e].name,class:"arcu-form-field arcu-field-"+b.settings.callbackFormFields[e].name,required:b.settings.callbackFormFields[e].required,type:"dropdown"==b.settings.callbackFormFields[e].type?null:b.settings.callbackFormFields[e].type,value:""});g.attr("placeholder",b.settings.callbackFormFields[e].placeholder);"undefined"!=typeof b.settings.callbackFormFields[e].maxlength&&g.attr("maxlength",b.settings.callbackFormFields[e].maxlength);"dropdown"==b.settings.callbackFormFields[e].type&&c.each(b.settings.callbackFormFields[e].values,function(a){var d=b.settings.callbackFormFields[e].values[a],k=b.settings.callbackFormFields[e].values[a];"object"==typeof b.settings.callbackFormFields[e].values[a]&&(d=b.settings.callbackFormFields[e].values[a].value,k=b.settings.callbackFormFields[e].values[a].label);a=c("<option>",{value:d});a.text(k);g.append(a)});d.append(g);a.append(d)})};d.prototype._initPopups=function(){var a=this,b=c("<div>",{class:"popups-block arcuAnimated"}),e=c("<div>",{class:"popups-list-container"});c.each(this.popups,function(){var b=c("<div>",{class:"arcu-popup",id:"arcu-popup-"+this.id}),d=c("<div>",{class:"arcu-popup-header",style:a.settings.theme?"background-color:"+a.settings.theme:null}),f=c("<div>",{class:"arcu-popup-close",style:a.settings.theme?"background-color:"+a.settings.theme:null}),g=c("<div>",{class:"arcu-popup-back",style:a.settings.theme?"background-color:"+a.settings.theme:null});f.append(a.settings.closeIcon);g.append('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512"><path fill="currentColor" d="M231.293 473.899l19.799-19.799c4.686-4.686 4.686-12.284 0-16.971L70.393 256 251.092 74.87c4.686-4.686 4.686-12.284 0-16.971L231.293 38.1c-4.686-4.686-12.284-4.686-16.971 0L4.908 247.515c-4.686 4.686-4.686 12.284 0 16.971L214.322 473.9c4.687 4.686 12.285 4.686 16.971-.001z" class=""></path></svg>');d.text(this.title);d.append(f);d.append(g);f=c("<div>",{class:"arcu-popup-content"});f.html(this.popupContent);b.append(d);b.append(f);e.append(b)});b.append(e);this.$element.append(b)};d.prototype._initMessengersBlock=function(){var a=c("<div>",{class:"messangers-block arcuAnimated"}),b=c("<div>",{class:"messangers-list-container"}),e=c("<ul>",{class:"messangers-list"});this.settings.itemsAnimation&&e.addClass("arcu-"+this.settings.itemsAnimation);"normal"!==this.settings.menuSize&&"large"!==this.settings.menuSize||a.addClass("lg");"small"===this.settings.menuSize&&a.addClass("sm");this._appendMessengerIcons(e);if(this.settings.showMenuHeader){var d=c("<div>",{class:"arcu-menu-header",style:this.settings.theme?"background-color:"+this.settings.theme:null});d.html(this.settings.menuHeaderText);if(this.settings.showHeaderCloseBtn){var h=c("<div>",{class:"arcu-header-close",style:"color:"+this.settings.headerCloseBtnColor+"; background:"+this.settings.headerCloseBtnBgColor});h.append(this.settings.closeIcon);d.append(h)}a.append(d);a.addClass("has-header")}"rounded"==this.settings.itemsIconType?e.addClass("rounded-items"):e.addClass("not-rounded-items");b.append(e);a.append(b);"elastic"==this.settings.style?(b='<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 100 800" preserveAspectRatio="none"><path d="M-1,0h101c0,0-97.833,153.603-97.833,396.167C2.167,627.579,100,800,100,800H-1V0z"/></svg>',e=c("<div>",{class:"arcu-morph-shape",id:"arcu-morph-shape","data-morph-open":"M-1,0h101c0,0,0-1,0,395c0,404,0,405,0,405H-1V0z"}),e.append(b),a.append(e)):"bubble"==this.settings.style&&(b='<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 100 800" preserveAspectRatio="none"><path d="M-7.312,0H0c0,0,0,113.839,0,400c0,264.506,0,400,0,400h-7.312V0z"></path><defs></defs></svg>',e=c("<div>",{class:"arcu-morph-shape",id:"arcu-morph-shape","data-morph-open":"M-7.312,0H15c0,0,66,113.339,66,399.5C81,664.006,15,800,15,800H-7.312V0z;M-7.312,0H100c0,0,0,113.839,0,400c0,264.506,0,400,0,400H-7.312V0z"}),e.append(b),a.append(e));this.$element.append(a)};d.prototype._appendMessengerIcons=function(a){var b=this;c.each(this.settings.items,function(e){e=c("<li>",{});if("callback"==this.href)var d=c("<div>",{class:"messanger call-back "+(this.class?this.class:"")});else if("_popup"==this.href)b.popups.push(this),d=c("<div>",{class:"messanger arcu-popup-link "+(this.class?this.class:""),"data-id":this.id?this.id:null});else if(d=c("<a>",{class:"messanger "+(this.class?this.class:"")+(this.addons?" has-addon ":""),id:this.id?this.id:null,rel:"nofollow noopener",href:this.href,target:this.target?this.target:"_blank"}),this.onClick){var h=this;d.on("click",function(a){h.onClick(a)})}this.addons&&c.each(this.addons,function(a){a=c("<a>",{href:this.href,title:this.title?this.title:null,target:this.target?this.target:"_blank",class:this.class?this.class:"arcu-addon",style:(this.color?"color:"+this.color:null)+"; background-color: transparent"});if(this.icon)if(0===this.icon.indexOf("<"))a.append(this.icon);else if(-1===this.icon.indexOf("<")){var b=c("<img>",{src:this.icon});a.append(b)}if(this.onClick){var e=this;a.on("click",function(a){return e.onClick(a)})}d.append(a)});var f="rounded"==b.settings.itemsIconType?this.noContainer?c("<span>",{style:this.color?"color:"+this.color+"; fill: "+this.color:null,class:"no-container"}):c("<span>",{style:this.color&&!this.noContainer?"background-color:"+this.color:null}):this.noContainer?c("<span>",{style:this.color?"color:"+this.color+"; fill: "+this.color:null,class:"no-container"}):c("<span>",{style:(this.color&&!this.noContainer?"color:"+this.color:null)+"; background-color: transparent"});f.append(this.icon);d.append(f);f=c("<div>",{class:"arcu-item-label"});var g=c("<div>",{class:"arcu-item-title"});g.text(this.title);f.append(g);"undefined"!=typeof this.subTitle&&this.subTitle&&(g=c("<div>",{class:"arcu-item-subtitle"}),g.text(this.subTitle),f.append(g));d.append(f);e.append(d);a.append(e)})};d.prototype._initMessageButton=function(){var a=this,b=c("<div>",{class:"arcontactus-message-button",style:this._backgroundStyle()});"large"===this.settings.buttonSize&&this.$element.addClass("lg");"huge"===this.settings.buttonSize&&this.$element.addClass("hg");"medium"===this.settings.buttonSize&&this.$element.addClass("md");"small"===this.settings.buttonSize&&this.$element.addClass("sm");var e=c("<div>",{class:"static"}),d=c("<div>",{class:"img-"+this.settings.buttonIconSize});d.append(this.settings.buttonIcon);!1!==this.settings.buttonText?d.append("<p>"+this.settings.buttonText+"</p>"):b.addClass("no-text");e.append(d);d=c("<div>",{class:"callback-state",style:a._colorStyle()});d.append(this.settings.callbackStateIcon);var h=c("<div>",{class:"icons hide"}),f=c("<div>",{class:"icons-line"});c.each(this.settings.items,function(b){b=c("<span>",{style:a._colorStyle()});b.append(this.icon);f.append(b)});h.append(f);var g=c("<div>",{class:"arcontactus-close"});g.append(this.settings.closeIcon);var l=c("<div>",{class:"pulsation",style:a._backgroundStyle()}),m=c("<div>",{class:"pulsation",style:a._backgroundStyle()});b.append(e).append(d).append(h).append(g).append(l).append(m);this.$element.append(b)};d.prototype._initPrompt=function(){var a=c("<div>",{class:"arcontactus-prompt arcu-prompt-"+this.settings.promptPosition}),b=c("<div>",{class:"arcontactus-prompt-close",style:this._backgroundStyle()+"; color: #FFFFFF"});b.append(this.settings.closeIcon);var e=c("<div>",{class:"arcontactus-prompt-inner"});a.append(b).append(e);this.$element.append(a)};d.prototype._initEvents=function(){var a=this.$element,b=this;a.find(".arcontactus-message-button").on("mousedown",function(a){b.x=a.pageX;b.y=a.pageY}).on("mouseup",function(a){if(b.settings.drag&&a.pageX===b.x&&a.pageY===b.y||!b.settings.drag)"regular"==b.settings.mode?b._menuOpened||b._popupOpened||b._callbackOpened?(b._menuOpened&&b.closeMenu(),b._popupOpened&&b.closePopup()):b.openMenu():b.openCallbackPopup(),a.preventDefault()});this.settings.drag&&(a.draggable(),a.get(0).addEventListener("touchmove",function(b){var c=b.targetTouches[0];a.get(0).style.left=c.pageX-25+"px";a.get(0).style.top=c.pageY-25+"px";b.preventDefault()},!1));c(document).on("click",function(a){b.closeMenu();b.closePopup()});a.on("click",function(a){a.stopPropagation()});a.find(".call-back").on("click",function(){b.openCallbackPopup()});a.find(".arcu-popup-link").on("click",function(){var a=c(this).data("id");b.openPopup(a)});a.find(".arcu-header-close").on("click",function(){b.closeMenu()});a.find(".arcu-popup-close").on("click",function(){b.closePopup()});a.find(".arcu-popup-back").on("click",function(){b.closePopup();b.openMenu()});a.find(".callback-countdown-block-close").on("click",function(){null!=b.countdown&&(clearInterval(b.countdown),b.countdown=null);b.closeCallbackPopup()});a.find(".arcontactus-prompt-close").on("click",function(){b.hidePrompt()});a.find("#arcu-callback-form").on("submit",function(c){c.preventDefault();a.find(".callback-countdown-block-phone").addClass("ar-loading");b.settings.reCaptcha?grecaptcha.execute(b.settings.reCaptchaKey,{action:b.settings.reCaptchaAction}).then(function(c){a.find(".ar-g-token").val(c);b.sendCallbackRequest()}):b.sendCallbackRequest()});setTimeout(function(){b._processHash()},500);c(window).on("hashchange",function(a){b._processHash()})};d.prototype._removeEvents=function(){c(document).unbind("click")};d.prototype._processHash=function(){switch(window.location.hash){case "#callback-form":case "callback-form":this.openCallbackPopup();break;case "#callback-form-close":case "callback-form-close":this.closeCallbackPopup();break;case "#contactus-menu":case "contactus-menu":this.openMenu();break;case "#contactus-menu-close":case "contactus-menu-close":this.closeMenu();break;case "#contactus-hide":case "contactus-hide":this.hide();break;case "#contactus-show":case "contactus-show":this.show()}};d.prototype._callBackCountDownMethod=function(){var a=this.settings.countdown,b=this.$element,c=this,d=60;b.find(".callback-countdown-block-phone, .callback-countdown-block-timer").toggleClass("display-flex");this.countdown=setInterval(function(){--d;var e=a,f=d;10>a&&(e="0"+a);10>d&&(f="0"+d);e=e+":"+f;b.find(".callback-countdown-block-timer_timer").html(e);0===d&&0===a&&(clearInterval(c.countdown),c.countdown=null,b.find(".callback-countdown-block-sorry, .callback-countdown-block-timer").toggleClass("display-flex"));0===d&&(d=60,--a)},20)};d.prototype.sendCallbackRequest=function(){var a=this,b=a.$element;this.$element.trigger("arcontactus.beforeSendCallbackRequest");c.ajax({url:a.settings.ajaxUrl,type:"POST",dataType:"json",data:b.find("form").serialize(),success:function(c){a.settings.countdown&&a._callBackCountDownMethod();b.find(".callback-countdown-block-phone").removeClass("ar-loading");if(c.success)a.settings.countdown||b.find(".callback-countdown-block-sorry, .callback-countdown-block-phone").toggleClass("display-flex");else if(c.errors){var d=c.errors.join("\n\r");alert(d)}else alert(a.settings.errorMessage);a.$element.trigger("arcontactus.successCallbackRequest",c)},error:function(){b.find(".callback-countdown-block-phone").removeClass("ar-loading");alert(a.settings.errorMessage);a.$element.trigger("arcontactus.errorCallbackRequest")}})};d.prototype.show=function(){this.$element.addClass("active");this.$element.trigger("arcontactus.show")};d.prototype.hide=function(){this.$element.removeClass("active");this.$element.trigger("arcontactus.hide")};d.prototype.openPopup=function(a){this.closeMenu();var b=this.$element;b.find("#arcu-popup-"+a).addClass("show-messageners-block");b.find("#arcu-popup-"+a).hasClass("popup-opened")||(this.stopAnimation(),b.addClass("popup-opened"),b.find("#arcu-popup-"+a).addClass(this.settings.menuInAnimationClass),b.find(".arcontactus-close").addClass("show-messageners-block"),b.find(".icons, .static").addClass("hide"),b.find(".pulsation").addClass("stop"),this._popupOpened=!0,this.$element.trigger("arcontactus.openPopup"))};d.prototype.closePopup=function(){var a=this.$element;a.find(".arcu-popup").hasClass("show-messageners-block")&&(setTimeout(function(){a.removeClass("popup-opened")},150),a.find(".arcu-popup").removeClass(this.settings.menuInAnimationClass).addClass(this.settings.menuOutAnimationClass),setTimeout(function(){a.removeClass("popup-opened")},150),a.find(".arcontactus-close").removeClass("show-messageners-block"),a.find(".icons, .static").removeClass("hide"),a.find(".pulsation").removeClass("stop"),this.startAnimation(),this._popupOpened=!1,this.$element.trigger("arcontactus.closeMenu"))};d.prototype.openMenu=function(){if("callback"==this.settings.mode)return console.log("Widget in callback mode"),!1;if("elastic"==this.settings.style||"bubble"==this.settings.style)jQuery("body").addClass("arcu-show-menu").addClass("arcu-menu-"+this.settings.align),jQuery("body").addClass("arcu-pushed");var a=this.$element,b=this;a.find(".messangers-block").hasClass(this.settings.menuInAnimationClass)||(this.stopAnimation(),a.addClass("open"),a.find(".messangers-block").addClass(this.settings.menuInAnimationClass),a.find(".arcontactus-close").addClass("show-messageners-block"),a.find(".icons, .static").addClass("hide"),a.find(".pulsation").addClass("stop"),this._menuOpened=!0,this.$element.trigger("arcontactus.openMenu"));if("elastic"==this.settings.style)this.svgPath.animate({path:this.svgPathOpen},400,mina.easeinout,function(){b.isAnimating=!1});else if("bubble"==this.settings.style){var c=function(a){a>b.svgStepsTotal-1||(b.svgPath.animate({path:b.svgSteps[a]},0===a?400:500,0===a?mina.easein:mina.elastic,function(){c(a)}),a++)};c(0)}};d.prototype.closeMenu=function(){if("callback"==this.settings.mode)return console.log("Widget in callback mode"),!1;if("elastic"==this.settings.style||"bubble"==this.settings.style)jQuery("body").removeClass("arcu-show-menu").removeClass("arcu-menu-"+this.settings.align),setTimeout(function(){jQuery("body").removeClass("arcu-pushed")},500);var a=this.$element,b=this;a.find(".messangers-block").hasClass(this.settings.menuInAnimationClass)&&(setTimeout(function(){a.removeClass("open")},150),a.find(".messangers-block").removeClass(this.settings.menuInAnimationClass).addClass(this.settings.menuOutAnimationClass),setTimeout(function(){a.find(".messangers-block").removeClass(b.settings.menuOutAnimationClass)},1E3),a.find(".arcontactus-close").removeClass("show-messageners-block"),a.find(".icons, .static").removeClass("hide"),a.find(".pulsation").removeClass("stop"),this.startAnimation(),this._menuOpened=!1,this.$element.trigger("arcontactus.closeMenu"));"elastic"!=this.settings.style&&"bubble"!=this.settings.style||setTimeout(function(){b.svgPath.attr("d",b.svgInitialPath);b.isAnimating=!1},300)};d.prototype.toggleMenu=function(){var a=this.$element;this.hidePrompt();if(a.find(".callback-countdown-block").hasClass("display-flex"))return!1;a.find(".messangers-block").hasClass(this.settings.menuInAnimationClass)?this.closeMenu():this.openMenu();this.$element.trigger("arcontactus.toggleMenu")};d.prototype.openCallbackPopup=function(){var a=this.$element;a.addClass("opened");this.closeMenu();this.stopAnimation();a.find(".icons, .static").addClass("hide");a.find(".pulsation").addClass("stop");a.find(".callback-countdown-block-phone, .callback-countdown-block-sorry, .callback-countdown-block-timer").removeClass("display-flex");a.find(".callback-countdown-block").addClass("display-flex");a.find(".callback-countdown-block-phone").addClass("display-flex");a.find(".callback-state").addClass("display-flex");this._callbackOpened=!0;this.$element.trigger("arcontactus.openCallbackPopup")};d.prototype.closeCallbackPopup=function(){var a=this.$element;a.removeClass("opened");a.find(".messangers-block").removeClass(this.settings.menuInAnimationClass);a.find(".arcontactus-close").removeClass("show-messageners-block");a.find(".icons, .static").removeClass("hide");a.find(".pulsation").removeClass("stop");a.find(".callback-countdown-block").removeClass("display-flex");a.find(".callback-state").removeClass("display-flex");this.startAnimation();this._callbackOpened=!1;this.$element.trigger("arcontactus.closeCallbackPopup")};d.prototype.startAnimation=function(){var a=this.$element,b=a.find(".icons-line"),c=a.find(".static"),d=a.find(".icons-line>span:first-child").width()+40;if("huge"===this.settings.buttonSize)var h=2,f=0;"large"===this.settings.buttonSize&&(h=2,f=0);"medium"===this.settings.buttonSize&&(h=4,f=-2);"small"===this.settings.buttonSize&&(h=4,f=-2);var g=a.find(".icons-line>span").length,l=0;this.stopAnimation();if(0===this.settings.iconsAnimationSpeed)return!1;var m=this;this._interval=setInterval(function(){0===l&&(b.parent().removeClass("hide"),c.addClass("hide"));var a="translate("+-(d*l+h)+"px, "+f+"px)";b.css({"-webkit-transform":a,"-ms-transform":a,transform:a});l++;l>g&&(l>g+1&&(m.settings.iconsAnimationPause&&(m.stopAnimation(),setTimeout(function(){if(m._callbackOpened||m._menuOpened||m._popupOpened)return!1;m.startAnimation()},m.settings.iconsAnimationPause)),l=0),b.parent().addClass("hide"),c.removeClass("hide"),a="translate("+-h+"px, "+f+"px)",b.css({"-webkit-transform":a,"-ms-transform":a,transform:a}))},this.settings.iconsAnimationSpeed)};d.prototype.stopAnimation=function(){clearInterval(this._interval);var a=this.$element,b=a.find(".icons-line");a=a.find(".static");b.parent().addClass("hide");a.removeClass("hide");b.css({"-webkit-transform":"translate(-2px, 0px)","-ms-transform":"translate(-2px, 0px)",transform:"translate(-2px, 0px)"})};d.prototype.showPrompt=function(a){var b=this.$element.find(".arcontactus-prompt");a&&a.content&&b.find(".arcontactus-prompt-inner").html(a.content);b.addClass("active");this.$element.trigger("arcontactus.showPrompt")};d.prototype.hidePrompt=function(){this.$element.find(".arcontactus-prompt").removeClass("active");this.$element.trigger("arcontactus.hidePrompt")};d.prototype.showPromptTyping=function(){this.$element.find(".arcontactus-prompt").find(".arcontactus-prompt-inner").html("");this._insertPromptTyping();this.showPrompt({});this.$element.trigger("arcontactus.showPromptTyping")};d.prototype._insertPromptTyping=function(){var a=this.$element.find(".arcontactus-prompt-inner"),b=c("<div>",{class:"arcontactus-prompt-typing"}),d=c("<div>");b.append(d);b.append(d.clone());b.append(d.clone());a.append(b)};d.prototype.hidePromptTyping=function(){this.$element.find(".arcontactus-prompt").removeClass("active");this.$element.trigger("arcontactus.hidePromptTyping")};d.prototype.getSettings=function(){console.log(this.settings)};d.prototype.getVersion=function(){console.log(this.settings.pluginVersion)};d.prototype._backgroundStyle=function(){return"background-color: "+this.settings.theme};d.prototype._colorStyle=function(){return"color: "+this.settings.theme};c.fn.contactUs=function(a){var b=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=c(this),k=e.data("ar.contactus");k||(k=new d(this,"object"==typeof a&&a),e.data("ar.contactus",k));"string"==typeof a&&"_"!==a.charAt(0)&&k[a].apply(k,b)})};c.fn.contactUs.Constructor=d})(jQuery);/*
* 2017 Azelab
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@areama.net so we can send you a copy immediately.
*
*
*  @author Azelab <support@azelab.com>
*  @copyright  2017 Azelab

*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of Azelab
*/
var arcuGoTop=!1;window.addEventListener('load',function(){if(arcuGoTop){document.getElementById('arcu-go-top').addEventListener('click',function(){window.scrollTo({top:0,behavior:"smooth"})});window.addEventListener('scroll',function(e){arCuScroll()});arCuScroll()}
$('body').on('click','.arcu-close-btn',function(){arCuCloseQRCode()});$('body').on('click','#arcu-qr-modal-backdrop',function(){arCuCloseQRCode()})});function arCuScroll(){if(pageYOffset>300){document.getElementById('arcu-go-top').classList.add('active')}else{document.getElementById('arcu-go-top').classList.remove('active')}}
function arCuGetCookie(cookieName){if(document.cookie.length>0){c_start=document.cookie.indexOf(cookieName+"=");if(c_start!=-1){c_start=c_start+cookieName.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1){c_end=document.cookie.length}
return unescape(document.cookie.substring(c_start,c_end))}}
return 0};function arCuCreateCookie(name,value,days){var expires;if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));expires="; expires="+date.toGMTString()}else{expires=""}
document.cookie=name+"="+value+expires+"; path=/"};function arCuShowMessage(index){if(arCuPromptClosed){return!1}
if(typeof arCuMessages[index]!=='undefined'){jQuery('#arcontactus').contactUs('showPromptTyping');_arCuTimeOut=setTimeout(function(){if(arCuPromptClosed){return!1}
jQuery('#arcontactus').contactUs('showPrompt',{content:arCuMessages[index]});index ++;_arCuTimeOut=setTimeout(function(){if(arCuPromptClosed){return!1}
arCuShowMessage(index)},arCuMessageTime)},arCuTypingTime)}else{if(arCuCloseLastMessage){jQuery('#arcontactus').contactUs('hidePrompt')}
if(arCuLoop){arCuShowMessage(0)}}};function arCuShowMessages(){setTimeout(function(){clearTimeout(_arCuTimeOut);arCuShowMessage(0)},arCuDelayFirst)};function arCuShowQRCode(data,title){arCuBlockUI(!1);jQuery('#arcontactus').contactUs('closeMenu');jQuery.ajax({type:'GET',url:arcuOptions.ajaxUrl,dataType:'json',data:{action:'getQRCode',ajax:!0,data:data},success:function(data){jQuery('#arcu-qr-modal').remove();jQuery('#arcu-qr-modal-backdrop').remove();var $modal=$('<div>',{id:'arcu-qr-modal'});var $backdrop=$('<div>',{id:'arcu-qr-modal-backdrop'});var $img=$('<img>',{src:data.qrcodeFile});var $title=$('<h4>');var $close=$('<button>',{class:'arcu-close-btn',type:'button'});$title.text(title);$modal.append($close);$modal.append($title);$modal.append($img);jQuery('body').append($backdrop);jQuery('body').append($modal);$img.on('load',function(){arCuUnBlockUI(!1);setTimeout(function(){if(jQuery('#page').length){jQuery('#page').addClass('arcu-blur')}else if(jQuery('body>main').length){jQuery('body>main').addClass('arcu-blur')}
jQuery('#arcu-qr-modal').addClass('active');jQuery('#arcu-qr-modal-backdrop').addClass('active')},200)})}}).fail(function(){arCuUnBlockUI(!1)})}
function arCuCloseQRCode(){jQuery('#arcu-qr-modal').removeClass('active');jQuery('#arcu-qr-modal-backdrop').removeClass('active');jQuery('.arcu-blur').removeClass('arcu-blur');setTimeout(function(){jQuery('#arcu-qr-modal').remove();jQuery('#arcu-qr-modal-backdrop').remove()},400)}
function arCuBlockUI(selector){if(selector){$(selector).addClass('ar-blocked');$(selector).find('.ar-loading').remove();$(selector).append('<div class="ar-loading"><div class="ar-loading-inner">Loading...</div></div>')}else{$('#ar-static-loader').remove();$('body').append('<div id="ar-static-loader"><div class="ar-loading-inner"></div></div>')}};function arCuUnBlockUI(selector){if(selector){$(selector).find('.ar-loading').remove();$(selector).removeClass('ar-blocked')}else{$('#ar-static-loader').remove()}};var Base=function(){};Base.extend=function(a,b){"use strict";var c=Base.prototype.extend;Base._prototyping=!0;var d=new this;c.call(d,a),d.base=function(){},delete Base._prototyping;var e=d.constructor,f=d.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==f)this._constructing=!0,e.apply(this,arguments),delete this._constructing;else if(null!==arguments[0])return(arguments[0].extend||c).call(arguments[0],d)};return f.ancestor=this,f.extend=this.extend,f.forEach=this.forEach,f.implement=this.implement,f.prototype=d,f.toString=this.toString,f.valueOf=function(a){return"object"==a?f:e.valueOf()},c.call(f,b),"function"==typeof f.init&&f.init(),f},Base.prototype={extend:function(a,b){if(arguments.length>1){var c=this[a];if(c&&"function"==typeof b&&(!c.valueOf||c.valueOf()!=b.valueOf())&&/\bbase\b/.test(b)){var d=b.valueOf();b=function(){var a=this.base||Base.prototype.base;this.base=c;var b=d.apply(this,arguments);return this.base=a,b},b.valueOf=function(a){return"object"==a?b:d},b.toString=Base.toString}this[a]=b}else if(a){var e=Base.prototype.extend;Base._prototyping||"function"==typeof this||(e=this.extend||e);for(var f={toSource:null},g=["constructor","toString","valueOf"],h=Base._prototyping?0:1;i=g[h++];)a[i]!=f[i]&&e.call(this,i,a[i]);for(var i in a)f[i]||e.call(this,i,a[i])}return this}},Base=Base.extend({constructor:function(){this.extend(arguments[0])}},{ancestor:Object,version:"1.1",forEach:function(a,b,c){for(var d in a)void 0===this.prototype[d]&&b.call(c,a[d],d,a)},implement:function(){for(var a=0;a<arguments.length;a++)"function"==typeof arguments[a]?arguments[a](this.prototype):this.prototype.extend(arguments[a]);return this},toString:function(){return String(this.valueOf())}});var FlipClock;!function(a){"use strict";FlipClock=function(a,b,c){return b instanceof Object&&b instanceof Date==!1&&(c=b,b=0),new FlipClock.Factory(a,b,c)},FlipClock.Lang={},FlipClock.Base=Base.extend({buildDate:"2014-10-06",version:"0.7.2",constructor:function(b,c){"object"!=typeof b&&(b={}),"object"!=typeof c&&(c={}),this.setOptions(a.extend(!0,{},b,c))},callback:function(a){if("function"==typeof a){for(var b=[],c=1;c<=arguments.length;c++)arguments[c]&&b.push(arguments[c]);a.apply(this,b)}},log:function(a){window.console&&console.log&&console.log(a)},getOption:function(a){return this[a]?this[a]:!1},getOptions:function(){return this},setOption:function(a,b){this[a]=b},setOptions:function(a){for(var b in a)"undefined"!=typeof a[b]&&this.setOption(b,a[b])}})}(jQuery),function(a){"use strict";FlipClock.Face=FlipClock.Base.extend({autoStart:!0,dividers:[],factory:!1,lists:[],constructor:function(a,b){this.dividers=[],this.lists=[],this.base(b),this.factory=a},build:function(){this.autoStart&&this.start()},createDivider:function(b,c,d){"boolean"!=typeof c&&c||(d=c,c=b);var e=['<span class="'+this.factory.classes.dot+' top" style="background: '+timer_dot_color+';"></span>','<span class="'+this.factory.classes.dot+' bottom" style="background: '+timer_dot_color+';"></span>'].join("");d&&(e=""),b=this.factory.localize(b);var f=['<span class="'+this.factory.classes.divider+" "+(c?c:"").toLowerCase()+'">','<span class="'+this.factory.classes.label+'">'+(b?b:"")+"</span>",e,"</span>"],g=a(f.join(""));return this.dividers.push(g),g},createList:function(a,b){"object"==typeof a&&(b=a,a=0);var c=new FlipClock.List(this.factory,a,b);return this.lists.push(c),c},reset:function(){this.factory.time=new FlipClock.Time(this.factor,this.factory.original?Math.round(this.factory.original):0,{minimumDigits:this.factory.minimumDigits}),this.flip(this.factory.original,!1)},appendDigitToClock:function(a){a.$el.append(!1)},addDigit:function(a){var b=this.createList(a,{classes:{active:this.factory.classes.active,before:this.factory.classes.before,flip:this.factory.classes.flip}});this.appendDigitToClock(b)},start:function(){},stop:function(){},autoIncrement:function(){this.factory.countdown?this.decrement():this.increment()},increment:function(){this.factory.time.addSecond()},decrement:function(){0==this.factory.time.getTimeSeconds()?this.factory.stop():this.factory.time.subSecond()},flip:function(b,c){var d=this;a.each(b,function(a,b){var e=d.lists[a];e?(c||b==e.digit||e.play(),e.select(b)):d.addDigit(b)})}})}(jQuery),function(a){"use strict";FlipClock.Factory=FlipClock.Base.extend({animationRate:1e3,autoStart:!0,callbacks:{destroy:!1,create:!1,init:!1,interval:!1,start:!1,stop:!1,reset:!1},classes:{active:"flip-clock-active",before:"flip-clock-before",divider:"flip-clock-divider",dot:"flip-clock-dot",label:"flip-clock-label",flip:"flip",play:"play",wrapper:"flip-clock-wrapper"},clockFace:"HourlyCounter",countdown:!1,defaultClockFace:"HourlyCounter",defaultLanguage:"english",$el:!1,face:!0,lang:!1,language:"english",minimumDigits:0,original:!1,running:!1,time:!1,timer:!1,$wrapper:!1,constructor:function(b,c,d){d||(d={}),this.lists=[],this.running=!1,this.base(d),this.$el=a(b).addClass(this.classes.wrapper),this.$wrapper=this.$el,this.original=c instanceof Date?c:c?Math.round(c):0,this.time=new FlipClock.Time(this,this.original,{minimumDigits:this.minimumDigits,animationRate:this.animationRate}),this.timer=new FlipClock.Timer(this,d),this.loadLanguage(this.language),this.loadClockFace(this.clockFace,d),this.autoStart&&this.start()},loadClockFace:function(a,b){var c,d="Face",e=!1;return a=a.ucfirst()+d,this.face.stop&&(this.stop(),e=!0),this.$el.html(""),this.time.minimumDigits=this.minimumDigits,c=FlipClock[a]?new FlipClock[a](this,b):new FlipClock[this.defaultClockFace+d](this,b),c.build(),this.face=c,e&&this.start(),this.face},loadLanguage:function(a){var b;return b=FlipClock.Lang[a.ucfirst()]?FlipClock.Lang[a.ucfirst()]:FlipClock.Lang[a]?FlipClock.Lang[a]:FlipClock.Lang[this.defaultLanguage],this.lang=b},localize:function(a,b){var c=this.lang;if(!a)return null;var d=a.toLowerCase();return"object"==typeof b&&(c=b),c&&c[d]?c[d]:a},start:function(a){var b=this;b.running||b.countdown&&!(b.countdown&&b.time.time>0)?b.log("Trying to start timer when countdown already at 0"):(b.face.start(b.time),b.timer.start(function(){b.flip(),"function"==typeof a&&a()}))},stop:function(a){this.face.stop(),this.timer.stop(a);for(var b in this.lists)this.lists.hasOwnProperty(b)&&this.lists[b].stop()},reset:function(a){this.timer.reset(a),this.face.reset()},setTime:function(a){this.time.time=a,this.flip(!0)},getTime:function(){return this.time},setCountdown:function(a){var b=this.running;this.countdown=a?!0:!1,b&&(this.stop(),this.start())},flip:function(a){this.face.flip(!1,a)}})}(jQuery),function(a){"use strict";FlipClock.List=FlipClock.Base.extend({digit:0,classes:{active:"flip-clock-active",before:"flip-clock-before",flip:"flip"},factory:!1,$el:!1,$obj:!1,items:[],lastDigit:0,constructor:function(a,b){this.factory=a,this.digit=b,this.lastDigit=b,this.$el=this.createList(),this.$obj=this.$el,b>0&&this.select(b),this.factory.$el.append(this.$el)},select:function(a){if("undefined"==typeof a?a=this.digit:this.digit=a,this.digit!=this.lastDigit){var b=this.$el.find("."+this.classes.before).removeClass(this.classes.before);this.$el.find("."+this.classes.active).removeClass(this.classes.active).addClass(this.classes.before),this.appendListItem(this.classes.active,this.digit),b.remove(),this.lastDigit=this.digit}},play:function(){this.$el.addClass(this.factory.classes.play)},stop:function(){var a=this;setTimeout(function(){a.$el.removeClass(a.factory.classes.play)},this.factory.timer.interval)},createListItem:function(a,b){return['<li class="'+(a?a:"")+'">','<a href="#">','<div class="up">','<div class="shadow"></div>','<div class="inn" style="background-color: '+timer_bg_color+';color:'+timer_text_color+';">'+(b?b:"")+"</div>","</div>",'<div class="down">','<div class="shadow"></div>','<div class="inn" style="background-color: '+timer_bg_color+';color:'+timer_text_color+';">'+(b?b:"")+"</div>","</div>","</a>","</li>"].join("")},appendListItem:function(a,b){var c=this.createListItem(a,b);this.$el.append(c)},createList:function(){var b=this.getPrevDigit()?this.getPrevDigit():this.digit,c=a(['<ul class="'+this.classes.flip+" "+(this.factory.running?this.factory.classes.play:"")+'">',this.createListItem(this.classes.before,b),this.createListItem(this.classes.active,this.digit),"</ul>"].join(""));return c},getNextDigit:function(){return 9==this.digit?0:this.digit+1},getPrevDigit:function(){return 0==this.digit?9:this.digit-1}})}(jQuery),function(a){"use strict";String.prototype.ucfirst=function(){return this.substr(0,1).toUpperCase()+this.substr(1)},a.fn.FlipClock=function(b,c){return new FlipClock(a(this),b,c)},a.fn.flipClock=function(b,c){return a.fn.FlipClock(b,c)}}(jQuery),function(a){"use strict";FlipClock.Time=FlipClock.Base.extend({time:0,factory:!1,minimumDigits:0,constructor:function(a,b,c){"object"!=typeof c&&(c={}),c.minimumDigits||(c.minimumDigits=a.minimumDigits),this.base(c),this.factory=a,b&&(this.time=b)},convertDigitsToArray:function(a){var b=[];a=a.toString();for(var c=0;c<a.length;c++)a[c].match(/^\d*$/g)&&b.push(a[c]);return b},digit:function(a){var b=this.toString(),c=b.length;return b[c-a]?b[c-a]:!1},digitize:function(b){var c=[];if(a.each(b,function(a,b){b=b.toString(),1==b.length&&(b="0"+b);for(var d=0;d<b.length;d++)c.push(b.charAt(d))}),c.length>this.minimumDigits&&(this.minimumDigits=c.length),this.minimumDigits>c.length)for(var d=c.length;d<this.minimumDigits;d++)c.unshift("0");return c},getDateObject:function(){return this.time instanceof Date?this.time:new Date((new Date).getTime()+1e3*this.getTimeSeconds())},getDayCounter:function(a){var b=[this.getDays(),this.getHours(!0),this.getMinutes(!0)];return a&&b.push(this.getSeconds(!0)),this.digitize(b)},getDays:function(a){var b=this.getTimeSeconds()/60/60/24;return a&&(b%=7),Math.floor(b)},getHourCounter:function(){var a=this.digitize([this.getHours(),this.getMinutes(!0),this.getSeconds(!0)]);return a},getHourly:function(){return this.getHourCounter()},getHours:function(a){var b=this.getTimeSeconds()/60/60;return a&&(b%=24),Math.floor(b)},getMilitaryTime:function(a,b){"undefined"==typeof b&&(b=!0),a||(a=this.getDateObject());var c=[a.getHours(),a.getMinutes()];return b===!0&&c.push(a.getSeconds()),this.digitize(c)},getMinutes:function(a){var b=this.getTimeSeconds()/60;return a&&(b%=60),Math.floor(b)},getMinuteCounter:function(){var a=this.digitize([this.getMinutes(),this.getSeconds(!0)]);return a},getTimeSeconds:function(a){return a||(a=new Date),this.time instanceof Date?this.factory.countdown?Math.max(this.time.getTime()/1e3-a.getTime()/1e3,0):a.getTime()/1e3-this.time.getTime()/1e3:this.time},getTime:function(a,b){"undefined"==typeof b&&(b=!0),a||(a=this.getDateObject()),console.log(a);var c=a.getHours(),d=[c>12?c-12:0===c?12:c,a.getMinutes()];return b===!0&&d.push(a.getSeconds()),this.digitize(d)},getSeconds:function(a){var b=this.getTimeSeconds();return a&&(60==b?b=0:b%=60),Math.ceil(b)},getWeeks:function(){var a=this.getTimeSeconds()/60/60/24/7;return mod&&(a%=52),Math.floor(a)},removeLeadingZeros:function(b,c){var d=0,e=[];return a.each(c,function(a){b>a?d+=parseInt(c[a],10):e.push(c[a])}),0===d?e:c},addSeconds:function(a){this.time instanceof Date?this.time.setSeconds(this.time.getSeconds()+a):this.time+=a},addSecond:function(){this.addSeconds(1)},subSeconds:function(a){this.time instanceof Date?this.time.setSeconds(this.time.getSeconds()-a):this.time-=a},subSecond:function(){this.subSeconds(1)},toString:function(){return this.getTimeSeconds().toString()}})}(jQuery),function(){"use strict";FlipClock.Timer=FlipClock.Base.extend({callbacks:{destroy:!1,create:!1,init:!1,interval:!1,start:!1,stop:!1,reset:!1},count:0,factory:!1,interval:1e3,animationRate:1e3,constructor:function(a,b){this.base(b),this.factory=a,this.callback(this.callbacks.init),this.callback(this.callbacks.create)},getElapsed:function(){return this.count*this.interval},getElapsedTime:function(){return new Date(this.time+this.getElapsed())},reset:function(a){clearInterval(this.timer),this.count=0,this._setInterval(a),this.callback(this.callbacks.reset)},start:function(a){this.factory.running=!0,this._createTimer(a),this.callback(this.callbacks.start)},stop:function(a){this.factory.running=!1,this._clearInterval(a),this.callback(this.callbacks.stop),this.callback(a)},_clearInterval:function(){clearInterval(this.timer)},_createTimer:function(a){this._setInterval(a)},_destroyTimer:function(a){this._clearInterval(),this.timer=!1,this.callback(a),this.callback(this.callbacks.destroy)},_interval:function(a){this.callback(this.callbacks.interval),this.callback(a),this.count++},_setInterval:function(a){var b=this;b._interval(a),b.timer=setInterval(function(){b._interval(a)},this.interval)}})}(jQuery),function(a){FlipClock.TwentyFourHourClockFace=FlipClock.Face.extend({constructor:function(a,b){this.base(a,b)},build:function(b){var c=this,d=this.factory.$el.find("ul");this.factory.time.time||(this.factory.original=new Date,this.factory.time=new FlipClock.Time(this.factory,this.factory.original));var b=b?b:this.factory.time.getMilitaryTime(!1,this.showSeconds);b.length>d.length&&a.each(b,function(a,b){c.createList(b)}),this.createDivider(),this.createDivider(),a(this.dividers[0]).insertBefore(this.lists[this.lists.length-2].$el),a(this.dividers[1]).insertBefore(this.lists[this.lists.length-4].$el),this.base()},flip:function(a,b){this.autoIncrement(),a=a?a:this.factory.time.getMilitaryTime(!1,this.showSeconds),this.base(a,b)}})}(jQuery),function(a){FlipClock.CounterFace=FlipClock.Face.extend({shouldAutoIncrement:!1,constructor:function(a,b){"object"!=typeof b&&(b={}),a.autoStart=b.autoStart?!0:!1,b.autoStart&&(this.shouldAutoIncrement=!0),a.increment=function(){a.countdown=!1,a.setTime(a.getTime().getTimeSeconds()+1)},a.decrement=function(){a.countdown=!0;var b=a.getTime().getTimeSeconds();b>0&&a.setTime(b-1)},a.setValue=function(b){a.setTime(b)},a.setCounter=function(b){a.setTime(b)},this.base(a,b)},build:function(){var b=this,c=this.factory.$el.find("ul"),d=this.factory.getTime().digitize([this.factory.getTime().time]);d.length>c.length&&a.each(d,function(a,c){var d=b.createList(c);d.select(c)}),a.each(this.lists,function(a,b){b.play()}),this.base()},flip:function(a,b){this.shouldAutoIncrement&&this.autoIncrement(),a||(a=this.factory.getTime().digitize([this.factory.getTime().time])),this.base(a,b)},reset:function(){this.factory.time=new FlipClock.Time(this.factory,this.factory.original?Math.round(this.factory.original):0),this.flip()}})}(jQuery),function(a){FlipClock.DailyCounterFace=FlipClock.Face.extend({showSeconds:!0,constructor:function(a,b){this.base(a,b)},build:function(b){var c=this,d=this.factory.$el.find("ul"),e=0;b=b?b:this.factory.time.getDayCounter(this.showSeconds),b.length>d.length&&a.each(b,function(a,b){c.createList(b)}),this.showSeconds?a(this.createDivider("Seconds")).insertBefore(this.lists[this.lists.length-2].$el):e=2,a(this.createDivider("Minutes")).insertBefore(this.lists[this.lists.length-4+e].$el),a(this.createDivider("Hours")).insertBefore(this.lists[this.lists.length-6+e].$el),a(this.createDivider("Days",!0)).insertBefore(this.lists[0].$el),this.base()},flip:function(a,b){a||(a=this.factory.time.getDayCounter(this.showSeconds)),this.autoIncrement(),this.base(a,b)}})}(jQuery),function(a){FlipClock.HourlyCounterFace=FlipClock.Face.extend({constructor:function(a,b){this.base(a,b)},build:function(b,c){var d=this,e=this.factory.$el.find("ul");c=c?c:this.factory.time.getHourCounter(),c.length>e.length&&a.each(c,function(a,b){d.createList(b)}),a(this.createDivider("Seconds")).insertBefore(this.lists[this.lists.length-2].$el),a(this.createDivider("Minutes")).insertBefore(this.lists[this.lists.length-4].$el),b||a(this.createDivider("Hours",!0)).insertBefore(this.lists[0].$el),this.base()},flip:function(a,b){a||(a=this.factory.time.getHourCounter()),this.autoIncrement(),this.base(a,b)},appendDigitToClock:function(a){this.base(a),this.dividers[0].insertAfter(this.dividers[0].next())}})}(jQuery),function(){FlipClock.MinuteCounterFace=FlipClock.HourlyCounterFace.extend({clearExcessDigits:!1,constructor:function(a,b){this.base(a,b)},build:function(){this.base(!0,this.factory.time.getMinuteCounter())},flip:function(a,b){a||(a=this.factory.time.getMinuteCounter()),this.base(a,b)}})}(jQuery),function(a){FlipClock.TwelveHourClockFace=FlipClock.TwentyFourHourClockFace.extend({meridium:!1,meridiumText:"AM",build:function(){var b=this.factory.time.getTime(!1,this.showSeconds);this.base(b),this.meridiumText=this.getMeridium(),this.meridium=a(['<ul class="flip-clock-meridium">',"<li>",'<a href="#">'+this.meridiumText+"</a>","</li>","</ul>"].join("")),this.meridium.insertAfter(this.lists[this.lists.length-1].$el)},flip:function(a,b){this.meridiumText!=this.getMeridium()&&(this.meridiumText=this.getMeridium(),this.meridium.find("a").html(this.meridiumText)),this.base(this.factory.time.getTime(!1,this.showSeconds),b)},getMeridium:function(){return(new Date).getHours()>=12?"PM":"AM"},isPM:function(){return"PM"==this.getMeridium()?!0:!1},isAM:function(){return"AM"==this.getMeridium()?!0:!1}})}(jQuery),function(){FlipClock.Lang.Arabic={years:"سنوات",months:"شهور",days:"أيام",hours:"ساعات",minutes:"دقائق",seconds:"ثواني"},FlipClock.Lang.ar=FlipClock.Lang.Arabic,FlipClock.Lang["ar-ar"]=FlipClock.Lang.Arabic,FlipClock.Lang.arabic=FlipClock.Lang.Arabic}(jQuery),function(){FlipClock.Lang.Danish={years:"År",months:"Måneder",days:"Dage",hours:"Timer",minutes:"Minutter",seconds:"Sekunder"},FlipClock.Lang.da=FlipClock.Lang.Danish,FlipClock.Lang["da-dk"]=FlipClock.Lang.Danish,FlipClock.Lang.danish=FlipClock.Lang.Danish}(jQuery),function(){FlipClock.Lang.German={years:"Jahre",months:"Monate",days:"Tage",hours:"Stunden",minutes:"Minuten",seconds:"Sekunden"},FlipClock.Lang.de=FlipClock.Lang.German,FlipClock.Lang["de-de"]=FlipClock.Lang.German,FlipClock.Lang.german=FlipClock.Lang.German}(jQuery),function(){FlipClock.Lang.English={years:"Years",months:"Months",days:"Days",hours:"Hours",minutes:"Minutes",seconds:"Seconds"},FlipClock.Lang.en=FlipClock.Lang.English,FlipClock.Lang["en-us"]=FlipClock.Lang.English,FlipClock.Lang.english=FlipClock.Lang.English}(jQuery),function(){FlipClock.Lang.Spanish={years:"A&#241;os",months:"Meses",days:"D&#205;as",hours:"Horas",minutes:"Minutos",seconds:"Segundo"},FlipClock.Lang.es=FlipClock.Lang.Spanish,FlipClock.Lang["es-es"]=FlipClock.Lang.Spanish,FlipClock.Lang.spanish=FlipClock.Lang.Spanish}(jQuery),function(){FlipClock.Lang.Finnish={years:"Vuotta",months:"Kuukautta",days:"Päivää",hours:"Tuntia",minutes:"Minuuttia",seconds:"Sekuntia"},FlipClock.Lang.fi=FlipClock.Lang.Finnish,FlipClock.Lang["fi-fi"]=FlipClock.Lang.Finnish,FlipClock.Lang.finnish=FlipClock.Lang.Finnish}(jQuery),function(){FlipClock.Lang.French={years:"Ans",months:"Mois",days:"Jours",hours:"Heures",minutes:"Minutes",seconds:"Secondes"},FlipClock.Lang.fr=FlipClock.Lang.French,FlipClock.Lang["fr-ca"]=FlipClock.Lang.French,FlipClock.Lang.french=FlipClock.Lang.French}(jQuery),function(){FlipClock.Lang.Italian={years:"Anni",months:"Mesi",days:"Giorni",hours:"Ore",minutes:"Minuti",seconds:"Secondi"},FlipClock.Lang.it=FlipClock.Lang.Italian,FlipClock.Lang["it-it"]=FlipClock.Lang.Italian,FlipClock.Lang.italian=FlipClock.Lang.Italian}(jQuery),function(){FlipClock.Lang.Latvian={years:"Gadi",months:"Mēneši",days:"Dienas",hours:"Stundas",minutes:"Minūtes",seconds:"Sekundes"},FlipClock.Lang.lv=FlipClock.Lang.Latvian,FlipClock.Lang["lv-lv"]=FlipClock.Lang.Latvian,FlipClock.Lang.latvian=FlipClock.Lang.Latvian}(jQuery),function(){FlipClock.Lang.Dutch={years:"Jaren",months:"Maanden",days:"Dagen",hours:"Uren",minutes:"Minuten",seconds:"Seconden"},FlipClock.Lang.nl=FlipClock.Lang.Dutch,FlipClock.Lang["nl-be"]=FlipClock.Lang.Dutch,FlipClock.Lang.dutch=FlipClock.Lang.Dutch}(jQuery),function(){FlipClock.Lang.Norwegian={years:"År",months:"Måneder",days:"Dager",hours:"Timer",minutes:"Minutter",seconds:"Sekunder"},FlipClock.Lang.no=FlipClock.Lang.Norwegian,FlipClock.Lang.nb=FlipClock.Lang.Norwegian,FlipClock.Lang["no-nb"]=FlipClock.Lang.Norwegian,FlipClock.Lang.norwegian=FlipClock.Lang.Norwegian}(jQuery),function(){FlipClock.Lang.Portuguese={years:"Anos",months:"Meses",days:"Dias",hours:"Horas",minutes:"Minutos",seconds:"Segundos"},FlipClock.Lang.pt=FlipClock.Lang.Portuguese,FlipClock.Lang["pt-br"]=FlipClock.Lang.Portuguese,FlipClock.Lang.portuguese=FlipClock.Lang.Portuguese}(jQuery),function(){FlipClock.Lang.Russian={years:"лет",months:"месяцев",days:"дней",hours:"часов",minutes:"минут",seconds:"секунд"},FlipClock.Lang.ru=FlipClock.Lang.Russian,FlipClock.Lang["ru-ru"]=FlipClock.Lang.Russian,FlipClock.Lang.russian=FlipClock.Lang.Russian}(jQuery),function(){FlipClock.Lang.Swedish={years:"År",months:"Månader",days:"Dagar",hours:"Timmar",minutes:"Minuter",seconds:"Sekunder"},FlipClock.Lang.sv=FlipClock.Lang.Swedish,FlipClock.Lang["sv-se"]=FlipClock.Lang.Swedish,FlipClock.Lang.swedish=FlipClock.Lang.Swedish}(jQuery);!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};e=function(){function e(e,o){var s,n,l=this;if(l.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(e),appendDots:i(e),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(i,e){return'<button type="button" data-role="none">'+(e+1)+"</button>"},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",fade:!1,focusOnSelect:!1,infinite:!0,lazyLoad:"ondemand",onBeforeChange:null,onAfterChange:null,onInit:null,onReInit:null,pauseOnHover:!0,pauseOnDotsHover:!1,responsive:null,rtl:!1,slide:"div",slidesToShow:1,slidesToScroll:1,speed:300,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,variableWidth:!1,vertical:!1,waitForAnimate:!0},l.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentSlide:0,currentLeft:null,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1},i.extend(l,l.initials),l.activeBreakpoint=null,l.animType=null,l.animProp=null,l.breakpoints=[],l.breakpointSettings=[],l.cssTransitions=!1,l.paused=!1,l.positionProp=null,l.$slider=i(e),l.$slidesCache=null,l.transformType=null,l.transitionType=null,l.windowWidth=0,l.windowTimer=null,l.options=i.extend({},l.defaults,o),l.originalSettings=l.options,s=l.options.responsive||null,s&&s.length>-1){for(n in s)s.hasOwnProperty(n)&&(l.breakpoints.push(s[n].breakpoint),l.breakpointSettings[s[n].breakpoint]=s[n].settings);l.breakpoints.sort(function(i,e){return e-i})}l.autoPlay=i.proxy(l.autoPlay,l),l.autoPlayClear=i.proxy(l.autoPlayClear,l),l.changeSlide=i.proxy(l.changeSlide,l),l.selectHandler=i.proxy(l.selectHandler,l),l.setPosition=i.proxy(l.setPosition,l),l.swipeHandler=i.proxy(l.swipeHandler,l),l.dragHandler=i.proxy(l.dragHandler,l),l.keyHandler=i.proxy(l.keyHandler,l),l.autoPlayIterator=i.proxy(l.autoPlayIterator,l),l.instanceUid=t++,l.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,l.init()}var t=0;return e}(),e.prototype.addSlide=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(0>t||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):o===!0?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateSlide=function(e,t){var o={},s=this;if(1===s.options.slidesToShow&&s.options.adaptiveHeight===!0&&s.options.vertical===!1){var n=s.$slides.eq(s.currentSlide).outerHeight(!0);s.$list.animate({height:n},s.options.speed)}s.options.rtl===!0&&s.options.vertical===!1&&(e=-e),s.transformsEnabled===!1?s.options.vertical===!1?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):s.cssTransitions===!1?i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){s.options.vertical===!1?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}}):(s.applyTransition(),o[s.animType]=s.options.vertical===!1?"translate3d("+e+"px, 0px, 0px)":"translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.asNavFor=function(e){var t=this,o=null!=t.options.asNavFor?i(t.options.asNavFor).getSlick():null;null!=o&&o.slideHandler(e,!0)},e.prototype.applyTransition=function(i){var e=this,t={};t[e.transitionType]=e.options.fade===!1?e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:"opacity "+e.options.speed+"ms "+e.options.cssEase,e.options.fade===!1?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer),i.slideCount>i.options.slidesToShow&&i.paused!==!0&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this;i.options.infinite===!1?1===i.direction?(i.currentSlide+1===i.slideCount-1&&(i.direction=0),i.slideHandler(i.currentSlide+i.options.slidesToScroll)):(i.currentSlide-1===0&&(i.direction=1),i.slideHandler(i.currentSlide-i.options.slidesToScroll)):i.slideHandler(i.currentSlide+i.options.slidesToScroll)},e.prototype.buildArrows=function(){var e=this;e.options.arrows===!0&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow=i(e.options.prevArrow),e.$nextArrow=i(e.options.nextArrow),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.appendTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),e.options.infinite!==!0&&e.$prevArrow.addClass("slick-disabled"))},e.prototype.buildDots=function(){var e,t,o=this;if(o.options.dots===!0&&o.slideCount>o.options.slidesToShow){for(t='<ul class="'+o.options.dotsClass+'">',e=0;e<=o.getDotCount();e+=1)t+="<li>"+o.options.customPaging.call(this,o,e)+"</li>";t+="</ul>",o.$dots=i(t).appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("index",e)}),e.$slidesCache=e.$slides,e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),e.options.centerMode===!0&&(e.options.slidesToScroll=1,e.options.slidesToShow%2===0&&(e.options.slidesToShow=3)),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.options.accessibility===!0&&e.$list.prop("tabIndex",0),e.setSlideClasses("number"==typeof this.currentSlide?this.currentSlide:0),e.options.draggable===!0&&e.$list.addClass("draggable")},e.prototype.checkResponsive=function(){var e,t,o=this;if(o.originalSettings.responsive&&o.originalSettings.responsive.length>-1&&null!==o.originalSettings.responsive){t=null;for(e in o.breakpoints)o.breakpoints.hasOwnProperty(e)&&i(window).width()<o.breakpoints[e]&&(t=o.breakpoints[e]);null!==t?null!==o.activeBreakpoint?t!==o.activeBreakpoint&&(o.activeBreakpoint=t,o.options=i.extend({},o.options,o.breakpointSettings[t]),o.refresh()):(o.activeBreakpoint=t,o.options=i.extend({},o.options,o.breakpointSettings[t]),o.refresh()):null!==o.activeBreakpoint&&(o.activeBreakpoint=null,o.options=i.extend({},o.options,o.originalSettings),o.refresh())}},e.prototype.changeSlide=function(e){var t,o,s,n=this,l=i(e.target);switch(l.is("a")&&e.preventDefault(),s=n.slideCount%n.options.slidesToScroll!==0,t=s?0:(n.slideCount-n.currentSlide)%n.options.slidesToScroll,e.data.message){case"previous":o=0===t?n.options.slidesToScroll:n.options.slidesToShow-t,n.slideCount>n.options.slidesToShow&&n.slideHandler(n.currentSlide-o);break;case"next":o=0===t?n.options.slidesToScroll:t,n.slideCount>n.options.slidesToShow&&n.slideHandler(n.currentSlide+o);break;case"index":var r=0===e.data.index?0:e.data.index||i(e.target).parent().index()*n.options.slidesToScroll;n.slideHandler(r);default:return!1}},e.prototype.destroy=function(){var e=this;e.autoPlayClear(),e.touchObject={},i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&(e.$prevArrow.remove(),e.$nextArrow.remove()),e.$slides.parent().hasClass("slick-track")&&e.$slides.unwrap().unwrap(),e.$slides.removeClass("slick-slide slick-active slick-visible").css("width",""),e.$slider.removeClass("slick-slider"),e.$slider.removeClass("slick-initialized"),e.$list.off(".slick"),i(window).off(".slick-"+e.instanceUid),i(document).off(".slick-"+e.instanceUid)},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",e.options.fade===!1?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;t.cssTransitions===!1?(t.$slides.eq(i).css({zIndex:1e3}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:1e3}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.filterSlides=function(i){var e=this;null!==i&&(e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.getCurrent=function(){var i=this;return i.currentSlide},e.prototype.getDotCount=function(){var i,e=this,t=0,o=0,s=0;for(i=e.options.infinite===!0?e.slideCount+e.options.slidesToShow-e.options.slidesToScroll:e.slideCount;i>t;)s++,o+=e.options.slidesToScroll,t=o+e.options.slidesToShow;return s},e.prototype.getLeft=function(i){var e,t,o,s=this,n=0;return s.slideOffset=0,t=s.$slides.first().outerHeight(),s.options.infinite===!0?(s.slideCount>s.options.slidesToShow&&(s.slideOffset=s.slideWidth*s.options.slidesToShow*-1,n=t*s.options.slidesToShow*-1),s.slideCount%s.options.slidesToScroll!==0&&i+s.options.slidesToScroll>s.slideCount&&s.slideCount>s.options.slidesToShow&&(s.slideOffset=s.slideCount%s.options.slidesToShow*s.slideWidth*-1,n=s.slideCount%s.options.slidesToShow*t*-1)):s.slideCount%s.options.slidesToShow!==0&&i+s.options.slidesToScroll>s.slideCount&&s.slideCount>s.options.slidesToShow&&(s.slideOffset=s.options.slidesToShow*s.slideWidth-s.slideCount%s.options.slidesToShow*s.slideWidth,n=s.slideCount%s.options.slidesToShow*t),s.slideCount>s.options.slidesToShow||(s.slideOffset=0,n=0),s.options.centerMode===!0&&s.options.infinite===!0?s.slideOffset+=s.slideWidth*Math.floor(s.options.slidesToShow/2)-s.slideWidth:s.options.centerMode===!0&&(s.slideOffset+=s.slideWidth*Math.floor(s.options.slidesToShow/2)),e=s.options.vertical===!1?i*s.slideWidth*-1+s.slideOffset:i*t*-1+n,s.options.variableWidth===!0&&(o=s.$slideTrack.children(".slick-slide").eq(s.slideCount>s.options.slidesToShow&&s.options.infinite!==!1?i+s.options.slidesToShow:i),e=o[0]?-1*o[0].offsetLeft:0,s.options.centerMode===!0&&(o=s.$slideTrack.children(".slick-slide").eq(i+s.options.slidesToShow+1),e=o[0]?-1*o[0].offsetLeft:0,e+=(s.$list.width()-o.outerWidth())/2)),e},e.prototype.init=function(){var e=this;i(e.$slider).hasClass("slick-initialized")||(i(e.$slider).addClass("slick-initialized"),e.buildOut(),e.setProps(),e.startLoad(),e.loadSlider(),e.initializeEvents(),e.checkResponsive()),null!==e.options.onInit&&e.options.onInit.call(this,e)},e.prototype.initArrowEvents=function(){var i=this;i.options.arrows===!0&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.on("click.slick",{message:"next"},i.changeSlide))},e.prototype.initDotEvents=function(){var e=this;e.options.dots===!0&&e.slideCount>e.options.slidesToShow&&i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),e.options.dots===!0&&e.options.pauseOnDotsHover===!0&&e.options.autoplay===!0&&i("li",e.$dots).on("mouseenter.slick",e.autoPlayClear).on("mouseleave.slick",e.autoPlay)},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"},e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.options.pauseOnHover===!0&&e.options.autoplay===!0&&(e.$list.on("mouseenter.slick",e.autoPlayClear),e.$list.on("mouseleave.slick",e.autoPlay)),e.options.accessibility===!0&&e.$list.on("keydown.slick",e.keyHandler),e.options.focusOnSelect===!0&&i(e.options.slide,e.$slideTrack).on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,function(){e.checkResponsive(),e.setPosition()}),i(window).on("resize.slick.slick-"+e.instanceUid,function(){i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.setPosition()},50))}),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(document).on("ready.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.initUI=function(){var i=this;i.options.arrows===!0&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),i.options.dots===!0&&i.slideCount>i.options.slidesToShow&&i.$dots.show(),i.options.autoplay===!0&&i.autoPlay()},e.prototype.keyHandler=function(i){var e=this;37===i.keyCode?e.changeSlide({data:{message:"previous"}}):39===i.keyCode&&e.changeSlide({data:{message:"next"}})},e.prototype.lazyLoad=function(){function e(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy");e.load(function(){e.animate({opacity:1},200)}).css({opacity:0}).attr("src",t).removeAttr("data-lazy").removeClass("slick-loading")})}var t,o,s,n,l=this;l.options.centerMode===!0?l.options.infinite===!0?(s=l.currentSlide+(l.options.slidesToShow/2+1),n=s+l.options.slidesToShow+2):(s=Math.max(0,l.currentSlide-(l.options.slidesToShow/2+1)),n=2+(l.options.slidesToShow/2+1)+l.currentSlide):(s=l.options.infinite?l.options.slidesToShow+l.currentSlide:l.currentSlide,n=s+l.options.slidesToShow,l.options.fade===!0&&(s>0&&s--,n>l.slideCount||n++)),t=l.$slider.find(".slick-slide").slice(s,n),e(t),l.slideCount>l.options.slidesToShow?l.currentSlide<l.slideCount-l.options.slidesToShow?0===l.currentSlide&&(o=l.$slider.find(".slick-cloned").slice(-1*l.options.slidesToShow),e(o)):(o=l.$slider.find(".slick-cloned").slice(0,l.options.slidesToShow),e(o)):(o=l.$slider.find(".slick-slide"),e(o))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.postSlide=function(i){var e=this;null!==e.options.onAfterChange&&e.options.onAfterChange.call(this,e,i),e.animating=!1,e.setPosition(),e.swipeLeft=null,e.options.autoplay===!0&&e.paused===!1&&e.autoPlay()},e.prototype.progressiveLazyLoad=function(){var e,t,o=this;e=i("img[data-lazy]").length,e>0&&(t=i("img[data-lazy]",o.$slider).first(),t.attr("src",t.attr("data-lazy")).removeClass("slick-loading").load(function(){t.removeAttr("data-lazy"),o.progressiveLazyLoad()}).error(function(){t.removeAttr("data-lazy"),o.progressiveLazyLoad()}))},e.prototype.refresh=function(){var e=this,t=e.currentSlide;e.destroy(),i.extend(e,e.initials),e.currentSlide=t,e.init()},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide<e.slideCount||0===e.currentSlide||(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount>e.options.slidesToShow||(e.currentSlide=0),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.options.focusOnSelect===!0&&i(e.options.slide,e.$slideTrack).on("click.slick",e.selectHandler),e.setSlideClasses(0),e.setPosition(),null!==e.options.onReInit&&e.options.onReInit.call(this,e)},e.prototype.removeSlide=function(i,e){var t=this;return"boolean"==typeof i?(e=i,i=e===!0?0:t.slideCount-1):i=e===!0?--i:i,t.slideCount<1||0>i||i>t.slideCount-1?!1:(t.unload(),t.$slideTrack.children(this.options.slide).eq(i).remove(),t.$slides=t.$slideTrack.children(this.options.slide),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.append(t.$slides),t.$slidesCache=t.$slides,void t.reinit())},e.prototype.setCSS=function(i){var e,t,o=this,s={};o.options.rtl===!0&&(i=-i),e="left"==o.positionProp?i+"px":"0px",t="top"==o.positionProp?i+"px":"0px",s[o.positionProp]=i,o.transformsEnabled===!1?o.$slideTrack.css(s):(s={},o.cssTransitions===!1?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var e=this;e.options.vertical===!1?e.options.centerMode===!0&&e.$list.css({padding:"0px "+e.options.centerPadding}):(e.$list.height(e.$slides.first().outerHeight(!0)*e.options.slidesToShow),e.options.centerMode===!0&&e.$list.css({padding:e.options.centerPadding+" 0px"})),e.listWidth=e.$list.width(),e.listHeight=e.$list.height(),e.options.vertical===!1&&e.options.variableWidth===!1?(e.slideWidth=Math.ceil(e.listWidth/e.options.slidesToShow),e.$slideTrack.width(Math.ceil(e.slideWidth*e.$slideTrack.children(".slick-slide").length))):e.options.variableWidth===!0?(e.slideWidth=0,e.$slideTrack.children(".slick-slide").each(function(){e.slideWidth+=Math.ceil(i(this).outerWidth(!0))}),e.$slideTrack.width(Math.ceil(e.slideWidth)+1)):(e.slideWidth=Math.ceil(e.listWidth),e.$slideTrack.height(Math.ceil(e.$slides.first().outerHeight(!0)*e.$slideTrack.children(".slick-slide").length)));var t=e.$slides.first().outerWidth(!0)-e.$slides.first().width();e.options.variableWidth===!1&&e.$slideTrack.children(".slick-slide").width(e.slideWidth-t)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,i(s).css({position:"relative",left:e,top:0,zIndex:800,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:900,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&i.options.adaptiveHeight===!0&&i.options.vertical===!1){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),i.options.fade===!1?i.setCSS(i.getLeft(i.currentSlide)):i.setFade()},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=i.options.vertical===!0?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),(void 0!==e.WebkitTransition||void 0!==e.MozTransition||void 0!==e.msTransition)&&i.options.useCSS===!0&&(i.cssTransitions=!0),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&i.animType!==!1&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=null!==i.animType&&i.animType!==!1},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;n.$slider.find(".slick-slide").removeClass("slick-active").removeClass("slick-center"),t=n.$slider.find(".slick-slide"),n.options.centerMode===!0?(e=Math.floor(n.options.slidesToShow/2),n.options.infinite===!0&&(e>i||i>n.slideCount-1-e?(o=n.options.slidesToShow+i,t.slice(o-e+1,o+e+2).addClass("slick-active")):n.$slides.slice(i-e,i+e+1).addClass("slick-active"),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")):0>i||i>n.slideCount-n.options.slidesToShow?t.length>n.options.slidesToShow?(s=n.slideCount%n.options.slidesToShow,o=n.options.infinite===!0?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active")):t.addClass("slick-active"):n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active"),"ondemand"===n.options.lazyLoad&&n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if((s.options.fade===!0||s.options.vertical===!0)&&(s.options.centerMode=!1),s.options.infinite===!0&&s.options.fade===!1&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=s.options.centerMode===!0?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;o>e;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.selectHandler=function(e){var t=this,o=parseInt(i(e.target).parents(".slick-slide").attr("index"));o||(o=0),t.slideCount>t.options.slidesToShow&&t.slideHandler(o)},e.prototype.slideHandler=function(i,e){var t,o,s,n,l=null,r=this;return e=e||!1,r.animating===!0&&r.options.waitForAnimate===!0?!1:(e===!1&&r.asNavFor(i),t=i,l=r.getLeft(t),s=r.getLeft(r.currentSlide),n=r.slideCount%r.options.slidesToScroll!==0?r.options.slidesToScroll:0,r.currentLeft=null===r.swipeLeft?s:r.swipeLeft,r.options.infinite===!1&&r.options.centerMode===!1&&(0>i||i>r.slideCount-r.options.slidesToShow+n)?(r.options.fade===!1&&(t=r.currentSlide,r.animateSlide(s,function(){r.postSlide(t)})),!1):r.options.infinite===!1&&r.options.centerMode===!0&&(0>i||i>r.slideCount-r.options.slidesToScroll)?(r.options.fade===!1&&(t=r.currentSlide,r.animateSlide(s,function(){r.postSlide(t)})),!1):(r.options.autoplay===!0&&clearInterval(r.autoPlayTimer),o=0>t?r.slideCount%r.options.slidesToScroll!==0?r.slideCount-r.slideCount%r.options.slidesToScroll:r.slideCount+t:t<r.slideCount?t:r.slideCount%r.options.slidesToScroll!==0?0:t-r.slideCount,r.animating=!0,null!==r.options.onBeforeChange&&i!==r.currentSlide&&r.options.onBeforeChange.call(this,r,r.currentSlide,o),r.currentSlide=o,r.setSlideClasses(r.currentSlide),r.updateDots(),r.updateArrows(),r.options.fade===!0?(r.fadeSlide(o,function(){r.postSlide(o)}),!1):void r.animateSlide(l,function(){r.postSlide(o)})))},e.prototype.startLoad=function(){var i=this;i.options.arrows===!0&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),i.options.dots===!0&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),o=Math.round(180*t/Math.PI),0>o&&(o=360-Math.abs(o)),(o>45||0>o)&&(o>360||315>o)?135>o||o>225?"vertical":"right":"left"},e.prototype.swipeEnd=function(e){var t,o,s=this;if(s.dragging=!1,void 0===s.touchObject.curX)return!1;if(s.touchObject.swipeLength<s.touchObject.minSwipe)s.touchObject.startX!==s.touchObject.curX&&(s.slideHandler(s.currentSlide),s.touchObject={});else switch(i(e.target).on("click.slick",function(e){e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),i(e.target).off("click.slick")}),s.options.swipeToSlide===!0?(o=Math.round(s.touchObject.swipeLength/s.slideWidth),t=o):t=s.options.slidesToScroll,s.swipeDirection()){case"left":s.slideHandler(s.currentSlide+t),s.touchObject={};break;case"right":s.slideHandler(s.currentSlide-t),s.touchObject={}}},e.prototype.swipeHandler=function(i){var e=this;if(!(e.options.swipe===!1||"ontouchend"in document&&e.options.swipe===!1||e.options.draggable===!1&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n=this;return s=void 0!==i.originalEvent?i.originalEvent.touches:null,e=n.getLeft(n.currentSlide),!n.dragging||s&&1!==s.length?!1:(n.touchObject.curX=void 0!==s?s[0].pageX:i.clientX,n.touchObject.curY=void 0!==s?s[0].pageY:i.clientY,n.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(n.touchObject.curX-n.touchObject.startX,2))),t=n.swipeDirection(),"vertical"!==t?(void 0!==i.originalEvent&&n.touchObject.swipeLength>4&&i.preventDefault(),o=n.touchObject.curX>n.touchObject.startX?1:-1,n.swipeLeft=n.options.vertical===!1?e+n.touchObject.swipeLength*o:e+n.touchObject.swipeLength*(n.$list.height()/n.listWidth)*o,n.options.fade===!0||n.options.touchMove===!1?!1:n.animating===!0?(n.swipeLeft=null,!1):void n.setCSS(n.swipeLeft)):void 0)},e.prototype.swipeStart=function(i){var e,t=this;return"IMG"===i.target.nodeName&&i.preventDefault(),1===t.touchObject.fingerCount&&t.slideCount>t.options.slidesToShow?(void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,void(t.dragging=!0)):(t.touchObject={},!1)},e.prototype.unfilterSlides=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&(e.$prevArrow.remove(),e.$nextArrow.remove()),e.$slides.removeClass("slick-slide slick-active slick-visible").css("width","")},e.prototype.updateArrows=function(){var i=this;i.options.arrows===!0&&i.options.infinite!==!0&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.removeClass("slick-disabled"),i.$nextArrow.removeClass("slick-disabled"),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled"),i.$nextArrow.removeClass("slick-disabled")):i.currentSlide<i.slideCount-i.options.slidesToShow||(i.$nextArrow.addClass("slick-disabled"),i.$prevArrow.removeClass("slick-disabled")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active"),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active"))},i.fn.slick=function(i){var t=this;return t.each(function(t,o){o.slick=new e(o,i)})},i.fn.slickAdd=function(i,e,t){var o=this;return o.each(function(o,s){s.slick.addSlide(i,e,t)})},i.fn.slickCurrentSlide=function(){var i=this;return i.get(0).slick.getCurrent()},i.fn.slickFilter=function(i){var e=this;return e.each(function(e,t){t.slick.filterSlides(i)})},i.fn.slickGoTo=function(i){var e=this;return e.each(function(e,t){t.slick.changeSlide({data:{message:"index",index:parseInt(i)}})})},i.fn.slickNext=function(){var i=this;return i.each(function(i,e){e.slick.changeSlide({data:{message:"next"}})})},i.fn.slickPause=function(){var i=this;return i.each(function(i,e){e.slick.autoPlayClear(),e.slick.paused=!0})},i.fn.slickPlay=function(){var i=this;return i.each(function(i,e){e.slick.paused=!1,e.slick.autoPlay()})},i.fn.slickPrev=function(){var i=this;return i.each(function(i,e){e.slick.changeSlide({data:{message:"previous"}})})},i.fn.slickRemove=function(i,e){var t=this;return t.each(function(t,o){o.slick.removeSlide(i,e)})},i.fn.slickGetOption=function(i){var e=this;return e.get(0).slick.options[i]},i.fn.slickSetOption=function(i,e,t){var o=this;return o.each(function(o,s){s.slick.options[i]=e,t===!0&&(s.slick.unload(),s.slick.reinit())})},i.fn.slickUnfilter=function(){var i=this;return i.each(function(i,e){e.slick.unfilterSlides()})},i.fn.unslick=function(){var i=this;return i.each(function(i,e){e.slick&&e.slick.destroy()})},i.fn.getSlick=function(){var i=null,e=this;return e.each(function(e,t){i=t.slick}),i}});/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License version 3.0
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
 */
var clock;$(document).ready(function(){$('#flash_sale_complete_banner.category_flash_sale').hover(function(){$('.show_all_hover').slideDown()},function(){$('.show_all_hover').slideUp()});$('.autoplay').slick({slidesToShow:1,slidesToScroll:1,autoplay:!0,autoplaySpeed:2500,speed:2000,dots:!1,draggable:!1,touchMove:!1,});if(typeof(date_end)!="undefined"&&date_end!==null){var currentDate=new Date();var futureDate=new Date(date_end*1000);var diff=futureDate.getTime()/1000-currentDate.getTime()/1000;if(diff>0){clock=$('.clock').FlipClock(diff,{clockFace:'HourlyCounter',countdown:!0,language:lang_code});clock_miniture=$('body .clock-mini').FlipClock(diff,{clockFace:'HourlyCounter',countdown:!0,language:lang_code,})}}
$(".flash-sale-image-class").each(function(){var id_div=this.id;var id=id_div.substring(11);var max_width=$('#'+id_div).width();$('#flash_sale_img_'+id).css({'max-width':max_width})})});$(document).on('click','.flip a',function(e){e.preventDefault()});function addToCartFlashSale(id_product){$("#fs_add_to_cart_"+id_product).click()};/*! jQuery UI - v1.10.3 - 2013-05-03
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
!function(a,b){function e(b,c){var d,e,g,h=b.nodeName.toLowerCase();return"area"===h?(d=b.parentNode,e=d.name,!(!b.href||!e||"map"!==d.nodeName.toLowerCase())&&(g=a("img[usemap=#"+e+"]")[0],!!g&&f(g))):(/input|select|textarea|button|object/.test(h)?!b.disabled:"a"===h?b.href||c:c)&&f(b)}function f(b){return a.expr.filters.visible(b)&&!a(b).parents().addBack().filter(function(){return"hidden"===a.css(this,"visibility")}).length}var c=0,d=/^ui-id-\d+$/;a.ui=a.ui||{},a.extend(a.ui,{version:"1.10.3",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}}),a.fn.extend({focus:function(b){return function(c,d){return"number"==typeof c?this.each(function(){var b=this;setTimeout(function(){a(b).focus(),d&&d.call(b)},c)}):b.apply(this,arguments)}}(a.fn.focus),scrollParent:function(){var b;return b=a.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.css(this,"position"))&&/(auto|scroll)/.test(a.css(this,"overflow")+a.css(this,"overflow-y")+a.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.css(this,"overflow")+a.css(this,"overflow-y")+a.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length)for(var e,f,d=a(this[0]);d.length&&d[0]!==document;){if(e=d.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(f=parseInt(d.css("zIndex"),10),!isNaN(f)&&0!==f))return f;d=d.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++c)})},removeUniqueId:function(){return this.each(function(){d.test(this.id)&&a(this).removeAttr("id")})}}),a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(c){return!!a.data(c,b)}}):function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){return e(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var c=a.attr(b,"tabindex"),d=isNaN(c);return(d||c>=0)&&e(b,!d)}}),a("<a>").outerWidth(1).jquery||a.each(["Width","Height"],function(c,d){function h(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.css(b,"padding"+this))||0,d&&(c-=parseFloat(a.css(b,"border"+this+"Width"))||0),f&&(c-=parseFloat(a.css(b,"margin"+this))||0)}),c}var e="Width"===d?["Left","Right"]:["Top","Bottom"],f=d.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){return c===b?g["inner"+d].call(this):this.each(function(){a(this).css(f,h(this,c)+"px")})},a.fn["outer"+d]=function(b,c){return"number"!=typeof b?g["outer"+d].call(this,b):this.each(function(){a(this).css(f,h(this,b,!0,c)+"px")})}}),a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),a("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(a.fn.removeData=function(b){return function(c){return arguments.length?b.call(this,a.camelCase(c)):b.call(this)}}(a.fn.removeData)),a.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),a.support.selectstart="onselectstart"in document.createElement("div"),a.fn.extend({disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.extend(a.ui,{plugin:{add:function(b,c,d){var e,f=a.ui[b].prototype;for(e in d)f.plugins[e]=f.plugins[e]||[],f.plugins[e].push([c,d[e]])},call:function(a,b,c){var d,e=a.plugins[b];if(e&&a.element[0].parentNode&&11!==a.element[0].parentNode.nodeType)for(d=0;d<e.length;d++)a.options[e[d][0]]&&e[d][1].apply(a.element,c)}},hasScroll:function(b,c){if("hidden"===a(b).css("overflow"))return!1;var d=c&&"left"===c?"scrollLeft":"scrollTop",e=!1;return b[d]>0||(b[d]=1,e=b[d]>0,b[d]=0,e)}})}(jQuery),function(a,b){var c=0,d=Array.prototype.slice,e=a.cleanData;a.cleanData=function(b){for(var d,c=0;null!=(d=b[c]);c++)try{a(d).triggerHandler("remove")}catch(a){}e(b)},a.widget=function(b,c,d){var e,f,g,h,i={},j=b.split(".")[0];b=b.split(".")[1],e=j+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][e.toLowerCase()]=function(b){return!!a.data(b,e)},a[j]=a[j]||{},f=a[j][b],g=a[j][b]=function(a,b){return this._createWidget?void(arguments.length&&this._createWidget(a,b)):new g(a,b)},a.extend(g,f,{version:d.version,_proto:a.extend({},d),_childConstructors:[]}),h=new c,h.options=a.widget.extend({},h.options),a.each(d,function(b,d){return a.isFunction(d)?void(i[b]=function(){var a=function(){return c.prototype[b].apply(this,arguments)},e=function(a){return c.prototype[b].apply(this,a)};return function(){var f,b=this._super,c=this._superApply;return this._super=a,this._superApply=e,f=d.apply(this,arguments),this._super=b,this._superApply=c,f}}()):void(i[b]=d)}),g.prototype=a.widget.extend(h,{widgetEventPrefix:f?h.widgetEventPrefix:b},i,{constructor:g,namespace:j,widgetName:b,widgetFullName:e}),f?(a.each(f._childConstructors,function(b,c){var d=c.prototype;a.widget(d.namespace+"."+d.widgetName,g,c._proto)}),delete f._childConstructors):c._childConstructors.push(g),a.widget.bridge(b,g)},a.widget.extend=function(c){for(var h,i,e=d.call(arguments,1),f=0,g=e.length;f<g;f++)for(h in e[f])i=e[f][h],e[f].hasOwnProperty(h)&&i!==b&&(a.isPlainObject(i)?c[h]=a.isPlainObject(c[h])?a.widget.extend({},c[h],i):a.widget.extend({},i):c[h]=i);return c},a.widget.bridge=function(c,e){var f=e.prototype.widgetFullName||c;a.fn[c]=function(g){var h="string"==typeof g,i=d.call(arguments,1),j=this;return g=!h&&i.length?a.widget.extend.apply(null,[g].concat(i)):g,h?this.each(function(){var d,e=a.data(this,f);return e?a.isFunction(e[g])&&"_"!==g.charAt(0)?(d=e[g].apply(e,i),d!==e&&d!==b?(j=d&&d.jquery?j.pushStack(d.get()):d,!1):void 0):a.error("no such method '"+g+"' for "+c+" widget instance"):a.error("cannot call methods on "+c+" prior to initialization; attempted to call method '"+g+"'")}):this.each(function(){var b=a.data(this,f);b?b.option(g||{})._init():a.data(this,f,new e(g,this))}),j}},a.Widget=function(){},a.Widget._childConstructors=[],a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(b,d){d=a(d||this.defaultElement||this)[0],this.element=a(d),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=a.widget.extend({},this.options,this._getCreateOptions(),b),this.bindings=a(),this.hoverable=a(),this.focusable=a(),d!==this&&(a.data(d,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target===d&&this.destroy()}}),this.document=a(d.style?d.ownerDocument:d.document||d),this.window=a(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:a.noop,_getCreateEventData:a.noop,_create:a.noop,_init:a.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(a.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:a.noop,widget:function(){return this.element},option:function(c,d){var f,g,h,e=c;if(0===arguments.length)return a.widget.extend({},this.options);if("string"==typeof c)if(e={},f=c.split("."),c=f.shift(),f.length){for(g=e[c]=a.widget.extend({},this.options[c]),h=0;h<f.length-1;h++)g[f[h]]=g[f[h]]||{},g=g[f[h]];if(c=f.pop(),d===b)return g[c]===b?null:g[c];g[c]=d}else{if(d===b)return this.options[c]===b?null:this.options[c];e[c]=d}return this._setOptions(e),this},_setOptions:function(a){var b;for(b in a)this._setOption(b,a[b]);return this},_setOption:function(a,b){return this.options[a]=b,"disabled"===a&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!b).attr("aria-disabled",b),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(b,c,d){var e,f=this;"boolean"!=typeof b&&(d=c,c=b,b=!1),d?(c=e=a(c),this.bindings=this.bindings.add(c)):(d=c,c=this.element,e=this.widget()),a.each(d,function(d,g){function h(){if(b||f.options.disabled!==!0&&!a(this).hasClass("ui-state-disabled"))return("string"==typeof g?f[g]:g).apply(f,arguments)}"string"!=typeof g&&(h.guid=g.guid=g.guid||h.guid||a.guid++);var i=d.match(/^(\w+)\s*(.*)$/),j=i[1]+f.eventNamespace,k=i[2];k?e.delegate(k,j,h):c.bind(j,h)})},_off:function(a,b){b=(b||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,a.unbind(b).undelegate(b)},_delay:function(a,b){function c(){return("string"==typeof a?d[a]:a).apply(d,arguments)}var d=this;return setTimeout(c,b||0)},_hoverable:function(b){this.hoverable=this.hoverable.add(b),this._on(b,{mouseenter:function(b){a(b.currentTarget).addClass("ui-state-hover")},mouseleave:function(b){a(b.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(b){this.focusable=this.focusable.add(b),this._on(b,{focusin:function(b){a(b.currentTarget).addClass("ui-state-focus")},focusout:function(b){a(b.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(b,c,d){var e,f,g=this.options[b];if(d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&&g.apply(this.element[0],[c].concat(d))===!1||c.isDefaultPrevented())}},a.each({show:"fadeIn",hide:"fadeOut"},function(b,c){a.Widget.prototype["_"+b]=function(d,e,f){"string"==typeof e&&(e={effect:e});var g,h=e?e===!0||"number"==typeof e?c:e.effect||c:b;e=e||{},"number"==typeof e&&(e={duration:e}),g=!a.isEmptyObject(e),e.complete=f,e.delay&&d.delay(e.delay),g&&a.effects&&a.effects.effect[h]?d[b](e):h!==b&&d[h]?d[h](e.duration,e.easing,f):d.queue(function(c){a(this)[b](),f&&f.call(d[0]),c()})}})}(jQuery),function(a,b){var c=!1;a(document).mouseup(function(){c=!1}),a.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(!0===a.data(c.target,b.widgetName+".preventClickEvent"))return a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(b){if(!c){this._mouseStarted&&this._mouseUp(b),this._mouseDownEvent=b;var d=this,e=1===b.which,f=!("string"!=typeof this.options.cancel||!b.target.nodeName)&&a(b.target).closest(this.options.cancel).length;return!(e&&!f&&this._mouseCapture(b))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(b)!==!1,!this._mouseStarted)?(b.preventDefault(),!0):(!0===a.data(b.target,this.widgetName+".preventClickEvent")&&a.removeData(b.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),b.preventDefault(),c=!0,!0))}},_mouseMove:function(b){return a.ui.ie&&(!document.documentMode||document.documentMode<9)&&!b.button?this._mouseUp(b):this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted)},_mouseUp:function(b){return a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,b.target===this._mouseDownEvent.target&&a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b)),!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(a,b){a.widget("ui.draggable",a.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(b){var c=this.options;return!(this.helper||c.disabled||a(b.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(b),!!this.handle&&(a(c.iframeFix===!0?"iframe":c.iframeFix).each(function(){a("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(a(this).offset()).appendTo("body")}),!0))},_mouseStart:function(b){var c=this.options;return this.helper=this._createHelper(b),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),a.ui.ddmanager&&(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt),this._setContainment(),this._trigger("start",b)===!1?(this._clear(),!1):(this._cacheHelperProportions(),a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this._mouseDrag(b,!0),a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,b),!0)},_mouseDrag:function(b,c){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute"),!c){var d=this._uiHash();if(this._trigger("drag",b,d)===!1)return this._mouseUp({}),!1;this.position=d.position}return 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"),a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),!1},_mouseStop:function(b){var c=this,d=!1;return a.ui.ddmanager&&!this.options.dropBehaviour&&(d=a.ui.ddmanager.drop(this,b)),this.dropped&&(d=this.dropped,this.dropped=!1),!("original"===this.options.helper&&!a.contains(this.element[0].ownerDocument,this.element[0]))&&("invalid"===this.options.revert&&!d||"valid"===this.options.revert&&d||this.options.revert===!0||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d)?a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",b)!==!1&&c._clear()}):this._trigger("stop",b)!==!1&&this._clear(),!1)},_mouseUp:function(b){return a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,b),a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(b){return!this.options.handle||!!a(b.target).closest(this.element.find(this.options.handle)).length},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b])):"clone"===c.helper?this.element.clone().removeAttr("id"):this.element;return d.parents("body").length||d.appendTo("parent"===c.appendTo?this.element[0].parentNode:c.appendTo),d[0]===this.element[0]||/(fixed|absolute)/.test(d.css("position"))||d.css("position","absolute"),d},_adjustOffsetFromHelper:function(b){"string"==typeof b&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){var b=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&a.ui.ie)&&(b={top:0,left:0}),{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b,c,d,e=this.options;return e.containment?"window"===e.containment?void(this.containment=[a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,a(window).scrollLeft()+a(window).width()-this.helperProportions.width-this.margins.left,a(window).scrollTop()+(a(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===e.containment?void(this.containment=[0,0,a(document).width()-this.helperProportions.width-this.margins.left,(a(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):e.containment.constructor===Array?void(this.containment=e.containment):("parent"===e.containment&&(e.containment=this.helper[0].parentNode),c=a(e.containment),d=c[0],void(d&&(b="hidden"!==c.css("overflow"),this.containment=[(parseInt(c.css("borderLeftWidth"),10)||0)+(parseInt(c.css("paddingLeft"),10)||0),(parseInt(c.css("borderTopWidth"),10)||0)+(parseInt(c.css("paddingTop"),10)||0),(b?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(c.css("borderRightWidth"),10)||0)-(parseInt(c.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(b?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(c.css("borderBottomWidth"),10)||0)-(parseInt(c.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=c))):void(this.containment=null)},_convertPositionTo:function(b,c){c||(c=this.position);var d="absolute"===b?1:-1,e="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:e.scrollTop(),left:e.scrollLeft()}),{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*d,left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*d}},_generatePosition:function(b){var c,d,e,f,g=this.options,h="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=b.pageX,j=b.pageY;return this.offset.scroll||(this.offset.scroll={top:h.scrollTop(),left:h.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(d=this.relative_container.offset(),c=[this.containment[0]+d.left,this.containment[1]+d.top,this.containment[2]+d.left,this.containment[3]+d.top]):c=this.containment,b.pageX-this.offset.click.left<c[0]&&(i=c[0]+this.offset.click.left),b.pageY-this.offset.click.top<c[1]&&(j=c[1]+this.offset.click.top),b.pageX-this.offset.click.left>c[2]&&(i=c[2]+this.offset.click.left),b.pageY-this.offset.click.top>c[3]&&(j=c[3]+this.offset.click.top)),g.grid&&(e=g.grid[1]?this.originalPageY+Math.round((j-this.originalPageY)/g.grid[1])*g.grid[1]:this.originalPageY,j=c?e-this.offset.click.top>=c[1]||e-this.offset.click.top>c[3]?e:e-this.offset.click.top>=c[1]?e-g.grid[1]:e+g.grid[1]:e,f=g.grid[0]?this.originalPageX+Math.round((i-this.originalPageX)/g.grid[0])*g.grid[0]:this.originalPageX,i=c?f-this.offset.click.left>=c[0]||f-this.offset.click.left>c[2]?f:f-this.offset.click.left>=c[0]?f-g.grid[0]:f+g.grid[0]:f)),{top:j-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(b,c,d){return d=d||this._uiHash(),a.ui.plugin.call(this,b,[c,d]),"drag"===b&&(this.positionAbs=this._convertPositionTo("absolute")),a.Widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c){var d=a(this).data("ui-draggable"),e=d.options,f=a.extend({},c,{item:d.element});d.sortables=[],a(e.connectToSortable).each(function(){var c=a.data(this,"ui-sortable");c&&!c.options.disabled&&(d.sortables.push({instance:c,shouldRevert:c.options.revert}),c.refreshPositions(),c._trigger("activate",b,f))})},stop:function(b,c){var d=a(this).data("ui-draggable"),e=a.extend({},c,{item:d.element});a.each(d.sortables,function(){this.instance.isOver?(this.instance.isOver=0,d.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(b),this.instance.options.helper=this.instance.options._helper,"original"===d.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",b,e))})},drag:function(b,c){var d=a(this).data("ui-draggable"),e=this;a.each(d.sortables,function(){var f=!1,g=this;this.instance.positionAbs=d.positionAbs,this.instance.helperProportions=d.helperProportions,this.instance.offset.click=d.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(f=!0,a.each(d.sortables,function(){return this.instance.positionAbs=d.positionAbs,this.instance.helperProportions=d.helperProportions,this.instance.offset.click=d.offset.click,this!==g&&this.instance._intersectsWith(this.instance.containerCache)&&a.contains(g.instance.element[0],this.instance.element[0])&&(f=!1),f})),f?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=a(e).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return c.helper[0]},b.target=this.instance.currentItem[0],this.instance._mouseCapture(b,!0),this.instance._mouseStart(b,!0,!0),this.instance.offset.click.top=d.offset.click.top,this.instance.offset.click.left=d.offset.click.left,this.instance.offset.parent.left-=d.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=d.offset.parent.top-this.instance.offset.parent.top,d._trigger("toSortable",b),d.dropped=this.instance.element,d.currentItem=d.element,this.instance.fromOutside=d),this.instance.currentItem&&this.instance._mouseDrag(b)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",b,this.instance._uiHash(this.instance)),this.instance._mouseStop(b,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),d._trigger("fromSortable",b),d.dropped=!1)})}}),a.ui.plugin.add("draggable","cursor",{start:function(){var b=a("body"),c=a(this).data("ui-draggable").options;b.css("cursor")&&(c._cursor=b.css("cursor")),b.css("cursor",c.cursor)},stop:function(){var b=a(this).data("ui-draggable").options;b._cursor&&a("body").css("cursor",b._cursor)}}),a.ui.plugin.add("draggable","opacity",{start:function(b,c){var d=a(c.helper),e=a(this).data("ui-draggable").options;d.css("opacity")&&(e._opacity=d.css("opacity")),d.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("ui-draggable").options;d._opacity&&a(c.helper).css("opacity",d._opacity)}}),a.ui.plugin.add("draggable","scroll",{start:function(){var b=a(this).data("ui-draggable");b.scrollParent[0]!==document&&"HTML"!==b.scrollParent[0].tagName&&(b.overflowOffset=b.scrollParent.offset())},drag:function(b){var c=a(this).data("ui-draggable"),d=c.options,e=!1;c.scrollParent[0]!==document&&"HTML"!==c.scrollParent[0].tagName?(d.axis&&"x"===d.axis||(c.overflowOffset.top+c.scrollParent[0].offsetHeight-b.pageY<d.scrollSensitivity?c.scrollParent[0].scrollTop=e=c.scrollParent[0].scrollTop+d.scrollSpeed:b.pageY-c.overflowOffset.top<d.scrollSensitivity&&(c.scrollParent[0].scrollTop=e=c.scrollParent[0].scrollTop-d.scrollSpeed)),d.axis&&"y"===d.axis||(c.overflowOffset.left+c.scrollParent[0].offsetWidth-b.pageX<d.scrollSensitivity?c.scrollParent[0].scrollLeft=e=c.scrollParent[0].scrollLeft+d.scrollSpeed:b.pageX-c.overflowOffset.left<d.scrollSensitivity&&(c.scrollParent[0].scrollLeft=e=c.scrollParent[0].scrollLeft-d.scrollSpeed))):(d.axis&&"x"===d.axis||(b.pageY-a(document).scrollTop()<d.scrollSensitivity?e=a(document).scrollTop(a(document).scrollTop()-d.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())<d.scrollSensitivity&&(e=a(document).scrollTop(a(document).scrollTop()+d.scrollSpeed))),d.axis&&"y"===d.axis||(b.pageX-a(document).scrollLeft()<d.scrollSensitivity?e=a(document).scrollLeft(a(document).scrollLeft()-d.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())<d.scrollSensitivity&&(e=a(document).scrollLeft(a(document).scrollLeft()+d.scrollSpeed)))),e!==!1&&a.ui.ddmanager&&!d.dropBehaviour&&a.ui.ddmanager.prepareOffsets(c,b)}}),a.ui.plugin.add("draggable","snap",{start:function(){var b=a(this).data("ui-draggable"),c=b.options;b.snapElements=[],a(c.snap.constructor!==String?c.snap.items||":data(ui-draggable)":c.snap).each(function(){var c=a(this),d=c.offset();this!==b.element[0]&&b.snapElements.push({item:this,width:c.outerWidth(),height:c.outerHeight(),top:d.top,left:d.left})})},drag:function(b,c){var d,e,f,g,h,i,j,k,l,m,n=a(this).data("ui-draggable"),o=n.options,p=o.snapTolerance,q=c.offset.left,r=q+n.helperProportions.width,s=c.offset.top,t=s+n.helperProportions.height;for(l=n.snapElements.length-1;l>=0;l--)h=n.snapElements[l].left,i=h+n.snapElements[l].width,j=n.snapElements[l].top,k=j+n.snapElements[l].height,r<h-p||q>i+p||t<j-p||s>k+p||!a.contains(n.snapElements[l].item.ownerDocument,n.snapElements[l].item)?(n.snapElements[l].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,b,a.extend(n._uiHash(),{snapItem:n.snapElements[l].item})),n.snapElements[l].snapping=!1):("inner"!==o.snapMode&&(d=Math.abs(j-t)<=p,e=Math.abs(k-s)<=p,f=Math.abs(h-r)<=p,g=Math.abs(i-q)<=p,d&&(c.position.top=n._convertPositionTo("relative",{top:j-n.helperProportions.height,left:0}).top-n.margins.top),e&&(c.position.top=n._convertPositionTo("relative",{top:k,left:0}).top-n.margins.top),f&&(c.position.left=n._convertPositionTo("relative",{top:0,left:h-n.helperProportions.width}).left-n.margins.left),g&&(c.position.left=n._convertPositionTo("relative",{top:0,left:i}).left-n.margins.left)),m=d||e||f||g,"outer"!==o.snapMode&&(d=Math.abs(j-s)<=p,e=Math.abs(k-t)<=p,f=Math.abs(h-q)<=p,g=Math.abs(i-r)<=p,d&&(c.position.top=n._convertPositionTo("relative",{top:j,left:0}).top-n.margins.top),e&&(c.position.top=n._convertPositionTo("relative",{top:k-n.helperProportions.height,left:0}).top-n.margins.top),f&&(c.position.left=n._convertPositionTo("relative",{top:0,left:h}).left-n.margins.left),g&&(c.position.left=n._convertPositionTo("relative",{top:0,left:i-n.helperProportions.width}).left-n.margins.left)),!n.snapElements[l].snapping&&(d||e||f||g||m)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,b,a.extend(n._uiHash(),{snapItem:n.snapElements[l].item})),n.snapElements[l].snapping=d||e||f||g||m)}}),a.ui.plugin.add("draggable","stack",{start:function(){var b,c=this.data("ui-draggable").options,d=a.makeArray(a(c.stack)).sort(function(b,c){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(c).css("zIndex"),10)||0)});d.length&&(b=parseInt(a(d[0]).css("zIndex"),10)||0,a(d).each(function(c){a(this).css("zIndex",b+c)}),this.css("zIndex",b+d.length))}}),a.ui.plugin.add("draggable","zIndex",{start:function(b,c){var d=a(c.helper),e=a(this).data("ui-draggable").options;d.css("zIndex")&&(e._zIndex=d.css("zIndex")),d.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("ui-draggable").options;d._zIndex&&a(c.helper).css("zIndex",d._zIndex)}})}(jQuery),function(a,b){function c(a,b,c){return a>b&&a<b+c}a.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var b=this.options,c=b.accept;this.isover=!1,this.isout=!0,this.accept=a.isFunction(c)?c:function(a){return a.is(c)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},a.ui.ddmanager.droppables[b.scope]=a.ui.ddmanager.droppables[b.scope]||[],a.ui.ddmanager.droppables[b.scope].push(this),b.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var b=0,c=a.ui.ddmanager.droppables[this.options.scope];b<c.length;b++)c[b]===this&&c.splice(b,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(b,c){"accept"===b&&(this.accept=a.isFunction(c)?c:function(a){return a.is(c)}),a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),c&&this._trigger("activate",b,this.ui(c))},_deactivate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),c&&this._trigger("deactivate",b,this.ui(c))},_over:function(b){var c=a.ui.ddmanager.current;c&&(c.currentItem||c.element)[0]!==this.element[0]&&this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",b,this.ui(c)))},_out:function(b){var c=a.ui.ddmanager.current;c&&(c.currentItem||c.element)[0]!==this.element[0]&&this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",b,this.ui(c)))},_drop:function(b,c){var d=c||a.ui.ddmanager.current,e=!1;return!(!d||(d.currentItem||d.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var b=a.data(this,"ui-droppable");if(b.options.greedy&&!b.options.disabled&&b.options.scope===d.options.scope&&b.accept.call(b.element[0],d.currentItem||d.element)&&a.ui.intersect(d,a.extend(b,{offset:b.element.offset()}),b.options.tolerance))return e=!0,!1}),!e&&(!!this.accept.call(this.element[0],d.currentItem||d.element)&&(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",b,this.ui(d)),this.element)))},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}}),a.ui.intersect=function(a,b,d){if(!b.offset)return!1;var e,f,g=(a.positionAbs||a.position.absolute).left,h=g+a.helperProportions.width,i=(a.positionAbs||a.position.absolute).top,j=i+a.helperProportions.height,k=b.offset.left,l=k+b.proportions.width,m=b.offset.top,n=m+b.proportions.height;switch(d){case"fit":return k<=g&&h<=l&&m<=i&&j<=n;case"intersect":return k<g+a.helperProportions.width/2&&h-a.helperProportions.width/2<l&&m<i+a.helperProportions.height/2&&j-a.helperProportions.height/2<n;case"pointer":return e=(a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left,f=(a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top,c(f,m,b.proportions.height)&&c(e,k,b.proportions.width);case"touch":return(i>=m&&i<=n||j>=m&&j<=n||i<m&&j>n)&&(g>=k&&g<=l||h>=k&&h<=l||g<k&&h>l);default:return!1}},a.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(b,c){var d,e,f=a.ui.ddmanager.droppables[b.options.scope]||[],g=c?c.type:null,h=(b.currentItem||b.element).find(":data(ui-droppable)").addBack();a:for(d=0;d<f.length;d++)if(!(f[d].options.disabled||b&&!f[d].accept.call(f[d].element[0],b.currentItem||b.element))){for(e=0;e<h.length;e++)if(h[e]===f[d].element[0]){f[d].proportions.height=0;continue a}f[d].visible="none"!==f[d].element.css("display"),f[d].visible&&("mousedown"===g&&f[d]._activate.call(f[d],c),f[d].offset=f[d].element.offset(),f[d].proportions={width:f[d].element[0].offsetWidth,height:f[d].element[0].offsetHeight})}},drop:function(b,c){var d=!1;return a.each((a.ui.ddmanager.droppables[b.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance)&&(d=this._drop.call(this,c)||d),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],b.currentItem||b.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,c)))}),d},dragStart:function(b,c){b.element.parentsUntil("body").bind("scroll.droppable",function(){b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)})},drag:function(b,c){b.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(b,c),a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var d,e,f,g=a.ui.intersect(b,this,this.options.tolerance),h=!g&&this.isover?"isout":g&&!this.isover?"isover":null;h&&(this.options.greedy&&(e=this.options.scope,f=this.element.parents(":data(ui-droppable)").filter(function(){return a.data(this,"ui-droppable").options.scope===e}),f.length&&(d=a.data(f[0],"ui-droppable"),d.greedyChild="isover"===h)),d&&"isover"===h&&(d.isover=!1,d.isout=!0,d._out.call(d,c)),this[h]=!0,this["isout"===h?"isover":"isout"]=!1,this["isover"===h?"_over":"_out"].call(this,c),d&&"isout"===h&&(d.isout=!1,d.isover=!0,d._over.call(d,c)))}})},dragStop:function(b,c){b.element.parentsUntil("body").unbind("scroll.droppable"),b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)}}}(jQuery),function(a,b){function c(a){return parseInt(a,10)||0}function d(a){return!isNaN(parseInt(a,10))}a.widget("ui.resizable",a.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var b,c,d,e,f,g=this,h=this.options;if(this.element.addClass("ui-resizable"),a.extend(this,{_aspectRatio:!!h.aspectRatio,aspectRatio:h.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:h.helper||h.ghost||h.animate?h.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(a("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=h.handles||(a(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),b=this.handles.split(","),this.handles={},c=0;c<b.length;c++)d=a.trim(b[c]),f="ui-resizable-"+d,e=a("<div class='ui-resizable-handle "+f+"'></div>"),e.css({zIndex:h.zIndex}),"se"===d&&e.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[d]=".ui-resizable-"+d,this.element.append(e);this._renderAxis=function(b){var c,d,e,f;b=b||this.element;for(c in this.handles)this.handles[c].constructor===String&&(this.handles[c]=a(this.handles[c],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(d=a(this.handles[c],this.element),f=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth(),e=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join(""),b.css(e,f),this._proportionallyResize()),a(this.handles[c]).length},this._renderAxis(this.element),this._handles=a(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){g.resizing||(this.className&&(e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),g.axis=e&&e[1]?e[1]:"se")}),h.autoHide&&(this._handles.hide(),a(this.element).addClass("ui-resizable-autohide").mouseenter(function(){h.disabled||(a(this).removeClass("ui-resizable-autohide"),g._handles.show())}).mouseleave(function(){h.disabled||g.resizing||(a(this).addClass("ui-resizable-autohide"),g._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var b,c=function(b){a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(c(this.element),b=this.element,this.originalElement.css({position:b.css("position"),width:b.outerWidth(),height:b.outerHeight(),top:b.css("top"),left:b.css("left")}).insertAfter(b),b.remove()),this.originalElement.css("resize",this.originalResizeStyle),c(this.originalElement),this},_mouseCapture:function(b){var c,d,e=!1;for(c in this.handles)d=a(this.handles[c])[0],(d===b.target||a.contains(d,b.target))&&(e=!0);return!this.options.disabled&&e},_mouseStart:function(b){var d,e,f,g=this.options,h=this.element.position(),i=this.element;return this.resizing=!0,/absolute/.test(i.css("position"))?i.css({position:"absolute",top:i.css("top"),left:i.css("left")}):i.is(".ui-draggable")&&i.css({position:"absolute",top:h.top,left:h.left}),this._renderProxy(),d=c(this.helper.css("left")),e=c(this.helper.css("top")),g.containment&&(d+=a(g.containment).scrollLeft()||0,e+=a(g.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:d,top:e},this.size=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()},this.originalSize=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()},this.originalPosition={left:d,top:e},this.sizeDiff={width:i.outerWidth()-i.width(),height:i.outerHeight()-i.height()},this.originalMousePosition={left:b.pageX,top:b.pageY},this.aspectRatio="number"==typeof g.aspectRatio?g.aspectRatio:this.originalSize.width/this.originalSize.height||1,f=a(".ui-resizable-"+this.axis).css("cursor"),a("body").css("cursor","auto"===f?this.axis+"-resize":f),i.addClass("ui-resizable-resizing"),this._propagate("start",b),!0},_mouseDrag:function(b){var c,d=this.helper,e={},f=this.originalMousePosition,g=this.axis,h=this.position.top,i=this.position.left,j=this.size.width,k=this.size.height,l=b.pageX-f.left||0,m=b.pageY-f.top||0,n=this._change[g];return!!n&&(c=n.apply(this,[b,l,m]),this._updateVirtualBoundaries(b.shiftKey),(this._aspectRatio||b.shiftKey)&&(c=this._updateRatio(c,b)),c=this._respectSize(c,b),this._updateCache(c),this._propagate("resize",b),this.position.top!==h&&(e.top=this.position.top+"px"),this.position.left!==i&&(e.left=this.position.left+"px"),this.size.width!==j&&(e.width=this.size.width+"px"),this.size.height!==k&&(e.height=this.size.height+"px"),d.css(e),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),a.isEmptyObject(e)||this._trigger("resize",b,this.ui()),!1)},_mouseStop:function(b){this.resizing=!1;var c,d,e,f,g,h,i,j=this.options,k=this;return this._helper&&(c=this._proportionallyResizeElements,d=c.length&&/textarea/i.test(c[0].nodeName),e=d&&a.ui.hasScroll(c[0],"left")?0:k.sizeDiff.height,f=d?0:k.sizeDiff.width,g={width:k.helper.width()-f,height:k.helper.height()-e},h=parseInt(k.element.css("left"),10)+(k.position.left-k.originalPosition.left)||null,i=parseInt(k.element.css("top"),10)+(k.position.top-k.originalPosition.top)||null,j.animate||this.element.css(a.extend(g,{top:i,left:h})),k.helper.height(k.size.height),k.helper.width(k.size.width),this._helper&&!j.animate&&this._proportionallyResize()),a("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",b),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(a){var b,c,e,f,g,h=this.options;g={minWidth:d(h.minWidth)?h.minWidth:0,maxWidth:d(h.maxWidth)?h.maxWidth:1/0,minHeight:d(h.minHeight)?h.minHeight:0,maxHeight:d(h.maxHeight)?h.maxHeight:1/0},(this._aspectRatio||a)&&(b=g.minHeight*this.aspectRatio,e=g.minWidth/this.aspectRatio,c=g.maxHeight*this.aspectRatio,f=g.maxWidth/this.aspectRatio,b>g.minWidth&&(g.minWidth=b),e>g.minHeight&&(g.minHeight=e),c<g.maxWidth&&(g.maxWidth=c),f<g.maxHeight&&(g.maxHeight=f)),this._vBoundaries=g},_updateCache:function(a){this.offset=this.helper.offset(),d(a.left)&&(this.position.left=a.left),d(a.top)&&(this.position.top=a.top),d(a.height)&&(this.size.height=a.height),d(a.width)&&(this.size.width=a.width)},_updateRatio:function(a){var b=this.position,c=this.size,e=this.axis;return d(a.height)?a.width=a.height*this.aspectRatio:d(a.width)&&(a.height=a.width/this.aspectRatio),"sw"===e&&(a.left=b.left+(c.width-a.width),a.top=null),"nw"===e&&(a.top=b.top+(c.height-a.height),a.left=b.left+(c.width-a.width)),a},_respectSize:function(a){var b=this._vBoundaries,c=this.axis,e=d(a.width)&&b.maxWidth&&b.maxWidth<a.width,f=d(a.height)&&b.maxHeight&&b.maxHeight<a.height,g=d(a.width)&&b.minWidth&&b.minWidth>a.width,h=d(a.height)&&b.minHeight&&b.minHeight>a.height,i=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,k=/sw|nw|w/.test(c),l=/nw|ne|n/.test(c);return g&&(a.width=b.minWidth),h&&(a.height=b.minHeight),e&&(a.width=b.maxWidth),f&&(a.height=b.maxHeight),g&&k&&(a.left=i-b.minWidth),e&&k&&(a.left=i-b.maxWidth),h&&l&&(a.top=j-b.minHeight),f&&l&&(a.top=j-b.maxHeight),a.width||a.height||a.left||!a.top?a.width||a.height||a.top||!a.left||(a.left=null):a.top=null,a},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var a,b,c,d,e,f=this.helper||this.element;for(a=0;a<this._proportionallyResizeElements.length;a++){if(e=this._proportionallyResizeElements[a],!this.borderDif)for(this.borderDif=[],c=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],d=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")],b=0;b<c.length;b++)this.borderDif[b]=(parseInt(c[b],10)||0)+(parseInt(d[b],10)||0);e.css({height:f.height()-this.borderDif[0]-this.borderDif[2]||0,width:f.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var b=this.element,c=this.options;this.elementOffset=b.offset(),this._helper?(this.helper=this.helper||a("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++c.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(a,b){return{width:this.originalSize.width+b}},w:function(a,b){var c=this.originalSize,d=this.originalPosition;return{left:d.left+b,width:c.width-b}},n:function(a,b,c){var d=this.originalSize,e=this.originalPosition;return{top:e.top+c,height:d.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]),"resize"!==b&&this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),a.ui.plugin.add("resizable","animate",{stop:function(b){var c=a(this).data("ui-resizable"),d=c.options,e=c._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&a.ui.hasScroll(e[0],"left")?0:c.sizeDiff.height,h=f?0:c.sizeDiff.width,i={width:c.size.width-h,height:c.size.height-g},j=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,k=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;c.element.animate(a.extend(i,k&&j?{top:k,left:j}:{}),{duration:d.animateDuration,easing:d.animateEasing,step:function(){var d={width:parseInt(c.element.css("width"),10),height:parseInt(c.element.css("height"),10),top:parseInt(c.element.css("top"),10),left:parseInt(c.element.css("left"),10)};e&&e.length&&a(e[0]).css({width:d.width,height:d.height}),c._updateCache(d),c._propagate("resize",b)}})}}),a.ui.plugin.add("resizable","containment",{start:function(){var b,d,e,f,g,h,i,j=a(this).data("ui-resizable"),k=j.options,l=j.element,m=k.containment,n=m instanceof a?m.get(0):/parent/.test(m)?l.parent().get(0):m;n&&(j.containerElement=a(n),/document/.test(m)||m===document?(j.containerOffset={left:0,top:0},j.containerPosition={left:0,top:0},j.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}):(b=a(n),d=[],a(["Top","Right","Left","Bottom"]).each(function(a,e){d[a]=c(b.css("padding"+e))}),j.containerOffset=b.offset(),j.containerPosition=b.position(),j.containerSize={height:b.innerHeight()-d[3],width:b.innerWidth()-d[1]},e=j.containerOffset,f=j.containerSize.height,g=j.containerSize.width,h=a.ui.hasScroll(n,"left")?n.scrollWidth:g,i=a.ui.hasScroll(n)?n.scrollHeight:f,j.parentData={element:n,left:e.left,top:e.top,width:h,height:i}))},resize:function(b){var c,d,e,f,g=a(this).data("ui-resizable"),h=g.options,i=g.containerOffset,j=g.position,k=g._aspectRatio||b.shiftKey,l={top:0,left:0},m=g.containerElement;m[0]!==document&&/static/.test(m.css("position"))&&(l=i),j.left<(g._helper?i.left:0)&&(g.size.width=g.size.width+(g._helper?g.position.left-i.left:g.position.left-l.left),k&&(g.size.height=g.size.width/g.aspectRatio),g.position.left=h.helper?i.left:0),j.top<(g._helper?i.top:0)&&(g.size.height=g.size.height+(g._helper?g.position.top-i.top:g.position.top),k&&(g.size.width=g.size.height*g.aspectRatio),g.position.top=g._helper?i.top:0),g.offset.left=g.parentData.left+g.position.left,g.offset.top=g.parentData.top+g.position.top,c=Math.abs((g._helper?g.offset.left-l.left:g.offset.left-l.left)+g.sizeDiff.width),d=Math.abs((g._helper?g.offset.top-l.top:g.offset.top-i.top)+g.sizeDiff.height),e=g.containerElement.get(0)===g.element.parent().get(0),f=/relative|absolute/.test(g.containerElement.css("position")),e&&f&&(c-=g.parentData.left),c+g.size.width>=g.parentData.width&&(g.size.width=g.parentData.width-c,k&&(g.size.height=g.size.width/g.aspectRatio)),d+g.size.height>=g.parentData.height&&(g.size.height=g.parentData.height-d,k&&(g.size.width=g.size.height*g.aspectRatio))},stop:function(){var b=a(this).data("ui-resizable"),c=b.options,d=b.containerOffset,e=b.containerPosition,f=b.containerElement,g=a(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width,j=g.outerHeight()-b.sizeDiff.height;b._helper&&!c.animate&&/relative/.test(f.css("position"))&&a(this).css({left:h.left-e.left-d.left,width:i,height:j}),b._helper&&!c.animate&&/static/.test(f.css("position"))&&a(this).css({left:h.left-e.left-d.left,width:i,height:j})}}),a.ui.plugin.add("resizable","alsoResize",{start:function(){var b=a(this).data("ui-resizable"),c=b.options,d=function(b){a(b).each(function(){var b=a(this);b.data("ui-resizable-alsoresize",{width:parseInt(b.width(),10),height:parseInt(b.height(),10),left:parseInt(b.css("left"),10),top:parseInt(b.css("top"),10)})})};"object"!=typeof c.alsoResize||c.alsoResize.parentNode?d(c.alsoResize):c.alsoResize.length?(c.alsoResize=c.alsoResize[0],d(c.alsoResize)):a.each(c.alsoResize,function(a){d(a)})},resize:function(b,c){var d=a(this).data("ui-resizable"),e=d.options,f=d.originalSize,g=d.originalPosition,h={height:d.size.height-f.height||0,width:d.size.width-f.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0},i=function(b,d){a(b).each(function(){var b=a(this),e=a(this).data("ui-resizable-alsoresize"),f={},g=d&&d.length?d:b.parents(c.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(g,function(a,b){var c=(e[b]||0)+(h[b]||0);c&&c>=0&&(f[b]=c||null)}),b.css(f)})};"object"!=typeof e.alsoResize||e.alsoResize.nodeType?i(e.alsoResize):a.each(e.alsoResize,function(a,b){i(a,b)})},stop:function(){a(this).removeData("resizable-alsoresize")}}),a.ui.plugin.add("resizable","ghost",{start:function(){var b=a(this).data("ui-resizable"),c=b.options,d=b.size;b.ghost=b.originalElement.clone(),b.ghost.css({opacity:.25,display:"block",position:"relative",height:d.height,width:d.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof c.ghost?c.ghost:""),b.ghost.appendTo(b.helper)},resize:function(){var b=a(this).data("ui-resizable");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=a(this).data("ui-resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}}),a.ui.plugin.add("resizable","grid",{resize:function(){var b=a(this).data("ui-resizable"),c=b.options,d=b.size,e=b.originalSize,f=b.originalPosition,g=b.axis,h="number"==typeof c.grid?[c.grid,c.grid]:c.grid,i=h[0]||1,j=h[1]||1,k=Math.round((d.width-e.width)/i)*i,l=Math.round((d.height-e.height)/j)*j,m=e.width+k,n=e.height+l,o=c.maxWidth&&c.maxWidth<m,p=c.maxHeight&&c.maxHeight<n,q=c.minWidth&&c.minWidth>m,r=c.minHeight&&c.minHeight>n;c.grid=h,q&&(m+=i),r&&(n+=j),o&&(m-=i),p&&(n-=j),/^(se|s|e)$/.test(g)?(b.size.width=m,b.size.height=n):/^(ne)$/.test(g)?(b.size.width=m,b.size.height=n,b.position.top=f.top-l):/^(sw)$/.test(g)?(b.size.width=m,b.size.height=n,b.position.left=f.left-k):(b.size.width=m,b.size.height=n,b.position.top=f.top-l,b.position.left=f.left-k)}})}(jQuery),function(a,b){a.widget("ui.selectable",a.ui.mouse,{version:"1.10.3",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var b,c=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){b=a(c.options.filter,c.element[0]),b.addClass("ui-selectee"),b.each(function(){var b=a(this),c=b.offset();a.data(this,"selectable-item",{element:this,$element:b,left:c.left,top:c.top,right:c.left+b.outerWidth(),bottom:c.top+b.outerHeight(),startselected:!1,selected:b.hasClass("ui-selected"),selecting:b.hasClass("ui-selecting"),unselecting:b.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=b.addClass("ui-selectee"),this._mouseInit(),this.helper=a("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(b){var c=this,d=this.options;this.opos=[b.pageX,b.pageY],this.options.disabled||(this.selectees=a(d.filter,this.element[0]),this._trigger("start",b),a(d.appendTo).append(this.helper),this.helper.css({left:b.pageX,top:b.pageY,width:0,height:0}),d.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var d=a.data(this,"selectable-item");d.startselected=!0,b.metaKey||b.ctrlKey||(d.$element.removeClass("ui-selected"),d.selected=!1,d.$element.addClass("ui-unselecting"),d.unselecting=!0,c._trigger("unselecting",b,{unselecting:d.element}))}),a(b.target).parents().addBack().each(function(){var d,e=a.data(this,"selectable-item");if(e)return d=!b.metaKey&&!b.ctrlKey||!e.$element.hasClass("ui-selected"),e.$element.removeClass(d?"ui-unselecting":"ui-selected").addClass(d?"ui-selecting":"ui-unselecting"),e.unselecting=!d,e.selecting=d,e.selected=d,d?c._trigger("selecting",b,{selecting:e.element}):c._trigger("unselecting",b,{unselecting:e.element}),!1}))},_mouseDrag:function(b){if(this.dragged=!0,!this.options.disabled){var c,d=this,e=this.options,f=this.opos[0],g=this.opos[1],h=b.pageX,i=b.pageY;return f>h&&(c=h,h=f,f=c),g>i&&(c=i,i=g,g=c),this.helper.css({left:f,top:g,width:h-f,height:i-g}),this.selectees.each(function(){var c=a.data(this,"selectable-item"),j=!1;c&&c.element!==d.element[0]&&("touch"===e.tolerance?j=!(c.left>h||c.right<f||c.top>i||c.bottom<g):"fit"===e.tolerance&&(j=c.left>f&&c.right<h&&c.top>g&&c.bottom<i),j?(c.selected&&(c.$element.removeClass("ui-selected"),c.selected=!1),c.unselecting&&(c.$element.removeClass("ui-unselecting"),c.unselecting=!1),c.selecting||(c.$element.addClass("ui-selecting"),c.selecting=!0,d._trigger("selecting",b,{selecting:c.element}))):(c.selecting&&((b.metaKey||b.ctrlKey)&&c.startselected?(c.$element.removeClass("ui-selecting"),c.selecting=!1,c.$element.addClass("ui-selected"),c.selected=!0):(c.$element.removeClass("ui-selecting"),c.selecting=!1,c.startselected&&(c.$element.addClass("ui-unselecting"),c.unselecting=!0),d._trigger("unselecting",b,{unselecting:c.element}))),c.selected&&(b.metaKey||b.ctrlKey||c.startselected||(c.$element.removeClass("ui-selected"),c.selected=!1,c.$element.addClass("ui-unselecting"),c.unselecting=!0,d._trigger("unselecting",b,{unselecting:c.element})))))}),!1}},_mouseStop:function(b){var c=this;return this.dragged=!1,a(".ui-unselecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-unselecting"),d.unselecting=!1,d.startselected=!1,c._trigger("unselected",b,{unselected:d.element})}),a(".ui-selecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected"),d.selecting=!1,d.selected=!0,d.startselected=!0,c._trigger("selected",b,{selected:d.element})}),this._trigger("stop",b),this.helper.remove(),!1}})}(jQuery),function(a,b){function c(a,b,c){return a>b&&a<b+c}function d(a){return/left|right/.test(a.css("float"))||/inline|table-cell/.test(a.css("display"))}a.widget("ui.sortable",a.ui.mouse,{version:"1.10.3",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 a=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=!!this.items.length&&("x"===a.axis||d(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 a=this.items.length-1;a>=0;a--)this.items[a].item.removeData(this.widgetName+"-item");return this},_setOption:function(b,c){"disabled"===b?(this.options[b]=c,this.widget().toggleClass("ui-sortable-disabled",!!c)):a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(b,c){var d=null,e=!1,f=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(b),a(b.target).parents().each(function(){if(a.data(this,f.widgetName+"-item")===f)return d=a(this),!1}),a.data(b.target,f.widgetName+"-item")===f&&(d=a(b.target)),!!d&&(!(this.options.handle&&!c&&(a(this.options.handle,d).find("*").addBack().each(function(){this===b.target&&(e=!0)}),!e))&&(this.currentItem=d,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(b,c,d){var e,f,g=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(b),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},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.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(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,g.cursorAt&&this._adjustOffsetFromHelper(g.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),g.containment&&this._setContainment(),g.cursor&&"auto"!==g.cursor&&(f=this.document.find("body"),this.storedCursor=f.css("cursor"),f.css("cursor",g.cursor),this.storedStylesheet=a("<style>*{ cursor: "+g.cursor+" !important; }</style>").appendTo(f)),g.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",g.opacity)),g.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",g.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",b,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!d)for(e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("activate",b,this._uiHash(this));return a.ui.ddmanager&&(a.ui.ddmanager.current=this),a.ui.ddmanager&&!g.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(b),!0},_mouseDrag:function(b){var c,d,e,f,g=this.options,h=!1;for(this.position=this._generatePosition(b),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-b.pageY<g.scrollSensitivity?this.scrollParent[0].scrollTop=h=this.scrollParent[0].scrollTop+g.scrollSpeed:b.pageY-this.overflowOffset.top<g.scrollSensitivity&&(this.scrollParent[0].scrollTop=h=this.scrollParent[0].scrollTop-g.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-b.pageX<g.scrollSensitivity?this.scrollParent[0].scrollLeft=h=this.scrollParent[0].scrollLeft+g.scrollSpeed:b.pageX-this.overflowOffset.left<g.scrollSensitivity&&(this.scrollParent[0].scrollLeft=h=this.scrollParent[0].scrollLeft-g.scrollSpeed)):(b.pageY-a(document).scrollTop()<g.scrollSensitivity?h=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())<g.scrollSensitivity&&(h=a(document).scrollTop(a(document).scrollTop()+g.scrollSpeed)),b.pageX-a(document).scrollLeft()<g.scrollSensitivity?h=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())<g.scrollSensitivity&&(h=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed))),h!==!1&&a.ui.ddmanager&&!g.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b)),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"),c=this.items.length-1;c>=0;c--)if(d=this.items[c],e=d.item[0],f=this._intersectsWithPointer(d),f&&d.instance===this.currentContainer&&!(e===this.currentItem[0]||this.placeholder[1===f?"next":"prev"]()[0]===e||a.contains(this.placeholder[0],e)||"semi-dynamic"===this.options.type&&a.contains(this.element[0],e))){if(this.direction=1===f?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(d))break;this._rearrange(b,d),this._trigger("change",b,this._uiHash());break}return this._contactContainers(b),a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),this._trigger("sort",b,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(b,c){if(b){if(a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,b),this.options.revert){var d=this,e=this.placeholder.offset(),f=this.options.axis,g={};f&&"x"!==f||(g.left=e.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),f&&"y"!==f||(g.top=e.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,a(this.helper).animate(g,parseInt(this.options.revert,10)||500,function(){d._clear(b)})}else this._clear(b,c);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 b=this.containers.length-1;b>=0;b--)this.containers[b]._trigger("deactivate",null,this._uiHash(this)),this.containers[b].containerCache.over&&(this.containers[b]._trigger("out",null,this._uiHash(this)),this.containers[b].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(),a.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},a(c).each(function(){var c=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[\-=_](.+)/);c&&d.push((b.key||c[1]+"[]")+"="+(b.key&&b.expression?c[1]:c[2]))}),!d.length&&b.key&&d.push(b.key+"="),d.join("&")},toArray:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},c.each(function(){d.push(a(b.item||this).attr(b.attribute||"id")||"")}),d},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top,e=d+this.helperProportions.height,f=a.left,g=f+a.width,h=a.top,i=h+a.height,j=this.offset.click.top,k=this.offset.click.left,l="x"===this.options.axis||d+j>h&&d+j<i,m="y"===this.options.axis||b+k>f&&b+k<g,n=l&&m;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?n:f<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<g&&h<d+this.helperProportions.height/2&&e-this.helperProportions.height/2<i},_intersectsWithPointer:function(a){var b="x"===this.options.axis||c(this.positionAbs.top+this.offset.click.top,a.top,a.height),d="y"===this.options.axis||c(this.positionAbs.left+this.offset.click.left,a.left,a.width),e=b&&d,f=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();return!!e&&(this.floating?g&&"right"===g||"down"===f?2:1:f&&("down"===f?2:1))},_intersectsWithSides:function(a){var b=c(this.positionAbs.top+this.offset.click.top,a.top+a.height/2,a.height),d=c(this.positionAbs.left+this.offset.click.left,a.left+a.width/2,a.width),e=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();return this.floating&&f?"right"===f&&d||"left"===f&&!d:e&&("down"===e&&b||"up"===e&&!b)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return 0!==a&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return 0!==a&&(a>0?"right":"left")},refresh:function(a){return this._refreshItems(a),this.refreshPositions(),this},_connectWith:function(){var a=this.options;return a.connectWith.constructor===String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(b){var c,d,e,f,g=[],h=[],i=this._connectWith();if(i&&b)for(c=i.length-1;c>=0;c--)for(e=a(i[c]),d=e.length-1;d>=0;d--)f=a.data(e[d],this.widgetFullName),f&&f!==this&&!f.options.disabled&&h.push([a.isFunction(f.options.items)?f.options.items.call(f.element):a(f.options.items,f.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),f]);for(h.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),c=h.length-1;c>=0;c--)h[c][0].each(function(){g.push(this)});return a(g)},_removeCurrentsFromItems:function(){var b=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=a.grep(this.items,function(a){for(var c=0;c<b.length;c++)if(b[c]===a.item[0])return!1;return!0})},_refreshItems:function(b){this.items=[],this.containers=[this];var c,d,e,f,g,h,i,j,k=this.items,l=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]],m=this._connectWith();if(m&&this.ready)for(c=m.length-1;c>=0;c--)for(e=a(m[c]),d=e.length-1;d>=0;d--)f=a.data(e[d],this.widgetFullName),f&&f!==this&&!f.options.disabled&&(l.push([a.isFunction(f.options.items)?f.options.items.call(f.element[0],b,{item:this.currentItem}):a(f.options.items,f.element),f]),this.containers.push(f));for(c=l.length-1;c>=0;c--)for(g=l[c][1],h=l[c][0],d=0,j=h.length;d<j;d++)i=a(h[d]),i.data(this.widgetName+"-item",g),k.push({item:i,instance:g,width:0,height:0,left:0,top:0})},refreshPositions:function(b){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var c,d,e,f;for(c=this.items.length-1;c>=0;c--)d=this.items[c],d.instance!==this.currentContainer&&this.currentContainer&&d.item[0]!==this.currentItem[0]||(e=this.options.toleranceElement?a(this.options.toleranceElement,d.item):d.item,b||(d.width=e.outerWidth(),d.height=e.outerHeight()),f=e.offset(),d.left=f.left,d.top=f.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(c=this.containers.length-1;c>=0;c--)f=this.containers[c].element.offset(),this.containers[c].containerCache.left=f.left,this.containers[c].containerCache.top=f.top,this.containers[c].containerCache.width=this.containers[c].element.outerWidth(),this.containers[c].containerCache.height=this.containers[c].element.outerHeight();return this},_createPlaceholder:function(b){b=b||this;var c,d=b.options;d.placeholder&&d.placeholder.constructor!==String||(c=d.placeholder,d.placeholder={element:function(){var d=b.currentItem[0].nodeName.toLowerCase(),e=a("<"+d+">",b.document[0]).addClass(c||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===d?b.currentItem.children().each(function(){a("<td>&#160;</td>",b.document[0]).attr("colspan",a(this).attr("colspan")||1).appendTo(e)}):"img"===d&&e.attr("src",b.currentItem.attr("src")),c||e.css("visibility","hidden"),e},update:function(a,e){c&&!d.forcePlaceholderSize||(e.height()||e.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10)))}}),b.placeholder=a(d.placeholder.element.call(b.element,b.currentItem)),b.currentItem.after(b.placeholder),d.placeholder.update(b,b.placeholder)},_contactContainers:function(b){var e,f,g,h,i,j,k,l,m,n,o=null,p=null;for(e=this.containers.length-1;e>=0;e--)if(!a.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(o&&a.contains(this.containers[e].element[0],o.element[0]))continue;o=this.containers[e],p=e}else this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",b,this._uiHash(this)),this.containers[e].containerCache.over=0);if(o)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",b,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(g=1e4,h=null,n=o.floating||d(this.currentItem),i=n?"left":"top",j=n?"width":"height",k=this.positionAbs[i]+this.offset.click[i],f=this.items.length-1;f>=0;f--)a.contains(this.containers[p].element[0],this.items[f].item[0])&&this.items[f].item[0]!==this.currentItem[0]&&(n&&!c(this.positionAbs.top+this.offset.click.top,this.items[f].top,this.items[f].height)||(l=this.items[f].item.offset()[i],m=!1,Math.abs(l-k)>Math.abs(l+this.items[f][j]-k)&&(m=!0,l+=this.items[f][j]),Math.abs(l-k)<g&&(g=Math.abs(l-k),h=this.items[f],this.direction=m?"up":"down")));if(!h&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return;h?this._rearrange(b,h,null,!0):this._rearrange(b,null,this.containers[p].element,!0),this._trigger("change",b,this._uiHash()),this.containers[p]._trigger("change",b,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",b,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b,this.currentItem])):"clone"===c.helper?this.currentItem.clone():this.currentItem;return d.parents("body").length||a("parent"!==c.appendTo?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]),d[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")}),d[0].style.width&&!c.forceHelperSize||d.width(this.currentItem.width()),d[0].style.height&&!c.forceHelperSize||d.height(this.currentItem.height()),d},_adjustOffsetFromHelper:function(b){"string"==typeof b&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&a.ui.ie)&&(b={top:0,left:0}),{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.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 b,c,d,e=this.options;"parent"===e.containment&&(e.containment=this.helper[0].parentNode),"document"!==e.containment&&"window"!==e.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a("document"===e.containment?document:window).width()-this.helperProportions.width-this.margins.left,(a("document"===e.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(e.containment)||(b=a(e.containment)[0],c=a(e.containment).offset(),d="hidden"!==a(b).css("overflow"),this.containment=[c.left+(parseInt(a(b).css("borderLeftWidth"),10)||0)+(parseInt(a(b).css("paddingLeft"),10)||0)-this.margins.left,c.top+(parseInt(a(b).css("borderTopWidth"),10)||0)+(parseInt(a(b).css("paddingTop"),10)||0)-this.margins.top,c.left+(d?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(a(b).css("borderLeftWidth"),10)||0)-(parseInt(a(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,c.top+(d?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(a(b).css("borderTopWidth"),10)||0)-(parseInt(a(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(b,c){c||(c=this.position);var d="absolute"===b?1:-1,e="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,f=/(html|body)/i.test(e[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():f?0:e.scrollTop())*d,left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())*d}},_generatePosition:function(b){var c,d,e=this.options,f=b.pageX,g=b.pageY,h="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(h[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&&(b.pageX-this.offset.click.left<this.containment[0]&&(f=this.containment[0]+this.offset.click.left),b.pageY-this.offset.click.top<this.containment[1]&&(g=this.containment[1]+this.offset.click.top),b.pageX-this.offset.click.left>this.containment[2]&&(f=this.containment[2]+this.offset.click.left),b.pageY-this.offset.click.top>this.containment[3]&&(g=this.containment[3]+this.offset.click.top)),e.grid&&(c=this.originalPageY+Math.round((g-this.originalPageY)/e.grid[1])*e.grid[1],g=this.containment?c-this.offset.click.top>=this.containment[1]&&c-this.offset.click.top<=this.containment[3]?c:c-this.offset.click.top>=this.containment[1]?c-e.grid[1]:c+e.grid[1]:c,d=this.originalPageX+Math.round((f-this.originalPageX)/e.grid[0])*e.grid[0],f=this.containment?d-this.offset.click.left>=this.containment[0]&&d-this.offset.click.left<=this.containment[2]?d:d-this.offset.click.left>=this.containment[0]?d-e.grid[0]:d+e.grid[0]:d)),{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():i?0:h.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():i?0:h.scrollLeft())}},_rearrange:function(a,b,c,d){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?b.item[0]:b.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var e=this.counter;this._delay(function(){e===this.counter&&this.refreshPositions(!d)})},_clear:function(a,b){this.reverting=!1;var c,d=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(c in this._storedCSS)"auto"!==this._storedCSS[c]&&"static"!==this._storedCSS[c]||(this._storedCSS[c]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!b&&d.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||b||d.push(function(a){this._trigger("update",a,this._uiHash())}),this!==this.currentContainer&&(b||(d.push(function(a){this._trigger("remove",a,this._uiHash())}),d.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.currentContainer)),d.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.currentContainer)))),c=this.containers.length-1;c>=0;c--)b||d.push(function(a){return function(b){a._trigger("deactivate",b,this._uiHash(this))}}.call(this,this.containers[c])),this.containers[c].containerCache.over&&(d.push(function(a){return function(b){a._trigger("out",b,this._uiHash(this))}}.call(this,this.containers[c])),this.containers[c].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(!b){for(this._trigger("beforeStop",a,this._uiHash()),c=0;c<d.length;c++)d[c].call(this,a);this._trigger("stop",a,this._uiHash())}return this.fromOutside=!1,!1}if(b||this._trigger("beforeStop",a,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!b){for(c=0;c<d.length;c++)d[c].call(this,a);this._trigger("stop",a,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(b){var c=b||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:b?b.element:null}}})}(jQuery),function(a,b){var c="ui-effects-";a.effects={effect:{}},function(a,b){function m(a,b,c){var d=h[b.type]||{};return null==a?c||!b.def?null:b.def:(a=d.floor?~~a:parseFloat(a),isNaN(a)?b.def:d.mod?(a+d.mod)%d.mod:0>a?0:d.max<a?d.max:a)}function n(b){var c=f(),d=c._rgba=[];return b=b.toLowerCase(),l(e,function(a,e){var f,h=e.re.exec(b),i=h&&e.parse(h),j=e.space||"rgba";if(i)return f=c[j](i),c[g[j].cache]=f[g[j].cache],d=c._rgba=f._rgba,!1}),d.length?("0,0,0,0"===d.join()&&a.extend(d,k.transparent),c):k[b]}function o(a,b,c){return c=(c+1)%1,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(2/3-c)*6:a}var k,c="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",d=/^([\-+])=\s*(\d+\.?\d*)/,e=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],f=a.Color=function(b,c,d,e){return new a.Color.fn.parse(b,c,d,e)},g={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},h={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},i=f.support={},j=a("<p>")[0],l=a.each;j.style.cssText="background-color:rgba(1,1,1,.5)",i.rgba=j.style.backgroundColor.indexOf("rgba")>-1,l(g,function(a,b){b.cache="_"+a,b.props.alpha={idx:3,type:"percent",def:1}}),f.fn=a.extend(f.prototype,{parse:function(c,d,e,h){if(c===b)return this._rgba=[null,null,null,null],this;(c.jquery||c.nodeType)&&(c=a(c).css(d),d=b);var i=this,j=a.type(c),o=this._rgba=[];return d!==b&&(c=[c,d,e,h],j="array"),"string"===j?this.parse(n(c)||k._default):"array"===j?(l(g.rgba.props,function(a,b){o[b.idx]=m(c[b.idx],b)}),this):"object"===j?(c instanceof f?l(g,function(a,b){c[b.cache]&&(i[b.cache]=c[b.cache].slice())}):l(g,function(b,d){var e=d.cache;l(d.props,function(a,b){if(!i[e]&&d.to){if("alpha"===a||null==c[a])return;i[e]=d.to(i._rgba)}i[e][b.idx]=m(c[a],b,!0)}),i[e]&&a.inArray(null,i[e].slice(0,3))<0&&(i[e][3]=1,d.from&&(i._rgba=d.from(i[e])))}),this):void 0},is:function(a){var b=f(a),c=!0,d=this;return l(g,function(a,e){var f,g=b[e.cache];return g&&(f=d[e.cache]||e.to&&e.to(d._rgba)||[],l(e.props,function(a,b){if(null!=g[b.idx])return c=g[b.idx]===f[b.idx]})),c}),c},_space:function(){var a=[],b=this;return l(g,function(c,d){b[d.cache]&&a.push(c)}),a.pop()},transition:function(a,b){var c=f(a),d=c._space(),e=g[d],i=0===this.alpha()?f("transparent"):this,j=i[e.cache]||e.to(i._rgba),k=j.slice();return c=c[e.cache],l(e.props,function(a,d){var e=d.idx,f=j[e],g=c[e],i=h[d.type]||{};null!==g&&(null===f?k[e]=g:(i.mod&&(g-f>i.mod/2?f+=i.mod:f-g>i.mod/2&&(f-=i.mod)),k[e]=m((g-f)*b+f,d)))}),this[d](k)},blend:function(b){if(1===this._rgba[3])return this;var c=this._rgba.slice(),d=c.pop(),e=f(b)._rgba;return f(a.map(c,function(a,b){return(1-d)*e[b]+d*a}))},toRgbaString:function(){var b="rgba(",c=a.map(this._rgba,function(a,b){return null==a?b>2?1:0:a});return 1===c[3]&&(c.pop(),b="rgb("),b+c.join()+")"},toHslaString:function(){var b="hsla(",c=a.map(this.hsla(),function(a,b){return null==a&&(a=b>2?1:0),b&&b<3&&(a=Math.round(100*a)+"%"),a});return 1===c[3]&&(c.pop(),b="hsl("),b+c.join()+")"},toHexString:function(b){var c=this._rgba.slice(),d=c.pop();return b&&c.push(~~(255*d)),"#"+a.map(c,function(a){return a=(a||0).toString(16),1===a.length?"0"+a:a}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),f.fn.parse.prototype=f.fn,g.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var k,l,b=a[0]/255,c=a[1]/255,d=a[2]/255,e=a[3],f=Math.max(b,c,d),g=Math.min(b,c,d),h=f-g,i=f+g,j=.5*i;return k=g===f?0:b===f?60*(c-d)/h+360:c===f?60*(d-b)/h+120:60*(b-c)/h+240,l=0===h?0:j<=.5?h/i:h/(2-i),[Math.round(k)%360,l,j,null==e?1:e]},g.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/360,c=a[1],d=a[2],e=a[3],f=d<=.5?d*(1+c):d+c-d*c,g=2*d-f;return[Math.round(255*o(g,f,b+1/3)),Math.round(255*o(g,f,b)),Math.round(255*o(g,f,b-1/3)),e]},l(g,function(c,e){var g=e.props,h=e.cache,i=e.to,j=e.from;f.fn[c]=function(c){if(i&&!this[h]&&(this[h]=i(this._rgba)),c===b)return this[h].slice();var d,e=a.type(c),k="array"===e||"object"===e?c:arguments,n=this[h].slice();return l(g,function(a,b){var c=k["object"===e?a:b.idx];null==c&&(c=n[b.idx]),n[b.idx]=m(c,b)}),j?(d=f(j(n)),d[h]=n,d):f(n)},l(g,function(b,e){f.fn[b]||(f.fn[b]=function(f){var k,g=a.type(f),h="alpha"===b?this._hsla?"hsla":"rgba":c,i=this[h](),j=i[e.idx];return"undefined"===g?j:("function"===g&&(f=f.call(this,j),g=a.type(f)),null==f&&e.empty?this:("string"===g&&(k=d.exec(f),k&&(f=j+parseFloat(k[2])*("+"===k[1]?1:-1))),i[e.idx]=f,this[h](i)))})})}),f.hook=function(b){var c=b.split(" ");l(c,function(b,c){a.cssHooks[c]={set:function(b,d){var e,g,h="";if("transparent"!==d&&("string"!==a.type(d)||(e=n(d)))){if(d=f(e||d),!i.rgba&&1!==d._rgba[3]){for(g="backgroundColor"===c?b.parentNode:b;(""===h||"transparent"===h)&&g&&g.style;)try{h=a.css(g,"backgroundColor"),g=g.parentNode}catch(a){}d=d.blend(h&&"transparent"!==h?h:"_default")}d=d.toRgbaString()}try{b.style[c]=d}catch(a){}}},a.fx.step[c]=function(b){b.colorInit||(b.start=f(b.elem,c),b.end=f(b.end),b.colorInit=!0),a.cssHooks[c].set(b.elem,b.start.transition(b.end,b.pos))}})},f.hook(c),a.cssHooks.borderColor={expand:function(a){var b={};return l(["Top","Right","Bottom","Left"],function(c,d){b["border"+d+"Color"]=a}),b}},k=a.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function e(b){var c,d,e=b.ownerDocument.defaultView?b.ownerDocument.defaultView.getComputedStyle(b,null):b.currentStyle,f={};if(e&&e.length&&e[0]&&e[e[0]])for(d=e.length;d--;)c=e[d],"string"==typeof e[c]&&(f[a.camelCase(c)]=e[c]);else for(c in e)"string"==typeof e[c]&&(f[c]=e[c]);return f}function f(b,c){var f,g,e={};for(f in c)g=c[f],b[f]!==g&&(d[f]||!a.fx.step[f]&&isNaN(parseFloat(g))||(e[f]=g));return e}var c=["add","remove","toggle"],d={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(b,c){a.fx.step[c]=function(a){("none"!==a.end&&!a.setAttr||1===a.pos&&!a.setAttr)&&(jQuery.style(a.elem,c,a.end),a.setAttr=!0)}}),a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),a.effects.animateClass=function(b,d,g,h){var i=a.speed(d,g,h);return this.queue(function(){var h,d=a(this),g=d.attr("class")||"",j=i.children?d.find("*").addBack():d;j=j.map(function(){var b=a(this);return{el:b,start:e(this)}}),h=function(){a.each(c,function(a,c){b[c]&&d[c+"Class"](b[c])})},h(),j=j.map(function(){return this.end=e(this.el[0]),this.diff=f(this.start,this.end),this}),d.attr("class",g),j=j.map(function(){var b=this,c=a.Deferred(),d=a.extend({},i,{queue:!1,complete:function(){c.resolve(b)}});return this.el.animate(this.diff,d),c.promise()}),a.when.apply(a,j.get()).done(function(){h(),a.each(arguments,function(){var b=this.el;a.each(this.diff,function(a){b.css(a,"")})}),i.complete.call(d[0])})})},a.fn.extend({addClass:function(b){return function(c,d,e,f){return d?a.effects.animateClass.call(this,{add:c},d,e,f):b.apply(this,arguments)}}(a.fn.addClass),removeClass:function(b){return function(c,d,e,f){return arguments.length>1?a.effects.animateClass.call(this,{remove:c},d,e,f):b.apply(this,arguments)}}(a.fn.removeClass),toggleClass:function(c){return function(d,e,f,g,h){return"boolean"==typeof e||e===b?f?a.effects.animateClass.call(this,e?{add:d}:{remove:d},f,g,h):c.apply(this,arguments):a.effects.animateClass.call(this,{toggle:d},e,f,g)}}(a.fn.toggleClass),switchClass:function(b,c,d,e,f){return a.effects.animateClass.call(this,{add:c,remove:b},d,e,f)}})}(),function(){function d(b,c,d,e){return a.isPlainObject(b)&&(c=b,b=b.effect),b={effect:b},null==c&&(c={}),a.isFunction(c)&&(e=c,d=null,c={}),("number"==typeof c||a.fx.speeds[c])&&(e=d,d=c,c={}),a.isFunction(d)&&(e=d,d=null),c&&a.extend(b,c),d=d||c.duration,b.duration=a.fx.off?0:"number"==typeof d?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default,b.complete=e||c.complete,b}function e(b){return!(b&&"number"!=typeof b&&!a.fx.speeds[b])||("string"==typeof b&&!a.effects.effect[b]||(!!a.isFunction(b)||"object"==typeof b&&!b.effect))}a.extend(a.effects,{version:"1.10.3",save:function(a,b){for(var d=0;d<b.length;d++)null!==b[d]&&a.data(c+b[d],a[0].style[b[d]])},restore:function(a,d){var e,f;for(f=0;f<d.length;f++)null!==d[f]&&(e=a.data(c+d[f]),e===b&&(e=""),a.css(d[f],e))},setMode:function(a,b){return"toggle"===b&&(b=a.is(":hidden")?"show":"hide"),b},getBaseline:function(a,b){var c,d;switch(a[0]){case"top":c=0;break;case"middle":c=.5;break;case"bottom":c=1;break;default:c=a[0]/b.height}switch(a[1]){case"left":d=0;break;case"center":d=.5;break;case"right":d=1;break;default:d=a[1]/b.width}return{x:d,y:c}},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(!0),height:b.outerHeight(!0),float:b.css("float")},d=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:b.width(),height:b.height()},f=document.activeElement;try{f.id}catch(a){f=document.body}return b.wrap(d),(b[0]===f||a.contains(b[0],f))&&a(f).focus(),d=b.parent(),"static"===b.css("position")?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),b.css(e),d.css(c).show()},removeWrapper:function(b){var c=document.activeElement;return b.parent().is(".ui-effects-wrapper")&&(b.parent().replaceWith(b),(b[0]===c||a.contains(b[0],c))&&a(c).focus()),b},setTransition:function(b,c,d,e){return e=e||{},a.each(c,function(a,c){var f=b.cssUnit(c);f[0]>0&&(e[c]=f[0]*d+f[1])}),e}}),a.fn.extend({effect:function(){function g(c){function h(){a.isFunction(e)&&e.call(d[0]),a.isFunction(c)&&c()}var d=a(this),e=b.complete,g=b.mode;(d.is(":hidden")?"hide"===g:"show"===g)?(d[g](),h()):f.call(d[0],b,h)}var b=d.apply(this,arguments),c=b.mode,e=b.queue,f=a.effects.effect[b.effect];return a.fx.off||!f?c?this[c](b.duration,b.complete):this.each(function(){b.complete&&b.complete.call(this)}):e===!1?this.each(g):this.queue(e||"fx",g)},show:function(a){return function(b){if(e(b))return a.apply(this,arguments);var c=d.apply(this,arguments);return c.mode="show",this.effect.call(this,c)}}(a.fn.show),hide:function(a){return function(b){if(e(b))return a.apply(this,arguments);var c=d.apply(this,arguments);return c.mode="hide",this.effect.call(this,c)}}(a.fn.hide),toggle:function(a){return function(b){if(e(b)||"boolean"==typeof b)return a.apply(this,arguments);var c=d.apply(this,arguments);return c.mode="toggle",this.effect.call(this,c)}}(a.fn.toggle),cssUnit:function(b){var c=this.css(b),d=[];return a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])}),d}})}(),function(){var b={};a.each(["Quad","Cubic","Quart","Quint","Expo"],function(a,c){b[c]=function(b){return Math.pow(b,a+2)}}),a.extend(b,{Sine:function(a){return 1-Math.cos(a*Math.PI/2)},Circ:function(a){return 1-Math.sqrt(1-a*a)},Elastic:function(a){return 0===a||1===a?a:-Math.pow(2,8*(a-1))*Math.sin((80*(a-1)-7.5)*Math.PI/15)},Back:function(a){return a*a*(3*a-2)},Bounce:function(a){for(var b,c=4;a<((b=Math.pow(2,--c))-1)/11;);return 1/Math.pow(4,3-c)-7.5625*Math.pow((3*b-2)/22-a,2)}}),a.each(b,function(b,c){a.easing["easeIn"+b]=c,a.easing["easeOut"+b]=function(a){return 1-c(1-a)},a.easing["easeInOut"+b]=function(a){return a<.5?c(2*a)/2:1-c(a*-2+2)/2}})}()}(jQuery),function(a,b){var c=0,d={},e={};d.height=d.paddingTop=d.paddingBottom=d.borderTopWidth=d.borderBottomWidth="hide",e.height=e.paddingTop=e.paddingBottom=e.borderTopWidth=e.borderBottomWidth="show",a.widget("ui.accordion",{version:"1.10.3",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var b=this.options;this.prevShow=this.prevHide=a(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),b.collapsible||b.active!==!1&&null!=b.active||(b.active=0),this._processPanels(),b.active<0&&(b.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():a(),content:this.active.length?this.active.next():a()}},_createIcons:function(){var b=this.options.icons;b&&(a("<span>").addClass("ui-accordion-header-icon ui-icon "+b.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(b.header).addClass(b.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var a;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),a=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&a.css("height","")},_setOption:function(a,b){return"active"===a?void this._activate(b):("event"===a&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(b)),this._super(a,b),"collapsible"!==a||b||this.options.active!==!1||this._activate(0),"icons"===a&&(this._destroyIcons(),b&&this._createIcons()),void("disabled"===a&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!b)))},_keydown:function(b){if(!b.altKey&&!b.ctrlKey){var c=a.ui.keyCode,d=this.headers.length,e=this.headers.index(b.target),f=!1;switch(b.keyCode){case c.RIGHT:case c.DOWN:f=this.headers[(e+1)%d];break;case c.LEFT:case c.UP:f=this.headers[(e-1+d)%d];break;case c.SPACE:case c.ENTER:this._eventHandler(b);break;case c.HOME:f=this.headers[0];break;case c.END:f=this.headers[d-1]}f&&(a(b.target).attr("tabIndex",-1),a(f).attr("tabIndex",0),f.focus(),b.preventDefault())}},_panelKeyDown:function(b){b.keyCode===a.ui.keyCode.UP&&b.ctrlKey&&a(b.currentTarget).prev().focus()},refresh:function(){var b=this.options;this._processPanels(),b.active===!1&&b.collapsible===!0||!this.headers.length?(b.active=!1,this.active=a()):b.active===!1?this._activate(0):this.active.length&&!a.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(b.active=!1,this.active=a()):this._activate(Math.max(0,b.active-1)):b.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var b,d=this.options,e=d.heightStyle,f=this.element.parent(),g=this.accordionId="ui-accordion-"+(this.element.attr("id")||++c);this.active=this._findActive(d.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(b){var c=a(this),d=c.attr("id"),e=c.next(),f=e.attr("id");d||(d=g+"-header-"+b,c.attr("id",d)),f||(f=g+"-panel-"+b,e.attr("id",f)),c.attr("aria-controls",f),e.attr("aria-labelledby",d)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(d.event),"fill"===e?(b=f.height(),this.element.siblings(":visible").each(function(){var c=a(this),d=c.css("position");"absolute"!==d&&"fixed"!==d&&(b-=c.outerHeight(!0))}),this.headers.each(function(){b-=a(this).outerHeight(!0)}),this.headers.next().each(function(){a(this).height(Math.max(0,b-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):"auto"===e&&(b=0,this.headers.next().each(function(){b=Math.max(b,a(this).css("height","").height())}).height(b))},_activate:function(b){var c=this._findActive(b)[0];c!==this.active[0]&&(c=c||this.active[0],this._eventHandler({target:c,currentTarget:c,preventDefault:a.noop}))},_findActive:function(b){return"number"==typeof b?this.headers.eq(b):a()},_setupEvents:function(b){var c={keydown:"_keydown"};b&&a.each(b.split(" "),function(a,b){c[b]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,c),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(b){var c=this.options,d=this.active,e=a(b.currentTarget),f=e[0]===d[0],g=f&&c.collapsible,h=g?a():e.next(),i=d.next(),j={oldHeader:d,oldPanel:i,newHeader:g?a():e,newPanel:h};b.preventDefault(),f&&!c.collapsible||this._trigger("beforeActivate",b,j)===!1||(c.active=!g&&this.headers.index(e),this.active=f?a():e,this._toggle(j),d.removeClass("ui-accordion-header-active ui-state-active"),c.icons&&d.children(".ui-accordion-header-icon").removeClass(c.icons.activeHeader).addClass(c.icons.header),f||(e.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),c.icons&&e.children(".ui-accordion-header-icon").removeClass(c.icons.header).addClass(c.icons.activeHeader),e.next().addClass("ui-accordion-content-active")))},_toggle:function(b){var c=b.newPanel,d=this.prevShow.length?this.prevShow:b.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=c,this.prevHide=d,this.options.animate?this._animate(c,d,b):(d.hide(),c.show(),this._toggleComplete(b)),d.attr({"aria-expanded":"false","aria-hidden":"true"}),d.prev().attr("aria-selected","false"),c.length&&d.length?d.prev().attr("tabIndex",-1):c.length&&this.headers.filter(function(){return 0===a(this).attr("tabIndex")}).attr("tabIndex",-1),c.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(a,b,c){var f,g,h,i=this,j=0,k=a.length&&(!b.length||a.index()<b.index()),l=this.options.animate||{},m=k&&l.down||l,n=function(){i._toggleComplete(c)};return"number"==typeof m&&(h=m),"string"==typeof m&&(g=m),g=g||m.easing||l.easing,h=h||m.duration||l.duration,b.length?a.length?(f=a.show().outerHeight(),b.animate(d,{duration:h,easing:g,step:function(a,b){b.now=Math.round(a)}}),void a.hide().animate(e,{duration:h,easing:g,complete:n,step:function(a,c){c.now=Math.round(a),"height"!==c.prop?j+=c.now:"content"!==i.options.heightStyle&&(c.now=Math.round(f-b.outerHeight()-j),j=0)}})):b.animate(d,h,g,n):a.animate(e,h,g,n)},_toggleComplete:function(a){var b=a.oldPanel;b.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),b.length&&(b.parent()[0].className=b.parent()[0].className),this._trigger("activate",null,a)}})}(jQuery),function(a,b){var c=0;a.widget("ui.autocomplete",{version:"1.10.3",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},pending:0,_create:function(){var b,c,d,e=this.element[0].nodeName.toLowerCase(),f="textarea"===e,g="input"===e;this.isMultiLine=!!f||!g&&this.element.prop("isContentEditable"),this.valueMethod=this.element[f||g?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(e){if(this.element.prop("readOnly"))return b=!0,d=!0,void(c=!0);b=!1,d=!1,c=!1;var f=a.ui.keyCode;switch(e.keyCode){case f.PAGE_UP:b=!0,this._move("previousPage",e);break;case f.PAGE_DOWN:b=!0,this._move("nextPage",e);break;case f.UP:b=!0,this._keyEvent("previous",e);break;case f.DOWN:b=!0,this._keyEvent("next",e);break;case f.ENTER:case f.NUMPAD_ENTER:this.menu.active&&(b=!0,e.preventDefault(),this.menu.select(e));break;case f.TAB:this.menu.active&&this.menu.select(e);break;case f.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(e),e.preventDefault());break;default:c=!0,this._searchTimeout(e)}},keypress:function(d){if(b)return b=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||d.preventDefault());if(!c){var e=a.ui.keyCode;switch(d.keyCode){case e.PAGE_UP:this._move("previousPage",d);break;case e.PAGE_DOWN:this._move("nextPage",d);break;case e.UP:this._keyEvent("previous",d);break;case e.DOWN:this._keyEvent("next",d)}}},input:function(a){return d?(d=!1,void a.preventDefault()):void this._searchTimeout(a)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(a){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(a),void this._change(a))}}),this._initSource(),this.menu=a("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(b){b.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var c=this.menu.element[0];a(b.target).closest(".ui-menu-item").length||this._delay(function(){var b=this;this.document.one("mousedown",function(d){d.target===b.element[0]||d.target===c||a.contains(c,d.target)||b.close()})})},menufocus:function(b,c){if(this.isNewMenu&&(this.isNewMenu=!1,b.originalEvent&&/^mouse/.test(b.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){a(b.target).trigger(b.originalEvent)});var d=c.item.data("ui-autocomplete-item");!1!==this._trigger("focus",b,{item:d})?b.originalEvent&&/^key/.test(b.originalEvent.type)&&this._value(d.value):this.liveRegion.text(d.value)},menuselect:function(a,b){var c=b.item.data("ui-autocomplete-item"),d=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=d,this._delay(function(){this.previous=d,this.selectedItem=c})),!1!==this._trigger("select",a,{item:c})&&this._value(c.value),this.term=this._value(),this.close(a),this.selectedItem=c}}),this.liveRegion=a("<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(a,b){this._super(a,b),"source"===a&&this._initSource(),"appendTo"===a&&this.menu.element.appendTo(this._appendTo()),"disabled"===a&&b&&this.xhr&&this.xhr.abort()},_appendTo:function(){var b=this.options.appendTo;return b&&(b=b.jquery||b.nodeType?a(b):this.document.find(b).eq(0)),b||(b=this.element.closest(".ui-front")),b.length||(b=this.document[0].body),b},_initSource:function(){var b,c,d=this;a.isArray(this.options.source)?(b=this.options.source,this.source=function(c,d){d(a.ui.autocomplete.filter(b,c.term))}):"string"==typeof this.options.source?(c=this.options.source,this.source=function(b,e){d.xhr&&d.xhr.abort(),d.xhr=a.ajax({url:c,data:b,dataType:"json",success:function(a){e(a)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(a){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,a))},this.options.delay)},search:function(a,b){return a=null!=a?a:this._value(),this.term=this._value(),a.length<this.options.minLength?this.close(b):this._trigger("search",b)!==!1?this._search(a):void 0},_search:function(a){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:a},this._response())},_response:function(){var a=this,b=++c;return function(d){b===c&&a.__response(d),a.pending--,a.pending||a.element.removeClass("ui-autocomplete-loading")}},__response:function(a){a&&(a=this._normalize(a)),this._trigger("response",null,{content:a}),!this.options.disabled&&a&&a.length&&!this.cancelSearch?(this._suggest(a),this._trigger("open")):this._close()},close:function(a){this.cancelSearch=!0,this._close(a)},_close:function(a){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",a))},_change:function(a){this.previous!==this._value()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(b){return b.length&&b[0].label&&b[0].value?b:a.map(b,function(b){return"string"==typeof b?{label:b,value:b}:a.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(b){var c=this.menu.element.empty();this._renderMenu(c,b),this.isNewMenu=!0,this.menu.refresh(),c.show(),this._resizeMenu(),c.position(a.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(b,c){var d=this;a.each(c,function(a,c){d._renderItemData(b,c)})},_renderItemData:function(a,b){return this._renderItem(a,b).data("ui-autocomplete-item",b)},_renderItem:function(b,c){return a("<li>").append(a("<a>").text(c.label)).appendTo(b)},_move:function(a,b){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(a)||this.menu.isLastItem()&&/^next/.test(a)?(this._value(this.term),void this.menu.blur()):void this.menu[a](b):void this.search(null,b)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(a,b){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(a,b),b.preventDefault())}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(b,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}}),a.widget("ui.autocomplete",a.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(a){return a+(a>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(a){var b;this._superApply(arguments),this.options.disabled||this.cancelSearch||(b=a&&a.length?this.options.messages.results(a.length):this.options.messages.noResults,this.liveRegion.text(b))}})}(jQuery),function(a,b){var c,d,e,f,g="ui-button ui-widget ui-state-default ui-corner-all",h="ui-state-hover ui-state-active ",i="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",j=function(){var b=a(this);setTimeout(function(){b.find(":ui-button").button("refresh")},1)},k=function(b){var c=b.name,d=b.form,e=a([]);return c&&(c=c.replace(/'/g,"\\'"),e=d?a(d).find("[name='"+c+"']"):a("[name='"+c+"']",b.ownerDocument).filter(function(){return!this.form})),e};a.widget("ui.button",{version:"1.10.3",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,j),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var b=this,h=this.options,i="checkbox"===this.type||"radio"===this.type,l=i?"":"ui-state-active",m="ui-state-focus";null===h.label&&(h.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(g).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){h.disabled||this===c&&a(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){h.disabled||a(this).removeClass(l)}).bind("click"+this.eventNamespace,function(a){h.disabled&&(a.preventDefault(),a.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){b.buttonElement.addClass(m)}).bind("blur"+this.eventNamespace,function(){b.buttonElement.removeClass(m)}),i&&(this.element.bind("change"+this.eventNamespace,function(){f||b.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(a){h.disabled||(f=!1,d=a.pageX,e=a.pageY)}).bind("mouseup"+this.eventNamespace,function(a){h.disabled||d===a.pageX&&e===a.pageY||(f=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(h.disabled||f)return!1}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(h.disabled||f)return!1;a(this).addClass("ui-state-active"),b.buttonElement.attr("aria-pressed","true");var c=b.element[0];k(c).not(c).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return!h.disabled&&(a(this).addClass("ui-state-active"),c=this,void b.document.one("mouseup",function(){c=null}))}).bind("mouseup"+this.eventNamespace,function(){return!h.disabled&&void a(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(b){return!h.disabled&&void(b.keyCode!==a.ui.keyCode.SPACE&&b.keyCode!==a.ui.keyCode.ENTER||a(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){a(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(b){b.keyCode===a.ui.keyCode.SPACE&&a(this).click()})),this._setOption("disabled",h.disabled),this._resetButton()},_determineButtonType:function(){var a,b,c;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button","checkbox"===this.type||"radio"===this.type?(a=this.element.parents().last(),b="label[for='"+this.element.attr("id")+"']",this.buttonElement=a.find(b),this.buttonElement.length||(a=a.length?a.siblings():this.element.siblings(),this.buttonElement=a.filter(b),this.buttonElement.length||(this.buttonElement=a.find(b))),this.element.addClass("ui-helper-hidden-accessible"),c=this.element.is(":checked"),c&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",c)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(g+" "+h+" "+i).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(a,b){return this._super(a,b),"disabled"===a?void(b?this.element.prop("disabled",!0):this.element.prop("disabled",!1)):void this._resetButton()},refresh:function(){var b=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");b!==this.options.disabled&&this._setOption("disabled",b),"radio"===this.type?k(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var b=this.buttonElement.removeClass(i),c=a("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,e=d.primary&&d.secondary,f=[];d.primary||d.secondary?(this.options.text&&f.push("ui-button-text-icon"+(e?"s":d.primary?"-primary":"-secondary")),d.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>"),d.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>"),this.options.text||(f.push(e?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||b.attr("title",a.trim(c)))):f.push("ui-button-text-only"),b.addClass(f.join(" "))}}),a.widget("ui.buttonset",{version:"1.10.3",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,b){"disabled"===a&&this.buttons.button("option",a,b),this._super(a,b)},refresh:function(){var b="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(b?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery),function(a,b){function e(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},a.extend(this._defaults,this.regional[""]),this.dpDiv=f(a("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function f(b){var c="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return b.delegate(c,"mouseout",function(){a(this).removeClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&a(this).removeClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&a(this).removeClass("ui-datepicker-next-hover")}).delegate(c,"mouseover",function(){a.datepicker._isDisabledDatepicker(d.inline?b.parent()[0]:d.input[0])||(a(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),a(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&a(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&a(this).addClass("ui-datepicker-next-hover"))})}function g(b,c){a.extend(b,c);for(var d in c)null==c[d]&&(b[d]=c[d]);return b}a.extend(a.ui,{datepicker:{version:"1.10.3"}});var d,c="datepicker";a.extend(e.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return g(this._defaults,a||{}),this},_attachDatepicker:function(b,c){var d,e,f;d=b.nodeName.toLowerCase(),e="div"===d||"span"===d,b.id||(this.uuid+=1,b.id="dp"+this.uuid),f=this._newInst(a(b),e),f.settings=a.extend({},c||{}),"input"===d?this._connectDatepicker(b,f):e&&this._inlineDatepicker(b,f)},_newInst:function(b,c){var d=b[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:d,input:b,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:c,dpDiv:c?f(a("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(b,d){var e=a(b);d.append=a([]),d.trigger=a([]),e.hasClass(this.markerClassName)||(this._attachments(e,d),e.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(d),a.data(b,c,d),d.settings.disabled&&this._disableDatepicker(b))},_attachments:function(b,c){var d,e,f,g=this._get(c,"appendText"),h=this._get(c,"isRTL");c.append&&c.append.remove(),g&&(c.append=a("<span class='"+this._appendClass+"'>"+g+"</span>"),b[h?"before":"after"](c.append)),b.unbind("focus",this._showDatepicker),c.trigger&&c.trigger.remove(),d=this._get(c,"showOn"),"focus"!==d&&"both"!==d||b.focus(this._showDatepicker),"button"!==d&&"both"!==d||(e=this._get(c,"buttonText"),f=this._get(c,"buttonImage"),c.trigger=a(this._get(c,"buttonImageOnly")?a("<img/>").addClass(this._triggerClass).attr({src:f,alt:e,title:e}):a("<button type='button'></button>").addClass(this._triggerClass).html(f?a("<img/>").attr({src:f,alt:e,title:e}):e)),b[h?"before":"after"](c.trigger),c.trigger.click(function(){return a.datepicker._datepickerShowing&&a.datepicker._lastInput===b[0]?a.datepicker._hideDatepicker():a.datepicker._datepickerShowing&&a.datepicker._lastInput!==b[0]?(a.datepicker._hideDatepicker(),a.datepicker._showDatepicker(b[0])):a.datepicker._showDatepicker(b[0]),!1}))},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b,c,d,e,f=new Date(2009,11,20),g=this._get(a,"dateFormat");g.match(/[DM]/)&&(b=function(a){for(c=0,d=0,e=0;e<a.length;e++)a[e].length>c&&(c=a[e].length,d=e);return d},f.setMonth(b(this._get(a,g.match(/MM/)?"monthNames":"monthNamesShort"))),f.setDate(b(this._get(a,g.match(/DD/)?"dayNames":"dayNamesShort"))+20-f.getDay())),a.input.attr("size",this._formatDate(a,f).length)}},_inlineDatepicker:function(b,d){var e=a(b);e.hasClass(this.markerClassName)||(e.addClass(this.markerClassName).append(d.dpDiv),a.data(b,c,d),this._setDate(d,this._getDefaultDate(d),!0),this._updateDatepicker(d),this._updateAlternate(d),d.settings.disabled&&this._disableDatepicker(b),d.dpDiv.css("display","block"))},_dialogDatepicker:function(b,d,e,f,h){var i,j,k,l,m,n=this._dialogInst;return n||(this.uuid+=1,i="dp"+this.uuid,this._dialogInput=a("<input type='text' id='"+i+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),a("body").append(this._dialogInput),n=this._dialogInst=this._newInst(this._dialogInput,!1),n.settings={},a.data(this._dialogInput[0],c,n)),g(n.settings,f||{}),d=d&&d.constructor===Date?this._formatDate(n,d):d,this._dialogInput.val(d),this._pos=h?h.length?h:[h.pageX,h.pageY]:null,this._pos||(j=document.documentElement.clientWidth,k=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,m=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[j/2-100+l,k/2-150+m]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),n.settings.onSelect=e,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),a.blockUI&&a.blockUI(this.dpDiv),a.data(this._dialogInput[0],c,n),this},_destroyDatepicker:function(b){var d,e=a(b),f=a.data(b,c);e.hasClass(this.markerClassName)&&(d=b.nodeName.toLowerCase(),a.removeData(b,c),"input"===d?(f.append.remove(),f.trigger.remove(),e.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!==d&&"span"!==d||e.removeClass(this.markerClassName).empty())},_enableDatepicker:function(b){var d,e,f=a(b),g=a.data(b,c);f.hasClass(this.markerClassName)&&(d=b.nodeName.toLowerCase(),"input"===d?(b.disabled=!1,g.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==d&&"span"!==d||(e=f.children("."+this._inlineClass),e.children().removeClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=a.map(this._disabledInputs,function(a){return a===b?null:a}))},_disableDatepicker:function(b){var d,e,f=a(b),g=a.data(b,c);f.hasClass(this.markerClassName)&&(d=b.nodeName.toLowerCase(),"input"===d?(b.disabled=!0,g.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==d&&"span"!==d||(e=f.children("."+this._inlineClass),e.children().addClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=a.map(this._disabledInputs,function(a){return a===b?null:a}),this._disabledInputs[this._disabledInputs.length]=b)},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]===a)return!0;return!1},_getInst:function(b){try{return a.data(b,c)}catch(a){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(c,d,e){var f,h,i,j,k=this._getInst(c);return 2===arguments.length&&"string"==typeof d?"defaults"===d?a.extend({},a.datepicker._defaults):k?"all"===d?a.extend({},k.settings):this._get(k,d):null:(f=d||{},"string"==typeof d&&(f={},f[d]=e),void(k&&(this._curInst===k&&this._hideDatepicker(),h=this._getDateDatepicker(c,!0),i=this._getMinMaxDate(k,"min"),j=this._getMinMaxDate(k,"max"),g(k.settings,f),null!==i&&f.dateFormat!==b&&f.minDate===b&&(k.settings.minDate=this._formatDate(k,i)),null!==j&&f.dateFormat!==b&&f.maxDate===b&&(k.settings.maxDate=this._formatDate(k,j)),"disabled"in f&&(f.disabled?this._disableDatepicker(c):this._enableDatepicker(c)),this._attachments(a(c),k),this._autoSize(k),this._setDate(k,h),this._updateAlternate(k),this._updateDatepicker(k))))},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){var b=this._getInst(a);b&&this._updateDatepicker(b)},_setDateDatepicker:function(a,b){var c=this._getInst(a);c&&(this._setDate(c,b),this._updateDatepicker(c),this._updateAlternate(c))},_getDateDatepicker:function(a,b){var c=this._getInst(a);return c&&!c.inline&&this._setDateFromField(c,b),c?this._getDate(c):null},_doKeyDown:function(b){var c,d,e,f=a.datepicker._getInst(b.target),g=!0,h=f.dpDiv.is(".ui-datepicker-rtl");if(f._keyEvent=!0,a.datepicker._datepickerShowing)switch(b.keyCode){case 9:a.datepicker._hideDatepicker(),g=!1;break;case 13:return e=a("td."+a.datepicker._dayOverClass+":not(."+a.datepicker._currentClass+")",f.dpDiv),e[0]&&a.datepicker._selectDay(b.target,f.selectedMonth,f.selectedYear,e[0]),c=a.datepicker._get(f,"onSelect"),c?(d=a.datepicker._formatDate(f),c.apply(f.input?f.input[0]:null,[d,f])):a.datepicker._hideDatepicker(),!1;case 27:a.datepicker._hideDatepicker();break;case 33:a.datepicker._adjustDate(b.target,b.ctrlKey?-a.datepicker._get(f,"stepBigMonths"):-a.datepicker._get(f,"stepMonths"),"M");break;case 34:a.datepicker._adjustDate(b.target,b.ctrlKey?+a.datepicker._get(f,"stepBigMonths"):+a.datepicker._get(f,"stepMonths"),"M");break;case 35:(b.ctrlKey||b.metaKey)&&a.datepicker._clearDate(b.target),g=b.ctrlKey||b.metaKey;break;case 36:(b.ctrlKey||b.metaKey)&&a.datepicker._gotoToday(b.target),g=b.ctrlKey||b.metaKey;break;case 37:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,h?1:-1,"D"),g=b.ctrlKey||b.metaKey,b.originalEvent.altKey&&a.datepicker._adjustDate(b.target,b.ctrlKey?-a.datepicker._get(f,"stepBigMonths"):-a.datepicker._get(f,"stepMonths"),"M");break;case 38:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,-7,"D"),g=b.ctrlKey||b.metaKey;break;case 39:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,h?-1:1,"D"),g=b.ctrlKey||b.metaKey,b.originalEvent.altKey&&a.datepicker._adjustDate(b.target,b.ctrlKey?+a.datepicker._get(f,"stepBigMonths"):+a.datepicker._get(f,"stepMonths"),"M");break;case 40:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,7,"D"),g=b.ctrlKey||b.metaKey;break;default:g=!1}else 36===b.keyCode&&b.ctrlKey?a.datepicker._showDatepicker(this):g=!1;g&&(b.preventDefault(),b.stopPropagation())},_doKeyPress:function(b){var c,d,e=a.datepicker._getInst(b.target);if(a.datepicker._get(e,"constrainInput"))return c=a.datepicker._possibleChars(a.datepicker._get(e,"dateFormat")),d=String.fromCharCode(null==b.charCode?b.keyCode:b.charCode),b.ctrlKey||b.metaKey||d<" "||!c||c.indexOf(d)>-1},_doKeyUp:function(b){var c,d=a.datepicker._getInst(b.target);if(d.input.val()!==d.lastVal)try{c=a.datepicker.parseDate(a.datepicker._get(d,"dateFormat"),d.input?d.input.val():null,a.datepicker._getFormatConfig(d)),c&&(a.datepicker._setDateFromField(d),a.datepicker._updateAlternate(d),a.datepicker._updateDatepicker(d))}catch(a){}return!0},_showDatepicker:function(b){if(b=b.target||b,"input"!==b.nodeName.toLowerCase()&&(b=a("input",b.parentNode)[0]),!a.datepicker._isDisabledDatepicker(b)&&a.datepicker._lastInput!==b){var c,d,e,f,h,i,j;c=a.datepicker._getInst(b),a.datepicker._curInst&&a.datepicker._curInst!==c&&(a.datepicker._curInst.dpDiv.stop(!0,!0),c&&a.datepicker._datepickerShowing&&a.datepicker._hideDatepicker(a.datepicker._curInst.input[0])),d=a.datepicker._get(c,"beforeShow"),e=d?d.apply(b,[b,c]):{},e!==!1&&(g(c.settings,e),c.lastVal=null,a.datepicker._lastInput=b,a.datepicker._setDateFromField(c),a.datepicker._inDialog&&(b.value=""),a.datepicker._pos||(a.datepicker._pos=a.datepicker._findPos(b),a.datepicker._pos[1]+=b.offsetHeight),f=!1,a(b).parents().each(function(){return f|="fixed"===a(this).css("position"),!f}),h={left:a.datepicker._pos[0],top:a.datepicker._pos[1]},a.datepicker._pos=null,c.dpDiv.empty(),c.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),a.datepicker._updateDatepicker(c),h=a.datepicker._checkOffset(c,h,f),c.dpDiv.css({position:a.datepicker._inDialog&&a.blockUI?"static":f?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),c.inline||(i=a.datepicker._get(c,"showAnim"),j=a.datepicker._get(c,"duration"),c.dpDiv.zIndex(a(b).zIndex()+1),a.datepicker._datepickerShowing=!0,a.effects&&a.effects.effect[i]?c.dpDiv.show(i,a.datepicker._get(c,"showOptions"),j):c.dpDiv[i||"show"](i?j:null),a.datepicker._shouldFocusInput(c)&&c.input.focus(),a.datepicker._curInst=c))}},_updateDatepicker:function(b){this.maxRows=4,d=b,b.dpDiv.empty().append(this._generateHTML(b)),this._attachHandlers(b),b.dpDiv.find("."+this._dayOverClass+" a").mouseover();var c,e=this._getNumberOfMonths(b),f=e[1],g=17;b.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),f>1&&b.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",g*f+"em"),b.dpDiv[(1!==e[0]||1!==e[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),b.dpDiv[(this._get(b,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),b===a.datepicker._curInst&&a.datepicker._datepickerShowing&&a.datepicker._shouldFocusInput(b)&&b.input.focus(),b.yearshtml&&(c=b.yearshtml,setTimeout(function(){c===b.yearshtml&&b.yearshtml&&b.dpDiv.find("select.ui-datepicker-year:first").replaceWith(b.yearshtml),c=b.yearshtml=null},0))},_shouldFocusInput:function(a){return a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&!a.input.is(":focus")},_checkOffset:function(b,c,d){var e=b.dpDiv.outerWidth(),f=b.dpDiv.outerHeight(),g=b.input?b.input.outerWidth():0,h=b.input?b.input.outerHeight():0,i=document.documentElement.clientWidth+(d?0:a(document).scrollLeft()),j=document.documentElement.clientHeight+(d?0:a(document).scrollTop());return c.left-=this._get(b,"isRTL")?e-g:0,c.left-=d&&c.left===b.input.offset().left?a(document).scrollLeft():0,c.top-=d&&c.top===b.input.offset().top+h?a(document).scrollTop():0,c.left-=Math.min(c.left,c.left+e>i&&i>e?Math.abs(c.left+e-i):0),c.top-=Math.min(c.top,c.top+f>j&&j>f?Math.abs(f+h):0),c},_findPos:function(b){for(var c,d=this._getInst(b),e=this._get(d,"isRTL");b&&("hidden"===b.type||1!==b.nodeType||a.expr.filters.hidden(b));)b=b[e?"previousSibling":"nextSibling"];return c=a(b).offset(),[c.left,c.top]},_hideDatepicker:function(b){var d,e,f,g,h=this._curInst;!h||b&&h!==a.data(b,c)||this._datepickerShowing&&(d=this._get(h,"showAnim"),e=this._get(h,"duration"),f=function(){a.datepicker._tidyDialog(h)},a.effects&&(a.effects.effect[d]||a.effects[d])?h.dpDiv.hide(d,a.datepicker._get(h,"showOptions"),e,f):h.dpDiv["slideDown"===d?"slideUp":"fadeIn"===d?"fadeOut":"hide"](d?e:null,f),d||f(),this._datepickerShowing=!1,g=this._get(h,"onClose"),g&&g.apply(h.input?h.input[0]:null,[h.input?h.input.val():"",h]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),a.blockUI&&(a.unblockUI(),a("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(b){if(a.datepicker._curInst){var c=a(b.target),d=a.datepicker._getInst(c[0]);(c[0].id===a.datepicker._mainDivId||0!==c.parents("#"+a.datepicker._mainDivId).length||c.hasClass(a.datepicker.markerClassName)||c.closest("."+a.datepicker._triggerClass).length||!a.datepicker._datepickerShowing||a.datepicker._inDialog&&a.blockUI)&&(!c.hasClass(a.datepicker.markerClassName)||a.datepicker._curInst===d)||a.datepicker._hideDatepicker()}},_adjustDate:function(b,c,d){var e=a(b),f=this._getInst(e[0]);this._isDisabledDatepicker(e[0])||(this._adjustInstDate(f,c+("M"===d?this._get(f,"showCurrentAtPos"):0),d),this._updateDatepicker(f))},_gotoToday:function(b){var c,d=a(b),e=this._getInst(d[0]);this._get(e,"gotoCurrent")&&e.currentDay?(e.selectedDay=e.currentDay,e.drawMonth=e.selectedMonth=e.currentMonth,e.drawYear=e.selectedYear=e.currentYear):(c=new Date,e.selectedDay=c.getDate(),e.drawMonth=e.selectedMonth=c.getMonth(),e.drawYear=e.selectedYear=c.getFullYear()),this._notifyChange(e),this._adjustDate(d)},_selectMonthYear:function(b,c,d){var e=a(b),f=this._getInst(e[0]);f["selected"+("M"===d?"Month":"Year")]=f["draw"+("M"===d?"Month":"Year")]=parseInt(c.options[c.selectedIndex].value,10),this._notifyChange(f),this._adjustDate(e)},_selectDay:function(b,c,d,e){var f,g=a(b);a(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(g[0])||(f=this._getInst(g[0]),f.selectedDay=f.currentDay=a("a",e).html(),f.selectedMonth=f.currentMonth=c,f.selectedYear=f.currentYear=d,this._selectDate(b,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear)))},_clearDate:function(b){var c=a(b);this._selectDate(c,"")},_selectDate:function(b,c){var d,e=a(b),f=this._getInst(e[0]);c=null!=c?c:this._formatDate(f),f.input&&f.input.val(c),this._updateAlternate(f),d=this._get(f,"onSelect"),d?d.apply(f.input?f.input[0]:null,[c,f]):f.input&&f.input.trigger("change"),f.inline?this._updateDatepicker(f):(this._hideDatepicker(),this._lastInput=f.input[0],"object"!=typeof f.input[0]&&f.input.focus(),this._lastInput=null)},_updateAlternate:function(b){var c,d,e,f=this._get(b,"altField");f&&(c=this._get(b,"altFormat")||this._get(b,"dateFormat"),d=this._getDate(b),e=this.formatDate(c,d,this._getFormatConfig(b)),a(f).each(function(){a(this).val(e)}))},noWeekends:function(a){var b=a.getDay();return[b>0&&b<6,""]},iso8601Week:function(a){var b,c=new Date(a.getTime());return c.setDate(c.getDate()+4-(c.getDay()||7)),b=c.getTime(),c.setMonth(0),c.setDate(1),Math.floor(Math.round((b-c)/864e5)/7)+1},parseDate:function(b,c,d){if(null==b||null==c)throw"Invalid arguments";if(c="object"==typeof c?c.toString():c+"",""===c)return null;var e,f,g,t,h=0,i=(d?d.shortYearCutoff:null)||this._defaults.shortYearCutoff,j="string"!=typeof i?i:(new Date).getFullYear()%100+parseInt(i,10),k=(d?d.dayNamesShort:null)||this._defaults.dayNamesShort,l=(d?d.dayNames:null)||this._defaults.dayNames,m=(d?d.monthNamesShort:null)||this._defaults.monthNamesShort,n=(d?d.monthNames:null)||this._defaults.monthNames,o=-1,p=-1,q=-1,r=-1,s=!1,u=function(a){var c=e+1<b.length&&b.charAt(e+1)===a;return c&&e++,c},v=function(a){var b=u(a),d="@"===a?14:"!"===a?20:"y"===a&&b?4:"o"===a?3:2,e=new RegExp("^\\d{1,"+d+"}"),f=c.substring(h).match(e);if(!f)throw"Missing number at position "+h;return h+=f[0].length,parseInt(f[0],10)},w=function(b,d,e){var f=-1,g=a.map(u(b)?e:d,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)});if(a.each(g,function(a,b){var d=b[1];if(c.substr(h,d.length).toLowerCase()===d.toLowerCase())return f=b[0],h+=d.length,!1}),f!==-1)return f+1;throw"Unknown name at position "+h},x=function(){if(c.charAt(h)!==b.charAt(e))throw"Unexpected literal at position "+h;h++};for(e=0;e<b.length;e++)if(s)"'"!==b.charAt(e)||u("'")?x():s=!1;else switch(b.charAt(e)){case"d":q=v("d");break;case"D":w("D",k,l);break;case"o":r=v("o");break;case"m":p=v("m");break;case"M":p=w("M",m,n);break;case"y":o=v("y");break;case"@":t=new Date(v("@")),o=t.getFullYear(),p=t.getMonth()+1,q=t.getDate();break;case"!":t=new Date((v("!")-this._ticksTo1970)/1e4),o=t.getFullYear(),p=t.getMonth()+1,q=t.getDate();break;case"'":u("'")?x():s=!0;break;default:x()}if(h<c.length&&(g=c.substr(h),!/^\s+/.test(g)))throw"Extra/unparsed characters found in date: "+g;if(o===-1?o=(new Date).getFullYear():o<100&&(o+=(new Date).getFullYear()-(new Date).getFullYear()%100+(o<=j?0:-100)),r>-1)for(p=1,q=r;;){if(f=this._getDaysInMonth(o,p-1),q<=f)break;p++,q-=f}if(t=this._daylightSavingAdjust(new Date(o,p-1,q)),t.getFullYear()!==o||t.getMonth()+1!==p||t.getDate()!==q)throw"Invalid date";return t},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d,e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=function(b){var c=d+1<a.length&&a.charAt(d+1)===b;return c&&d++,c},j=function(a,b,c){var d=""+b;if(i(a))for(;d.length<c;)d="0"+d;return d},k=function(a,b,c,d){return i(a)?d[b]:c[b]},l="",m=!1;if(b)for(d=0;d<a.length;d++)if(m)"'"!==a.charAt(d)||i("'")?l+=a.charAt(d):m=!1;else switch(a.charAt(d)){case"d":l+=j("d",b.getDate(),2);break;case"D":l+=k("D",b.getDay(),e,f);break;case"o":l+=j("o",Math.round((new Date(b.getFullYear(),b.getMonth(),b.getDate()).getTime()-new Date(b.getFullYear(),0,0).getTime())/864e5),3);break;case"m":l+=j("m",b.getMonth()+1,2);break;case"M":l+=k("M",b.getMonth(),g,h);break;case"y":l+=i("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":l+=b.getTime();break;case"!":l+=1e4*b.getTime()+this._ticksTo1970;break;case"'":i("'")?l+="'":m=!0;break;default:l+=a.charAt(d)}return l},_possibleChars:function(a){var b,c="",d=!1,e=function(c){var d=b+1<a.length&&a.charAt(b+1)===c;return d&&b++,d};for(b=0;b<a.length;b++)if(d)"'"!==a.charAt(b)||e("'")?c+=a.charAt(b):d=!1;else switch(a.charAt(b)){case"d":case"m":case"y":case"@":c+="0123456789";break;case"D":case"M":return null;case"'":e("'")?c+="'":d=!0;break;default:c+=a.charAt(b)}return c},_get:function(a,c){return a.settings[c]!==b?a.settings[c]:this._defaults[c]},_setDateFromField:function(a,b){if(a.input.val()!==a.lastVal){var c=this._get(a,"dateFormat"),d=a.lastVal=a.input?a.input.val():null,e=this._getDefaultDate(a),f=e,g=this._getFormatConfig(a);try{f=this.parseDate(c,d,g)||e}catch(a){d=b?"":d}a.selectedDay=f.getDate(),a.drawMonth=a.selectedMonth=f.getMonth(),a.drawYear=a.selectedYear=f.getFullYear(),a.currentDay=d?f.getDate():0,a.currentMonth=d?f.getMonth():0,a.currentYear=d?f.getFullYear():0,this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(b,c,d){var e=function(a){var b=new Date;return b.setDate(b.getDate()+a),b},f=function(c){try{return a.datepicker.parseDate(a.datepicker._get(b,"dateFormat"),c,a.datepicker._getFormatConfig(b))}catch(a){}for(var d=(c.toLowerCase().match(/^c/)?a.datepicker._getDate(b):null)||new Date,e=d.getFullYear(),f=d.getMonth(),g=d.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,i=h.exec(c);i;){switch(i[2]||"d"){case"d":case"D":g+=parseInt(i[1],10);break;case"w":case"W":g+=7*parseInt(i[1],10);break;case"m":case"M":f+=parseInt(i[1],10),g=Math.min(g,a.datepicker._getDaysInMonth(e,f));break;case"y":case"Y":e+=parseInt(i[1],10),g=Math.min(g,a.datepicker._getDaysInMonth(e,f))}i=h.exec(c)}return new Date(e,f,g)},g=null==c||""===c?d:"string"==typeof c?f(c):"number"==typeof c?isNaN(c)?d:e(c):new Date(c.getTime());return g=g&&"Invalid Date"===g.toString()?d:g,g&&(g.setHours(0),g.setMinutes(0),g.setSeconds(0),g.setMilliseconds(0)),this._daylightSavingAdjust(g)},_daylightSavingAdjust:function(a){return a?(a.setHours(a.getHours()>12?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),e===a.selectedMonth&&f===a.selectedYear||c||this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&&""===a.input.val()?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_attachHandlers:function(b){var c=this._get(b,"stepMonths"),d="#"+b.id.replace(/\\\\/g,"\\");b.dpDiv.find("[data-handler]").map(function(){var b={prev:function(){a.datepicker._adjustDate(d,-c,"M")},next:function(){a.datepicker._adjustDate(d,+c,"M")},hide:function(){a.datepicker._hideDatepicker()},today:function(){a.datepicker._gotoToday(d)},selectDay:function(){return a.datepicker._selectDay(d,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return a.datepicker._selectMonthYear(d,this,"M"),!1},selectYear:function(){return a.datepicker._selectMonthYear(d,this,"Y"),!1}};a(this).bind(this.getAttribute("data-event"),b[this.getAttribute("data-handler")])})},_generateHTML:function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O=new Date,P=this._daylightSavingAdjust(new Date(O.getFullYear(),O.getMonth(),O.getDate())),Q=this._get(a,"isRTL"),R=this._get(a,"showButtonPanel"),S=this._get(a,"hideIfNoPrevNext"),T=this._get(a,"navigationAsDateFormat"),U=this._getNumberOfMonths(a),V=this._get(a,"showCurrentAtPos"),W=this._get(a,"stepMonths"),X=1!==U[0]||1!==U[1],Y=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),Z=this._getMinMaxDate(a,"min"),$=this._getMinMaxDate(a,"max"),_=a.drawMonth-V,aa=a.drawYear;if(_<0&&(_+=12,aa--),$)for(b=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-U[0]*U[1]+1,$.getDate())),b=Z&&b<Z?Z:b;this._daylightSavingAdjust(new Date(aa,_,1))>b;)_--,_<0&&(_=11,aa--);for(a.drawMonth=_,a.drawYear=aa,c=this._get(a,"prevText"),c=T?this.formatDate(c,this._daylightSavingAdjust(new Date(aa,_-W,1)),this._getFormatConfig(a)):c,d=this._canAdjustMonth(a,-1,aa,_)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+c+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"e":"w")+"'>"+c+"</span></a>":S?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+c+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"e":"w")+"'>"+c+"</span></a>",e=this._get(a,"nextText"),e=T?this.formatDate(e,this._daylightSavingAdjust(new Date(aa,_+W,1)),this._getFormatConfig(a)):e,f=this._canAdjustMonth(a,1,aa,_)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+e+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"w":"e")+"'>"+e+"</span></a>":S?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+e+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"w":"e")+"'>"+e+"</span></a>",g=this._get(a,"currentText"),h=this._get(a,"gotoCurrent")&&a.currentDay?Y:P,g=T?this.formatDate(g,h,this._getFormatConfig(a)):g,i=a.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(a,"closeText")+"</button>",j=R?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Q?i:"")+(this._isInRange(a,h)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+g+"</button>":"")+(Q?"":i)+"</div>":"",k=parseInt(this._get(a,"firstDay"),10),k=isNaN(k)?0:k,l=this._get(a,"showWeek"),m=this._get(a,"dayNames"),n=this._get(a,"dayNamesMin"),o=this._get(a,"monthNames"),p=this._get(a,"monthNamesShort"),q=this._get(a,"beforeShowDay"),r=this._get(a,"showOtherMonths"),s=this._get(a,"selectOtherMonths"),t=this._getDefaultDate(a),u="",w=0;w<U[0];w++){for(x="",this.maxRows=4,y=0;y<U[1];y++){if(z=this._daylightSavingAdjust(new Date(aa,_,a.selectedDay)),A=" ui-corner-all",B="",X){if(B+="<div class='ui-datepicker-group",U[1]>1)switch(y){case 0:B+=" ui-datepicker-group-first",A=" ui-corner-"+(Q?"right":"left");break;case U[1]-1:B+=" ui-datepicker-group-last",A=" ui-corner-"+(Q?"left":"right");break;default:B+=" ui-datepicker-group-middle",A=""}B+="'>"}for(B+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+A+"'>"+(/all|left/.test(A)&&0===w?Q?f:d:"")+(/all|right/.test(A)&&0===w?Q?d:f:"")+this._generateMonthYearHeader(a,_,aa,Z,$,w>0||y>0,o,p)+"</div><table class='ui-datepicker-calendar'><thead><tr>",C=l?"<th class='ui-datepicker-week-col'>"+this._get(a,"weekHeader")+"</th>":"",v=0;v<7;v++)D=(v+k)%7,C+="<th"+((v+k+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+m[D]+"'>"+n[D]+"</span></th>";for(B+=C+"</tr></thead><tbody>",E=this._getDaysInMonth(aa,_),aa===a.selectedYear&&_===a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,E)),F=(this._getFirstDayOfMonth(aa,_)-k+7)%7,G=Math.ceil((F+E)/7),H=X&&this.maxRows>G?this.maxRows:G,this.maxRows=H,I=this._daylightSavingAdjust(new Date(aa,_,1-F)),J=0;J<H;J++){for(B+="<tr>",K=l?"<td class='ui-datepicker-week-col'>"+this._get(a,"calculateWeek")(I)+"</td>":"",v=0;v<7;v++)L=q?q.apply(a.input?a.input[0]:null,[I]):[!0,""],M=I.getMonth()!==_,N=M&&!s||!L[0]||Z&&I<Z||$&&I>$,K+="<td class='"+((v+k+6)%7>=5?" ui-datepicker-week-end":"")+(M?" ui-datepicker-other-month":"")+(I.getTime()===z.getTime()&&_===a.selectedMonth&&a._keyEvent||t.getTime()===I.getTime()&&t.getTime()===z.getTime()?" "+this._dayOverClass:"")+(N?" "+this._unselectableClass+" ui-state-disabled":"")+(M&&!r?"":" "+L[1]+(I.getTime()===Y.getTime()?" "+this._currentClass:"")+(I.getTime()===P.getTime()?" ui-datepicker-today":""))+"'"+(M&&!r||!L[2]?"":" title='"+L[2].replace(/'/g,"&#39;")+"'")+(N?"":" data-handler='selectDay' data-event='click' data-month='"+I.getMonth()+"' data-year='"+I.getFullYear()+"'")+">"+(M&&!r?"&#xa0;":N?"<span class='ui-state-default'>"+I.getDate()+"</span>":"<a class='ui-state-default"+(I.getTime()===P.getTime()?" ui-state-highlight":"")+(I.getTime()===Y.getTime()?" ui-state-active":"")+(M?" ui-priority-secondary":"")+"' href='#'>"+I.getDate()+"</a>")+"</td>",I.setDate(I.getDate()+1),I=this._daylightSavingAdjust(I);B+=K+"</tr>"}_++,_>11&&(_=0,aa++),B+="</tbody></table>"+(X?"</div>"+(U[0]>0&&y===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=B}u+=x}return u+=j,a._keyEvent=!1,u},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o,p,q=this._get(a,"changeMonth"),r=this._get(a,"changeYear"),s=this._get(a,"showMonthAfterYear"),t="<div class='ui-datepicker-title'>",u="";if(f||!q)u+="<span class='ui-datepicker-month'>"+g[b]+"</span>";else{for(i=d&&d.getFullYear()===c,j=e&&e.getFullYear()===c,u+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",k=0;k<12;k++)(!i||k>=d.getMonth())&&(!j||k<=e.getMonth())&&(u+="<option value='"+k+"'"+(k===b?" selected='selected'":"")+">"+h[k]+"</option>");u+="</select>"}if(s||(t+=u+(!f&&q&&r?"":"&#xa0;")),!a.yearshtml)if(a.yearshtml="",f||!r)t+="<span class='ui-datepicker-year'>"+c+"</span>";else{for(l=this._get(a,"yearRange").split(":"),m=(new Date).getFullYear(),n=function(a){var b=a.match(/c[+\-].*/)?c+parseInt(a.substring(1),10):a.match(/[+\-].*/)?m+parseInt(a,10):parseInt(a,10);return isNaN(b)?m:b},o=n(l[0]),p=Math.max(o,n(l[1]||"")),o=d?Math.max(o,d.getFullYear()):o,p=e?Math.min(p,e.getFullYear()):p,a.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";o<=p;o++)a.yearshtml+="<option value='"+o+"'"+(o===c?" selected='selected'":"")+">"+o+"</option>";a.yearshtml+="</select>",t+=a.yearshtml,a.yearshtml=null}return t+=this._get(a,"yearSuffix"),s&&(t+=(!f&&q&&r?"":"&#xa0;")+u),t+="</div>"},_adjustInstDate:function(a,b,c){var d=a.drawYear+("Y"===c?b:0),e=a.drawMonth+("M"===c?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+("D"===c?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),"M"!==c&&"Y"!==c||this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&b<c?c:b;return d&&e>d?d:e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return null==b?[1,1]:"number"==typeof b?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return new Date(a,b,1).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1));return b<0&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c,d,e=this._getMinMaxDate(a,"min"),f=this._getMinMaxDate(a,"max"),g=null,h=null,i=this._get(a,"yearRange");return i&&(c=i.split(":"),d=(new Date).getFullYear(),g=parseInt(c[0],10),h=parseInt(c[1],10),c[0].match(/[+\-].*/)&&(g+=d),c[1].match(/[+\-].*/)&&(h+=d)),(!e||b.getTime()>=e.getTime())&&(!f||b.getTime()<=f.getTime())&&(!g||b.getFullYear()>=g)&&(!h||b.getFullYear()<=h)},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b="string"!=typeof b?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?"object"==typeof b?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),a.fn.datepicker=function(b){if(!this.length)return this;a.datepicker.initialized||(a(document).mousedown(a.datepicker._checkExternalClick),a.datepicker.initialized=!0),0===a("#"+a.datepicker._mainDivId).length&&a("body").append(a.datepicker.dpDiv);var c=Array.prototype.slice.call(arguments,1);return"string"!=typeof b||"isDisabled"!==b&&"getDate"!==b&&"widget"!==b?"option"===b&&2===arguments.length&&"string"==typeof arguments[1]?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(c)):this.each(function(){"string"==typeof b?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this].concat(c)):a.datepicker._attachDatepicker(this,b)}):a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(c))},a.datepicker=new e,a.datepicker.initialized=!1,a.datepicker.uuid=(new Date).getTime(),a.datepicker.version="1.10.3"}(jQuery),function(a,b){var c={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},d={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};a.widget("ui.dialog",{version:"1.10.3",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(b){var c=a(this).css(b).offset().top;c<0&&a(this).css("top",b.top-c)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&a.fn.draggable&&this._makeDraggable(),this.options.resizable&&a.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var b=this.options.appendTo;return b&&(b.jquery||b.nodeType)?a(b):this.document.find(b||"body").eq(0)},_destroy:function(){var a,b=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),a=b.parent.children().eq(b.index),a.length&&a[0]!==this.element[0]?a.before(this.element):b.parent.append(this.element)},widget:function(){return this.uiDialog},disable:a.noop,enable:a.noop,close:function(b){var c=this;this._isOpen&&this._trigger("beforeClose",b)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||a(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){c._trigger("close",b)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(a,b){var c=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return c&&!b&&this._trigger("focus",a),c},open:function(){var b=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=a(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){b._focusTabbable(),b._trigger("focus")}),void this._trigger("open"))},_focusTabbable:function(){var a=this.element.find("[autofocus]");a.length||(a=this.element.find(":tabbable")),a.length||(a=this.uiDialogButtonPane.find(":tabbable")),a.length||(a=this.uiDialogTitlebarClose.filter(":tabbable")),a.length||(a=this.uiDialog),a.eq(0).focus()},_keepFocus:function(b){function c(){var b=this.document[0].activeElement,c=this.uiDialog[0]===b||a.contains(this.uiDialog[0],b);c||this._focusTabbable()}b.preventDefault(),c.call(this),this._delay(c)},_createWrapper:function(){this.uiDialog=a("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(b){if(this.options.closeOnEscape&&!b.isDefaultPrevented()&&b.keyCode&&b.keyCode===a.ui.keyCode.ESCAPE)return b.preventDefault(),void this.close(b);if(b.keyCode===a.ui.keyCode.TAB){var c=this.uiDialog.find(":tabbable"),d=c.filter(":first"),e=c.filter(":last");b.target!==e[0]&&b.target!==this.uiDialog[0]||b.shiftKey?b.target!==d[0]&&b.target!==this.uiDialog[0]||!b.shiftKey||(e.focus(1),b.preventDefault()):(d.focus(1),b.preventDefault())}},mousedown:function(a){this._moveToTop(a)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var b;this.uiDialogTitlebar=a("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(b){a(b.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=a("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(a){a.preventDefault(),this.close(a)}}),b=a("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(b),this.uiDialog.attr({"aria-labelledby":b.attr("id")})},_title:function(a){this.options.title||a.html("&#160;"),a.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=a("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=a("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var b=this,c=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),a.isEmptyObject(c)||a.isArray(c)&&!c.length?void this.uiDialog.removeClass("ui-dialog-buttons"):(a.each(c,function(c,d){var e,f;d=a.isFunction(d)?{click:d,text:c}:d,d=a.extend({type:"button"},d),e=d.click,d.click=function(){e.apply(b.element[0],arguments)},f={icons:d.icons,text:d.showText},delete d.icons,delete d.showText,a("<button></button>",d).button(f).appendTo(b.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function d(a){return{position:a.position,offset:a.offset}}var b=this,c=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(c,e){a(this).addClass("ui-dialog-dragging"),b._blockFrames(),b._trigger("dragStart",c,d(e))},drag:function(a,c){b._trigger("drag",a,d(c))},stop:function(e,f){c.position=[f.position.left-b.document.scrollLeft(),f.position.top-b.document.scrollTop()],a(this).removeClass("ui-dialog-dragging"),b._unblockFrames(),b._trigger("dragStop",e,d(f))}})},_makeResizable:function(){function g(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}var b=this,c=this.options,d=c.resizable,e=this.uiDialog.css("position"),f="string"==typeof d?d:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:c.maxWidth,maxHeight:c.maxHeight,minWidth:c.minWidth,minHeight:this._minHeight(),handles:f,start:function(c,d){a(this).addClass("ui-dialog-resizing"),b._blockFrames(),b._trigger("resizeStart",c,g(d))},resize:function(a,c){b._trigger("resize",a,g(c))},stop:function(d,e){c.height=a(this).height(),c.width=a(this).width(),a(this).removeClass("ui-dialog-resizing"),b._unblockFrames(),b._trigger("resizeStop",d,g(e))}}).css("position",e)},_minHeight:function(){var a=this.options;return"auto"===a.height?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(){var a=this.uiDialog.is(":visible");a||this.uiDialog.show(),this.uiDialog.position(this.options.position),a||this.uiDialog.hide()},_setOptions:function(b){var e=this,f=!1,g={};a.each(b,function(a,b){e._setOption(a,b),a in c&&(f=!0),a in d&&(g[a]=b)}),f&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",g)},_setOption:function(a,b){var c,d,e=this.uiDialog;"dialogClass"===a&&e.removeClass(this.options.dialogClass).addClass(b),"disabled"!==a&&(this._super(a,b),"appendTo"===a&&this.uiDialog.appendTo(this._appendTo()),"buttons"===a&&this._createButtons(),"closeText"===a&&this.uiDialogTitlebarClose.button({label:""+b}),"draggable"===a&&(c=e.is(":data(ui-draggable)"),c&&!b&&e.draggable("destroy"),!c&&b&&this._makeDraggable()),"position"===a&&this._position(),"resizable"===a&&(d=e.is(":data(ui-resizable)"),d&&!b&&e.resizable("destroy"),d&&"string"==typeof b&&e.resizable("option","handles",b),d||b===!1||this._makeResizable()),"title"===a&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var a,b,c,d=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),d.minWidth>d.width&&(d.width=d.minWidth),a=this.uiDialog.css({height:"auto",width:d.width}).outerHeight(),b=Math.max(0,d.minHeight-a),c="number"==typeof d.maxHeight?Math.max(0,d.maxHeight-a):"none","auto"===d.height?this.element.css({minHeight:b,maxHeight:c,height:"auto"}):this.element.height(Math.max(0,d.height-a)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var b=a(this);return a("<div>").css({position:"absolute",width:b.outerWidth(),height:b.outerHeight()}).appendTo(b.parent()).offset(b.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(b){return!!a(b.target).closest(".ui-dialog").length||!!a(b.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var b=this,c=this.widgetFullName;a.ui.dialog.overlayInstances||this._delay(function(){a.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(d){b._allowInteraction(d)||(d.preventDefault(),a(".ui-dialog:visible:last .ui-dialog-content").data(c)._focusTabbable())})}),this.overlay=a("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),a.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(a.ui.dialog.overlayInstances--,a.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),a.ui.dialog.overlayInstances=0,a.uiBackCompat!==!1&&a.widget("ui.dialog",a.ui.dialog,{_position:function(){var e,b=this.options.position,c=[],d=[0,0];b?(("string"==typeof b||"object"==typeof b&&"0"in b)&&(c=b.split?b.split(" "):[b[0],b[1]],1===c.length&&(c[1]=c[0]),a.each(["left","top"],function(a,b){+c[a]===c[a]&&(d[a]=c[a],c[a]=b)}),b={my:c[0]+(d[0]<0?d[0]:"+"+d[0])+" "+c[1]+(d[1]<0?d[1]:"+"+d[1]),at:c.join(" ")}),b=a.extend({},a.ui.dialog.prototype.options.position,b)):b=a.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(b),e||this.uiDialog.hide()}})}(jQuery),function(a,b){var c=/up|down|vertical/,d=/up|left|vertical|horizontal/;a.effects.effect.blind=function(b,e){var p,q,r,f=a(this),g=["position","top","bottom","left","right","height","width"],h=a.effects.setMode(f,b.mode||"hide"),i=b.direction||"up",j=c.test(i),k=j?"height":"width",l=j?"top":"left",m=d.test(i),n={},o="show"===h;f.parent().is(".ui-effects-wrapper")?a.effects.save(f.parent(),g):a.effects.save(f,g),f.show(),p=a.effects.createWrapper(f).css({overflow:"hidden"}),q=p[k](),r=parseFloat(p.css(l))||0,n[k]=o?q:0,m||(f.css(j?"bottom":"right",0).css(j?"top":"left","auto").css({position:"absolute"}),n[l]=o?r:q+r),o&&(p.css(k,0),m||p.css(l,r+q)),p.animate(n,{duration:b.duration,easing:b.easing,queue:!1,complete:function(){"hide"===h&&f.hide(),a.effects.restore(f,g),a.effects.removeWrapper(f),e()}})}}(jQuery),function(a,b){a.effects.effect.bounce=function(b,c){var q,r,s,d=a(this),e=["position","top","bottom","left","right","height","width"],f=a.effects.setMode(d,b.mode||"effect"),g="hide"===f,h="show"===f,i=b.direction||"up",j=b.distance,k=b.times||5,l=2*k+(h||g?1:0),m=b.duration/l,n=b.easing,o="up"===i||"down"===i?"top":"left",p="up"===i||"left"===i,t=d.queue(),u=t.length;for((h||g)&&e.push("opacity"),a.effects.save(d,e),d.show(),a.effects.createWrapper(d),j||(j=d["top"===o?"outerHeight":"outerWidth"]()/3),h&&(s={opacity:1},s[o]=0,d.css("opacity",0).css(o,p?2*-j:2*j).animate(s,m,n)),g&&(j/=Math.pow(2,k-1)),s={},s[o]=0,q=0;q<k;q++)r={},r[o]=(p?"-=":"+=")+j,d.animate(r,m,n).animate(s,m,n),j=g?2*j:j/2;g&&(r={opacity:0},r[o]=(p?"-=":"+=")+j,d.animate(r,m,n)),d.queue(function(){g&&d.hide(),a.effects.restore(d,e),a.effects.removeWrapper(d),c()}),u>1&&t.splice.apply(t,[1,0].concat(t.splice(u,l+1))),d.dequeue()}}(jQuery),function(a,b){a.effects.effect.clip=function(b,c){var m,n,o,d=a(this),e=["position","top","bottom","left","right","height","width"],f=a.effects.setMode(d,b.mode||"hide"),g="show"===f,h=b.direction||"vertical",i="vertical"===h,j=i?"height":"width",k=i?"top":"left",l={};a.effects.save(d,e),d.show(),m=a.effects.createWrapper(d).css({overflow:"hidden"}),n="IMG"===d[0].tagName?m:d,o=n[j](),g&&(n.css(j,0),n.css(k,o/2)),l[j]=g?o:0,l[k]=g?0:o/2,n.animate(l,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){g||d.hide(),a.effects.restore(d,e),a.effects.removeWrapper(d),c()}})}}(jQuery),function(a,b){a.effects.effect.drop=function(b,c){var l,d=a(this),e=["position","top","bottom","left","right","opacity","height","width"],f=a.effects.setMode(d,b.mode||"hide"),g="show"===f,h=b.direction||"left",i="up"===h||"down"===h?"top":"left",j="up"===h||"left"===h?"pos":"neg",k={opacity:g?1:0};a.effects.save(d,e),d.show(),a.effects.createWrapper(d),l=b.distance||d["top"===i?"outerHeight":"outerWidth"](!0)/2,g&&d.css("opacity",0).css(i,"pos"===j?-l:l),k[i]=(g?"pos"===j?"+=":"-=":"pos"===j?"-=":"+=")+l,d.animate(k,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){"hide"===f&&d.hide(),a.effects.restore(d,e),a.effects.removeWrapper(d),c()}})}}(jQuery),function(a,b){a.effects.effect.explode=function(b,c){function s(){l.push(this),l.length===d*e&&t()}function t(){f.css({visibility:"visible"}),a(l).remove(),h||f.hide(),c()}var m,n,o,p,q,r,d=b.pieces?Math.round(Math.sqrt(b.pieces)):3,e=d,f=a(this),g=a.effects.setMode(f,b.mode||"hide"),h="show"===g,i=f.show().css("visibility","hidden").offset(),j=Math.ceil(f.outerWidth()/e),k=Math.ceil(f.outerHeight()/d),l=[];for(m=0;m<d;m++)for(p=i.top+m*k,r=m-(d-1)/2,n=0;n<e;n++)o=i.left+n*j,q=n-(e-1)/2,f.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-n*j,top:-m*k}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:j,height:k,left:o+(h?q*j:0),top:p+(h?r*k:0),opacity:h?0:1}).animate({left:o+(h?0:q*j),top:p+(h?0:r*k),opacity:h?1:0},b.duration||500,b.easing,s)}}(jQuery),function(a,b){a.effects.effect.fade=function(b,c){var d=a(this),e=a.effects.setMode(d,b.mode||"toggle");d.animate({opacity:e},{queue:!1,duration:b.duration,easing:b.easing,complete:c})}}(jQuery),function(a,b){a.effects.effect.fold=function(b,c){var o,p,d=a(this),e=["position","top","bottom","left","right","height","width"],f=a.effects.setMode(d,b.mode||"hide"),g="show"===f,h="hide"===f,i=b.size||15,j=/([0-9]+)%/.exec(i),k=!!b.horizFirst,l=g!==k,m=l?["width","height"]:["height","width"],n=b.duration/2,q={},r={};a.effects.save(d,e),d.show(),o=a.effects.createWrapper(d).css({overflow:"hidden"}),p=l?[o.width(),o.height()]:[o.height(),o.width()],j&&(i=parseInt(j[1],10)/100*p[h?0:1]),g&&o.css(k?{height:0,width:i}:{height:i,width:0}),q[m[0]]=g?p[0]:i,r[m[1]]=g?p[1]:0,o.animate(q,n,b.easing).animate(r,n,b.easing,function(){h&&d.hide(),a.effects.restore(d,e),a.effects.removeWrapper(d),c()})}}(jQuery),function(a,b){a.effects.effect.highlight=function(b,c){var d=a(this),e=["backgroundImage","backgroundColor","opacity"],f=a.effects.setMode(d,b.mode||"show"),g={backgroundColor:d.css("backgroundColor")};"hide"===f&&(g.opacity=0),a.effects.save(d,e),d.show().css({backgroundImage:"none",backgroundColor:b.color||"#ffff99"}).animate(g,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){"hide"===f&&d.hide(),a.effects.restore(d,e),c()}})}}(jQuery),function(a,b){a.effects.effect.pulsate=function(b,c){var n,d=a(this),e=a.effects.setMode(d,b.mode||"show"),f="show"===e,g="hide"===e,h=f||"hide"===e,i=2*(b.times||5)+(h?1:0),j=b.duration/i,k=0,l=d.queue(),m=l.length;for(!f&&d.is(":visible")||(d.css("opacity",0).show(),k=1),n=1;n<i;n++)d.animate({opacity:k},j,b.easing),k=1-k;d.animate({opacity:k},j,b.easing),d.queue(function(){g&&d.hide(),c()}),m>1&&l.splice.apply(l,[1,0].concat(l.splice(m,i+1))),d.dequeue()}}(jQuery),function(a,b){a.effects.effect.puff=function(b,c){var d=a(this),e=a.effects.setMode(d,b.mode||"hide"),f="hide"===e,g=parseInt(b.percent,10)||150,h=g/100,i={height:d.height(),width:d.width(),outerHeight:d.outerHeight(),outerWidth:d.outerWidth()};a.extend(b,{effect:"scale",queue:!1,fade:!0,mode:e,complete:c,percent:f?g:100,from:f?i:{height:i.height*h,width:i.width*h,outerHeight:i.outerHeight*h,outerWidth:i.outerWidth*h}}),d.effect(b)},a.effects.effect.scale=function(b,c){var d=a(this),e=a.extend(!0,{},b),f=a.effects.setMode(d,b.mode||"effect"),g=parseInt(b.percent,10)||(0===parseInt(b.percent,10)?0:"hide"===f?0:100),h=b.direction||"both",i=b.origin,j={height:d.height(),width:d.width(),outerHeight:d.outerHeight(),outerWidth:d.outerWidth()},k={y:"horizontal"!==h?g/100:1,x:"vertical"!==h?g/100:1};e.effect="size",e.queue=!1,e.complete=c,"effect"!==f&&(e.origin=i||["middle","center"],e.restore=!0),e.from=b.from||("show"===f?{height:0,width:0,outerHeight:0,outerWidth:0}:j),e.to={height:j.height*k.y,width:j.width*k.x,outerHeight:j.outerHeight*k.y,outerWidth:j.outerWidth*k.x},e.fade&&("show"===f&&(e.from.opacity=0,e.to.opacity=1),"hide"===f&&(e.from.opacity=1,e.to.opacity=0)),d.effect(e)},a.effects.effect.size=function(b,c){var d,e,f,g=a(this),h=["position","top","bottom","left","right","width","height","overflow","opacity"],i=["position","top","bottom","left","right","overflow","opacity"],j=["width","height","overflow"],k=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],m=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],n=a.effects.setMode(g,b.mode||"effect"),o=b.restore||"effect"!==n,p=b.scale||"both",q=b.origin||["middle","center"],r=g.css("position"),s=o?h:i,t={height:0,width:0,outerHeight:0,outerWidth:0};"show"===n&&g.show(),d={height:g.height(),width:g.width(),outerHeight:g.outerHeight(),outerWidth:g.outerWidth()},"toggle"===b.mode&&"show"===n?(g.from=b.to||t,g.to=b.from||d):(g.from=b.from||("show"===n?t:d),g.to=b.to||("hide"===n?t:d)),f={from:{y:g.from.height/d.height,x:g.from.width/d.width},to:{y:g.to.height/d.height,x:g.to.width/d.width}},"box"!==p&&"both"!==p||(f.from.y!==f.to.y&&(s=s.concat(l),g.from=a.effects.setTransition(g,l,f.from.y,g.from),g.to=a.effects.setTransition(g,l,f.to.y,g.to)),f.from.x!==f.to.x&&(s=s.concat(m),g.from=a.effects.setTransition(g,m,f.from.x,g.from),g.to=a.effects.setTransition(g,m,f.to.x,g.to))),"content"!==p&&"both"!==p||f.from.y!==f.to.y&&(s=s.concat(k).concat(j),g.from=a.effects.setTransition(g,k,f.from.y,g.from),g.to=a.effects.setTransition(g,k,f.to.y,g.to)),a.effects.save(g,s),g.show(),a.effects.createWrapper(g),g.css("overflow","hidden").css(g.from),q&&(e=a.effects.getBaseline(q,d),g.from.top=(d.outerHeight-g.outerHeight())*e.y,g.from.left=(d.outerWidth-g.outerWidth())*e.x,g.to.top=(d.outerHeight-g.to.outerHeight)*e.y,g.to.left=(d.outerWidth-g.to.outerWidth)*e.x),g.css(g.from),"content"!==p&&"both"!==p||(l=l.concat(["marginTop","marginBottom"]).concat(k),m=m.concat(["marginLeft","marginRight"]),j=h.concat(l).concat(m),g.find("*[width]").each(function(){var c=a(this),d={height:c.height(),width:c.width(),outerHeight:c.outerHeight(),outerWidth:c.outerWidth()};o&&a.effects.save(c,j),c.from={height:d.height*f.from.y,width:d.width*f.from.x,outerHeight:d.outerHeight*f.from.y,outerWidth:d.outerWidth*f.from.x},c.to={height:d.height*f.to.y,width:d.width*f.to.x,outerHeight:d.height*f.to.y,outerWidth:d.width*f.to.x},f.from.y!==f.to.y&&(c.from=a.effects.setTransition(c,l,f.from.y,c.from),c.to=a.effects.setTransition(c,l,f.to.y,c.to)),f.from.x!==f.to.x&&(c.from=a.effects.setTransition(c,m,f.from.x,c.from),c.to=a.effects.setTransition(c,m,f.to.x,c.to)),c.css(c.from),c.animate(c.to,b.duration,b.easing,function(){o&&a.effects.restore(c,j)})})),g.animate(g.to,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){0===g.to.opacity&&g.css("opacity",g.from.opacity),"hide"===n&&g.hide(),a.effects.restore(g,s),o||("static"===r?g.css({position:"relative",top:g.to.top,left:g.to.left}):a.each(["top","left"],function(a,b){g.css(b,function(b,c){var d=parseInt(c,10),e=a?g.to.left:g.to.top;return"auto"===c?e+"px":d+e+"px"})})),a.effects.removeWrapper(g),c()}})}}(jQuery),function(a,b){a.effects.effect.shake=function(b,c){var q,d=a(this),e=["position","top","bottom","left","right","height","width"],f=a.effects.setMode(d,b.mode||"effect"),g=b.direction||"left",h=b.distance||20,i=b.times||3,j=2*i+1,k=Math.round(b.duration/j),l="up"===g||"down"===g?"top":"left",m="up"===g||"left"===g,n={},o={},p={},r=d.queue(),s=r.length;for(a.effects.save(d,e),d.show(),a.effects.createWrapper(d),n[l]=(m?"-=":"+=")+h,o[l]=(m?"+=":"-=")+2*h,p[l]=(m?"-=":"+=")+2*h,d.animate(n,k,b.easing),q=1;q<i;q++)d.animate(o,k,b.easing).animate(p,k,b.easing);d.animate(o,k,b.easing).animate(n,k/2,b.easing).queue(function(){"hide"===f&&d.hide(),a.effects.restore(d,e),a.effects.removeWrapper(d),c()}),s>1&&r.splice.apply(r,[1,0].concat(r.splice(s,j+1))),d.dequeue()}}(jQuery),function(a,b){a.effects.effect.slide=function(b,c){var k,d=a(this),e=["position","top","bottom","left","right","width","height"],f=a.effects.setMode(d,b.mode||"show"),g="show"===f,h=b.direction||"left",i="up"===h||"down"===h?"top":"left",j="up"===h||"left"===h,l={};a.effects.save(d,e),d.show(),k=b.distance||d["top"===i?"outerHeight":"outerWidth"](!0),a.effects.createWrapper(d).css({overflow:"hidden"}),g&&d.css(i,j?isNaN(k)?"-"+k:-k:k),l[i]=(g?j?"+=":"-=":j?"-=":"+=")+k,d.animate(l,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){"hide"===f&&d.hide(),a.effects.restore(d,e),a.effects.removeWrapper(d),c()}})}}(jQuery),function(a,b){a.effects.effect.transfer=function(b,c){var d=a(this),e=a(b.to),f="fixed"===e.css("position"),g=a("body"),h=f?g.scrollTop():0,i=f?g.scrollLeft():0,j=e.offset(),k={top:j.top-h,left:j.left-i,height:e.innerHeight(),width:e.innerWidth()},l=d.offset(),m=a("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(b.className).css({top:l.top-h,left:l.left-i,height:d.innerHeight(),width:d.innerWidth(),position:f?"fixed":"absolute"}).animate(k,b.duration,b.easing,function(){m.remove(),c()})}}(jQuery),function(a,b){a.widget("ui.menu",{version:"1.10.3",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,a.proxy(function(a){this.options.disabled&&a.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(a){a.preventDefault()},"click .ui-state-disabled > a":function(a){a.preventDefault()},"click .ui-menu-item:has(a)":function(b){var c=a(b.target).closest(".ui-menu-item");!this.mouseHandled&&c.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(b),c.has(".ui-menu").length?this.expand(b):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(b){var c=a(b.currentTarget);c.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(b,c)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(a,b){var c=this.active||this.element.children(".ui-menu-item").eq(0);b||this.focus(a,c)},blur:function(b){this._delay(function(){a.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(b)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(b){a(b.target).closest(".ui-menu").length||this.collapseAll(b),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 b=a(this);b.data("ui-menu-submenu-carat")&&b.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(b){function i(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var c,d,e,f,g,h=!0;switch(b.keyCode){case a.ui.keyCode.PAGE_UP:this.previousPage(b);break;case a.ui.keyCode.PAGE_DOWN:this.nextPage(b);break;case a.ui.keyCode.HOME:this._move("first","first",b);break;case a.ui.keyCode.END:this._move("last","last",b);break;case a.ui.keyCode.UP:this.previous(b);break;case a.ui.keyCode.DOWN:this.next(b);break;case a.ui.keyCode.LEFT:this.collapse(b);break;case a.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(b);break;case a.ui.keyCode.ENTER:case a.ui.keyCode.SPACE:this._activate(b);break;case a.ui.keyCode.ESCAPE:this.collapse(b);break;default:h=!1,d=this.previousFilter||"",e=String.fromCharCode(b.keyCode),f=!1,clearTimeout(this.filterTimer),e===d?f=!0:e=d+e,g=new RegExp("^"+i(e),"i"),c=this.activeMenu.children(".ui-menu-item").filter(function(){return g.test(a(this).children("a").text())}),c=f&&c.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):c,c.length||(e=String.fromCharCode(b.keyCode),g=new RegExp("^"+i(e),"i"),c=this.activeMenu.children(".ui-menu-item").filter(function(){return g.test(a(this).children("a").text())})),c.length?(this.focus(b,c),c.length>1?(this.previousFilter=e,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&b.preventDefault()},_activate:function(a){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(a):this.select(a))},refresh:function(){var b,c=this.options.icons.submenu,d=this.element.find(this.options.menus);d.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 b=a(this),d=b.prev("a"),e=a("<span>").addClass("ui-menu-icon ui-icon "+c).data("ui-menu-submenu-carat",!0);d.attr("aria-haspopup","true").prepend(e),b.attr("aria-labelledby",d.attr("id"))}),b=d.add(this.element),b.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()}),b.children(":not(.ui-menu-item)").each(function(){var b=a(this);/[^\-\u2014\u2013\s]/.test(b.text())||b.addClass("ui-widget-content ui-menu-divider")}),b.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!a.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(a,b){"icons"===a&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(b.submenu),this._super(a,b)},focus:function(a,b){var c,d;this.blur(a,a&&"focus"===a.type),this._scrollIntoView(b),this.active=b.first(),d=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",d.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),a&&"keydown"===a.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),c=b.children(".ui-menu"),c.length&&/^mouse/.test(a.type)&&this._startOpening(c),this.activeMenu=b.parent(),this._trigger("focus",a,{item:b})},_scrollIntoView:function(b){var c,d,e,f,g,h;this._hasScroll()&&(c=parseFloat(a.css(this.activeMenu[0],"borderTopWidth"))||0,d=parseFloat(a.css(this.activeMenu[0],"paddingTop"))||0,e=b.offset().top-this.activeMenu.offset().top-c-d,f=this.activeMenu.scrollTop(),g=this.activeMenu.height(),h=b.height(),e<0?this.activeMenu.scrollTop(f+e):e+h>g&&this.activeMenu.scrollTop(f+e-g+h))},blur:function(a,b){b||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",a,{item:this.active}))},_startOpening:function(a){clearTimeout(this.timer),"true"===a.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(a)},this.delay))},_open:function(b){var c=a.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(b.parents(".ui-menu")).hide().attr("aria-hidden","true"),b.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(c)},collapseAll:function(b,c){clearTimeout(this.timer),this.timer=this._delay(function(){var d=c?this.element:a(b&&b.target).closest(this.element.find(".ui-menu"));d.length||(d=this.element),this._close(d),this.blur(b),this.activeMenu=d},this.delay)},_close:function(a){a||(a=this.active?this.active.parent():this.element),a.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(a){var b=this.active&&this.active.parent().closest(".ui-menu-item",this.element);b&&b.length&&(this._close(),this.focus(a,b))},expand:function(a){var b=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();b&&b.length&&(this._open(b.parent()),this._delay(function(){this.focus(a,b)}))},next:function(a){this._move("next","first",a)},previous:function(a){this._move("prev","last",a)},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(a,b,c){var d;this.active&&(d="first"===a||"last"===a?this.active["first"===a?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[a+"All"](".ui-menu-item").eq(0)),d&&d.length&&this.active||(d=this.activeMenu.children(".ui-menu-item")[b]()),this.focus(c,d)},nextPage:function(b){var c,d,e;return this.active?void(this.isLastItem()||(this._hasScroll()?(d=this.active.offset().top,e=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return c=a(this),c.offset().top-d-e<0}),this.focus(b,c)):this.focus(b,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]()))):void this.next(b)},previousPage:function(b){var c,d,e;return this.active?void(this.isFirstItem()||(this._hasScroll()?(d=this.active.offset().top,e=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return c=a(this),c.offset().top-d+e>0}),this.focus(b,c)):this.focus(b,this.activeMenu.children(".ui-menu-item").first()))):void this.next(b)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(b){this.active=this.active||a(b.target).closest(".ui-menu-item");var c={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(b,!0),this._trigger("select",b,c)}})}(jQuery),function(a,b){function m(a,b,c){return[parseFloat(a[0])*(k.test(a[0])?b/100:1),parseFloat(a[1])*(k.test(a[1])?c/100:1)]}function n(b,c){return parseInt(a.css(b,c),10)||0}function o(b){var c=b[0];return 9===c.nodeType?{width:b.width(),height:b.height(),offset:{top:0,left:0}}:a.isWindow(c)?{width:b.width(),height:b.height(),offset:{top:b.scrollTop(),left:b.scrollLeft()}}:c.preventDefault?{width:0,height:0,offset:{top:c.pageY,left:c.pageX}}:{width:b.outerWidth(),height:b.outerHeight(),offset:b.offset()}}a.ui=a.ui||{};var c,d=Math.max,e=Math.abs,f=Math.round,g=/left|center|right/,h=/top|center|bottom/,i=/[\+\-]\d+(\.[\d]+)?%?/,j=/^\w+/,k=/%$/,l=a.fn.position;a.position={scrollbarWidth:function(){if(c!==b)return c;var d,e,f=a("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),g=f.children()[0];return a("body").append(f),d=g.offsetWidth,f.css("overflow","scroll"),e=g.offsetWidth,d===e&&(e=f[0].clientWidth),f.remove(),c=d-e},getScrollInfo:function(b){var c=b.isWindow?"":b.element.css("overflow-x"),d=b.isWindow?"":b.element.css("overflow-y"),e="scroll"===c||"auto"===c&&b.width<b.element[0].scrollWidth,f="scroll"===d||"auto"===d&&b.height<b.element[0].scrollHeight;return{width:f?a.position.scrollbarWidth():0,height:e?a.position.scrollbarWidth():0}},getWithinInfo:function(b){var c=a(b||window),d=a.isWindow(c[0]);return{element:c,isWindow:d,offset:c.offset()||{left:0,top:0},scrollLeft:c.scrollLeft(),scrollTop:c.scrollTop(),width:d?c.width():c.outerWidth(),height:d?c.height():c.outerHeight()}}},a.fn.position=function(b){if(!b||!b.of)return l.apply(this,arguments);b=a.extend({},b);var c,k,p,q,r,s,t=a(b.of),u=a.position.getWithinInfo(b.within),v=a.position.getScrollInfo(u),w=(b.collision||"flip").split(" "),x={};return s=o(t),t[0].preventDefault&&(b.at="left top"),k=s.width,p=s.height,q=s.offset,r=a.extend({},q),a.each(["my","at"],function(){var c,d,a=(b[this]||"").split(" ");1===a.length&&(a=g.test(a[0])?a.concat(["center"]):h.test(a[0])?["center"].concat(a):["center","center"]),a[0]=g.test(a[0])?a[0]:"center",a[1]=h.test(a[1])?a[1]:"center",c=i.exec(a[0]),d=i.exec(a[1]),x[this]=[c?c[0]:0,d?d[0]:0],b[this]=[j.exec(a[0])[0],j.exec(a[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===b.at[0]?r.left+=k:"center"===b.at[0]&&(r.left+=k/2),"bottom"===b.at[1]?r.top+=p:"center"===b.at[1]&&(r.top+=p/2),c=m(x.at,k,p),r.left+=c[0],r.top+=c[1],this.each(function(){var g,h,i=a(this),j=i.outerWidth(),l=i.outerHeight(),o=n(this,"marginLeft"),s=n(this,"marginTop"),y=j+o+n(this,"marginRight")+v.width,z=l+s+n(this,"marginBottom")+v.height,A=a.extend({},r),B=m(x.my,i.outerWidth(),i.outerHeight());"right"===b.my[0]?A.left-=j:"center"===b.my[0]&&(A.left-=j/2),"bottom"===b.my[1]?A.top-=l:"center"===b.my[1]&&(A.top-=l/2),A.left+=B[0],A.top+=B[1],a.support.offsetFractions||(A.left=f(A.left),A.top=f(A.top)),g={marginLeft:o,marginTop:s},a.each(["left","top"],function(d,e){a.ui.position[w[d]]&&a.ui.position[w[d]][e](A,{targetWidth:k,targetHeight:p,elemWidth:j,elemHeight:l,collisionPosition:g,collisionWidth:y,collisionHeight:z,offset:[c[0]+B[0],c[1]+B[1]],my:b.my,at:b.at,within:u,elem:i})}),b.using&&(h=function(a){var c=q.left-A.left,f=c+k-j,g=q.top-A.top,h=g+p-l,m={target:{element:t,left:q.left,top:q.top,width:k,height:p},element:{element:i,left:A.left,top:A.top,width:j,height:l},horizontal:f<0?"left":c>0?"right":"center",vertical:h<0?"top":g>0?"bottom":"middle"};k<j&&e(c+f)<k&&(m.horizontal="center"),p<l&&e(g+h)<p&&(m.vertical="middle"),d(e(c),e(f))>d(e(g),e(h))?m.important="horizontal":m.important="vertical",b.using.call(this,a,m)}),i.offset(a.extend(A,{using:h}))})},a.ui.position={fit:{left:function(a,b){var j,c=b.within,e=c.isWindow?c.scrollLeft:c.offset.left,f=c.width,g=a.left-b.collisionPosition.marginLeft,h=e-g,i=g+b.collisionWidth-f-e;b.collisionWidth>f?h>0&&i<=0?(j=a.left+h+b.collisionWidth-f-e,a.left+=h-j):i>0&&h<=0?a.left=e:h>i?a.left=e+f-b.collisionWidth:a.left=e:h>0?a.left+=h:i>0?a.left-=i:a.left=d(a.left-g,a.left)},top:function(a,b){var j,c=b.within,e=c.isWindow?c.scrollTop:c.offset.top,f=b.within.height,g=a.top-b.collisionPosition.marginTop,h=e-g,i=g+b.collisionHeight-f-e;b.collisionHeight>f?h>0&&i<=0?(j=a.top+h+b.collisionHeight-f-e,a.top+=h-j):i>0&&h<=0?a.top=e:h>i?a.top=e+f-b.collisionHeight:a.top=e:h>0?a.top+=h:i>0?a.top-=i:a.top=d(a.top-g,a.top)}},flip:{left:function(a,b){var n,o,c=b.within,d=c.offset.left+c.scrollLeft,f=c.width,g=c.isWindow?c.scrollLeft:c.offset.left,h=a.left-b.collisionPosition.marginLeft,i=h-g,j=h+b.collisionWidth-f-g,k="left"===b.my[0]?-b.elemWidth:"right"===b.my[0]?b.elemWidth:0,l="left"===b.at[0]?b.targetWidth:"right"===b.at[0]?-b.targetWidth:0,m=-2*b.offset[0];i<0?(n=a.left+k+l+m+b.collisionWidth-f-d,(n<0||n<e(i))&&(a.left+=k+l+m)):j>0&&(o=a.left-b.collisionPosition.marginLeft+k+l+m-g,(o>0||e(o)<j)&&(a.left+=k+l+m))},top:function(a,b){var o,p,c=b.within,d=c.offset.top+c.scrollTop,f=c.height,g=c.isWindow?c.scrollTop:c.offset.top,h=a.top-b.collisionPosition.marginTop,i=h-g,j=h+b.collisionHeight-f-g,k="top"===b.my[1],l=k?-b.elemHeight:"bottom"===b.my[1]?b.elemHeight:0,m="top"===b.at[1]?b.targetHeight:"bottom"===b.at[1]?-b.targetHeight:0,n=-2*b.offset[1];i<0?(p=a.top+l+m+n+b.collisionHeight-f-d,a.top+l+m+n>i&&(p<0||p<e(i))&&(a.top+=l+m+n)):j>0&&(o=a.top-b.collisionPosition.marginTop+l+m+n-g,a.top+l+m+n>j&&(o>0||e(o)<j)&&(a.top+=l+m+n))}},flipfit:{left:function(){a.ui.position.flip.left.apply(this,arguments),a.ui.position.fit.left.apply(this,arguments)},top:function(){a.ui.position.flip.top.apply(this,arguments),a.ui.position.fit.top.apply(this,arguments)}}},function(){var b,c,d,e,f,g=document.getElementsByTagName("body")[0],h=document.createElement("div");b=document.createElement(g?"div":"body"),d={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},g&&a.extend(d,{position:"absolute",left:"-1000px",top:"-1000px"});for(f in d)b.style[f]=d[f];b.appendChild(h),c=g||document.documentElement,c.insertBefore(b,c.firstChild),h.style.cssText="position: absolute; left: 10.7432222px;",e=a(h).offset().left,a.support.offsetFractions=e>10&&e<11,b.innerHTML="",c.removeChild(b)}()}(jQuery),function(a,b){a.widget("ui.progressbar",{version:"1.10.3",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(a){return a===b?this.options.value:(this.options.value=this._constrainedValue(a),void this._refreshValue())},_constrainedValue:function(a){return a===b&&(a=this.options.value),this.indeterminate=a===!1,"number"!=typeof a&&(a=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,a))},_setOptions:function(a){var b=a.value;delete a.value,this._super(a),this.options.value=this._constrainedValue(b),this._refreshValue()},_setOption:function(a,b){"max"===a&&(b=Math.max(this.min,b)),this._super(a,b)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var b=this.options.value,c=this._percentage();this.valueDiv.toggle(this.indeterminate||b>this.min).toggleClass("ui-corner-right",b===this.options.max).width(c.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=a("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":b}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==b&&(this.oldValue=b,this._trigger("change")),b===this.options.max&&this._trigger("complete")}})}(jQuery),function(a,b){var c=5;a.widget("ui.slider",a.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var b,c,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",g=[];for(c=d.values&&d.values.length||1,e.length>c&&(e.slice(c).remove(),e=e.slice(0,c)),b=e.length;b<c;b++)g.push(f);this.handles=e.add(a(g.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(b){a(this).data("ui-slider-handle-index",b)})},_createRange:function(){var b=this.options,c="";b.range?(b.range===!0&&(b.values?b.values.length&&2!==b.values.length?b.values=[b.values[0],b.values[0]]:a.isArray(b.values)&&(b.values=b.values.slice(0)):b.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=a("<div></div>").appendTo(this.element),c="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(c+("min"===b.range||"max"===b.range?" ui-slider-range-"+b.range:""))):this.range=a([])},_setupEvents:function(){var a=this.handles.add(this.range).filter("a");this._off(a),this._on(a,this._handleEvents),this._hoverable(a),this._focusable(a)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(b){var c,d,e,f,g,h,i,j,k=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),c={x:b.pageX,y:b.pageY},d=this._normValueFromMouse(c),e=this._valueMax()-this._valueMin()+1,this.handles.each(function(b){var c=Math.abs(d-k.values(b));(e>c||e===c&&(b===k._lastChangedValue||k.values(b)===l.min))&&(e=c,f=a(this),g=b)}),h=this._start(b,g),h!==!1&&(this._mouseSliding=!0,this._handleIndex=g,f.addClass("ui-state-active").focus(),i=f.offset(),j=!a(b.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=j?{left:0,top:0}:{left:b.pageX-i.left-f.width()/2,top:b.pageY-i.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,g,d),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);return this._slide(a,this._handleIndex,c),!1},_mouseStop:function(a){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;return"horizontal"===this.orientation?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),d<0&&(d=0),"vertical"===this.orientation&&(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e,this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};return this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&&this.options.values.length?(d=this.values(b?0:1),2===this.options.values.length&&this.options.range===!0&&(0===b&&c>d||1===b&&c<d)&&(c=d),c!==this.values(b)&&(e=this.values(),e[b]=c,f=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e}),d=this.values(b?0:1),f!==!1&&this.values(b,c,!0))):c!==this.value()&&(f=this._trigger("slide",a,{handle:this.handles[b],value:c}),f!==!1&&this.value(c))},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._lastChangedValue=b,this._trigger("change",a,c)}},value:function(a){return arguments.length?(this.options.value=this._trimAlignValue(a),this._refreshValue(),void this._change(null,0)):this._value()},values:function(b,c){var d,e,f;if(arguments.length>1)return this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),void this._change(null,b);if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();for(d=this.options.values,e=arguments[0],f=0;f<d.length;f+=1)d[f]=this._trimAlignValue(e[f]),this._change(null,f);this._refreshValue()},_setOption:function(b,c){var d,e=0;switch("range"===b&&this.options.range===!0&&("min"===c?(this.options.value=this._values(0),this.options.values=null):"max"===c&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),a.isArray(this.options.values)&&(e=this.options.values.length),a.Widget.prototype._setOption.apply(this,arguments),b){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),d=0;d<e;d+=1)this._change(null,d);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a)},_values:function(a){var b,c,d;if(arguments.length)return b=this.options.values[a],b=this._trimAlignValue(b);if(this.options.values&&this.options.values.length){for(c=this.options.values.slice(),d=0;d<c.length;d+=1)c[d]=this._trimAlignValue(c[d]);return c}return[]},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;return 2*Math.abs(c)>=b&&(d+=c>0?b:-b),parseFloat(d.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b,c,d,e,f,g=this.options.range,h=this.options,i=this,j=!this._animateOff&&h.animate,k={};this.options.values&&this.options.values.length?this.handles.each(function(d){c=(i.values(d)-i._valueMin())/(i._valueMax()-i._valueMin())*100,k["horizontal"===i.orientation?"left":"bottom"]=c+"%",a(this).stop(1,1)[j?"animate":"css"](k,h.animate),i.options.range===!0&&("horizontal"===i.orientation?(0===d&&i.range.stop(1,1)[j?"animate":"css"]({left:c+"%"},h.animate),1===d&&i.range[j?"animate":"css"]({width:c-b+"%"},{queue:!1,duration:h.animate})):(0===d&&i.range.stop(1,1)[j?"animate":"css"]({bottom:c+"%"},h.animate),1===d&&i.range[j?"animate":"css"]({height:c-b+"%"},{queue:!1,duration:h.animate}))),b=c}):(d=this.value(),e=this._valueMin(),f=this._valueMax(),c=f!==e?(d-e)/(f-e)*100:0,k["horizontal"===this.orientation?"left":"bottom"]=c+"%",this.handle.stop(1,1)[j?"animate":"css"](k,h.animate),"min"===g&&"horizontal"===this.orientation&&this.range.stop(1,1)[j?"animate":"css"]({width:c+"%"},h.animate),"max"===g&&"horizontal"===this.orientation&&this.range[j?"animate":"css"]({width:100-c+"%"},{queue:!1,duration:h.animate}),"min"===g&&"vertical"===this.orientation&&this.range.stop(1,1)[j?"animate":"css"]({height:c+"%"},h.animate),"max"===g&&"vertical"===this.orientation&&this.range[j?"animate":"css"]({height:100-c+"%"},{queue:!1,duration:h.animate}))},_handleEvents:{keydown:function(b){var d,e,f,g,h=a(b.target).data("ui-slider-handle-index");switch(b.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(b.preventDefault(),!this._keySliding&&(this._keySliding=!0,a(b.target).addClass("ui-state-active"),d=this._start(b,h),d===!1))return}switch(g=this.options.step,e=f=this.options.values&&this.options.values.length?this.values(h):this.value(),b.keyCode){case a.ui.keyCode.HOME:f=this._valueMin();break;case a.ui.keyCode.END:f=this._valueMax();break;case a.ui.keyCode.PAGE_UP:f=this._trimAlignValue(e+(this._valueMax()-this._valueMin())/c);break;case a.ui.keyCode.PAGE_DOWN:f=this._trimAlignValue(e-(this._valueMax()-this._valueMin())/c);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(e===this._valueMax())return;f=this._trimAlignValue(e+g);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(e===this._valueMin())return;f=this._trimAlignValue(e-g)}this._slide(b,h,f)},click:function(a){a.preventDefault()},keyup:function(b){var c=a(b.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(b,c),this._change(b,c),a(b.target).removeClass("ui-state-active"))}}})}(jQuery),function(a){function b(a){return function(){var b=this.element.val();a.apply(this,arguments),this._refresh(),b!==this.element.val()&&this._trigger("change")}}a.widget("ui.spinner",{version:"1.10.3",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var b={},c=this.element;return a.each(["min","max","step"],function(a,d){var e=c.attr(d);void 0!==e&&e.length&&(b[d]=e)}),b},_events:{keydown:function(a){this._start(a)&&this._keydown(a)&&a.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(a){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",a)))},mousewheel:function(a,b){if(b){if(!this.spinning&&!this._start(a))return!1;this._spin((b>0?1:-1)*this.options.step,a),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(a)},100),a.preventDefault()}},"mousedown .ui-spinner-button":function(b){function d(){var a=this.element[0]===this.document[0].activeElement;a||(this.element.focus(),this.previous=c,this._delay(function(){this.previous=c}))}var c;c=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),b.preventDefault(),d.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,d.call(this)}),this._start(b)!==!1&&this._repeat(null,a(b.currentTarget).hasClass("ui-spinner-up")?1:-1,b)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(b){if(a(b.currentTarget).hasClass("ui-state-active"))return this._start(b)!==!1&&void this._repeat(null,a(b.currentTarget).hasClass("ui-spinner-up")?1:-1,b)},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var a=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=a.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*a.height())&&a.height()>0&&a.height(a.height()),this.options.disabled&&this.disable()},_keydown:function(b){var c=this.options,d=a.ui.keyCode;switch(b.keyCode){case d.UP:return this._repeat(null,1,b),!0;case d.DOWN:return this._repeat(null,-1,b),!0;case d.PAGE_UP:return this._repeat(null,c.page,b),!0;case d.PAGE_DOWN:return this._repeat(null,-c.page,b),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(a){return!(!this.spinning&&this._trigger("start",a)===!1)&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(a,b,c){a=a||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,b,c)},a),this._spin(b*this.options.step,c)},_spin:function(a,b){var c=this.value()||0;this.counter||(this.counter=1),c=this._adjustValue(c+a*this._increment(this.counter)),this.spinning&&this._trigger("spin",b,{value:c})===!1||(this._value(c),this.counter++)},_increment:function(b){var c=this.options.incremental;return c?a.isFunction(c)?c(b):Math.floor(b*b*b/5e4-b*b/500+17*b/200+1):1},_precision:function(){var a=this._precisionOf(this.options.step);return null!==this.options.min&&(a=Math.max(a,this._precisionOf(this.options.min))),a},_precisionOf:function(a){var b=a.toString(),c=b.indexOf(".");return c===-1?0:b.length-c-1},_adjustValue:function(a){var b,c,d=this.options;return b=null!==d.min?d.min:0,c=a-b,c=Math.round(c/d.step)*d.step,a=b+c,a=parseFloat(a.toFixed(this._precision())),null!==d.max&&a>d.max?d.max:null!==d.min&&a<d.min?d.min:a},_stop:function(a){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",a))},_setOption:function(a,b){if("culture"===a||"numberFormat"===a){var c=this._parse(this.element.val());return this.options[a]=b,void this.element.val(this._format(c))}"max"!==a&&"min"!==a&&"step"!==a||"string"==typeof b&&(b=this._parse(b)),"icons"===a&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(b.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(b.down)),this._super(a,b),"disabled"===a&&(b?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:b(function(a){this._super(a),this._value(this.element.val())}),_parse:function(a){return"string"==typeof a&&""!==a&&(a=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(a,10,this.options.culture):+a),""===a||isNaN(a)?null:a},_format:function(a){return""===a?"":window.Globalize&&this.options.numberFormat?Globalize.format(a,this.options.numberFormat,this.options.culture):a},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(a,b){var c;""!==a&&(c=this._parse(a),null!==c&&(b||(c=this._adjustValue(c)),a=this._format(c))),this.element.val(a),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:b(function(a){this._stepUp(a)}),_stepUp:function(a){this._start()&&(this._spin((a||1)*this.options.step),this._stop())},stepDown:b(function(a){this._stepDown(a)}),_stepDown:function(a){this._start()&&(this._spin((a||1)*-this.options.step),this._stop())},pageUp:b(function(a){this._stepUp((a||1)*this.options.page)}),pageDown:b(function(a){this._stepDown((a||1)*this.options.page)}),value:function(a){return arguments.length?void b(this._value).call(this,a):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}(jQuery),function(a,b){function e(){return++c}function f(a){return a.hash.length>1&&decodeURIComponent(a.href.replace(d,""))===decodeURIComponent(location.href.replace(d,""))}var c=0,d=/#.*$/;a.widget("ui.tabs",{version:"1.10.3",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var b=this,c=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",c.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(b){a(this).is(".ui-state-disabled")&&b.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){a(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),c.active=this._initialActive(),a.isArray(c.disabled)&&(c.disabled=a.unique(c.disabled.concat(a.map(this.tabs.filter(".ui-state-disabled"),function(a){return b.tabs.index(a)}))).sort()),this.options.active!==!1&&this.anchors.length?this.active=this._findActive(c.active):this.active=a(),this._refresh(),this.active.length&&this.load(c.active)},_initialActive:function(){var b=this.options.active,c=this.options.collapsible,d=location.hash.substring(1);return null===b&&(d&&this.tabs.each(function(c,e){if(a(e).attr("aria-controls")===d)return b=c,!1}),null===b&&(b=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==b&&b!==-1||(b=!!this.tabs.length&&0)),b!==!1&&(b=this.tabs.index(this.tabs.eq(b)),b===-1&&(b=!c&&0)),!c&&b===!1&&this.anchors.length&&(b=0),b},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):a()}},_tabKeydown:function(b){var c=a(this.document[0].activeElement).closest("li"),d=this.tabs.index(c),e=!0;if(!this._handlePageNav(b)){switch(b.keyCode){case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:d++;break;case a.ui.keyCode.UP:case a.ui.keyCode.LEFT:e=!1,d--;break;case a.ui.keyCode.END:d=this.anchors.length-1;break;case a.ui.keyCode.HOME:d=0;break;case a.ui.keyCode.SPACE:return b.preventDefault(),clearTimeout(this.activating),void this._activate(d);case a.ui.keyCode.ENTER:return b.preventDefault(),clearTimeout(this.activating),void this._activate(d!==this.options.active&&d);default:return}b.preventDefault(),clearTimeout(this.activating),d=this._focusNextTab(d,e),b.ctrlKey||(c.attr("aria-selected","false"),this.tabs.eq(d).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",d)},this.delay))}},_panelKeydown:function(b){this._handlePageNav(b)||b.ctrlKey&&b.keyCode===a.ui.keyCode.UP&&(b.preventDefault(),this.active.focus())},_handlePageNav:function(b){return b.altKey&&b.keyCode===a.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):b.altKey&&b.keyCode===a.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(b,c){function e(){return b>d&&(b=0),b<0&&(b=d),b}for(var d=this.tabs.length-1;a.inArray(e(),this.options.disabled)!==-1;)b=c?b+1:b-1;return b},_focusNextTab:function(a,b){return a=this._findNextTab(a,b),this.tabs.eq(a).focus(),a},_setOption:function(a,b){return"active"===a?void this._activate(b):"disabled"===a?void this._setupDisabled(b):(this._super(a,b),"collapsible"===a&&(this.element.toggleClass("ui-tabs-collapsible",b),b||this.options.active!==!1||this._activate(0)),"event"===a&&this._setupEvents(b),void("heightStyle"===a&&this._setupHeightStyle(b)))},_tabId:function(a){return a.attr("aria-controls")||"ui-tabs-"+e()},_sanitizeSelector:function(a){return a?a.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var b=this.options,c=this.tablist.children(":has(a[href])");b.disabled=a.map(c.filter(".ui-state-disabled"),function(a){return c.index(a)}),this._processTabs(),b.active!==!1&&this.anchors.length?this.active.length&&!a.contains(this.tablist[0],this.active[0])?this.tabs.length===b.disabled.length?(b.active=!1,this.active=a()):this._activate(this._findNextTab(Math.max(0,b.active-1),!1)):b.active=this.tabs.index(this.active):(b.active=!1,this.active=a()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var b=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return a("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=a(),this.anchors.each(function(c,d){var e,g,h,i=a(d).uniqueId().attr("id"),j=a(d).closest("li"),k=j.attr("aria-controls");f(d)?(e=d.hash,g=b.element.find(b._sanitizeSelector(e))):(h=b._tabId(j),e="#"+h,g=b.element.find(e),g.length||(g=b._createPanel(h),g.insertAfter(b.panels[c-1]||b.tablist)),g.attr("aria-live","polite")),g.length&&(b.panels=b.panels.add(g)),k&&j.data("ui-tabs-aria-controls",k),j.attr({"aria-controls":e.substring(1),"aria-labelledby":i}),g.attr("aria-labelledby",i)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(b){return a("<div>").attr("id",b).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(b){a.isArray(b)&&(b.length?b.length===this.anchors.length&&(b=!0):b=!1);for(var d,c=0;d=this.tabs[c];c++)b===!0||a.inArray(c,b)!==-1?a(d).addClass("ui-state-disabled").attr("aria-disabled","true"):a(d).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=b},_setupEvents:function(b){var c={click:function(a){a.preventDefault()}};b&&a.each(b.split(" "),function(a,b){c[b]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,c),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(b){var c,d=this.element.parent();"fill"===b?(c=d.height(),c-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var b=a(this),d=b.css("position");"absolute"!==d&&"fixed"!==d&&(c-=b.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){c-=a(this).outerHeight(!0)}),this.panels.each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):"auto"===b&&(c=0,this.panels.each(function(){c=Math.max(c,a(this).height("").height())}).height(c))},_eventHandler:function(b){var c=this.options,d=this.active,e=a(b.currentTarget),f=e.closest("li"),g=f[0]===d[0],h=g&&c.collapsible,i=h?a():this._getPanelForTab(f),j=d.length?this._getPanelForTab(d):a(),k={oldTab:d,oldPanel:j,newTab:h?a():f,newPanel:i};b.preventDefault(),f.hasClass("ui-state-disabled")||f.hasClass("ui-tabs-loading")||this.running||g&&!c.collapsible||this._trigger("beforeActivate",b,k)===!1||(c.active=!h&&this.tabs.index(f),this.active=g?a():f,this.xhr&&this.xhr.abort(),j.length||i.length||a.error("jQuery UI Tabs: Mismatching fragment identifier."),i.length&&this.load(this.tabs.index(f),b),this._toggle(b,k))},_toggle:function(b,c){function g(){d.running=!1,d._trigger("activate",b,c)}function h(){c.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),e.length&&d.options.show?d._show(e,d.options.show,g):(e.show(),g())}var d=this,e=c.newPanel,f=c.oldPanel;this.running=!0,f.length&&this.options.hide?this._hide(f,this.options.hide,function(){c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),h()}):(c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),f.hide(),h()),f.attr({"aria-expanded":"false","aria-hidden":"true"}),c.oldTab.attr("aria-selected","false"),e.length&&f.length?c.oldTab.attr("tabIndex",-1):e.length&&this.tabs.filter(function(){return 0===a(this).attr("tabIndex")}).attr("tabIndex",-1),e.attr({"aria-expanded":"true","aria-hidden":"false"}),c.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(b){var c,d=this._findActive(b);d[0]!==this.active[0]&&(d.length||(d=this.active),c=d.find(".ui-tabs-anchor")[0],this._eventHandler({target:c,currentTarget:c,preventDefault:a.noop}))},_findActive:function(b){return b===!1?a():this.tabs.eq(b)},_getIndex:function(a){return"string"==typeof a&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){a.data(this,"ui-tabs-destroy")?a(this).remove():a(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var b=a(this),c=b.data("ui-tabs-aria-controls");c?b.attr("aria-controls",c).removeData("ui-tabs-aria-controls"):b.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(c){var d=this.options.disabled;d!==!1&&(c===b?d=!1:(c=this._getIndex(c),d=a.isArray(d)?a.map(d,function(a){return a!==c?a:null}):a.map(this.tabs,function(a,b){return b!==c?b:null})),this._setupDisabled(d))},disable:function(c){var d=this.options.disabled;if(d!==!0){if(c===b)d=!0;else{if(c=this._getIndex(c),a.inArray(c,d)!==-1)return;d=a.isArray(d)?a.merge([c],d).sort():[c]}this._setupDisabled(d)}},load:function(b,c){b=this._getIndex(b);var d=this,e=this.tabs.eq(b),g=e.find(".ui-tabs-anchor"),h=this._getPanelForTab(e),i={tab:e,panel:h};f(g[0])||(this.xhr=a.ajax(this._ajaxSettings(g,c,i)),this.xhr&&"canceled"!==this.xhr.statusText&&(e.addClass("ui-tabs-loading"),h.attr("aria-busy","true"),this.xhr.success(function(a){setTimeout(function(){h.html(a),d._trigger("load",c,i)},1)}).complete(function(a,b){setTimeout(function(){"abort"===b&&d.panels.stop(!1,!0),e.removeClass("ui-tabs-loading"),h.removeAttr("aria-busy"),a===d.xhr&&delete d.xhr},1)})))},_ajaxSettings:function(b,c,d){var e=this;return{url:b.attr("href"),beforeSend:function(b,f){return e._trigger("beforeLoad",c,a.extend({jqXHR:b,ajaxSettings:f},d))}}},_getPanelForTab:function(b){var c=a(b).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+c))}})}(jQuery),function(a){function c(b,c){var d=(b.attr("aria-describedby")||"").split(/\s+/);d.push(c),b.data("ui-tooltip-id",c).attr("aria-describedby",a.trim(d.join(" ")))}function d(b){var c=b.data("ui-tooltip-id"),d=(b.attr("aria-describedby")||"").split(/\s+/),e=a.inArray(c,d);e!==-1&&d.splice(e,1),b.removeData("ui-tooltip-id"),d=a.trim(d.join(" ")),d?b.attr("aria-describedby",d):b.removeAttr("aria-describedby")}var b=0;a.widget("ui.tooltip",{version:"1.10.3",options:{content:function(){var b=a(this).attr("title")||"";return a("<a>").text(b).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(b,c){var d=this;return"disabled"===b?(this[c?"_disable":"_enable"](),void(this.options[b]=c)):(this._super(b,c),void("content"===b&&a.each(this.tooltips,function(a,b){d._updateContent(b)})))},_disable:function(){var b=this;a.each(this.tooltips,function(c,d){var e=a.Event("blur");e.target=e.currentTarget=d[0],b.close(e,!0)}),this.element.find(this.options.items).addBack().each(function(){var b=a(this);b.is("[title]")&&b.data("ui-tooltip-title",b.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var b=a(this);b.data("ui-tooltip-title")&&b.attr("title",b.data("ui-tooltip-title"))})},open:function(b){var c=this,d=a(b?b.target:this.element).closest(this.options.items);d.length&&!d.data("ui-tooltip-id")&&(d.attr("title")&&d.data("ui-tooltip-title",d.attr("title")),d.data("ui-tooltip-open",!0),b&&"mouseover"===b.type&&d.parents().each(function(){var d,b=a(this);b.data("ui-tooltip-open")&&(d=a.Event("blur"),d.target=d.currentTarget=this,c.close(d,!0)),b.attr("title")&&(b.uniqueId(),c.parents[this.id]={element:this,title:b.attr("title")},b.attr("title",""))}),this._updateContent(d,b))},_updateContent:function(a,b){var c,d=this.options.content,e=this,f=b?b.type:null;return"string"==typeof d?this._open(b,a,d):(c=d.call(a[0],function(c){a.data("ui-tooltip-open")&&e._delay(function(){b&&(b.type=f),this._open(b,a,c)})}),void(c&&this._open(b,a,c)))},_open:function(b,d,e){function j(a){i.of=a,f.is(":hidden")||f.position(i)}var f,g,h,i=a.extend({},this.options.position);if(e){if(f=this._find(d),f.length)return void f.find(".ui-tooltip-content").html(e);d.is("[title]")&&(b&&"mouseover"===b.type?d.attr("title",""):d.removeAttr("title")),f=this._tooltip(d),c(d,f.attr("id")),f.find(".ui-tooltip-content").html(e),this.options.track&&b&&/^mouse/.test(b.type)?(this._on(this.document,{mousemove:j}),j(b)):f.position(a.extend({of:d},this.options.position)),f.hide(),this._show(f,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){f.is(":visible")&&(j(i.of),clearInterval(h))},a.fx.interval)),this._trigger("open",b,{tooltip:f}),g={keyup:function(b){if(b.keyCode===a.ui.keyCode.ESCAPE){var c=a.Event(b);c.currentTarget=d[0],this.close(c,!0)}},remove:function(){this._removeTooltip(f)}},b&&"mouseover"!==b.type||(g.mouseleave="close"),b&&"focusin"!==b.type||(g.focusout="close"),this._on(!0,d,g)}},close:function(b){var c=this,e=a(b?b.currentTarget:this.element),f=this._find(e);this.closing||(clearInterval(this.delayedShow),e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title")),d(e),f.stop(!0),this._hide(f,this.options.hide,function(){c._removeTooltip(a(this))}),e.removeData("ui-tooltip-open"),this._off(e,"mouseleave focusout keyup"),e[0]!==this.element[0]&&this._off(e,"remove"),this._off(this.document,"mousemove"),b&&"mouseleave"===b.type&&a.each(this.parents,function(b,d){a(d.element).attr("title",d.title),delete c.parents[b]}),this.closing=!0,this._trigger("close",b,{tooltip:f}),this.closing=!1)},_tooltip:function(c){var d="ui-tooltip-"+b++,e=a("<div>").attr({id:d,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return a("<div>").addClass("ui-tooltip-content").appendTo(e),e.appendTo(this.document[0].body),this.tooltips[d]=c,e},_find:function(b){var c=b.data("ui-tooltip-id");return c?a("#"+c):a()},_removeTooltip:function(a){a.remove(),delete this.tooltips[a.attr("id")]},_destroy:function(){var b=this;a.each(this.tooltips,function(c,d){var e=a.Event("blur");e.target=e.currentTarget=d[0],b.close(e,!0),a("#"+c).remove(),d.data("ui-tooltip-title")&&(d.attr("title",d.data("ui-tooltip-title")),d.removeData("ui-tooltip-title"))})}})}(jQuery);/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
(function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},w=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+(I?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(q(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current;d&&(q(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d=a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")),b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:n.scrollLeft(),y:n.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&r.innerWidth?r.innerWidth:n.width(),d.h=s&&r.innerHeight?r.innerHeight:n.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement;if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1<a.group.length&&k[c]!==v)return b[d](k[c]),e.preventDefault(),!1;if(-1<f.inArray(c,k))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,k,g){for(var h=f(d.target||null),j=!1;h.length&&!j&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)j=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&&(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1<b.group.length&&!a.canShrink){if(0<g||0<k)b.prev(0<g?"down":"left");else if(0>g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&&b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0,{},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){return q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=!0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,w(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case "image":e=a.tpl.image.replace("{href}",g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll":"no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,p=h.maxHeight,s=h.scrolling,q=h.scrollOutside?h.scrollbarWidth:0,x=h.margin,y=l(x[1]+x[3]),r=l(x[0]+x[2]),v,z,t,C,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");x=l(k.outerWidth(!0)-k.width());v=l(k.outerHeight(!0)-k.height());z=y+x;t=r+v;C=E(c)?(a.w-z)*l(c)/100:c;A=E(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(H=h.content,h.autoHeight&&1===H.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).height(9999),F=H.contents().find("body"),q&&F.css("overflow-x","hidden"),A=F.outerHeight(!0))}catch(G){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=l(C);j=l(A);D=C/A;m=l(E(m)?l(m,"w")-z:m);n=l(E(n)?l(n,"w")-z:n);u=l(E(u)?l(u,"h")-t:u);p=l(E(p)?l(p,"h")-t:p);F=n;B=p;h.fitToView&&(n=Math.min(a.w-z,n),p=Math.min(a.h-t,p));z=a.w-y;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/D)),j>p&&(j=p,c=l(j*D)),c<m&&(c=m,j=l(c/D)),j<u&&(j=u,c=l(j*D))):(c=Math.max(m,Math.min(c,n)),h.autoHeight&&"iframe"!==h.type&&(g.width(c),j=g.height()),j=Math.max(u,Math.min(j,p)));if(h.fitToView)if(g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height(),h.aspectRatio)for(;(a>z||y>r)&&(c>m&&j>u)&&!(19<d++);)j=Math.max(u,Math.min(p,j-10)),c=l(j*D),c<m&&(c=m,j=l(c/D)),c>n&&(c=n,j=l(c/D)),g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height();else c=Math.max(m,Math.min(c,c-(a-z))),j=Math.max(u,Math.min(j,j-(y-r)));q&&("auto"===s&&j<A&&c+x+q<z)&&(c+=q);g.width(c).height(j);e.width(c+x);a=e.width();y=e.height();e=(a>z||y>r)&&c>m&&j>u;c=h.aspectRatio?c<F&&j<B&&c<C&&j<A:(c<F||j<B)&&(c<C||j<A);f.extend(h,{dim:{width:w(a),height:w(y)},origWidth:C,origHeight:A,canShrink:e,canExpand:c,wPadding:x,hPadding:v,wrapSpace:y-k.outerHeight(!0),skinSpace:k.height()-j});!H&&(h.autoHeight&&j>u&&j<p&&!c)&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute",top:c[0],left:c[3]};d.autoCenter&&d.fixed&&!a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=w(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=w(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&(b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){!f(d.target).is("a")&&!f(d.target).parent().is("a")&&(d.preventDefault(),b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(a){a=a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,j=a.wPadding,m=b.getViewport();!e&&(a.isDom&&d.is(":visible"))&&(e=d.find("img:first"),e.length||(e=d));t(e)?(c=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):(c.top=m.y+(m.h-g)*a.topRatio,c.left=m.x+(m.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=m.y,c.left-=m.x;return c={top:w(c.top-h*a.topRatio),left:w(c.left-j*a.leftRatio),width:w(f+j),height:w(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](l("width"===f?c:c-g*e)),b.inner[f](l("width"===f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,k=f.extend({opacity:1},d);delete k.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(k,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&&(c.opacity=0.1));b.wrap.animate(c,{duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=w(l(e[g])-200),c[g]="+=200px"):(e[g]=w(l(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,el:f("html"),create:function(a){a=f.extend({},this.defaults,a);this.overlay&&this.close();this.overlay=f('<div class="fancybox-overlay"></div>').appendTo(b.coming?b.coming.parent:a.parent);this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(n.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive?b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){var a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),a=n.scrollTop(),b=n.scrollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%");I?(b=Math.max(G.documentElement.offsetWidth,G.body.offsetWidth),p.width()>b&&(a=p.width())):p.width()>n.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&(this.fixed&&b.fixed)&&(e||(this.margin=p.height()>n.height()?f("html").css("margin-right").replace("px",""):!1),b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){var e,c;b.locked&&(!1!==this.margin&&(f("*").filter(function(){return"fixed"===f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),e=n.scrollTop(),c=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(e).scrollLeft(c));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(q(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),I&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):p.undelegate(c,"click.fb-start").delegate(c+":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===v&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===v){a=f.support;d=f('<div style="position:fixed;top:20px;"></div>').appendTo("body");var e=20===d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(r).width();J.addClass("fancybox-lock-test");d=f(r).width();J.removeClass("fancybox-lock-test");f("<style type='text/css'>.fancybox-margin{margin-right:"+(d-a)+"px;}</style>").appendTo("head")})})(window,document,jQuery);(function(k){'use strict';k(['jquery'],function($){var j=$.scrollTo=function(a,b,c){return $(window).scrollTo(a,b,c)};j.defaults={axis:'xy',duration:0,limit:!0};j.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(f,g,h){if(typeof g=='object'){h=g;g=0}if(typeof h=='function')h={onAfter:h};if(f=='max')f=9e9;h=$.extend({},j.defaults,h);g=g||h.duration;h.queue=h.queue&&h.axis.length>1;if(h.queue)g/=2;h.offset=both(h.offset);h.over=both(h.over);return this._scrollable().each(function(){if(f==null)return;var d=this,$elem=$(d),targ=f,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=win?$(targ):$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}var e=$.isFunction(h.offset)&&h.offset(d,targ)||h.offset;$.each(h.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=j.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(h.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=e[pos]||0;if(h.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*h.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(h.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&h.queue){if(old!=attr[key])animate(h.onAfterFirst);delete attr[key]}});animate(h.onAfter);function animate(a){$elem.animate(attr,g,h.easing,a&&function(){a.call(this,targ,h)})}}).end()};j.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}return j})}(typeof define==='function'&&define.amd?define:function(a,b){if(typeof module!=='undefined'&&module.exports){module.exports=b(require('jquery'))}else{b(jQuery)}}));(function(a){var b=a.serialScroll=function(c){return a(window).serialScroll(c)};b.defaults={duration:1e3,axis:"x",event:"click",start:0,step:1,lock:!0,cycle:!0,constant:!0};a.fn.serialScroll=function(c){return this.each(function(){var t=a.extend({},b.defaults,c),s=t.event,i=t.step,r=t.lazy,e=t.target?this:document,u=a(t.target||this,e),p=u[0],m=t.items,h=t.start,g=t.interval,k=t.navigation,l;if(!r){m=d()}if(t.force){f({},h)}a(t.prev||[],e).bind(s,-i,q);a(t.next||[],e).bind(s,i,q);if(!p.ssbound){u.bind("prev.serialScroll",-i,q).bind("next.serialScroll",i,q).bind("goto.serialScroll",f)}if(g){u.bind("start.serialScroll",function(v){if(!g){o();g=!0;n()}}).bind("stop.serialScroll",function(){o();g=!1})}u.bind("notify.serialScroll",function(x,w){var v=j(w);if(v>-1){h=v}});p.ssbound=!0;if(t.jump){(r?u:d()).bind(s,function(v){f(v,j(v.target))})}if(k){k=a(k,e).bind(s,function(v){v.data=Math.round(d().length/k.length)*k.index(this);f(v,this)})}function q(v){v.data+=h;f(v,this)}function f(B,z){if(!isNaN(z)){B.data=z;z=p}var C=B.data,v,D=B.type,A=t.exclude?d().slice(0,-t.exclude):d(),y=A.length,w=A[C],x=t.duration;if(D){B.preventDefault()}if(g){o();l=setTimeout(n,t.interval)}if(!w){v=C<0?0:y-1;if(h!=v){C=v}else{if(!t.cycle){return}else{C=y-v-1}}w=A[C]}if(!w||t.lock&&u.is(":animated")||D&&t.onBefore&&t.onBefore(B,w,u,d(),C)===!1){return}if(t.stop){u.queue("fx",[]).stop()}if(t.constant){x=Math.abs(x/i*(h-C))}u.scrollTo(w,x,t).trigger("notify.serialScroll",[C])}function n(){u.trigger("next.serialScroll")}function o(){clearTimeout(l)}function d(){return a(m,p)}function j(w){if(!isNaN(w)){return w}var x=d(),v;while((v=x.index(w))==-1&&w!=p){w=w.parentNode}return v}})}})(jQuery);/*!
 * jQuery Cookie Plugin
 * https://github.com/carhartl/jquery-cookie
 *
 * Copyright 2011, Klaus Hartl
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.opensource.org/licenses/GPL-2.0
 */
(function($){$.cookie=function(key,value,options){if(arguments.length>1&&(!/Object/.test(Object.prototype.toString.call(value))||value===null||value===undefined)){options=$.extend({},options);if(value===null||value===undefined){options.expires=-1}
if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setDate(t.getDate()+days)}
value=String(value);return(document.cookie=[encodeURIComponent(key),'=',options.raw?value:encodeURIComponent(value),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''))}
options=value||{};var decode=options.raw?function(s){return s}:decodeURIComponent;var pairs=document.cookie.split('; ');for(var i=0,pair;pair=pairs[i]&&pairs[i].split('=');i++){if(decode(pair[0])===key)return decode(pair[1]||'')}
return null}})(jQuery);/**

*  2007-2020 PrestaShop

*

*  @author    Amazzing

*  @copyright Amazzing

*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)

*/
var af_product_list_selector='#js-product-list',locked_class=af_classes['icon-lock'],unlocked_class=af_classes['icon-unlock-alt'],unlocked_selector='.'+unlocked_class.replace(/ /g,'.'),pagination_class=af_classes.pagination,af_primary_filter={trigger:'',url:''},customThemeActions={documentReady:function(){},updateContentAfter:function(jsonData){}};var af={defineVariables:function(){$.extend(af,{blockAjax:!1,resizeTimer:!1,mouseLeaveTimer:!1,qsTimer:!1,cosCounter:1,isCompact:!1,autoScroll:!1,useUniform:!!$.fn.uniform,dimZeroMatches:parseInt($('#af_dim_zero_matches').val()),hideZeroMatches:parseInt($('#af_hide_zero_matches').val()),showCounters:parseInt($('#af_count_data').val()),includeGroup:parseInt($('#af_include_group').val()),dynamicParams:{f:parseInt($('#af_url_filters').val()),s:parseInt($('#af_url_sorting').val()),p:parseInt($('#af_url_page').val()),},nbItems:{current:$('#af_nb_items').val(),orig:$('#af_npp').val(),},isHorizontal:$('#af_layout').val()=='horizontal',productItemSelector:'.'+af_classes['js-product-miniature'],noItemsClass:'no-available-items',infiniteScrollThreshold:700,popstateURL:af.removeHash(window.location.href),$w:$(window),$listWrapper:$('.af_pl_wrapper'),$filterBlock:$('#amazzing_filter'),$selectedFilters:$('.selectedFilters'),$pageInput:$('#af_page'),$viewBtn:$('.viewFilteredProducts'),$dynamicContainer:$('#products').first(),});if(!af.$dynamicContainer.length){af.$dynamicContainer=$('#content').length?$('#content'):$('#main')}},documentReady:function(){af.defineVariables();customThemeActions.documentReady();af.setWrapper();af.bindEvents();af.toggleCompactView();if('slider' in af){af.slider.prepareAll()}
af.cutOff.prepare();af.adjustFolderedStructure();af.prepareLoadMoreIfRequired();af.updateSelectedFilters();if(af.$listWrapper.length&&$('.customer-filter-option').length){af.updateURL(af.prepareUrlAndVerifyParams())}},prepareLoadMoreIfRequired:function(){if(load_more&&af.$listWrapper.length){$('.dynamic-product-count').html(af_product_count_text);$('.dynamic-loading.next').removeClass('hidden').insertAfter(af.$listWrapper);$('.dynamic-loading.prev').removeClass('hidden').insertBefore(af.$listWrapper);if(!show_load_more_btn){$('.loadMore.next').addClass('hidden')}
$('.loadMore').on('click',function(){var $parent=$(this).closest('.dynamic-loading'),p=parseInt(af.$pageInput.val());if($parent.hasClass('next')){p++}else{$(this).data('p',$(this).data('p')-1);if($(this).data('p')<2){$parent.addClass('hidden')}}
$parent.addClass('loading');af.$pageInput.val(p).change()});af.rememberScrollPosition();if($('#af_p_type').val()==3){af.activateInfiniteScroll()}}},rememberScrollPosition:function(){af.$w.on('unload',function(){var $item=$(document.activeElement).closest(af.productItemSelector);if($item.length){var $currentItems=af.$listWrapper.find(af.productItemSelector),prevNum=$currentItems.index($item),npp=parseInt(af.nbItems.current),scrolledPage=Math.floor(prevNum/npp),initialPage=$('.loadMore.prev').data('p')||1,rememberPage=scrolledPage+initialPage,elPositionInPage=prevNum-(scrolledPage*npp),requiredScrollPosition=$currentItems.eq(elPositionInPage).offset().top-(af.$w.height()/2)+($item.height()/2);af.$pageInput.val(rememberPage);af.updateURL(af.prepareUrlAndVerifyParams());window.scrollTo(0,requiredScrollPosition)}})},bindEvents:function(){Object.keys(af.events).forEach(function(type){Object.keys(af.events[type]).forEach(function(event){af.events[type][event]()})})},events:{filter:{general:function(){af.$filterBlock.on('click','a[href="#"]',function(e){e.preventDefault()}).on('change','input, select',function(){if($(this).data('notrigger')){return}
var trigger=$(this).attr('id'),type=$(this).attr('type')||$(this).prop('tagName').toLowerCase(),$parent=$(this).closest('.af_filter'),isHiddenInput=$(this).parent().hasClass('hidden_inputs'),updateList=!af.$viewBtn.data('active')||isHiddenInput;if($parent.length){trigger=$parent.attr('data-trigger');if(!$parent.hasClass('special')&&!$parent.hasClass('has-slider')){af_primary_filter.trigger=trigger;af_primary_filter.url=$parent.attr('data-url')}}
if(type=='checkbox'||type=='radio'){if(type=='radio'){$parent.find('li.active').removeClass('active')}
$(this).closest('li').toggleClass('active',$(this).prop('checked'))}else if(type=='select'&&!$(this).closest('.selector-with-customer-filter').hasClass('hidden')&&$(this).find('option[value="'+$(this).val()+'"]').hasClass('customer-filter')){$(this).closest('.af_filter').find('.customer-filter-label').click();return}
if(trigger!='af_page'){af.$pageInput.val(1)}
if(!af.blockAjax){if(af.$viewBtn.data('active')&&!isHiddenInput){af.$viewBtn.addClass('loading').data('animate-after-loading',1)}
af.applyFilters(trigger,updateList)}}).on('click','.customer-filter-label',function(){$(this).toggleClass('unlocked');var locked=!$(this).hasClass('unlocked'),iconClass=locked?locked_class:unlocked_class,$input=$(this).find('input[type="hidden"]');$(this).find('a').first().attr('class',iconClass);if($input.length){var name=locked?$input.data('name'):'nosubmit';$input.attr('name',name).change()}else{var val=locked?$('option[id="'+$(this).data('id')+'"]').val():0;$(this).toggleClass('hidden-name',!locked).next().toggleClass('hidden',locked).find('select').val(val).change()}})},selectedFilters:function(){af.$selectedFilters.on('click','a',function(e){e.preventDefault();var $parentRow=$(this).parent(),$groupBlock=$('.af_filter[data-url="'+$parentRow.data('group')+'"]');if($(this).hasClass('close')){if($groupBlock.hasClass('type-1')||$groupBlock.hasClass('type-2')){var $input=$groupBlock.find('input[data-url="'+$parentRow.data('url')+'"]');$input.prop('checked',!1).change();if(af.useUniform){$input.parent().removeClass('checked')}}else if($groupBlock.hasClass('type-3')){$groupBlock.find('select').val(0).change()}else if($groupBlock.hasClass('has-slider')){af.slider.resetValues(af.slider.$[$groupBlock.data('trigger')])}}else if($(this).hasClass('all')){af.blockAjax=!0;af.$selectedFilters.find('.cf').find('a').not(unlocked_selector).click();af.blockAjax=!1;if(af.$viewBtn.data('active')){af.$viewBtn.addClass('loading').data('animate-after-loading',1)}
af.applyFilters('clear_all',!af.$viewBtn.data('active'))}else if($parentRow.hasClass('customer-filter-option')){if($groupBlock.hasClass('type-3')){$groupBlock.find('.customer-filter-label').click()}else{$groupBlock.find('.customer-filter[data-url="'+$parentRow.data('url')+'"]').closest('.customer-filter-label').click()}}})},dim:function(){if(af.dimZeroMatches&&!af.hideZeroMatches){af.$filterBlock.on('click','input.af.checkbox, input.af.radio',function(e){if($(this).prop('checked')&&$(this).closest('li').hasClass('no-matches')){e.preventDefault();$(this).prop('checked',!1);if(af.useUniform){$(this).parent().removeClass('checked').parent().removeClass('focus');if($(this).hasClass('radio')){var $parentBlock=$(this).closest('.af_filter'),url=$('.cf[data-group="'+$parentBlock.data('url')+'"]').data('url');$parentBlock.find('input[data-url="'+url+'"]').parent().addClass('checked').parent().addClass('focus')}}}})}},viewBtn:function(){af.$viewBtn.on('click',function(e){e.preventDefault();if(!$(this).hasClass('loading')){$(this).addClass('loading');af.applyFilters('view_products',!0);if(af.isCompact){$('.af-compact-overlay').click()}}})},foldered:function(){$('.af-toggle-child').on('click',function(){$(this).closest('.af-parent-category').toggleClass('open');af.cutOff.prepare($(this).closest('.af_filter'))})},toggleableContent:function(){$('.af_subtitle').not('.no-toggle').on('click',function(e){e.preventDefault();var $filter=$(this).closest('.af_filter');if(!$filter.hasClass(af.noItemsClass)){$filter.toggleClass('closed');if(!$filter.hasClass('closed')){if($filter.hasClass('type-3')&&af.useUniform){$filter.find('.af-select').uniform()}
if(af.isCompact){$filter.siblings('.af_filter').addClass('closed')}else if(af.isHorizontal){af.autoCloseFilterContent($filter)}}}
af.cutOff.prepare($filter)})},quickSearch:function(){af.$filterBlock.on('keyup','.qsInput',function(){var $qsInput=$(this);clearTimeout(af.qsTimer);af.qsTimer=setTimeout(function(){var value=$qsInput.val().toLowerCase(),$options=$qsInput.closest('.af_filter_content').find('li');$options.removeClass('qs-hidden');if(value.length){$options.each(function(){if($(this).children('label').children('.name').text().toLowerCase().indexOf(value)===-1){$(this).addClass('qs-hidden')}})}
$qsInput.toggleClass('has-value',value.length>0).siblings('.qs-no-matches').toggleClass('hidden',!!$options.not('.qs-hidden, .no-matches').length);if($qsInput.data('tree')){$options.removeClass('qs-half-hidden').filter('.af-parent-category.qs-hidden').each(function(){if($(this).find('li').not('.qs-hidden').length){$(this).addClass('qs-half-hidden open')}})}},200)})},},theme:{nbItems:function(){$(document).off('change','select[name="n"]').on('change','select[name="n"]',function(){af.nbItems.current=$(this).val();$('#af_nb_items').val(af.nbItems.current).change()}).on('submit','.showall',function(e){e.preventDefault();var num=$(this).find('input[name="n"]').val(),$nSelect=$('select[name="n"]');if(!$nSelect.find('option[value="'+num+'"]').length){var maxNum=$nSelect.find('option').last().val();if(parseInt(maxNum)>=parseInt(num)){num=maxNum}else{var newOptionHTML='<option value="'+num+'">'+num+'</option>';$nSelect.append(newOptionHTML);if(af.useUniform){$nSelect.uniform()}}}
$nSelect.val(num).change()})},sorting:function(){$('body').off('click','.js-search-link').on('click','.select-list.js-search-link',function(e){e.preventDefault();$(this).addClass('current').siblings().removeClass('current');var value=$(this).attr('href').split('order=')[1].split('&')[0].split('.');orderBy=value[1],orderWay=value[2],sortingName=$(this).text(),$title=$(this).closest('.products-sort-order').find('.select-title'),$htmlElementsInTitle=$title.find('*');af.applySorting(orderBy,orderWay);$title.html(sortingName).append($htmlElementsInTitle)})},pagination:function(){$(document).on('click','.'+pagination_class+' a',function(e){e.preventDefault();var page=1;if($(this).attr('href').indexOf('?')>-1){var params=af.unserialize($(this).attr('href').split('?')[1],!1);if(page_link_rewrite_text in params&&params[page_link_rewrite_text]>1){page=params[page_link_rewrite_text]}}
af.$pageInput.val(page).change()})},},browser:{popstate:function(){af.$w.on('popstate',function(){if(af.removeHash(window.location.href)!=af.popstateURL){af.updateFiltersBasingOnURL(window.location.href)}})},resize:function(){af.$w.on('resize',function(){clearTimeout(af.resizeTimer);af.resizeTimer=setTimeout(function(){af.toggleCompactView()},100)})},},},autoCloseFilterContent:function($filter){$filter.off('mouseenter mouseleave').on('mouseenter',function(){clearTimeout(af.mouseLeaveTimer)}).on('mouseleave',function(){af.mouseLeaveTimer=setTimeout(function(){if(!$filter.hasClass('closed')){$filter.find('.af_subtitle').click()}
$filter.off('mouseenter mouseleave')},1000)});setTimeout(function(){af.onClickOutSide($filter.find('.af_filter_content'),function(){$filter.addClass('closed')})},10)},onClickOutSide:function($el,action){var identifier=af.cosCounter++;$(document).off('click.'+identifier).on('click.'+identifier,function(e){if(!$el.is(e.target)&&$el.has(e.target).length===0){action();$(document).off('click.'+identifier)}})},applySorting:function(orderBy,orderWay){$('#af_orderBy').val(orderBy);$('#af_orderWay').val(orderWay).change()},prepareCompactView:function(){if($('.af-compact-overlay').hasClass('ready')){return}
$('.compact-toggle, .af-compact-overlay').on('click',function(e){e.preventDefault();var $body=$('body');if(!$body.hasClass('show-filter')){$body.data('scroll',af.$w.scrollTop())}
$body.toggleClass('show-filter');if($body.hasClass('show-filter')){$body.css('top','-'+$body.data('scroll')+'px')}else{$body.css('top','');window.scrollTo(0,+$body.data('scroll'))}}).addClass('ready');if('ontouchstart' in document.documentElement){var swipeThreshold=150,xStart=0,xEnd=0,compactLeft=af.$filterBlock.hasClass('compact-offset-left');af.$filterBlock.on('touchstart',function(e){xStart=e.originalEvent.touches[0].clientX;xEnd=xStart}).on('touchmove',function(e){xEnd=e.originalEvent.touches[0].clientX}).on('touchend',function(e){var diff=compactLeft?xStart-xEnd:xEnd-xStart;if(diff>swipeThreshold&&!$(e.target).closest('.af_filter').not('.closed').hasClass('has-slider')){$('body').removeClass('show-filter')}})}},toggleCompactView:function(){var isCompactBefore=af.isCompact;af.isCompact=af.$filterBlock.css('position')=='fixed';af.autoScroll=af.isCompact?1:parseInt($('#af_autoscroll').val());if(isCompactBefore!=af.isCompact){$('body').toggleClass('has-compact-filter',af.isCompact);var $afBlocks=af.$filterBlock.find('.af_filter'),$btnHolder=af.$filterBlock.find('.btn-holder');if(af.isCompact){af.prepareCompactView();$afBlocks.filter('.closed').addClass('cl-orig');$afBlocks.filter('.foldered').addClass('fd-orig');$afBlocks.addClass('closed').filter('.folderable').addClass('foldered');af.$filterBlock.removeClass('horizontal-layout').before('<span class="af-orig hidden"></span>').appendTo('body');$('.af-compact-overlay').appendTo('body');$btnHolder.appendTo(af.$filterBlock);setTimeout(function(){af.$filterBlock.addClass('animation-ready');if(typeof accordion=='function'){af.$filterBlock.find('.block_content').stop().attr('style','')}},500)}else{af.$filterBlock.removeClass('animation-ready').toggleClass('horizontal-layout',af.isHorizontal);$('.af-orig').before(af.$filterBlock).before($('.af-compact-overlay')).remove();$btnHolder.insertAfter('#af_form');$afBlocks.each(function(){$(this).toggleClass('closed',$(this).hasClass('cl-orig')).toggleClass('foldered',$(this).hasClass('fd-orig'))})}
af.cutOff.prepare()}
af.updateSFPositionIfRequired();af.toggleViewBtn()},toggleViewBtn:function(){var showBtn=$('#af_reload_action').val()==2||af.isCompact;af.$viewBtn.toggleClass('hidden',!showBtn).data('active',showBtn).parent().toggleClass('hidden',!showBtn&&!$('.manage-permanent-filters').length)},setWrapper:function(){if(!af.$listWrapper.length){$(af_product_list_selector).first().wrap('<div class="af_pl_wrapper"></div>');af.$listWrapper=$('.af_pl_wrapper')}},updateSFPositionIfRequired:function(){if($('#af_sf_position').val()==1){if(!af.isCompact){var $before=is_17?$('#products').first():$('.content_sortPagiBar').first();af.$selectedFilters.addClass('inline af').insertBefore($before)}else{af.$selectedFilters.removeClass('inline af').insertBefore('#af_form')}}},applyFilters:function(trigger,updateList){if(af.$listWrapper.length&&(updateList||af.$viewBtn.data('active'))){af.updateSelectedFilters()}
af.loadProducts(trigger,updateList)},loadProducts:function(trigger,updateList){if(af.blockAjax){return}
if(updateList&&!$('.dynamic-loading').hasClass('loading')){af.$listWrapper.animate({'opacity':0.3},350)}
if(af.dimZeroMatches){$('option:selected:disabled').prop('disabled',!1)}
var params=$('#af_form').serialize()+'&primary_filter='+af_primary_filter.trigger;if(!updateList){params+='&nb_items=0'}else if(!af.$listWrapper.length){if(!is_17&&page_name!='index'){af.updateSelectedFilters();af.updateURL(af.prepareUrlAndVerifyParams());window.location.reload();return}
params+='&layout_required=1';af.$dynamicContainer.animate({'opacity':0.3},350)}
if(load_more){var $prevLoader=$('.dynamic-loading.prev');if(trigger=='af_page'){if(!$prevLoader.length){params+='&page_from=1'}else if($prevLoader.hasClass('loading')){params+='&page='+$('.loadMore.prev').data('p')+'&page_to='+af.$pageInput.val()}else{params+='&page_from='+$('.loadMore.prev').data('p')}}else{$prevLoader.remove()}}
$.ajax({type:'POST',url:af_ajax_path,dataType:'json',data:{params:params,current_url:window.location.href,trigger:trigger,},success:function(r){af.forcedBaseURL='';af.updateContent(r,trigger,updateList);af.updateURL(af.prepareUrlAndVerifyParams())},error:function(r){console.warn($(r.responseText).text()||r.responseText)}})},updateContent:function(jsonData,trigger,updateList){if(updateList){if('layout' in jsonData){af.updateListLayout(jsonData.layout)}
af.updateProductList(jsonData,trigger);if(af.autoScroll&&(!load_more||trigger!='af_page')){af.autoscrollToTopOfTheList()}}
if(trigger!='af_page'){$('.af-total-count').html(parseInt(jsonData.products_num));af.updateFilteringBlocks(jsonData)}
if(af.$viewBtn.data('active')){af.$viewBtn.removeClass('loading');if(af.$viewBtn.data('animate-after-loading')){af.$viewBtn.addClass('btn-pulsate').data('animate-after-loading',0);setTimeout(function(){af.$viewBtn.removeClass('btn-pulsate')},300)}}},updateProductList:function(jsonData,trigger){if(load_more&&trigger=='af_page'){var $result=$('<div>'+af.utf8_decode(jsonData.product_list_html)+'</div>'),$items=$result.find(af.productItemSelector);if($('.dynamic-loading.prev').hasClass('loading')){af.$listWrapper.find(af.productItemSelector).first().before($items)}else{af.$listWrapper.find(af.productItemSelector).last().after($items)}
$('.dynamic-loading').removeClass('loading');if(is_17&&!$('#js-product-list-top').html()){$('#js-product-list-top').replaceWith(af.utf8_decode(jsonData.product_list_top_html))}}else{$(af_product_list_selector).replaceWith(af.utf8_decode(jsonData.product_list_html));if(is_17){$('#js-product-list-top').replaceWith(af.utf8_decode(jsonData.product_list_top_html));$('#js-product-list-bottom').replaceWith(af.utf8_decode(jsonData.product_list_bottom_html))}else{$('.'+af_classes['product-count']).remove();$('#'+pagination_holder_id).replaceWith(af.utf8_decode(jsonData.pagination_html));$('#'+pagination_bottom_holder_id).replaceWith(af.utf8_decode(jsonData.pagination_bottom_html))}}
if(load_more){var $countContainer=is_17?$('.dynamic-product-count'):$('.'+af_classes['product-count']);$countContainer.html(af.utf8_decode(jsonData.product_count_text));$('.loadMore.next').toggleClass('hidden',jsonData.hide_load_more_btn)}
var animationTime=is_17?500:1000;$('.af_pl_wrapper').animate({'opacity':1},animationTime);af.updateListAfter(jsonData)},updateListAfter:function(jsonData){if(typeof display=='function'&&$.totalStorage&&$.totalStorage('display')&&$.totalStorage('display')!='grid'){display($.totalStorage('display'))}
customThemeActions.updateContentAfter(jsonData);if(typeof updateContentAfter=='function')updateContentAfter(jsonData);af.$filterBlock.trigger('updateProductList',jsonData)},updateFilteringBlocks:function(jsonData){$('input.af.checkbox, input.af.radio').each(function(){var id=$(this).attr('id'),$li=$(this).closest('li'),$filter_block=$li.closest('.af_filter');if(jsonData.count_data[id]){$li.removeClass('no-matches');if(af.showCounters){$li.find('.count').first().html(jsonData.count_data[id])}}else if(!$li.hasClass('no-matches')){$li.addClass('no-matches');if(af.showCounters){$li.find('.count').first().html('0')}}
if(!$li.next().length&&!$li.parent().hasClass('child-categories')){af.checkAvailableItems($filter_block,!1)}});af.cutOff.prepare();af.adjustFolderedStructure();$('.af-select').each(function(){var html='',currentValue=$(this).val(),$filter_block=$(this).closest('.af_filter');$filter_block.find('.dynamic-select-options').children().each(function(){var id=$(this).data('id'),text=$(this).data('text'),val=$(this).data('value'),count=(id in jsonData.count_data)?parseInt(jsonData.count_data[id]):0;if(count||val==currentValue||$(this).hasClass('customer-filter')||!af.hideZeroMatches){html+='<option id="'+id+'" value="'+val+'" data-url="'+$(this).data('url')+'" data-text="'+text+'"';html+='class="'+$(this).attr('class')+'"'+((af.dimZeroMatches&&!count)?' disabled':'')+'>';html+=text+((af.showCounters&&count)?' ('+count+')':'')+'</option>'}});$(this).children().first().nextAll().remove();if(html){$(this).append(html).val(currentValue);if(af.useUniform){$(this).uniform()}}
af.checkAvailableItems($filter_block,!0)})},prepareUrlAndVerifyParams:function(){var url=af.forcedBaseURL?af.forcedBaseURL:af.getStaticURL(),dynamicParams=af.prepareDynamicParams();if(!$.isEmptyObject(dynamicParams)){af.verifyPrimaryFilter(dynamicParams);url+=(url.indexOf('?')>-1?'&':'?')+decodeURIComponent($.param(dynamicParams,!0))}
return url},updateURL:function(url){if(url&&url!=window.location.href){window.history.pushState(null,null,url);af.popstateURL=url}},getStaticURL:function(){if(!af.staticURL){if(typeof af_sp_base_url!='undefined'){af.staticURL=af_sp_base_url;if(!af_sp_fixed_criteria){$('.sp-hidden-filter').addClass('sp-dynamic-params')}}else{var splittedUrl=decodeURIComponent(window.location.href).split('?');af.staticURL=af.removeHash(splittedUrl[0]);if(splittedUrl.length==2){var staticParams=af.unserialize(splittedUrl[1],!0);if(!$.isEmptyObject(staticParams)){af.staticURL+='?'+decodeURIComponent($.param(staticParams,!0))}}}}
return af.staticURL},prepareDynamicParams:function(){var dynamicParams={},page=af.$pageInput.val();if(af.dynamicParams.f&&!af.forcedBaseURL){af.$selectedFilters.find('.cf').add('.sp-dynamic-params').each(function(){if(!$(this).find(unlocked_selector).length){var n=$(this).data('group'),v=$(this).data('url');if(n&&v){if(n in dynamicParams){dynamicParams[n]+=','+v}else{dynamicParams[n]=v}}}})}
if(af.dynamicParams.p&&page>1){dynamicParams[page_link_rewrite_text]=page}
if(af.dynamicParams.s){var order={by:$('#af_orderBy').val(),way:$('#af_orderWay').val()};if(order.by+':'+order.way!=$('#af_defaultSorting').val()){if(is_17){dynamicParams.order='product.'+order.by+'.'+order.way}else{dynamicParams.orderby=order.by
dynamicParams.orderway=order.way}}}
if(af.nbItems.current!=af.nbItems.orig){dynamicParams.n=af.nbItems.current}
return dynamicParams},verifyPrimaryFilter:function(dynamicParams){if(!(af_primary_filter.url in dynamicParams)){for(var link_rewrite in dynamicParams){var multipleSelection=dynamicParams[link_rewrite].toString().indexOf(',')>-1,$primaryBlock=$('.af_filter[data-url="'+link_rewrite+'"]').not('.special');if($primaryBlock.length&&(multipleSelection||!(af_primary_filter.url in dynamicParams))){af_primary_filter.url=link_rewrite;af_primary_filter.trigger=$primaryBlock.data('trigger')}}}},sortParams:function(params,primary_param){var sortedParams={};if(primary_param&&primary_param in params){sortedParams[primary_param]=params[primary_param]}
for(var n in params){sortedParams[n]=params[n]}
return sortedParams},autoscrollToTopOfTheList:function(){if(af.$listWrapper.length){var wrapperTop=af.$listWrapper.offset().top;if(af.isCompact||!af.isInViewPort(wrapperTop,wrapperTop)){$('html, body').animate({scrollTop:wrapperTop-150},100)}}},isInViewPort:function(top,bottom){var scrollTop=af.$w.scrollTop(),windowHeight=af.$w.height();return(scrollTop+windowHeight)>top&&scrollTop<bottom},checkAvailableItems:function($block,isSelect){if(af.dimZeroMatches||af.hideZeroMatches){var noItems=!isSelect?$block.find('li').not('.no-matches:not(.active)').length<1:$block.find('option').not('.no-matches:not(:selected), .first').length<1;$block.toggleClass(af.noItemsClass,noItems)}},cutOff:{prepare:function($blocks){if(af.isHorizontal){return}
$blocks=$blocks?$blocks:$('.af_filter');$blocks.not('.closed').find('.toggle-cut-off').each(function(){var $filter=$(this).closest('.af_filter');af.cutOff.apply($filter,$(this).data('cut'));if(!$(this).data('click-ready')){$(this).on('click',function(e){e.preventDefault();$filter.toggleClass('cut-off')}).data('click-ready',1)}})},apply:function($filter,maxItems){var $cut=$filter.find('li').removeClass('cut').filter(':visible').slice(maxItems).addClass('cut');$filter.toggleClass('expandable',!!$cut.length)},},adjustFolderedStructure:function(){$('.af_filter.foldered').find('.af-parent-category').each(function(){var $children=$(this).children('ul').find('li'),childrenWithMatches=$children.not('.no-matches').length,checkedChildren=$children.filter('.active').length;if(af.hideZeroMatches){$(this).children('label').find('.af-toggle-child').toggleClass('hidden',!childrenWithMatches&&!checkedChildren)}
if(checkedChildren||(childrenWithMatches&&$(this).hasClass('no-matches'))){$(this).addClass('open');if(af.hideZeroMatches||af.dimZeroMatches){$(this).removeClass('no-matches')}}})},updateListLayout:function(layout_html){if($.contains(af.$dynamicContainer[0],af.$filterBlock[0])){af.$filterBlock.insertBefore(af.$dynamicContainer);$('.af.dynamic-loading').insertAfter(af.$filterBlock)}
af.$dynamicContainer.html(af.utf8_decode(layout_html)).animate({'opacity':1},350);af.setWrapper();af.updateSFPositionIfRequired();af.updateSelectedFilters();af.prepareLoadMoreIfRequired()},updateSelectedFilters:function(){var html='',$customerFilterLabels=$('.customer-filter-label');$customerFilterLabels.each(function(){var url=$('#'+$(this).data('id')).data('url'),$f=$(this).closest('.af_filter'),groupURL=$f.data('url'),groupText=af.includeGroup?$f.find('.af_subtitle').text()+': ':'',text=groupText+$(this).find('.name').text(),unlocked=$(this).hasClass('unlocked'),divClass='customer-filter-option'+(unlocked?' unlocked':''),iClass=unlocked?unlocked_class:locked_class;html+=af.renderSelectedOption(url,groupURL,text,divClass,iClass)});$('.af_filter').each(function(){var groupURL=$(this).data('url'),groupText=af.includeGroup&&!$(this).hasClass('special')?$(this).find('.af_subtitle').text()+': ':'';iClass=af_classes['u-times']+' close',hasSelection=$(this).find('.customer-filter-label').not('.unlocked').length>0;if($(this).hasClass('has-slider')){var $bar=af.slider.$[$(this).data('trigger')];if($bar.values.from>$bar.values.min||$bar.values.to<$bar.values.max){var rangeURL=$bar.$inputs.from.val()+'-'+$bar.$inputs.to.val(),prefix=$(this).find('.prefix').first().text(),suffix=$(this).find('.suffix').first().text(),text=groupText+prefix+$bar.$displayValues.from.text()+' - '+$bar.$displayValues.to.text()+suffix;html+=af.renderSelectedOption(rangeURL,groupURL,text,'slider-option',iClass);hasSelection=!0}}else{$(this).find('input, option:not(.first, .customer-filter)').filter(':checked, :selected').each(function(){var text=groupText+($(this).data('text')||$(this).closest('label').find('.name').text());html+=af.renderSelectedOption($(this).data('url'),groupURL,text,'',iClass);hasSelection=!0})}
$(this).toggleClass('has-selection',hasSelection)});af.$selectedFilters.find('.cf').remove();af.$selectedFilters.append(html).toggleClass('hidden',!html);if($customerFilterLabels.length){af.$selectedFilters.find('.clearAll').toggleClass('hidden',!af.$selectedFilters.find('.cf').not('.unlocked').length)}},renderSelectedOption:function(url,group,text,divClass,iClass){return'<div class="cf '+divClass+'" data-url="'+url+'" data-group="'+group+'">'+text+' <a href="#" class="'+iClass+'"></a></div>'},activateInfiniteScroll:function(){var scrollTimer,lastViewportTop=af.$w.scrollTop(),$dl=$('.dynamic-loading.next'),$btn=$('.loadMore.next');af.$w.on('scroll',function(){var viewportTop=af.$w.scrollTop(),scrollingDown=viewportTop>lastViewportTop;lastViewportTop=viewportTop;clearTimeout(scrollTimer);scrollTimer=setTimeout(function(){if(scrollingDown&&af.$listWrapper.length&&!$dl.hasClass('loading')&&!$btn.hasClass('hidden')){var listBottom=af.$listWrapper.offset().top+af.$listWrapper.outerHeight();if(af.isInViewPort(listBottom-af.infiniteScrollThreshold,listBottom)){$btn.click()}}},50)})},unserialize:function(params,excludeDynamicParams){params=params.split('&');var result={},dynamicParams={order:0,orderby:0,orderway:0,n:0};dynamicParams[page_link_rewrite_text]=0;for(var i in params){var splitted=params[i].split('='),name=splitted[0];if(splitted.length==2&&(!excludeDynamicParams||!$('.af_filter[data-url="'+name+'"]').length&&!(name in dynamicParams))){result[name]=splitted[1]}}
return result},updateFiltersBasingOnURL:function(url){window.location.reload()},removeHash:function(url){return url.split('#')[0]},utf8_decode:function(utfstr){var res='';for(var i=0;i<utfstr.length;){var c=utfstr.charCodeAt(i);if(c<128){res+=String.fromCharCode(c);i++}else if((c>191)&&(c<224)){var c1=utfstr.charCodeAt(i+1);res+=String.fromCharCode(((c&31)<<6)|(c1&63));i+=2}else{var c1=utfstr.charCodeAt(i+1);var c2=utfstr.charCodeAt(i+2);res+=String.fromCharCode(((c&15)<<12)|((c1&63)<<6)|(c2&63));i+=3}}
return res},};$(document).ready(function(){af.documentReady()});/**
*  2007-2020 PrestaShop
*
*  @author    Amazzing
*  @copyright Amazzing
*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*/
customThemeActions.updateContentAfter=function(jsonData){if(typeof $.LeoCustomAjax=='function'){var leoCustomAjax=new $.LeoCustomAjax();leoCustomAjax.processAjax()}
if($('.af_pl_wrapper').find('.product_list').hasClass('list')){$('.leo_list').addClass('selected').siblings().removeClass('selected')}};$(document).ready(function(){$.each(list_menu,function(index,value){if(value.type=="horizontal"){var megamenu_element=$('.cavas_menu[data-megamenu-id='+value.id+']');if($("body").attr("id")=="index")isHomeMenu=1;megamenu_element.find(".megamenu > li > a").each(function(){menuURL=$(this).attr("href").replace("https://","").replace("http://","").replace("www.","").replace(/#\w*/,"");if((currentURL==menuURL)||(currentURL.replace(current_link,"")==menuURL)||isHomeMenu){$(this).parent().addClass("active");return!1}});if($(window).width()<=767){set_target_blank(!1,megamenu_element)}else{set_target_blank(!0,megamenu_element)}
if(value.show_cavas==1){$.fn.OffCavasmenu=function(opts){var config=$.extend({},{opt1:null,text_warning_select:text_warning_select_txt,text_confirm_remove:text_confirm_remove_txt,JSON:null},opts);this.each(function(){var $btn=megamenu_element.find('.navbar-toggler');var $nav=null;if(!$btn.length)
return;var $nav=$("<section class='off-canvas-nav-megamenu' data-megamenu-id="+value.id+"><nav class='offcanvas-mainnav' ><div class='off-canvas-button-megamenu'><span class='off-canvas-nav'></span>"+close_bt_txt+"</div></nav></section>");var $menucontent=$($btn.data('target')).find('.megamenu').clone();$("body").append($nav);$('body #page').append("<div class='megamenu-overlay' data-megamenu-id="+value.id+"></div>");$(".megamenu-overlay[data-megamenu-id="+value.id+"]").click(function(){$btn.trigger('click')});$(".off-canvas-nav-megamenu[data-megamenu-id="+value.id+"] .offcanvas-mainnav").append($menucontent);$("html").addClass("off-canvas");$(".off-canvas-nav-megamenu[data-megamenu-id="+value.id+"]").find(".off-canvas-button-megamenu").click(function(){off_canvas_active()});if($btn.is(':visible')){$("body").removeClass("off-canvas-active").addClass("off-canvas-inactive")}
$btn.click(function(){off_canvas_active();$('.off-canvas-nav-megamenu').removeClass('active');if(!$(".off-canvas-nav-megamenu[data-megamenu-id="+value.id+"]").hasClass('active')&&$('body').hasClass('off-canvas-active')){$(".off-canvas-nav-megamenu[data-megamenu-id="+value.id+"]").addClass('active');auto_height(value.id)}})});return this}
megamenu_element.OffCavasmenu();megamenu_element.find('.navbar-toggler').click(function(){return!1});$(".off-canvas-nav-megamenu[data-megamenu-id="+value.id+"]").find('.offcanvas-mainnav .caret').click(function(){if($(this).parent('li').hasClass('open-sub')){$(this).parent('li').find('.dropdown-menu').first().slideUp('fast',function(){auto_height(value.id)});$(this).parent('li').removeClass('open-sub')}else{$(this).parent('li').siblings('.open-sub').find('.dropdown-menu').first().slideUp('fast');$(this).parent('li').siblings().removeClass('open-sub');$(this).parent('li').find('.dropdown-menu').first().slideDown('fast',function(){auto_height(value.id)});$(this).parent('li').addClass('open-sub')}});$(window).resize(function(){if($(window).width()>991){$("body").removeClass("off-canvas-active").addClass("off-canvas-inactive")}else{auto_height(value.id)}})}else{var $bt=megamenu_element.find('.navbar-toggler');var $menu=megamenu_element.find('.leo-top-menu');$bt.click(function(){if($menu.hasClass('in')){megamenu_element.removeClass('active')}else{if(!megamenu_element.hasClass('active')){megamenu_element.addClass('active')}}});megamenu_element.find('.leo-top-menu .dropdown-toggle').removeAttr("disabled");megamenu_element.find(".dropdown-toggle").click(function(){if($(window).width()<=767){if($(this).parent("li").find("div:first").hasClass("level2"))
return!1;else return!0}});megamenu_element.find(".leo-top-menu li a").each(function(){if((this).hasAttribute('data-toggle')){$(this).removeAttr('data-toggle')}});megamenu_element.find(".leo-top-menu li a.dropdown-toggle").click(function(){if(!$(this).parent().hasClass('open')&&this.href&&this.href!='#'){window.location.href=this.href}})
megamenu_element.find(".leo-top-menu .caret").click(function(){if($(this).parent('li').hasClass('open-sub')){$(this).parent('li').find('.dropdown-menu').first().slideUp('fast',function(){auto_height_off(megamenu_element)});$(this).parent('li').removeClass('open-sub')}else{$(this).parent('li').siblings('.open-sub').find('.dropdown-menu').first().slideUp('fast');$(this).parent('li').siblings().removeClass('open-sub');$(this).parent('li').find('.dropdown-menu').first().slideDown('fast',function(){auto_height_off(megamenu_element)});$(this).parent('li').addClass('open-sub')}});if($(document).width()>543){megamenu_element.find('.leo-top-menu .dropdown-menu').css('display','')}
auto_height_off(megamenu_element);$(window).resize(function(){auto_height_off(megamenu_element);if($(document).width()>543){megamenu_element.find('.leo-top-menu .dropdown').removeClass('open-sub');megamenu_element.find('.leo-top-menu .dropdown-submenu').removeClass('open-sub');megamenu_element.find('.leo-top-menu .dropdown-menu').css('display','')}})}}else{var megamenu_element=$('.leo-verticalmenu[data-megamenu-id='+value.id+']');megamenu_element.find('.verticalmenu .dropdown-toggle').removeAttr("disabled");megamenu_element.find(".verticalmenu .dropdown-toggle").click(function(){if($(window).width()<=767){if($(this).parent("li").find("div:first").hasClass("level2"))
return!1;else return!0}});megamenu_element.find('.verticalmenu .dropdown-toggle').removeAttr('data-toggle');megamenu_element.find(".verticalmenu .caret").click(function(){if($(this).parents('.verticalmenu').hasClass('active-button')){var $parent=$(this).parent('li');if($parent.hasClass('open-sub')){$parent.find('.dropdown-menu').first().slideUp('fast',function(){$parent.removeClass('open-sub')})}else{if($parent.siblings('.open-sub').length>0){$parent.siblings('.open-sub').find('.dropdown-menu').first().slideUp('fast',function(){$parent.siblings('.open-sub').removeClass('open-sub')});$parent.find('.dropdown-menu').first().slideDown('fast',function(){$parent.addClass('open-sub')})}else{$parent.find('.dropdown-menu').first().slideDown('fast',function(){$parent.addClass('open-sub')})}}
return!1}});if($(window).width()>991){megamenu_element.find('.verticalmenu').addClass('active-hover');megamenu_element.find('.verticalmenu').removeClass('active-button');megamenu_element.find('.verticalmenu .dropdown-menu').css('display','');megamenu_element.find('.leo-verticalmenu').removeClass('active')}else{megamenu_element.find('.verticalmenu').removeClass('active-hover');megamenu_element.find('.verticalmenu').addClass('active-button')}
$(window).resize(function(){if($(window).width()>991){megamenu_element.find('.verticalmenu .dropdown').removeClass('open-sub');megamenu_element.find('.verticalmenu .dropdown-submenu').removeClass('open-sub');megamenu_element.find('.verticalmenu').addClass('active-hover');megamenu_element.find('.verticalmenu').removeClass('active-button');megamenu_element.find('.verticalmenu .dropdown-menu').css('display','');megamenu_element.removeClass('active')}else{megamenu_element.find('.verticalmenu').removeClass('active-hover');megamenu_element.find('.verticalmenu').addClass('active-button')}});scrollSliderBarMenu(megamenu_element)}
if(typeof value.list_tab!=='undefined'&&value.list_tab.length>0){$.each(value.list_tab,function(key,val){megamenu_element.find('#tabhtml'+val+' .nav a').hover(function(e){$(this).tab('show')})
megamenu_element.find('#tabhtml'+val+' .nav a').click(function(e){e.preventDefault();if(screen.width>576){$(this).tab('show');window.location.href=$(this).data('href')}else{$(this).tab('show')}})
$(".off-canvas-nav-megamenu[data-megamenu-id="+value.id+"]").find('#tabhtml'+val+' .nav a').click(function(e){e.preventDefault();if(!$(e.target).hasClass('nav-link')&&!$(this).hasClass('active')){var wrapper_tab=$(this).closest('.panel-group');var tab_href=$(this).attr('href');wrapper_tab.find('.nav-link').removeClass('active');wrapper_tab.find('.nav-item').removeClass('active');wrapper_tab.find('.tab-pane').removeClass('active');$(this).addClass('active');$(this).parents('.nav-item').addClass('active');wrapper_tab.find(tab_href).addClass('active')}else{window.location.href=$(this).data('href')}})})}
if(typeof value.level!=='undefined'&&typeof value.limit!=='undefined'){megamenu_element.find('.widget-category_image ul.level0').each(function(){$(this).find('ul').removeClass('dropdown-sub dropdown-menu')});megamenu_element.find(".widget-category_image ul.level0").each(function(){var check_level=$(this).parents('.widget-category_image').data('level');var check_limit=$(this).parents('.widget-category_image').data('limit');$(this).find("ul.level"+check_level).parent().find('.caret').remove();$(this).find("ul.level"+check_level+" li").remove();var element=$(this).find("ul.level"+(check_level-1)+" li").length;var count=0;if(check_level>0){$(this).find("ul.level"+(check_level-1)+" >li").each(function(){count=count+1;if(count>check_limit){$(this).remove()}})}});$(".off-canvas-nav-megamenu[data-megamenu-id="+value.id+"] .offcanvas-mainnav").find(".widget-category_image ul.level0").each(function(){var check_level=$(this).parents('.widget-category_image').data('level');var check_limit=$(this).parents('.widget-category_image').data('limit');$(this).find("ul.level"+check_level).parent().find('.caret').remove();$(this).find("ul.level"+check_level+" li").remove();var element=$(this).find("ul.level"+(check_level-1)+" li").length;var count=0;if(check_level>0){$(this).find("ul.level"+(check_level-1)+" >li").each(function(){count=count+1;if(count>check_limit){$(this).remove()}})}})}
if(value.type=="horizontal"){$(window).resize(function(){if($(window).width()<=767){set_target_blank(!1,megamenu_element)}else{set_target_blank(!0,megamenu_element)}})}
if(value.type=="horizontal"&&value.show_cavas==1){$(document.body).on('click','[data-toggle="dropdown"]',function(){if(!$(this).parent().hasClass('open')&&this.href&&this.href!='#'){window.location.href=this.href}})}})
$('.dropdown-menu.level1').parent().removeClass('aligned-fullwidth');$(".fancybox").fancybox({openEffect:'none',closeEffect:'none'})})
function auto_height_off(menu_object){wrapper_height=$("#page").innerHeight();ul_height=menu_object.find(".leo-top-menu ul").innerHeight();ul_offset_top=menu_object.find(".leo-top-menu ul").offset().top;if(ul_offset_top+ul_height>wrapper_height){if(!$("#page").hasClass('megamenu-autoheight')){$("#page").addClass('megamenu-autoheight')}}else{$("#page").removeClass('megamenu-autoheight')}}
function auto_height(menu_id){windowHeight=$(window).innerHeight();$(".off-canvas-nav-megamenu[data-megamenu-id="+menu_id+"] .offcanvas-mainnav").css('min-height',windowHeight)}
function off_canvas_active(){if($('body').hasClass('off-canvas-active')){$("body").removeClass("off-canvas-active").addClass("off-canvas-inactive")}else if($('body').hasClass('off-canvas-inactive')){$("body").removeClass("off-canvas-inactive").addClass("off-canvas-active")}else{$("body").addClass("off-canvas-active")}}
function set_target_blank(show,megamenu_element){if(show){megamenu_element.find(".leo-top-menu li a").each(function(){if($(this).hasClass('has-category')&&(this).hasAttribute('data-toggle')&&$(this).attr('target')=='_blank'){var value=$(this).attr('data-toggle');$(this).removeAttr('data-toggle');$(this).attr('remove-data-toggle',value)}})}else{megamenu_element.find(".leo-top-menu li a").each(function(){if($(this).hasClass('has-category')&&(this).hasAttribute('remove-data-toggle')&&$(this).attr('target')=='_blank'){var value=$(this).attr('remove-data-toggle');$(this).removeAttr('remove-data-toggle');$(this).attr('data-toggle',value)}})}}
function scrollSliderBarMenu(megamenu_element){var menuElement=megamenu_element;var columnElement=null;var maxWindowSize=991;if($(columnElement).length&&$(window).width()>=maxWindowSize)showOrHideSliderBarMenu(columnElement,menuElement,1);megamenu_element.find(".verticalmenu-button").click(function(){if($(menuElement).hasClass('active')){showOrHideSliderBarMenu(columnElement,menuElement,0)}else{showOrHideSliderBarMenu(columnElement,menuElement,1)}});var lastWidth=$(window).width();$(window).resize(function(){if($(window).width()!=lastWidth){if($(window).width()<maxWindowSize){if($(menuElement).hasClass('active'))showOrHideSliderBarMenu(columnElement,menuElement,0)}else{if($(columnElement).length&&!$(menuElement).hasClass('active'))showOrHideSliderBarMenu(columnElement,menuElement,1)}
lastWidth=$(window).width()}})}
function showOrHideSliderBarMenu(columnElement,menuElement,active){if(active){$(menuElement).addClass('active');if($(columnElement).length&&$(window).width()>=991)
columnElement.css('padding-top',($('.block_content',$(menuElement)).height())+'px')}else{$(menuElement).removeClass('active');if($(columnElement).length)columnElement.css('padding-top','')}};$(document).ready(function(){if(typeof enable_js_lang!='undefined'){$('ul#first-currencies li:not(.selected)').css('opacity',0.3);$('ul#first-currencies li:not(.selected)').hover(function(){$(this).css('opacity',1)},function(){$(this).css('opacity',0.3)})}
if(typeof enable_js_currency!='undefined'){$("#setCurrency").mouseover(function(){$(this).addClass("countries_hover");$(".currencies_ul").addClass("currencies_ul_hover")});$("#setCurrency").mouseout(function(){$(this).removeClass("countries_hover");$(".currencies_ul").removeClass("currencies_ul_hover")})}
if(typeof js_country!='undefined'){$("#countries").mouseover(function(){$(this).addClass("countries_hover");$(".countries_ul").addClass("countries_ul_hover")});$("#countries").mouseout(function(){$(this).removeClass("countries_hover");$(".countries_ul").removeClass("countries_ul_hover")})}})
function setCurrency(id_currency){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:prestashop.urls.base_url+'index.php'+'?rand='+new Date().getTime(),data:'controller=change-currency&id_currency='+parseInt(id_currency),success:function(msg){location.reload(!0)}})};var matched,browser;jQuery.uaMatch=function(ua){ua=ua.toLowerCase();var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"}};matched=jQuery.uaMatch(navigator.userAgent);browser={};if(matched.browser){browser[matched.browser]=!0;browser.version=matched.version}
if(browser.chrome){browser.webkit=!0}else if(browser.webkit){browser.safari=!0}
jQuery.browser=browser;(function($){$.fn.extend({autocomplete:function(urlOrData,options){var isUrl=typeof urlOrData=="string";options=$.extend({},$.Autocompleter.defaults,{url:isUrl?urlOrData:null,data:isUrl?null:urlOrData,delay:isUrl?$.Autocompleter.defaults.delay:10,max:options&&!options.scroll?10:150},options);options.highlight=options.highlight||function(value){return value};options.formatMatch=options.formatMatch||options.formatItem;return this.each(function(){new $.Autocompleter(this,options)})},result:function(handler){return this.bind("result",handler)},search:function(handler){return this.trigger("search",[handler])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(options){return this.trigger("setOptions",[options])},unautocomplete:function(){return this.trigger("unautocomplete")}});$.Autocompleter=function(input,options){var KEY={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var $input=$(input).attr("autocomplete","off").addClass(options.inputClass);var $loading=$input.parent().find('.leoproductsearch-loading');var timeout;var previousValue="";var cache=$.Autocompleter.Cache(options);var hasFocus=0;var lastKeyPressCode;var config={mouseDownOnSelect:!1};var select=$.Autocompleter.Select(options,input,selectCurrent,config);var blockSubmit;$.browser.opera&&$(input.form).bind("submit.autocomplete",function(){if(blockSubmit){blockSubmit=!1;return!1}});$input.bind(($.browser.opera?"keypress":"keydown")+".autocomplete",function(event){lastKeyPressCode=event.keyCode;switch(event.keyCode){case KEY.UP:event.preventDefault();if(select.visible()){select.prev()}else{onChange(0,!0)}
break;case KEY.DOWN:event.preventDefault();if(select.visible()){select.next()}else{onChange(0,!0)}
break;case KEY.PAGEUP:event.preventDefault();if(select.visible()){select.pageUp()}else{onChange(0,!0)}
break;case KEY.PAGEDOWN:event.preventDefault();if(select.visible()){select.pageDown()}else{onChange(0,!0)}
break;case options.multiple&&$.trim(options.multipleSeparator)==","&&KEY.COMMA:case KEY.TAB:case KEY.RETURN:if(selectCurrent()){event.preventDefault();blockSubmit=!0;return!1}
break;case KEY.ESC:select.hide();break;default:clearTimeout(timeout);timeout=setTimeout(onChange,options.delay);break}}).focus(function(){hasFocus++}).blur(function(){hasFocus=0;if(!config.mouseDownOnSelect){hideResults()}}).click(function(){if(hasFocus++>1&&!select.visible()){onChange(0,!0)}}).bind("search",function(){var fn=(arguments.length>1)?arguments[1]:null;function findValueCallback(q,data){var result;if(data&&data.length){for(var i=0;i<data.length;i++){if(data[i].result.toLowerCase()==q.toLowerCase()){result=data[i];break}}}
if(typeof fn=="function")fn(result);else $input.trigger("result",result&&[result.data,result.value])}
$.each(trimWords($input.val()),function(i,value){request(value,findValueCallback,findValueCallback)})}).bind("flushCache",function(){cache.flush()}).bind("setOptions",function(){$.extend(options,arguments[1]);if("data" in arguments[1])
cache.populate()}).bind("unautocomplete",function(){select.unbind();$input.unbind();$(input.form).unbind(".autocomplete")});function selectCurrent(){var selected=select.selected();if(!selected)
return!1;var v=selected.result;previousValue=v;if(options.multiple){var words=trimWords($input.val());if(words.length>1){v=words.slice(0,words.length-1).join(options.multipleSeparator)+options.multipleSeparator+v}
v+=options.multipleSeparator}
$input.val(v);hideResultsNow();$input.trigger("result",[selected.data,selected.value]);return!0}
function onChange(crap,skipPrevCheck){if(lastKeyPressCode==KEY.DEL){select.hide();return}
var currentValue=$input.val();if(!skipPrevCheck&&currentValue==previousValue)
return;previousValue=currentValue;currentValue=lastWord(currentValue);if(currentValue.length>=options.minChars){$input.addClass(options.loadingClass);if(!options.matchCase)
currentValue=currentValue.toLowerCase();request(currentValue,receiveData,hideResultsNow)}else{stopLoading();select.hide()}};function trimWords(value){if(!value){return[""]}
var words=value.split(options.multipleSeparator);var result=[];$.each(words,function(i,value){if($.trim(value))
result[i]=$.trim(value)});return result}
function lastWord(value){if(!options.multiple)
return value;var words=trimWords(value);return words[words.length-1]}
function autoFill(q,sValue){if(options.autoFill&&(lastWord($input.val()).toLowerCase()==q.toLowerCase())&&lastKeyPressCode!=KEY.BACKSPACE){$input.val($input.val()+sValue.substring(lastWord(previousValue).length));$.Autocompleter.Selection(input,previousValue.length,previousValue.length+sValue.length)}};function hideResults(){clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200)};function hideResultsNow(){var wasVisible=select.visible();select.hide();clearTimeout(timeout);stopLoading();if(options.mustMatch){$input.search(function(result){if(!result){if(options.multiple){var words=trimWords($input.val()).slice(0,-1);$input.val(words.join(options.multipleSeparator)+(words.length?options.multipleSeparator:""))}else $input.val("")}})}
if(wasVisible)
$.Autocompleter.Selection(input,input.value.length,input.value.length)};function receiveData(q,data){if(data&&data.length&&hasFocus){stopLoading();select.display(data,q);autoFill(q,data[0].value);select.show()}else{hideResultsNow()}};function request(term,success,failure){$loading.show();if(!options.matchCase)
term=term.toLowerCase();var data=cache.load(term);if(data&&data.length){success(term,data)}else if((typeof options.url=="string")&&(options.url.length>0)){var extraParams={timestamp:+new Date()};$.each(options.extraParams,function(key,param){extraParams[key]=typeof param=="function"?param():param});$.ajax({mode:"abort",port:"autocomplete"+input.name,dataType:options.dataType,url:options.url,data:$.extend({cate:$('input[name="cate"]').val(),q:lastWord(term),limit:options.max},extraParams),success:function(data){var str='<div>';if(data.suggest.length){str+='<div class="search-in-suggest">';str+='<div class="search-value-title">'+$("#leosearchtopbox").data('label-suggestion')+'</div>';str+='<ul>';for(i=0;i<data.suggest.length;i++){str+='<li><a class="suggest-item" href="'+data.suggest[i].word+'">'+data.suggest[i].word+'</a></li>'}
str+='</ul>';str+='</div>'}
if(data.category.length){str+='<div class="search-in-cat">';str+='<div class="search-value-title">'+$("#leosearchtopbox").data('search-for')+' "'+$("#leo_search_query_top").val()+'"</div>';if(data.category.length){str+='<ul>';for(i=0;i<data.category.length;i++){str+='<li><a href="'+data.category[i].link+'">'+$("#leosearchtopbox").data('in-category')+': <strong>'+data.category[i].name+'</strong> ('+data.category[i].count+' '+text_results_count+')</a></li>'}
str+='</ul>'}
str+='</div>'}
if(data.products.length){str+='<div class="search-in-product">';str+='<div class="search-value-title">'+$("#leosearchtopbox").data('products-for')+' "'+$("#leo_search_query_top").val()+'"</div>';str+='<ul>';for(i=0;i<data.products.length;i++){if(i%2==0){str+='<li class="ac_event"><a href="'+data.products[i].link+'">'}else{str+='<li class="ac_old"><a href="'+data.products[i].link+'">'}
if(lps_show_product_img){if(data.products[i].cover!=null){str+='<div class="lps-result-img"><img class="img-fluid" align = "center" src='+data.products[i].cover.bySize.small_default.url+'></div>'}else{str+='<div class="lps-result-img no-image"></div>'}}
str+='<div class="lps-result-content">';str+='<div class="lps-result-title">'+data.products[i].name+'</div>';if(lps_show_product_price){str+='<div class="lps-result-price">'+data.products[i].price+'</div>'}
str+='</div></a></li>'}
str+='</ul>';str+='</div>';str+='</div>';str+='<div class="all-search-product">';str+='<a href="'+data.link+'">'+$("#leosearchtopbox").data('view-all')+' ('+data.total_items+' '+$("#leosearchtopbox").data('label-products')+')</a>'
str+='</div>'}else{str+="<div class='no-products'>"+text_no_product+"</div>";str+='</div>'}
$(".leoproductsearch-result .ac_results").html(str);$(".leoproductsearch-result .ac_results").show();$(".suggest-item").click(function(){$("#leo_search_query_top").val($(this).attr('href'));onChange(0,!0);return!1});$("div.search-in-product ul li").on("mouseenter",function(){$(this).addClass('ac_over')}).on("mouseleave",function(){$(this).removeClass('ac_over')});$loading.hide()}})}else{select.emptyList();failure(term)}};function parse(data){var parsed=[];var rows=data.split("\n");for(var i=0;i<rows.length;i++){var row=$.trim(rows[i]);if(row){row=row.split("|");parsed[parsed.length]={data:row,value:row[0],result:options.formatResult&&options.formatResult(row,row[0])||row[0]}}}
return parsed};function stopLoading(){$input.removeClass(options.loadingClass)}};$.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results lps_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:!1,matchSubset:!0,matchContains:!1,cacheLength:10,max:100,mustMatch:!1,extraParams:{},selectFirst:!0,formatItem:function(row){return row[0]},formatMatch:null,autoFill:!1,width:0,multiple:!1,multipleSeparator:", ",highlight:function(value,term){return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:!0,scrollHeight:180};$.Autocompleter.Cache=function(options){var data={};var length=0;function matchSubset(s,sub){if(!options.matchCase)
s=s.toLowerCase();var i=s.indexOf(sub);if(i==-1)return!1;return i==0||options.matchContains};function add(q,cate,value){if(length>options.cacheLength){flush()}
if(!data[q]){length++}
data[q]=value}
function populate(){if(!options.data)return!1;var stMatchSets={},nullData=0;if(!options.url)options.cacheLength=1;stMatchSets[""]=[];for(var i=0,ol=options.data.length;i<ol;i++){var rawValue=options.data[i];rawValue=(typeof rawValue=="string")?[rawValue]:rawValue;var value=options.formatMatch(rawValue,i+1,options.data.length);if(value===!1)
continue;var firstChar=value.charAt(0).toLowerCase();if(!stMatchSets[firstChar])
stMatchSets[firstChar]=[];var row={value:value,data:rawValue,result:options.formatResult&&options.formatResult(rawValue)||value};stMatchSets[firstChar].push(row);if(nullData++<options.max){stMatchSets[""].push(row)}};$.each(stMatchSets,function(i,value){options.cacheLength++;add(i,value)})}
setTimeout(populate,25);function flush(){data={};length=0}
return{flush:flush,add:add,populate:populate,load:function(q){if(!options.cacheLength||!length)
return null;if(!options.url&&options.matchContains){var csub=[];for(var k in data){if(k.length>0){var c=data[k];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub.push(x)}})}}
return csub}else if(data[q]){return data[q]}else if(options.matchSubset){for(var i=q.length-1;i>=options.minChars;i--){var c=data[q.substr(0,i)];if(c){var csub=[];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub[csub.length]=x}});return csub}}}
return null}}};$.Autocompleter.Select=function(options,input,select,config){var CLASSES={ACTIVE:"ac_over"};var listItems,active=-1,data,term="",needsInit=!0,element,list;function init(){if(!needsInit)
return;element=$("<div/>").hide().addClass(options.resultsClass).css("position","absolute").appendTo('.leoproductsearch-result');list=$("<div/>").appendTo(element).mouseover(function(event){if(target(event).nodeName&&target(event).nodeName.toUpperCase()=='LI'){active=$("li",list).removeClass(CLASSES.ACTIVE).index(target(event));$(target(event)).addClass(CLASSES.ACTIVE)}}).click(function(event){$(target(event)).addClass(CLASSES.ACTIVE);select();input.focus();return!1}).mousedown(function(){config.mouseDownOnSelect=!0}).mouseup(function(){config.mouseDownOnSelect=!1});if(options.width>0)
element.css("width",options.width);needsInit=!1}
function target(event){var element=event.target;while(element&&element.tagName!="LI")
element=element.parentNode;if(!element)
return[];return element}
function moveSelect(step){listItems.slice(active,active+1).removeClass(CLASSES.ACTIVE);movePosition(step);var activeItem=listItems.slice(active,active+1).addClass(CLASSES.ACTIVE);if(options.scroll){var offset=0;listItems.slice(0,active).each(function(){offset+=this.offsetHeight});if((offset+activeItem[0].offsetHeight-list.scrollTop())>list[0].clientHeight){list.scrollTop(offset+activeItem[0].offsetHeight-list.innerHeight())}else if(offset<list.scrollTop()){list.scrollTop(offset)}}};function movePosition(step){active+=step;if(active<0){active=listItems.size()-1}else if(active>=listItems.size()){active=0}}
function limitNumberOfItems(available){return options.max&&options.max<available?options.max:available}
function fillList(){list.empty();var max=limitNumberOfItems(data.length);for(var i=0;i<max;i++){if(!data[i])
continue;var formatted=options.formatItem(data[i].data,i+1,max,data[i].value,term);if(formatted===!1)
continue;var li=$("<li/>").html(options.highlight(formatted,term)).addClass(i%2==0?"ac_even":"ac_odd").appendTo(list)[0];$.data(li,"ac_data",data[i])}
listItems=list.find("li");if(options.selectFirst){listItems.slice(0,1).addClass(CLASSES.ACTIVE);active=0}
if($.fn.bgiframe)
list.bgiframe()}
return{display:function(d,q){init();data=d;term=q;fillList()},next:function(){moveSelect(1)},prev:function(){moveSelect(-1)},pageUp:function(){if(active!=0&&active-8<0){moveSelect(-active)}else{moveSelect(-8)}},pageDown:function(){if(active!=listItems.size()-1&&active+8>listItems.size()){moveSelect(listItems.size()-1-active)}else{moveSelect(8)}},hide:function(){element&&element.hide();listItems&&listItems.removeClass(CLASSES.ACTIVE);active=-1},visible:function(){return element&&element.is(":visible")},current:function(){return this.visible()&&(listItems.filter("."+CLASSES.ACTIVE)[0]||options.selectFirst&&listItems[0])},show:function(){var offset=$(input).offset();element.css({width:typeof options.width=="string"||options.width>0?options.width:($(input).width()+parseInt($(input).css('padding-left'))+parseInt($(input).css('padding-right'))+parseInt($(input).css('margin-left'))+parseInt($(input).css('margin-right'))),top:"100%",left:0}).show();if(options.scroll){list.css({maxHeight:options.scrollHeight,overflow:'auto'});if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var listHeight=0;listItems.each(function(){listHeight+=this.offsetHeight});var scrollbarsVisible=listHeight>options.scrollHeight;list.css('height',scrollbarsVisible?options.scrollHeight:listHeight);if(!scrollbarsVisible){listItems.width(list.width()-parseInt(listItems.css("padding-left"))-parseInt(listItems.css("padding-right")))}}}},selected:function(){var selected=listItems&&listItems.filter("."+CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);return selected&&selected.length&&$.data(selected[0],"ac_data")},emptyList:function(){list&&list.empty()},unbind:function(){element&&element.remove()}}};$.Autocompleter.Selection=function(field,start,end){if(field.createTextRange){var selRange=field.createTextRange();selRange.collapse(!0);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select()}else if(field.setSelectionRange){field.setSelectionRange(start,end)}else{if(field.selectionStart){field.selectionStart=start;field.selectionEnd=end}}
field.focus()}})(jQuery);var instantSearchQueries=[];$(document).click(function(event){var $target=$(event.target);if(!$target.closest('.leoproductsearch-content').length){$(".leoproductsearch-result .ac_results").hide()}});$(document).ready(function(){$('#leo_search_query_top').click(function(){if($(this).val().length>2){$(".leoproductsearch-result .ac_results").show()}});if(typeof ajaxsearch!='undefined'&&ajaxsearch&&typeof blocksearch_type!=='undefined'&&blocksearch_type){var width_ac_results=$("#leo_search_query_"+blocksearch_type).outerWidth();$("#leo_search_query_"+blocksearch_type).autocomplete(leo_search_url,{minChars:3,max:numpro_display,width:(width_ac_results>0?width_ac_results:500),selectFirst:!1,scroll:!1,dataType:"json",formatItem:function(data,i,max,value,term){return value},extraParams:{ajaxSearch:1,id_lang:prestashop.language.id,leoproductsearch_static_token:leoproductsearch_static_token,leoproductsearch_token:leoproductsearch_token}}).result(function(event,data,formatted){$('#leo_search_query_'+blocksearch_type).val(data.name);document.location.href=data.url});$("#leo_search_query_"+blocksearch_type).click(function(){width_ac_results=$(this).outerWidth();$(this).setOptions({width:width_ac_results})})}
$('.cate-item').click(function(){if(!$(this).hasClass('active')){$('.cate-item.active').removeClass('active');var cate_id=$(this).data('cate-id');var cate_name=$(this).data('cate-name');$('#leosearch-cate-id').val(cate_id);$('#leosearchtop-cate-id').val(cate_id);$('#dropdownListCate span').text(cate_name);$('#dropdownListCateTop span').text(cate_name);$(this).addClass('active')}
$('#dropdownListCate').trigger('click');$('#dropdownListCateTop').trigger('click');var e=jQuery.Event("keydown");e.keyCode=40;$(this).parents('form').find('.search_query').focus().trigger(e);return!1});$('.search_query').click(function(){if($(this).val()!=''){}});$('.search_query').change(function(){if($(this).val()!=''){var e=jQuery.Event("keydown");e.keyCode=40;$(this).trigger(e)}})});$(window).resize(function(){updatePositionOfResult()});function updatePositionOfResult(){if($('.ac_results').length){width_ac_results=$("#leo_search_query_"+blocksearch_type).outerWidth();$("#leo_search_query_"+blocksearch_type).setOptions({width:width_ac_results});$('.ac_results').width(width_ac_results)}}
function tryToCloseInstantSearch(){if($('#old_center_column').length>0){$('#center_column').remove();$('#old_center_column').attr('id','center_column');$('#center_column').show();return!1}}
function stopInstantSearchQueries(){for(i=0;i<instantSearchQueries.length;i++)
instantSearchQueries[i].abort();instantSearchQueries=new Array()}
var Leosearchplaceholder=function(el,toRotate,period){this.toRotate=toRotate;this.el=el;this.loopNum=0;this.period=parseInt(period,10)||1000;this.txt='';this.tick();this.isDeleting=!1};Leosearchplaceholder.prototype.tick=function(){var i=this.loopNum%this.toRotate.length;var fullTxt=this.toRotate[i];if(this.isDeleting){this.txt=fullTxt.substring(0,this.txt.length-1)}else{this.txt=fullTxt.substring(0,this.txt.length+1)}
this.el.setAttribute('placeholder',this.txt);var that=this;var delta=60;if(this.isDeleting){delta/=5}
if(!this.isDeleting&&this.txt===fullTxt){delta=1000;this.isDeleting=!0}else if(this.isDeleting&&this.txt===''){this.isDeleting=!1;this.loopNum++;delta=100}
setTimeout(function(){that.tick()},delta)};window.onload=function(){var elements=document.getElementsByClassName('search_query');for(var i=0;i<elements.length;i++){var content=elements[i].getAttribute('data-content');var period=1000;if(content){new Leosearchplaceholder(elements[i],JSON.parse(content),period)}}};/*
 * NOTICE OF LICENSE
 *
 * This product is licensed for one customer to use on one installation (test stores and multishop included).
 * Site developer has the right to modify this module to suit their needs, but can not redistribute the module in
 * whole or in part. Any other use of this module constitutes a violation of the user agreement.
 *
 * DISCLAIMER
 *
 * NO WARRANTIES OF DATA SAFETY OR MODULE SECURITY
 * ARE EXPRESSED OR IMPLIED. USE THIS MODULE IN ACCORDANCE
 * WITH YOUR MERCHANT AGREEMENT, KNOWING THAT VIOLATIONS OF
 * PCI COMPLIANCY OR A DATA BREACH CAN COST THOUSANDS OF DOLLARS
 * IN FINES AND DAMAGE A STORES REPUTATION. USE AT YOUR OWN RISK.
 *
 * @author    idnovate.com <info@idnovate.com>
 * @copyright 2022 idnovate.com
 * @license   See above
 */
(function($,F){F.transitions.dropIn=function(){var endPos=F._getPosition(!0);endPos.top=(parseInt(endPos.top,10)-200)+'px';endPos.opacity=0;F.wrap.css(endPos).show().animate({top:'+=200px',opacity:1},{duration:F.current.openSpeed,complete:F._afterZoomIn})};F.transitions.dropOut=function(){F.wrap.removeClass('fancybox-opened').animate({top:'-=200px',opacity:0},{duration:F.current.closeSpeed,complete:F._afterZoomOut})};F.transitions.superscaleIn=function(){F.wrap.addClass('superscale');setTimeout(function(){F.wrap.addClass('superscale-transitions');F.wrap.addClass('show');F._afterZoomIn()})}
F.transitions.superscaleOut=function(){F.wrap.removeClass('show');setTimeout(function(){F.wrap.removeClass('superscale superscale-transitions');F._afterZoomOut()},300)}
F.transitions.fadescaleIn=function(){F.wrap.addClass('fadescale');setTimeout(function(){F.wrap.addClass('fadescale-transitions');F.wrap.addClass('show');F._afterZoomIn()})}
F.transitions.fadescaleOut=function(){F.wrap.removeClass('show');setTimeout(function(){F.wrap.removeClass('fadescale fadescale-transitions');F._afterZoomOut()},300)}
F.transitions.sliderightIn=function(){F.wrap.addClass('slideright');setTimeout(function(){F.wrap.addClass('slideright-transitions');F.wrap.addClass('show');F._afterZoomIn()})}
F.transitions.sliderightOut=function(){F.wrap.removeClass('show');setTimeout(function(){F.wrap.removeClass('slideright slideright-transitions');F._afterZoomOut()},300)}
F.transitions.slidebottomIn=function(){F.wrap.addClass('slidebottom');setTimeout(function(){F.wrap.addClass('slidebottom-transitions');F.wrap.addClass('show');F._afterZoomIn()})}
F.transitions.slidebottomOut=function(){F.wrap.removeClass('show');setTimeout(function(){F.wrap.removeClass('slidebottom slidebottom-transitions');F._afterZoomOut()},300)}
F.transitions.newspaperIn=function(){F.wrap.addClass('newspaper');setTimeout(function(){F.wrap.addClass('newspaper-transitions');F.wrap.addClass('show');F._afterZoomIn()})}
F.transitions.newspaperOut=function(){F.wrap.removeClass('show');setTimeout(function(){F.wrap.removeClass('newspaper newspaper-transitions');F._afterZoomOut()},300)}
F.transitions.fallIn=function(){F.wrap.addClass('fall');setTimeout(function(){F.wrap.addClass('show');F._afterZoomIn()})}
F.transitions.fallOut=function(){F.wrap.removeClass('show');setTimeout(function(){F.wrap.removeClass('fall');F._afterZoomOut()},300)}
F.transitions.sidefallIn=function(){F.wrap.addClass('sidefall');setTimeout(function(){F.wrap.addClass('show');F._afterZoomIn()})}
F.transitions.sidefallOut=function(){F.wrap.removeClass('show');setTimeout(function(){F.wrap.removeClass('sidefall');F._afterZoomOut()},300)}
F.transitions.stickyupIn=function(){F.wrap.addClass('stickyup');setTimeout(function(){F.wrap.addClass('show stickyup-transitions');F._afterZoomIn()})}
F.transitions.stickyupOut=function(){F.wrap.removeClass('show');setTimeout(function(){F.wrap.removeClass('stickyup stickyup-transitions');F._afterZoomOut()},300)}
F.transitions.horizontalflipIn=function(){F.wrap.addClass('horizflip');setTimeout(function(){F.wrap.addClass('show horizflip-transitions');F._afterZoomIn()})}
F.transitions.horizontalflipOut=function(){F.wrap.removeClass('show');setTimeout(function(){F.wrap.removeClass('horizflip horizflip-transitions');F._afterZoomOut()},300)}
F.transitions.verticalflipIn=function(){F.wrap.addClass('vertflip');setTimeout(function(){F.wrap.addClass('show vertflip-transitions');F._afterZoomIn()})}
F.transitions.verticalflipOut=function(){F.wrap.removeClass('show');setTimeout(function(){F.wrap.removeClass('vertflip vertflip-transitions');F._afterZoomOut()},300)}
F.transitions.signIn=function(){F.wrap.addClass('sign');setTimeout(function(){F.wrap.addClass('show sign-transitions');F._afterZoomIn()})}
F.transitions.signOut=function(){F.wrap.removeClass('show');setTimeout(function(){F.wrap.removeClass('sign sign-transitions');F._afterZoomOut()},300)}
F.transitions.slitIn=function(){F.wrap.addClass('slit');setTimeout(function(){F.wrap.addClass('show');F._afterZoomIn()})}
F.transitions.slitOut=function(){F.wrap.removeClass('show');setTimeout(function(){F.wrap.removeClass('slit');F._afterZoomOut()},300)}
F.transitions.rotatebottomIn=function(){F.wrap.addClass('rotatebottom');setTimeout(function(){F.wrap.addClass('show rotatebottom-transitions');F._afterZoomIn()})}
F.transitions.rotatebottomOut=function(){F.wrap.removeClass('show');setTimeout(function(){F.wrap.removeClass('rotatebottom-transitions rotatebottom');F._afterZoomOut()},300)}
F.transitions.rotateleftIn=function(){F.wrap.addClass('rotateleft');setTimeout(function(){F.wrap.addClass('show rotateleft-transitions');F._afterZoomIn()})}
F.transitions.rotateleftOut=function(){F.wrap.removeClass('show');setTimeout(function(){F.wrap.removeClass('rotateleft-transitions rotateleft');F._afterZoomOut()},300)}
F.transitions.blurIn=function(){F.wrap.siblings().not('.fancybox-wrap').not('.fancybox-overlay').addClass('blur-overlay');F.wrap.addClass('blur');setTimeout(function(){F.wrap.addClass('blur-transitions show');F._afterZoomIn()})}
F.transitions.blurOut=function(){F.wrap.removeClass('show');setTimeout(function(){F.wrap.removeClass('blur-transitions blur');F.wrap.siblings().not('.fancybox-wrap').not('.fancybox-overlay').removeClass('blur-overlay');F._afterZoomOut()},300)}})(jQuery,jQuery.fancybox);$(document).ready(function(){var $searchWidget=$('#search_widget');var $searchBox=$searchWidget.find('input[type=text]');var searchURL=$searchWidget.attr('data-search-controller-url');$.widget('prestashop.psBlockSearchAutocomplete',$.ui.autocomplete,{_renderItem:function(ul,product){return $("<li>").append($("<a>").append($("<span>").html(product.category_name).addClass("category")).append($("<span>").html(' > ').addClass("separator")).append($("<span>").html(product.name).addClass("product"))).appendTo(ul)}});$searchBox.psBlockSearchAutocomplete({source:function(query,response){$.post(searchURL,{s:query.term,resultsPerPage:10},null,'json').then(function(resp){response(resp.products)}).fail(response)},select:function(event,ui){var url=ui.item.url;window.location.href=url},})});/**
 * 2007-2020 PrestaShop and Contributors
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * @author    PrestaShop SA <contact@prestashop.com>
 * @copyright 2007-2020 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 * International Registered Trademark & Property of PrestaShop SA
 */
$(document).ready(function(){prestashop.blockcart=prestashop.blockcart||{};var showModal=prestashop.blockcart.showModal||function(modal){var $body=$('body');$body.append(modal);$body.one('click','#blockcart-modal',function(event){if(event.target.id==='blockcart-modal'){$(event.target).remove()}})};prestashop.on('updateCart',function(event){var refreshURL=$('.blockcart').data('refresh-url');var requestData={};if(event&&event.reason&&typeof event.resp!=='undefined'&&!event.resp.hasError){requestData={id_customization:event.reason.idCustomization,id_product_attribute:event.reason.idProductAttribute,id_product:event.reason.idProduct,action:event.reason.linkAction}}
if(event&&event.resp&&event.resp.hasError){prestashop.emit('showErrorNextToAddtoCartButton',{errorMessage:event.resp.errors.join('<br/>')})}
$.post(refreshURL,requestData).then(function(resp){var html=$('<div />').append($.parseHTML(resp.preview));$('.blockcart').replaceWith($(resp.preview).find('.blockcart'));if(resp.modal){showModal(resp.modal)}}).fail(function(resp){prestashop.emit('handleError',{eventType:'updateShoppingCart',resp:resp})})})});var options_modal_product_page={speed:300,dots:!1,infinite:!1,slidesToShow:4,slidesToScroll:1,vertical:!0,verticalSwiping:!0,responsive:[{breakpoint:1200,settings:{slidesToShow:3,slidesToScroll:1,}},{breakpoint:992,settings:{slidesToShow:2,slidesToScroll:1}},{breakpoint:768,settings:{slidesToShow:2,slidesToScroll:1}},{breakpoint:576,settings:{slidesToShow:1,slidesToScroll:1}},{breakpoint:480,settings:{slidesToShow:2,slidesToScroll:1}},{breakpoint:400,settings:{slidesToShow:1,slidesToScroll:1}}]};var options_quickview={speed:300,dots:!1,infinite:!1,slidesToShow:4,slidesToScroll:1,vertical:!0,verticalSwiping:!0,responsive:[{breakpoint:1200,settings:{slidesToShow:4,slidesToScroll:1,}},{breakpoint:992,settings:{slidesToShow:3,slidesToScroll:1}},{breakpoint:768,settings:{slidesToShow:4,slidesToScroll:1}},{breakpoint:576,settings:{slidesToShow:3,slidesToScroll:1}},{breakpoint:480,settings:{slidesToShow:2,slidesToScroll:1}}]};$(window).resize(function(){if(prestashop.page.page_name=='product')
restartElevateZoom();if($('#product-modal .product-images').hasClass('slick-initialized')&&$('#product-modal .product-images').height()==0){$('#product-modal .product-images').slick('unslick');$('#product-modal .product-images').hide();initSlickProductModal()}});$(document).ready(function(){floatHeader();if(prestashop.page.page_name=='product'){innitSlickandZoom()}
if(prestashop.page.page_name=='category'){setDefaultListGrid()}
if(typeof(products_list_functions)!='undefined'){for(var i=0;i<products_list_functions.length;i++){products_list_functions[i]()}}
$('.address-item .radio-block').click(function(){if(!$(this).parents('.address-item').hasClass('selected')){$('.address-item.selected').removeClass('selected');$(this).parents('.address-item').addClass('selected')}})
actionQuickViewLoading();prestashop.on('updateProductList',function(){actionQuickViewLoading()});prestashop.on('updatedProduct',function(){if($('.quickview.modal .product-thumb-images').length){initSlickProductQuickView()}else if($('.product-detail .product-thumb-images').length){innitSlickandZoom()}});if(typeof $("#content").data('templatemodal')!='undefined'){if(!$("#content").data('templatemodal')){$('div[data-target="#product-modal"]').hide()}}
$('.demo-product-detail a').click(function(e){if(!$(this).hasClass('updated')){e.preventDefault();var current_url=window.location.href;if(prestashop.page.page_name=='product'&&current_url.indexOf('.html')>=0){var link_href=$(this).attr('href');var layout_key_index=link_href.indexOf('?layout=');var layout_key_value=link_href.substring(layout_key_index);current_url=current_url.substring(0,current_url.indexOf('.html'));var new_url=current_url+'.html'+layout_key_value;window.location.href=new_url}}})});function innitSlickandZoom(){if($("#main").hasClass('product-image-thumbs')){$('.product-detail .product-thumb-images').imagesLoaded(function(){if(typeof check_loaded_main_product!='undefined'){clearInterval(check_loaded_main_product)}
check_loaded_main_product=setInterval(function(){if($('.product-detail .product-thumb-images').height()>0){$('.product-detail .product-thumb-images').fadeIn();clearInterval(check_loaded_main_product);postion=$("#content").data("templateview");numberimage=$("#content").data("numberimage");numberimage1200=$("#content").data("numberimage1200");numberimage992=$("#content").data("numberimage992");numberimage768=$("#content").data("numberimage768");numberimage576=$("#content").data("numberimage576");numberimage480=$("#content").data("numberimage480");numberimage360=$("#content").data("numberimage360");if(postion!=='undefined'){initSlickProductThumb(postion,numberimage,numberimage1200,numberimage992,numberimage768,numberimage576,numberimage480,numberimage360)}}},300)});initSlickProductModal()}
applyElevateZoom()}
function restartElevateZoom(){$(".zoomContainer").remove();applyElevateZoom()}
function applyElevateZoom(){$(".zoomContainer").remove();if($(window).width()<=991||$("#content").data("templatezoomtype")=='none'){if($('#main').hasClass('product-image-gallery')){if($('img.js-thumb').data('elevateZoom')){var ezApi=$('img.js-thumb').data('elevateZoom');ezApi.changeState('disable');$('img.js-thumb').unbind("touchmove")}}else{if($("#zoom_product").data('elevateZoom')){var ezApi=$("#zoom_product").data('elevateZoom');ezApi.changeState('disable');$("#zoom_product").unbind("touchmove")}}
return!1}
var zt=$("#content").data('templatezoomtype');var zoom_cursor;var zoom_type;var scroll_zoom=!1;var lens_FadeIn=200;var lens_FadeOut=200;var zoomWindow_FadeIn=200;var zoomWindow_FadeOut=200;var zoom_tint=!1;var zoomWindow_Width=400;var zoomWindow_Height=400;var zoomWindow_Position=1;if(zt=='in'){zoom_cursor='crosshair';zoom_type='inner';lens_FadeIn=!1;lens_FadeOut=!1}else{zoom_cursor='default';zoom_type='window';zoom_tint=!0;zoomWindow_Width=$("#content").data('zoomwindowwidth');zoomWindow_Height=$("#content").data('zoomwindowheight');if($("#content").data('zoomposition')=='right'){if(prestashop.language.is_rtl==1){zoomWindow_Position=11}else{zoomWindow_Position=1}}
if($("#content").data('zoomposition')=='left'){if(prestashop.language.is_rtl==1){zoomWindow_Position=1}else{zoomWindow_Position=11}}
if($("#content").data('zoomposition')=='top'){zoomWindow_Position=13}
if($("#content").data('zoomposition')=='bottom'){zoomWindow_Position=7}
if(zt=='in_scrooll'){var ua=window.navigator.userAgent;var old_ie=ua.indexOf('MSIE ');var new_ie=ua.indexOf('Trident/');if(old_ie>0||new_ie>0){scroll_zoom=!1}else{scroll_zoom=!0}}};if($('#main').hasClass('product-image-gallery')){lens_FadeIn=!1;lens_FadeOut=!1;zoomWindow_FadeIn=!1;zoomWindow_FadeOut=!1}
var zoom_config={responsive:!0,cursor:zoom_cursor,scrollZoom:scroll_zoom,scrollZoomIncrement:0.1,zoomLevel:1,zoomType:zoom_type,gallery:'thumb-gallery',lensFadeIn:lens_FadeIn,lensFadeOut:lens_FadeOut,zoomWindowFadeIn:zoomWindow_FadeIn,zoomWindowFadeOut:zoomWindow_FadeOut,zoomWindowWidth:zoomWindow_Width,zoomWindowHeight:zoomWindow_Height,borderColour:'#888',borderSize:2,zoomWindowOffetx:0,zoomWindowOffety:0,zoomWindowPosition:zoomWindow_Position,tint:zoom_tint,};if($('#main').hasClass('product-image-gallery')){$('img.js-thumb').each(function(){var parent_e=$(this).parent();$(this).attr('src',parent_e.data('image'));$(this).data('type-zoom',parent_e.data('zoom-image'))});if($.fn.elevateZoom!==undefined){$('img.js-thumb').elevateZoom(zoom_config);$('img.js-thumb').bind("click",function(e){var ez=$(this).data('elevateZoom');$.fancybox(ez.getGalleryList());return!1})}}else{if($.fn.elevateZoom!==undefined){$("#zoom_product").elevateZoom(zoom_config);$("#zoom_product").bind("click",function(e){var ez=$('#zoom_product').data('elevateZoom');$.fancybox(ez.getGalleryList());return!1})}}}
function initSlickProductThumb(postion,numberimage,numberimage1200,numberimage992,numberimage768,numberimage576,numberimage480,numberimage360){var vertical=!0;var verticalSwiping=!0;var slick_rtl=!1;if(postion=="bottom"){vertical=!1;verticalSwiping=!1}
if(postion=='none'){vertical=!1;verticalSwiping=!1;numberimage=numberimage1200=numberimage992=numberimage768=numberimage576=numberimage480=numberimage360=1}
if(!vertical&&prestashop.language.is_rtl==1){slick_rtl=!0}
var slider=$('#thumb-gallery');slider.slick({speed:300,dots:!1,infinite:!1,slidesToShow:numberimage,vertical:vertical,verticalSwiping:verticalSwiping,slidesToScroll:1,rtl:slick_rtl,responsive:[{breakpoint:1200,settings:{slidesToShow:numberimage1200,slidesToScroll:1,}},{breakpoint:992,settings:{slidesToShow:numberimage992,slidesToScroll:1,}},{breakpoint:768,settings:{slidesToShow:numberimage768,slidesToScroll:1}},{breakpoint:576,settings:{slidesToShow:numberimage576,slidesToScroll:1}},{breakpoint:480,settings:{slidesToShow:numberimage480,slidesToScroll:1}},{breakpoint:360,settings:{slidesToShow:numberimage360,slidesToScroll:1}}]});$("#thumb-gallery").show();if(postion=='none'){var slickInstance=slider[0];var slides=$(slickInstance.slick.$slides);var positionStart=findPosition(slides);var slideCount=slickInstance.slick.slideCount;if((positionStart+1)==slideCount){$('.arrows-product-fake .slick-next').addClass('slick-disabled')}else if(positionStart==0){$('.arrows-product-fake .slick-prev').addClass('slick-disabled')}
slider.slick('slickGoTo',positionStart);$('.arrows-product-fake .slick-next').on("click",function(){if(!$(this).hasClass('slick-disabled')){$('.arrows-product-fake .slick-prev').removeClass('slick-disabled');var positionCurrent=findPosition(slides);if((positionCurrent+1)<slideCount){$(slides[positionCurrent]).removeClass('active');$(slides[positionCurrent+1]).addClass('active');$(slides[positionCurrent+1]).find('img').trigger("click");slider.slick('slickNext');if((positionCurrent+1)==(slideCount-1)){$(this).addClass('slick-disabled')}}}});$('.arrows-product-fake .slick-prev').on("click",function(){if(!$(this).hasClass('slick-disabled')){$('.arrows-product-fake .slick-next').removeClass('slick-disabled');var positionCurrent=findPosition(slides);if((positionCurrent)>0){$(slides[positionCurrent]).removeClass('active');$(slides[positionCurrent-1]).addClass('active');$(slides[positionCurrent-1]).find('img').trigger("click");slider.slick('slickPrev');if((positionCurrent-1)==0){$(this).addClass('slick-disabled')}}}})}}
function findPosition(slides){var position;for(var i=0;i<slides.length;i++){if($(slides[i]).hasClass('active')){position=$(slides[i]).data('slick-index');return position}}}
function actionQuickViewLoading(){$('.quick-view').click(function(){if(!$(this).hasClass('active')){$(this).addClass('active');$(this).find('.leo-quickview-bt-loading').css({'display':'block'});$(this).find('.leo-quickview-bt-content').hide();if(typeof check_active_quickview!='undefined'){clearInterval(check_active_quickview)}
check_active_quickview=setInterval(function(){if($('.quickview.modal').length){$('.quickview.modal').on('hide.bs.modal',function(e){$('.quick-view.active').find('.leo-quickview-bt-loading').hide();$('.quick-view.active').find('.leo-quickview-bt-content').show();$('.quick-view.active').removeClass('active')});clearInterval(check_active_quickview);initSlickProductQuickView()}},300)}})}
$(document).on('click','.leo_grid',function(e){e.preventDefault();$('#js-product-list .product_list').removeClass('list');$('#js-product-list .product_list').addClass('grid');$(this).parent().find('.leo_list').removeClass('selected');$(this).addClass('selected');var configName=LEO_COOKIE_THEME+'_grid_list';$.cookie(configName,'grid',{expires:1,path:'/'})});$(document).on('click','.leo_list',function(e){e.preventDefault();$('#js-product-list .product_list').removeClass('grid');$('#js-product-list .product_list').addClass('list');$(this).parent().find('.leo_grid').removeClass('selected');$(this).addClass('selected');var configName=LEO_COOKIE_THEME+'_grid_list';$.cookie(configName,'list',{expires:1,path:'/'})});function setDefaultListGrid(){if($.cookie(LEO_COOKIE_THEME+'_grid_list')=='grid'){$('.leo_grid').trigger('click')}
if($.cookie(LEO_COOKIE_THEME+'_grid_list')=='list'){$('.leo_list').trigger('click')}}
function processFloatHeader(headerAdd,scroolAction){if($('.ac_results').length){$('.ac_results').hide()}
if(headerAdd){$("#header").addClass("navbar-fixed-top");var hideheight=$("#header").height()+120;$("#page").css("padding-top",$("#header").height());setTimeout(function(){$("#page").css("padding-top",$("#header").height())},200)}else{$("#header").removeClass("navbar-fixed-top");$("#page").css("padding-top",'')}
var pos=$(window).scrollTop();if(scroolAction&&pos>=hideheight){$(".header-nav").addClass('hide-bar');$(".hide-bar").css("margin-top",-$(".header-nav").height());$("#header").addClass("mini-navbar")}else{$(".header-nav").removeClass('hide-bar');$(".header-nav").css("margin-top",0);$("#header").removeClass("mini-navbar")}}
function floatHeader(){if(!$("body").hasClass("keep-header")||$(window).width()<=990){return}
$(window).resize(function(){if($(window).width()<=990){processFloatHeader(0,0)}else if($(window).width()>990){if($("body").hasClass("keep-header"))
processFloatHeader(1,1)}});var headerScrollTimer;$(window).scroll(function(){if(headerScrollTimer){window.clearTimeout(headerScrollTimer)}
headerScrollTimer=window.setTimeout(function(){if(!$("body").hasClass("keep-header"))return;if($(window).width()>990){processFloatHeader(1,1)}},100)})}
function initSlickProductQuickView(){$('.quickview.modal .product-thumb-images').imagesLoaded(function(){if(typeof check_loaded_thumb_quickview!='undefined'){clearInterval(check_loaded_thumb_quickview)}
check_loaded_thumb_quickview=setInterval(function(){if($('.quickview.modal .product-thumb-images').height()>0){$('.quickview.modal .product-thumb-images').fadeIn();clearInterval(check_loaded_thumb_quickview);$('.quickview.modal .product-thumb-images').slick(options_quickview)}},300)})}
function initSlickProductModal(){$('#product-modal .product-images').imagesLoaded(function(){if(typeof check_loaded_thumb_modal!='undefined'){clearInterval(check_loaded_thumb_modal)}
check_loaded_thumb_modal=setInterval(function(){if($('#product-modal .product-images').height()>0){$('#product-modal .product-images').fadeIn();clearInterval(check_loaded_thumb_modal);$('#product-modal .product-images').slick(options_modal_product_page)}},300)})}
$(document).ready(function(){$('.product-flag').removeAttr('style');prestashop.on('updateProductList',function(){$('.product-flag').removeAttr('style')})})
$().ready(function(){$('#leo_search_block_top .title_block').click(function(){$(this).parent().toggleClass('active');setTimeout(function(){jQuery('#leo_search_block_top.active input.form-control').focus()},100)});$(document).keydown(function(e){if(e.keyCode==27){$('#leo_search_block_top').removeClass('active')}});$(document).click(function(event){if(!$(event.target).closest("#leo_search_block_top").length){$("#leo_search_block_top").removeClass("active")}});$(document).ajaxComplete(function(){$('.p-reference .product-reference').html($("#product-details .product-reference").clone());$('.p-reference .product-quantities').html($("#product-details .product-quantities").clone())})});function customSticky(){var s=$(".header-top > .inner");var pos=s.offset();var alreadySticky=!1;$(window).scroll(function(){var windowpos=$(window).scrollTop();if(s.length){if(!alreadySticky){if(windowpos>=pos.top){alreadySticky=!0;s.parent().height(s.height());s.removeClass("cus-nosticky");s.addClass("cus-sticky");$('body').removeClass("body-nosticky");$('body').addClass("body-sticky")}}
if(alreadySticky){if(windowpos<pos.top){alreadySticky=!1;s.removeClass("cus-sticky");s.addClass("cus-nosticky");s.parent().removeAttr("style");$('body').addClass("body-nosticky");$('body').removeClass("body-sticky")}}}})}(function($){"use strict";$(document).ready(function(){"use strict";var progressPath=document.querySelector('.progress-wrap path');var pathLength=progressPath.getTotalLength();progressPath.style.transition=progressPath.style.WebkitTransition='none';progressPath.style.strokeDasharray=pathLength+' '+pathLength;progressPath.style.strokeDashoffset=pathLength;progressPath.getBoundingClientRect();progressPath.style.transition=progressPath.style.WebkitTransition='stroke-dashoffset 10ms linear';var updateProgress=function(){var scroll=$(window).scrollTop();var height=$(document).height()-$(window).height();var progress=pathLength-(scroll*pathLength/height);progressPath.style.strokeDashoffset=progress}
updateProgress();$(window).scroll(updateProgress);var offset=50;var duration=550;jQuery(window).on('scroll',function(){if(jQuery(this).scrollTop()>offset){jQuery('.progress-wrap').addClass('active-progress')}else{jQuery('.progress-wrap').removeClass('active-progress')}});jQuery('.progress-wrap').on('click',function(event){event.preventDefault();jQuery('html, body').animate({scrollTop:0},duration);return!1})})})(jQuery);!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports&&"string"!=typeof exports.nodeName?module.exports=t():e.Instafeed=t()}(this,function(){function e(e,t){if(!e)throw new Error(t)}function t(t){e(!t||"object"==typeof t,"options must be an object, got "+t+" ("+typeof t+")");var o={accessToken:null,accessTokenTimeout:5e3,after:null,apiTimeout:5e3,debug:!1,error:null,filter:null,limit:null,mock:!1,render:null,sort:null,success:null,target:"instafeed",template:'<a href="{{link}}"><img title="{{caption}}" src="{{image}}" /></a>',templateBoundaries:["{{","}}"],transform:null};if(t)for(var n in o)void 0!==t[n]&&(o[n]=t[n]);e("string"==typeof o.target||"object"==typeof o.target,"target must be a string or DOM node, got "+o.target+" ("+typeof o.target+")"),e("string"==typeof o.accessToken||"function"==typeof o.accessToken,"accessToken must be a string or function, got "+o.accessToken+" ("+typeof o.accessToken+")"),e("number"==typeof o.accessTokenTimeout,"accessTokenTimeout must be a number, got "+o.accessTokenTimeout+" ("+typeof o.accessTokenTimeout+")"),e("number"==typeof o.apiTimeout,"apiTimeout must be a number, got "+o.apiTimeout+" ("+typeof o.apiTimeout+")"),e("boolean"==typeof o.debug,"debug must be true or false, got "+o.debug+" ("+typeof o.debug+")"),e("boolean"==typeof o.mock,"mock must be true or false, got "+o.mock+" ("+typeof o.mock+")"),e("object"==typeof o.templateBoundaries&&2===o.templateBoundaries.length&&"string"==typeof o.templateBoundaries[0]&&"string"==typeof o.templateBoundaries[1],"templateBoundaries must be an array of 2 strings, got "+o.templateBoundaries+" ("+typeof o.templateBoundaries+")"),e(!o.template||"string"==typeof o.template,"template must null or string, got "+o.template+" ("+typeof o.template+")"),e(!o.error||"function"==typeof o.error,"error must be null or function, got "+o.error+" ("+typeof o.error+")"),e(!o.after||"function"==typeof o.after,"after must be null or function, got "+o.after+" ("+typeof o.after+")"),e(!o.success||"function"==typeof o.success,"success must be null or function, got "+o.success+" ("+typeof o.success+")"),e(!o.filter||"function"==typeof o.filter,"filter must be null or function, got "+o.filter+" ("+typeof o.filter+")"),e(!o.transform||"function"==typeof o.transform,"transform must be null or function, got "+o.transform+" ("+typeof o.transform+")"),e(!o.sort||"function"==typeof o.sort,"sort must be null or function, got "+o.sort+" ("+typeof o.sort+")"),e(!o.render||"function"==typeof o.render,"render must be null or function, got "+o.render+" ("+typeof o.render+")"),e(!o.limit||"number"==typeof o.limit,"limit must be null or number, got "+o.limit+" ("+typeof o.limit+")"),this._state={running:!1},this._options=o}return t.prototype.run=function(){var e=this,t=null,o=null,n=null,r=null;return this._debug("run","options",this._options),this._debug("run","state",this._state),this._state.running?(this._debug("run","already running, skipping"),!1):(this._state.running=!0,this._debug("run","getting dom node"),(t="string"==typeof this._options.target?document.getElementById(this._options.target):this._options.target)?(this._debug("run","got dom node",t),this._debug("run","getting access token"),this._getAccessToken(function(s,i){if(s)return e._debug("onTokenReceived","error",s),void e._fail(new Error("error getting access token: "+s.message));o="https://graph.instagram.com/me/media?fields=caption,id,media_type,media_url,permalink,thumbnail_url,timestamp,username&access_token="+i,e._debug("onTokenReceived","request url",o),e._makeApiRequest(o,function(o,s){if(o)return e._debug("onResponseReceived","error",o),void e._fail(new Error("api request error: "+o.message));e._debug("onResponseReceived","data",s),e._success(s);try{n=e._processData(s),e._debug("onResponseReceived","processed data",n)}catch(t){return void e._fail(t)}if(e._options.mock)e._debug("onResponseReceived","mock enabled, skipping render");else{try{r=e._renderData(n),e._debug("onResponseReceived","html content",r)}catch(t){return void e._fail(t)}t.innerHTML=r}e._finish()})}),!0):(this._fail(new Error("no element found with ID "+this._options.target)),!1))},t.prototype._processData=function(e){var t="function"==typeof this._options.transform,o="function"==typeof this._options.filter,n="function"==typeof this._options.sort,r="number"==typeof this._options.limit,s=[],i=null,a=null,u=null,c=null;if(this._debug("processData","hasFilter",o,"hasTransform",t,"hasSort",n,"hasLimit",r),"object"!=typeof e||"object"!=typeof e.data||e.data.length<=0)return null;for(var l=0;l<e.data.length;l++){if(a=this._getItemData(e.data[l]),t)try{u=this._options.transform(a),this._debug("processData","transformed item",a,u)}catch(e){throw this._debug("processData","error calling transform",e),new Error("error in transform: "+e.message)}else u=a;if(o){try{c=this._options.filter(u),this._debug("processData","filter item result",u,c)}catch(e){throw this._debug("processData","error calling filter",e),new Error("error in filter: "+e.message)}c&&s.push(u)}else s.push(u)}if(n)try{s.sort(this._options.sort)}catch(e){throw this._debug("processData","error calling sort",e),new Error("error in sort: "+e.message)}return r&&(i=s.length-this._options.limit,this._debug("processData","checking limit",s.length,this._options.limit,i),i>0&&s.splice(s.length-i,i)),s},t.prototype._getItemData=function(e){var t=null,o=null;switch(e.media_type){case"IMAGE":t="image",o=e.media_url;break;case"VIDEO":t="video",o=e.thumbnail_url;break;case"CAROUSEL_ALBUM":t="album",o=e.media_url}return{caption:e.caption,id:e.id,image:o,link:e.permalink,model:e,timestamp:e.timestamp,type:t,username:e.username}},t.prototype._renderData=function(e){var t="string"==typeof this._options.template,o="function"==typeof this._options.render,n=null,r=null,s="";if(this._debug("renderData","hasTemplate",t,"hasRender",o),"object"!=typeof e||e.length<=0)return null;for(var i=0;i<e.length;i++){if(n=e[i],o)try{r=this._options.render(n,this._options),this._debug("renderData","custom render result",n,r)}catch(e){throw this._debug("renderData","error calling render",e),new Error("error in render: "+e.message)}else t&&(r=this._basicRender(n));r?s+=r:this._debug("renderData","render item did not return any content",n)}return s},t.prototype._basicRender=function(e){for(var t=new RegExp(this._options.templateBoundaries[0]+"([\\s\\w.]+)"+this._options.templateBoundaries[1],"gm"),o=this._options.template,n=null,r="",s=0,i=null,a=null;null!==(n=t.exec(o));)i=n[1],r+=o.slice(s,n.index),(a=this._valueForKeyPath(i,e))&&(r+=a.toString()),s=t.lastIndex;return s<o.length&&(r+=o.slice(s,o.length)),r},t.prototype._valueForKeyPath=function(e,t){for(var o=/([\w]+)/gm,n=null,r=t;null!==(n=o.exec(e));){if("object"!=typeof r)return null;r=r[n[1]]}return r},t.prototype._fail=function(e){!this._runHook("error",e)&&console&&"function"==typeof console.error&&console.error(e),this._state.running=!1},t.prototype._finish=function(){this._runHook("after"),this._state.running=!1},t.prototype._success=function(e){this._runHook("success",e),this._state.running=!1},t.prototype._makeApiRequest=function(e,t){var o=!1,n=this,r=null,s=function(e,n){o||(o=!0,t(e,n))};(r=new XMLHttpRequest).timeout=this._options.apiTimeout,r.ontimeout=function(e){s(new Error("api request timed out"))},r.onerror=function(e){s(new Error("api connection error"))},r.onload=function(e){var t=r.getResponseHeader("Content-Type"),o=null;if(n._debug("apiRequestOnLoad","loaded",e),n._debug("apiRequestOnLoad","response status",r.status),n._debug("apiRequestOnLoad","response content type",t),t.indexOf("application/json")>=0)try{o=JSON.parse(r.responseText)}catch(e){return n._debug("apiRequestOnLoad","json parsing error",e,r.responseText),void s(new Error("error parsing response json"))}200===r.status?s(null,o):o&&o.error?s(new Error(o.error.code+" "+o.error.message)):s(new Error("status code "+r.status))},r.open("GET",e,!0),r.send()},t.prototype._getAccessToken=function(e){var t=!1,o=this,n=null,r=function(o,r){t||(t=!0,clearTimeout(n),e(o,r))};if("function"==typeof this._options.accessToken){this._debug("getAccessToken","calling accessToken as function"),n=setTimeout(function(){o._debug("getAccessToken","timeout check",t),r(new Error("accessToken timed out"),null)},this._options.accessTokenTimeout);try{this._options.accessToken(function(e,n){o._debug("getAccessToken","received accessToken callback",t,e,n),r(e,n)})}catch(e){this._debug("getAccessToken","error invoking the accessToken as function",e),r(e,null)}}else this._debug("getAccessToken","treating accessToken as static",typeof this._options.accessToken),r(null,this._options.accessToken)},t.prototype._debug=function(){var e=null;this._options.debug&&console&&"function"==typeof console.log&&((e=[].slice.call(arguments))[0]="[Instafeed] ["+e[0]+"]",console.log.apply(null,e))},t.prototype._runHook=function(e,t){var o=!1;if("function"==typeof this._options[e])try{this._options[e](t),o=!0}catch(t){this._debug("runHook","error calling hook",e,t)}return o},t});/*!
 * imagesLoaded PACKAGED v4.1.4
 * JavaScript is all like "You images are done yet or what?"
 * MIT License
 */
!function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(e,r),delete n[r]),r.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.imagesLoaded=t(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){function i(e,t){for(var i in t)e[i]=t[i];return e}function n(e){if(Array.isArray(e))return e;var t="object"==typeof e&&"number"==typeof e.length;return t?d.call(e):[e]}function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);var s=e;return"string"==typeof e&&(s=document.querySelectorAll(e)),s?(this.elements=n(s),this.options=i({},this.options),"function"==typeof t?r=t:i(this.options,t),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(s||e))}function r(e){this.img=e}function s(e,t){this.url=e,this.element=t,this.img=new Image}var h=e.jQuery,a=e.console,d=Array.prototype.slice;o.prototype=Object.create(t.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&u[t]){for(var i=e.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=e.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var u={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(t.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,e),n=i.exec(t.backgroundImage)}},o.prototype.addImage=function(e){var t=new r(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var i=new s(e,t);this.images.push(i)},o.prototype.check=function(){function e(e,i,n){setTimeout(function(){t.progress(e,i,n)})}var t=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(t){t.once("progress",e),t.check()}):void this.complete()},o.prototype.progress=function(e,t,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var e=this.getIsImageComplete();return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},r.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},o.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(h=t,h.fn.imagesLoaded=function(e,t){var i=new o(this,e,t);return i.jqDeferred.promise(h(this))})},o.makeJQueryPlugin(),o});(function(factory){'use strict';if(typeof define==='function'&&define.amd){define(['jquery'],factory)}else if(typeof exports!=='undefined'){module.exports=factory(require('jquery'))}else{factory(jQuery)}}(function($){'use strict';var Slick=window.Slick||{};Slick=(function(){var instanceUid=0;function Slick(element,settings){var _=this,dataSettings;_.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:$(element),appendDots:$(element),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3000,centerMode:!1,centerPadding:'50px',cssEase:'ease',customPaging:function(slider,i){return $('<button type="button" />').text(i+1)},dots:!1,dotsClass:'slick-dots',draggable:!0,easing:'linear',edgeFriction:0.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:'ondemand',mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:'window',responsive:null,rows:1,rtl:!1,slide:'',slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1000};_.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1};$.extend(_,_.initials);_.activeBreakpoint=null;_.animType=null;_.animProp=null;_.breakpoints=[];_.breakpointSettings=[];_.cssTransitions=!1;_.focussed=!1;_.interrupted=!1;_.hidden='hidden';_.paused=!0;_.positionProp=null;_.respondTo=null;_.rowCount=1;_.shouldClick=!0;_.$slider=$(element);_.$slidesCache=null;_.transformType=null;_.transitionType=null;_.visibilityChange='visibilitychange';_.windowWidth=0;_.windowTimer=null;dataSettings=$(element).data('slick')||{};_.options=$.extend({},_.defaults,settings,dataSettings);_.currentSlide=_.options.initialSlide;_.originalSettings=_.options;if(typeof document.mozHidden!=='undefined'){_.hidden='mozHidden';_.visibilityChange='mozvisibilitychange'}else if(typeof document.webkitHidden!=='undefined'){_.hidden='webkitHidden';_.visibilityChange='webkitvisibilitychange'}
_.autoPlay=$.proxy(_.autoPlay,_);_.autoPlayClear=$.proxy(_.autoPlayClear,_);_.autoPlayIterator=$.proxy(_.autoPlayIterator,_);_.changeSlide=$.proxy(_.changeSlide,_);_.clickHandler=$.proxy(_.clickHandler,_);_.selectHandler=$.proxy(_.selectHandler,_);_.setPosition=$.proxy(_.setPosition,_);_.swipeHandler=$.proxy(_.swipeHandler,_);_.dragHandler=$.proxy(_.dragHandler,_);_.keyHandler=$.proxy(_.keyHandler,_);_.instanceUid=instanceUid++;_.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/;_.registerBreakpoints();_.init(!0)}
return Slick}());Slick.prototype.activateADA=function(){var _=this;if(_.$slideTrack){_.$slideTrack.find('.slick-active').attr({'aria-hidden':'false'}).find('a, input, button, select').attr({'tabindex':'0'})}};Slick.prototype.addSlide=Slick.prototype.slickAdd=function(markup,index,addBefore){var _=this;if(typeof(index)==='boolean'){addBefore=index;index=null}else if(index<0||(index>=_.slideCount)){return!1}
_.unload();if(typeof(index)==='number'){if(index===0&&_.$slides.length===0){$(markup).appendTo(_.$slideTrack)}else if(addBefore){$(markup).insertBefore(_.$slides.eq(index))}else{$(markup).insertAfter(_.$slides.eq(index))}}else{if(addBefore===!0){$(markup).prependTo(_.$slideTrack)}else{$(markup).appendTo(_.$slideTrack)}}
_.$slides=_.$slideTrack.children(this.options.slide);_.$slideTrack.children(this.options.slide).detach();_.$slideTrack.append(_.$slides);_.$slides.each(function(index,element){$(element).attr('data-slick-index',index)});_.$slidesCache=_.$slides;_.reinit()};Slick.prototype.animateHeight=function(){var _=this;if(_.options.slidesToShow===1&&_.options.adaptiveHeight===!0&&_.options.vertical===!1){var targetHeight=_.$slides.eq(_.currentSlide).outerHeight(!0);_.$list.animate({height:targetHeight},_.options.speed)}};Slick.prototype.animateSlide=function(targetLeft,callback){var animProps={},_=this;_.animateHeight();if(_.options.rtl===!0&&_.options.vertical===!1){targetLeft=-targetLeft}
if(_.transformsEnabled===!1){if(_.options.vertical===!1){_.$slideTrack.animate({left:targetLeft},_.options.speed,_.options.easing,callback)}else{_.$slideTrack.animate({top:targetLeft},_.options.speed,_.options.easing,callback)}}else{if(_.cssTransitions===!1){if(_.options.rtl===!0){_.currentLeft=-(_.currentLeft)}
$({animStart:_.currentLeft}).animate({animStart:targetLeft},{duration:_.options.speed,easing:_.options.easing,step:function(now){now=Math.ceil(now);if(_.options.vertical===!1){animProps[_.animType]='translate('+now+'px, 0px)';_.$slideTrack.css(animProps)}else{animProps[_.animType]='translate(0px,'+now+'px)';_.$slideTrack.css(animProps)}},complete:function(){if(callback){callback.call()}}})}else{_.applyTransition();targetLeft=Math.ceil(targetLeft);if(_.options.vertical===!1){animProps[_.animType]='translate3d('+targetLeft+'px, 0px, 0px)'}else{animProps[_.animType]='translate3d(0px,'+targetLeft+'px, 0px)'}
_.$slideTrack.css(animProps);if(callback){setTimeout(function(){_.disableTransition();callback.call()},_.options.speed)}}}};Slick.prototype.getNavTarget=function(){var _=this,asNavFor=_.options.asNavFor;if(asNavFor&&asNavFor!==null){asNavFor=$(asNavFor).not(_.$slider)}
return asNavFor};Slick.prototype.asNavFor=function(index){var _=this,asNavFor=_.getNavTarget();if(asNavFor!==null&&typeof asNavFor==='object'){asNavFor.each(function(){var target=$(this).slick('getSlick');if(!target.unslicked){target.slideHandler(index,!0)}})}};Slick.prototype.applyTransition=function(slide){var _=this,transition={};if(_.options.fade===!1){transition[_.transitionType]=_.transformType+' '+_.options.speed+'ms '+_.options.cssEase}else{transition[_.transitionType]='opacity '+_.options.speed+'ms '+_.options.cssEase}
if(_.options.fade===!1){_.$slideTrack.css(transition)}else{_.$slides.eq(slide).css(transition)}};Slick.prototype.autoPlay=function(){var _=this;_.autoPlayClear();if(_.slideCount>_.options.slidesToShow){_.autoPlayTimer=setInterval(_.autoPlayIterator,_.options.autoplaySpeed)}};Slick.prototype.autoPlayClear=function(){var _=this;if(_.autoPlayTimer){clearInterval(_.autoPlayTimer)}};Slick.prototype.autoPlayIterator=function(){var _=this,slideTo=_.currentSlide+_.options.slidesToScroll;if(!_.paused&&!_.interrupted&&!_.focussed){if(_.options.infinite===!1){if(_.direction===1&&(_.currentSlide+1)===(_.slideCount-1)){_.direction=0}else if(_.direction===0){slideTo=_.currentSlide-_.options.slidesToScroll;if(_.currentSlide-1===0){_.direction=1}}}
_.slideHandler(slideTo)}};Slick.prototype.buildArrows=function(){var _=this;if(_.options.arrows===!0){_.$prevArrow=$(_.options.prevArrow).addClass('slick-arrow');_.$nextArrow=$(_.options.nextArrow).addClass('slick-arrow');if(!_.$slider.hasClass('has-arrows'))
_.$slider.addClass('has-arrows');if(_.slideCount>_.options.slidesToShow){_.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');_.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');if(_.htmlExpr.test(_.options.nextArrow)&&_.htmlExpr.test(_.options.prevArrow)){_.options.appendArrows.find(".slick-arrows").remove();_.options.appendArrows.append('<div class="slick-arrows "></div>');_.options.appendArrows.find(".slick-arrows").prepend(_.$prevArrow);_.options.appendArrows.find(".slick-arrows").append(_.$nextArrow)}
if(_.options.infinite!==!0){_.$prevArrow.addClass('slick-disabled').attr('aria-disabled','true')}}else{if(_.$slider.hasClass('has-arrows'))
_.$slider.removeClass('has-arrows');_.$prevArrow.add(_.$nextArrow).addClass('slick-hidden').attr({'aria-disabled':'true','tabindex':'-1'})}}};Slick.prototype.buildDots=function(){var _=this,i,dot;if(_.options.dots===!0){_.$slider.addClass('slick-dotted');dot=$('<ul />').addClass(_.options.dotsClass);for(i=0;i<=_.getDotCount();i+=1){dot.append($('<li />').append(_.options.customPaging.call(this,_,i)))}
_.$dots=dot.appendTo(_.options.appendDots);_.$dots.find('li').first().addClass('slick-active')}};Slick.prototype.buildOut=function(){var _=this;_.$slides=_.$slider.children(_.options.slide+':not(.slick-cloned, .slick-arrows)').addClass('slick-slide');_.slideCount=_.$slides.length;_.$slides.each(function(index,element){$(element).attr('data-slick-index',index).data('originalStyling',$(element).attr('style')||'')});_.$slider.addClass('slick-slider');_.$slideTrack=(_.slideCount===0)?$('<div class="slick-track"/>').appendTo(_.$slider):_.$slides.wrapAll('<div class="slick-track"/>').parent();_.$list=_.$slideTrack.wrap('<div class="slick-list"/>').parent();_.$slideTrack.css('opacity',0);if(_.options.centerMode===!0||_.options.swipeToSlide===!0){_.options.slidesToScroll=1}
$('img[data-lazy]',_.$slider).not('[src]').addClass('slick-loading');_.setupInfinite();_.buildArrows();_.buildDots();_.updateDots();_.setSlideClasses(typeof _.currentSlide==='number'?_.currentSlide:0);if(_.options.draggable===!0){_.$list.addClass('draggable')}};Slick.prototype.buildRows=function(){var _=this,a,b,c,newSlides,numOfSlides,originalSlides,slidesPerSection;newSlides=document.createDocumentFragment();originalSlides=_.$slider.children();if(_.options.rows>1){slidesPerSection=_.options.slidesPerRow*_.options.rows;numOfSlides=Math.ceil(originalSlides.length/slidesPerSection);for(a=0;a<numOfSlides;a++){var slide=document.createElement('div');for(b=0;b<_.options.rows;b++){var row=document.createElement('div');for(c=0;c<_.options.slidesPerRow;c++){var target=(a*slidesPerSection+((b*_.options.slidesPerRow)+c));if(originalSlides.get(target)){row.appendChild(originalSlides.get(target))}}
slide.appendChild(row)}
newSlides.appendChild(slide)}
_.$slider.empty().append(newSlides);_.$slider.children().children().children().css({'width':(100/_.options.slidesPerRow)+'%','display':'inline-block'})}};Slick.prototype.checkResponsive=function(initial,forceUpdate){var _=this,breakpoint,targetBreakpoint,respondToWidth,triggerBreakpoint=!1;var sliderWidth=_.$slider.width();var windowWidth=window.innerWidth||$(window).width();if(_.respondTo==='window'){respondToWidth=windowWidth}else if(_.respondTo==='slider'){respondToWidth=sliderWidth}else if(_.respondTo==='min'){respondToWidth=Math.min(windowWidth,sliderWidth)}
if(_.options.responsive&&_.options.responsive.length&&_.options.responsive!==null){targetBreakpoint=null;for(breakpoint in _.breakpoints){if(_.breakpoints.hasOwnProperty(breakpoint)){if(_.originalSettings.mobileFirst===!1){if(respondToWidth<_.breakpoints[breakpoint]){targetBreakpoint=_.breakpoints[breakpoint]}}else{if(respondToWidth>_.breakpoints[breakpoint]){targetBreakpoint=_.breakpoints[breakpoint]}}}}
if(targetBreakpoint!==null){if(_.activeBreakpoint!==null){if(targetBreakpoint!==_.activeBreakpoint||forceUpdate){_.activeBreakpoint=targetBreakpoint;if(_.breakpointSettings[targetBreakpoint]==='unslick'){_.unslick(targetBreakpoint)}else{_.options=$.extend({},_.originalSettings,_.breakpointSettings[targetBreakpoint]);if(initial===!0){_.currentSlide=_.options.initialSlide}
_.refresh(initial)}
triggerBreakpoint=targetBreakpoint}}else{_.activeBreakpoint=targetBreakpoint;if(_.breakpointSettings[targetBreakpoint]==='unslick'){_.unslick(targetBreakpoint)}else{_.options=$.extend({},_.originalSettings,_.breakpointSettings[targetBreakpoint]);if(initial===!0){_.currentSlide=_.options.initialSlide}
_.refresh(initial)}
triggerBreakpoint=targetBreakpoint}}else{if(_.activeBreakpoint!==null){_.activeBreakpoint=null;_.options=_.originalSettings;if(initial===!0){_.currentSlide=_.options.initialSlide}
_.refresh(initial);triggerBreakpoint=targetBreakpoint}}
if(!initial&&triggerBreakpoint!==!1){_.$slider.trigger('breakpoint',[_,triggerBreakpoint])}}};Slick.prototype.changeSlide=function(event,dontAnimate){var _=this,$target=$(event.currentTarget),indexOffset,slideOffset,unevenOffset;if($target.is('a')){event.preventDefault()}
if(!$target.is('li')){$target=$target.closest('li')}
unevenOffset=(_.slideCount%_.options.slidesToScroll!==0);indexOffset=unevenOffset?0:(_.slideCount-_.currentSlide)%_.options.slidesToScroll;switch(event.data.message){case 'previous':slideOffset=indexOffset===0?_.options.slidesToScroll:_.options.slidesToShow-indexOffset;if(_.slideCount>_.options.slidesToShow){_.slideHandler(_.currentSlide-slideOffset,!1,dontAnimate)}
break;case 'next':slideOffset=indexOffset===0?_.options.slidesToScroll:indexOffset;if(_.slideCount>_.options.slidesToShow){_.slideHandler(_.currentSlide+slideOffset,!1,dontAnimate)}
break;case 'index':var index=event.data.index===0?0:event.data.index||$target.index()*_.options.slidesToScroll;_.slideHandler(_.checkNavigable(index),!1,dontAnimate);$target.children().trigger('focus');break;default:return}};Slick.prototype.checkNavigable=function(index){var _=this,navigables,prevNavigable;navigables=_.getNavigableIndexes();prevNavigable=0;if(index>navigables[navigables.length-1]){index=navigables[navigables.length-1]}else{for(var n in navigables){if(index<navigables[n]){index=prevNavigable;break}
prevNavigable=navigables[n]}}
return index};Slick.prototype.cleanUpEvents=function(){var _=this;if(_.options.dots&&_.$dots!==null){$('li',_.$dots).off('click.slick',_.changeSlide).off('mouseenter.slick',$.proxy(_.interrupt,_,!0)).off('mouseleave.slick',$.proxy(_.interrupt,_,!1));if(_.options.accessibility===!0){_.$dots.off('keydown.slick',_.keyHandler)}}
_.$slider.off('focus.slick blur.slick');if(_.options.arrows===!0&&_.slideCount>_.options.slidesToShow){_.$prevArrow&&_.$prevArrow.off('click.slick',_.changeSlide);_.$nextArrow&&_.$nextArrow.off('click.slick',_.changeSlide);if(_.options.accessibility===!0){_.$prevArrow&&_.$prevArrow.off('keydown.slick',_.keyHandler);_.$nextArrow&&_.$nextArrow.off('keydown.slick',_.keyHandler)}}
_.$list.off('touchstart.slick mousedown.slick',_.swipeHandler);_.$list.off('touchmove.slick mousemove.slick',_.swipeHandler);_.$list.off('touchend.slick mouseup.slick',_.swipeHandler);_.$list.off('touchcancel.slick mouseleave.slick',_.swipeHandler);_.$list.off('click.slick',_.clickHandler);$(document).off(_.visibilityChange,_.visibility);_.cleanUpSlideEvents();if(_.options.accessibility===!0){_.$list.off('keydown.slick',_.keyHandler)}
if(_.options.focusOnSelect===!0){$(_.$slideTrack).children().off('click.slick',_.selectHandler)}
$(window).off('orientationchange.slick.slick-'+_.instanceUid,_.orientationChange);$(window).off('resize.slick.slick-'+_.instanceUid,_.resize);$('[draggable!=true]',_.$slideTrack).off('dragstart',_.preventDefault);$(window).off('load.slick.slick-'+_.instanceUid,_.setPosition)};Slick.prototype.cleanUpSlideEvents=function(){var _=this;_.$list.off('mouseenter.slick',$.proxy(_.interrupt,_,!0));_.$list.off('mouseleave.slick',$.proxy(_.interrupt,_,!1))};Slick.prototype.cleanUpRows=function(){var _=this,originalSlides;if(_.options.rows>1){originalSlides=_.$slides.children().children();originalSlides.removeAttr('style');_.$slider.empty().append(originalSlides)}};Slick.prototype.clickHandler=function(event){var _=this;if(_.shouldClick===!1){event.stopImmediatePropagation();event.stopPropagation();event.preventDefault()}};Slick.prototype.destroy=function(refresh){var _=this;_.autoPlayClear();_.touchObject={};_.cleanUpEvents();$('.slick-cloned',_.$slider).detach();if(_.$dots){_.$dots.remove()}
if(_.$prevArrow&&_.$prevArrow.length){_.$prevArrow.removeClass('slick-disabled slick-arrow slick-hidden').removeAttr('aria-hidden aria-disabled tabindex').css('display','');if(_.htmlExpr.test(_.options.prevArrow)){_.$prevArrow.remove()}}
if(_.$nextArrow&&_.$nextArrow.length){_.$nextArrow.removeClass('slick-disabled slick-arrow slick-hidden').removeAttr('aria-hidden aria-disabled tabindex').css('display','');if(_.htmlExpr.test(_.options.nextArrow)){_.$nextArrow.remove()}}
if(_.$slides){_.$slides.removeClass('slick-slide slick-active slick-center slick-visible slick-current').removeAttr('aria-hidden').removeAttr('data-slick-index').each(function(){$(this).attr('style',$(this).data('originalStyling'))});_.$slideTrack.children(this.options.slide).detach();_.$slideTrack.detach();_.$list.detach();_.$slider.append(_.$slides)}
_.cleanUpRows();_.$slider.removeClass('slick-slider');_.$slider.removeClass('slick-initialized');_.$slider.removeClass('slick-dotted');_.unslicked=!0;if(!refresh){_.$slider.trigger('destroy',[_])}};Slick.prototype.disableTransition=function(slide){var _=this,transition={};transition[_.transitionType]='';if(_.options.fade===!1){_.$slideTrack.css(transition)}else{_.$slides.eq(slide).css(transition)}};Slick.prototype.fadeSlide=function(slideIndex,callback){var _=this;if(_.cssTransitions===!1){_.$slides.eq(slideIndex).css({zIndex:_.options.zIndex});_.$slides.eq(slideIndex).animate({opacity:1},_.options.speed,_.options.easing,callback)}else{_.applyTransition(slideIndex);_.$slides.eq(slideIndex).css({opacity:1,zIndex:_.options.zIndex});if(callback){setTimeout(function(){_.disableTransition(slideIndex);callback.call()},_.options.speed)}}};Slick.prototype.fadeSlideOut=function(slideIndex){var _=this;if(_.cssTransitions===!1){_.$slides.eq(slideIndex).animate({opacity:0,zIndex:_.options.zIndex-2},_.options.speed,_.options.easing)}else{_.applyTransition(slideIndex);_.$slides.eq(slideIndex).css({opacity:0,zIndex:_.options.zIndex-2})}};Slick.prototype.filterSlides=Slick.prototype.slickFilter=function(filter){var _=this;if(filter!==null){_.$slidesCache=_.$slides;_.unload();_.$slideTrack.children(this.options.slide).detach();_.$slidesCache.filter(filter).appendTo(_.$slideTrack);_.reinit()}};Slick.prototype.focusHandler=function(){var _=this;_.$slider.off('focus.slick blur.slick').on('focus.slick blur.slick','*',function(event){event.stopImmediatePropagation();var $sf=$(this);setTimeout(function(){if(_.options.pauseOnFocus){_.focussed=$sf.is(':focus');_.autoPlay()}},0)})};Slick.prototype.getCurrent=Slick.prototype.slickCurrentSlide=function(){var _=this;return _.currentSlide};Slick.prototype.getDotCount=function(){var _=this;var breakPoint=0;var counter=0;var pagerQty=0;if(_.options.infinite===!0){if(_.slideCount<=_.options.slidesToShow){++pagerQty}else{while(breakPoint<_.slideCount){++pagerQty;breakPoint=counter+_.options.slidesToScroll;counter+=_.options.slidesToScroll<=_.options.slidesToShow?_.options.slidesToScroll:_.options.slidesToShow}}}else if(_.options.centerMode===!0){pagerQty=_.slideCount}else if(!_.options.asNavFor){pagerQty=1+Math.ceil((_.slideCount-_.options.slidesToShow)/_.options.slidesToScroll)}else{while(breakPoint<_.slideCount){++pagerQty;breakPoint=counter+_.options.slidesToScroll;counter+=_.options.slidesToScroll<=_.options.slidesToShow?_.options.slidesToScroll:_.options.slidesToShow}}
return pagerQty-1};Slick.prototype.getLeft=function(slideIndex){var _=this,targetLeft,verticalHeight,verticalOffset=0,targetSlide,coef;_.slideOffset=0;verticalHeight=_.$slides.first().outerHeight(!0);if(_.options.infinite===!0){if(_.slideCount>_.options.slidesToShow){_.slideOffset=(_.slideWidth*_.options.slidesToShow)*-1;coef=-1
if(_.options.vertical===!0&&_.options.centerMode===!0){if(_.options.slidesToShow===2){coef=-1.5}else if(_.options.slidesToShow===1){coef=-2}}
verticalOffset=(verticalHeight*_.options.slidesToShow)*coef}
if(_.slideCount%_.options.slidesToScroll!==0){if(slideIndex+_.options.slidesToScroll>_.slideCount&&_.slideCount>_.options.slidesToShow){if(slideIndex>_.slideCount){_.slideOffset=((_.options.slidesToShow-(slideIndex-_.slideCount))*_.slideWidth)*-1;verticalOffset=((_.options.slidesToShow-(slideIndex-_.slideCount))*verticalHeight)*-1}else{_.slideOffset=((_.slideCount%_.options.slidesToScroll)*_.slideWidth)*-1;verticalOffset=((_.slideCount%_.options.slidesToScroll)*verticalHeight)*-1}}}}else{if(slideIndex+_.options.slidesToShow>_.slideCount){_.slideOffset=((slideIndex+_.options.slidesToShow)-_.slideCount)*_.slideWidth;verticalOffset=((slideIndex+_.options.slidesToShow)-_.slideCount)*verticalHeight}}
if(_.slideCount<=_.options.slidesToShow){_.slideOffset=0;verticalOffset=0}
if(_.options.centerMode===!0&&_.slideCount<=_.options.slidesToShow){_.slideOffset=((_.slideWidth*Math.floor(_.options.slidesToShow))/2)-((_.slideWidth*_.slideCount)/2)}else if(_.options.centerMode===!0&&_.options.infinite===!0){_.slideOffset+=_.slideWidth*Math.floor(_.options.slidesToShow/2)-_.slideWidth}else if(_.options.centerMode===!0){_.slideOffset=0;_.slideOffset+=_.slideWidth*Math.floor(_.options.slidesToShow/2)}
if(_.options.vertical===!1){targetLeft=((slideIndex*_.slideWidth)*-1)+_.slideOffset}else{targetLeft=((slideIndex*verticalHeight)*-1)+verticalOffset}
if(_.options.variableWidth===!0){if(_.slideCount<=_.options.slidesToShow||_.options.infinite===!1){targetSlide=_.$slideTrack.children('.slick-slide').eq(slideIndex)}else{targetSlide=_.$slideTrack.children('.slick-slide').eq(slideIndex+_.options.slidesToShow)}
if(_.options.rtl===!0){if(targetSlide[0]){targetLeft=(_.$slideTrack.width()-targetSlide[0].offsetLeft-targetSlide.width())*-1}else{targetLeft=0}}else{targetLeft=targetSlide[0]?targetSlide[0].offsetLeft*-1:0}
if(_.options.centerMode===!0){if(_.slideCount<=_.options.slidesToShow||_.options.infinite===!1){targetSlide=_.$slideTrack.children('.slick-slide').eq(slideIndex)}else{targetSlide=_.$slideTrack.children('.slick-slide').eq(slideIndex+_.options.slidesToShow+1)}
if(_.options.rtl===!0){if(targetSlide[0]){targetLeft=(_.$slideTrack.width()-targetSlide[0].offsetLeft-targetSlide.width())*-1}else{targetLeft=0}}else{targetLeft=targetSlide[0]?targetSlide[0].offsetLeft*-1:0}
targetLeft+=(_.$list.width()-targetSlide.outerWidth())/2}}
return targetLeft};Slick.prototype.getOption=Slick.prototype.slickGetOption=function(option){var _=this;return _.options[option]};Slick.prototype.getNavigableIndexes=function(){var _=this,breakPoint=0,counter=0,indexes=[],max;if(_.options.infinite===!1){max=_.slideCount}else{breakPoint=_.options.slidesToScroll*-1;counter=_.options.slidesToScroll*-1;max=_.slideCount*2}
while(breakPoint<max){indexes.push(breakPoint);breakPoint=counter+_.options.slidesToScroll;counter+=_.options.slidesToScroll<=_.options.slidesToShow?_.options.slidesToScroll:_.options.slidesToShow}
return indexes};Slick.prototype.getSlick=function(){return this};Slick.prototype.getSlideCount=function(){var _=this,slidesTraversed,swipedSlide,centerOffset;centerOffset=_.options.centerMode===!0?_.slideWidth*Math.floor(_.options.slidesToShow/2):0;if(_.options.swipeToSlide===!0){_.$slideTrack.find('.slick-slide').each(function(index,slide){if(slide.offsetLeft-centerOffset+($(slide).outerWidth()/2)>(_.swipeLeft*-1)){swipedSlide=slide;return!1}});slidesTraversed=Math.abs($(swipedSlide).attr('data-slick-index')-_.currentSlide)||1;return slidesTraversed}else{return _.options.slidesToScroll}};Slick.prototype.goTo=Slick.prototype.slickGoTo=function(slide,dontAnimate){var _=this;_.changeSlide({data:{message:'index',index:parseInt(slide)}},dontAnimate)};Slick.prototype.init=function(creation){var _=this;if(!$(_.$slider).hasClass('slick-initialized')){$(_.$slider).addClass('slick-initialized');_.buildRows();_.buildOut();_.setProps();_.startLoad();_.loadSlider();_.initializeEvents();_.updateArrows();_.updateDots();_.checkResponsive(!0);_.focusHandler()}
if(creation){_.$slider.trigger('init',[_])}
if(_.options.accessibility===!0){_.initADA()}
if(_.options.autoplay){_.paused=!1;_.autoPlay()}};Slick.prototype.initADA=function(){var _=this,numDotGroups=Math.ceil(_.slideCount/_.options.slidesToShow),tabControlIndexes=_.getNavigableIndexes().filter(function(val){return(val>=0)&&(val<_.slideCount)});if(_.$slides){_.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({'aria-hidden':'true','tabindex':'-1'}).find('a, input, button, select').attr({'tabindex':'-1'})}
if(_.$dots!==null){_.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i){var slideControlIndex=tabControlIndexes.indexOf(i);$(this).attr({'role':'tabpanel','id':'slick-slide'+_.instanceUid+i,'tabindex':-1});if(slideControlIndex!==-1){$(this).attr({'aria-describedby':'slick-slide-control'+_.instanceUid+slideControlIndex})}});_.$dots.attr('role','tablist').find('li').each(function(i){var mappedSlideIndex=tabControlIndexes[i];$(this).attr({'role':'presentation'});$(this).find('button').first().attr({'role':'tab','id':'slick-slide-control'+_.instanceUid+i,'aria-controls':'slick-slide'+_.instanceUid+mappedSlideIndex,'aria-label':(i+1)+' of '+numDotGroups,'aria-selected':null,'tabindex':'-1'})}).eq(_.currentSlide).find('button').attr({'aria-selected':'true','tabindex':'0'}).end()}
if(_.$slides){for(var i=_.currentSlide,max=i+_.options.slidesToShow;i<max;i++){_.$slides.eq(i).attr('tabindex',0)}}
_.activateADA()};Slick.prototype.initArrowEvents=function(){var _=this;if(_.options.arrows===!0&&_.slideCount>_.options.slidesToShow){_.$prevArrow.off('click.slick').on('click.slick',{message:'previous'},_.changeSlide);_.$nextArrow.off('click.slick').on('click.slick',{message:'next'},_.changeSlide);if(_.options.accessibility===!0){_.$prevArrow.on('keydown.slick',_.keyHandler);_.$nextArrow.on('keydown.slick',_.keyHandler)}}};Slick.prototype.initDotEvents=function(){var _=this;if(_.options.dots===!0){$('li',_.$dots).on('click.slick',{message:'index'},_.changeSlide);if(_.options.accessibility===!0){_.$dots.on('keydown.slick',_.keyHandler)}}
if(_.options.dots===!0&&_.options.pauseOnDotsHover===!0){$('li',_.$dots).on('mouseenter.slick',$.proxy(_.interrupt,_,!0)).on('mouseleave.slick',$.proxy(_.interrupt,_,!1))}};Slick.prototype.initSlideEvents=function(){var _=this;if(_.options.pauseOnHover){_.$list.on('mouseenter.slick',$.proxy(_.interrupt,_,!0));_.$list.on('mouseleave.slick',$.proxy(_.interrupt,_,!1))}};Slick.prototype.initializeEvents=function(){var _=this;_.initArrowEvents();_.initDotEvents();_.initSlideEvents();_.$list.on('touchstart.slick mousedown.slick',{action:'start'},_.swipeHandler);_.$list.on('touchmove.slick mousemove.slick',{action:'move'},_.swipeHandler);_.$list.on('touchend.slick mouseup.slick',{action:'end'},_.swipeHandler);_.$list.on('touchcancel.slick mouseleave.slick',{action:'end'},_.swipeHandler);_.$list.on('click.slick',_.clickHandler);$(document).on(_.visibilityChange,$.proxy(_.visibility,_));if(_.options.accessibility===!0){_.$list.on('keydown.slick',_.keyHandler)}
if(_.options.focusOnSelect===!0){$(_.$slideTrack).children().on('click.slick',_.selectHandler)}
$(window).on('orientationchange.slick.slick-'+_.instanceUid,$.proxy(_.orientationChange,_));$(window).on('resize.slick.slick-'+_.instanceUid,$.proxy(_.resize,_));$('[draggable!=true]',_.$slideTrack).on('dragstart',_.preventDefault);$(window).on('load.slick.slick-'+_.instanceUid,_.setPosition);$(_.setPosition)};Slick.prototype.initUI=function(){var _=this;if(_.options.arrows===!0&&_.slideCount>_.options.slidesToShow){_.$prevArrow.show();_.$nextArrow.show()}
if(_.options.dots===!0&&_.slideCount>_.options.slidesToShow){_.$dots.show()}};Slick.prototype.keyHandler=function(event){var _=this;if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')){if(event.keyCode===37&&_.options.accessibility===!0){_.changeSlide({data:{message:_.options.rtl===!0?'next':'previous'}})}else if(event.keyCode===39&&_.options.accessibility===!0){_.changeSlide({data:{message:_.options.rtl===!0?'previous':'next'}})}}};Slick.prototype.lazyLoad=function(){var _=this,loadRange,cloneRange,rangeStart,rangeEnd;function loadImages(imagesScope){$('img[data-lazy]',imagesScope).each(function(){var image=$(this),imageSource=$(this).attr('data-lazy'),imageSrcSet=$(this).attr('data-srcset'),imageSizes=$(this).attr('data-sizes')||_.$slider.attr('data-sizes'),imageToLoad=document.createElement('img');imageToLoad.onload=function(){image.animate({opacity:0},100,function(){if(imageSrcSet){image.attr('srcset',imageSrcSet);if(imageSizes){image.attr('sizes',imageSizes)}}
image.attr('src',imageSource).animate({opacity:1},200,function(){image.removeAttr('data-lazy data-srcset data-sizes').removeClass('slick-loading')});_.$slider.trigger('lazyLoaded',[_,image,imageSource])})};imageToLoad.onerror=function(){image.removeAttr('data-lazy').removeClass('slick-loading').addClass('slick-lazyload-error');_.$slider.trigger('lazyLoadError',[_,image,imageSource])};imageToLoad.src=imageSource})}
if(_.options.centerMode===!0){if(_.options.infinite===!0){rangeStart=_.currentSlide+(_.options.slidesToShow/2+1);rangeEnd=rangeStart+_.options.slidesToShow+2}else{rangeStart=Math.max(0,_.currentSlide-(_.options.slidesToShow/2+1));rangeEnd=2+(_.options.slidesToShow/2+1)+_.currentSlide}}else{rangeStart=_.options.infinite?_.options.slidesToShow+_.currentSlide:_.currentSlide;rangeEnd=Math.ceil(rangeStart+_.options.slidesToShow);if(_.options.fade===!0){if(rangeStart>0)rangeStart--;if(rangeEnd<=_.slideCount)rangeEnd++}}
loadRange=_.$slider.find('.slick-slide').slice(rangeStart,rangeEnd);if(_.options.lazyLoad==='anticipated'){var prevSlide=rangeStart-1,nextSlide=rangeEnd,$slides=_.$slider.find('.slick-slide');for(var i=0;i<_.options.slidesToScroll;i++){if(prevSlide<0)prevSlide=_.slideCount-1;loadRange=loadRange.add($slides.eq(prevSlide));loadRange=loadRange.add($slides.eq(nextSlide));prevSlide--;nextSlide++}}
loadImages(loadRange);if(_.slideCount<=_.options.slidesToShow){cloneRange=_.$slider.find('.slick-slide');loadImages(cloneRange)}else if(_.currentSlide>=_.slideCount-_.options.slidesToShow){cloneRange=_.$slider.find('.slick-cloned').slice(0,_.options.slidesToShow);loadImages(cloneRange)}else if(_.currentSlide===0){cloneRange=_.$slider.find('.slick-cloned').slice(_.options.slidesToShow*-1);loadImages(cloneRange)}};Slick.prototype.loadSlider=function(){var _=this;_.setPosition();_.$slideTrack.css({opacity:1});_.$slider.removeClass('slick-loading');_.initUI();if(_.options.lazyLoad==='progressive'){_.progressiveLazyLoad()}};Slick.prototype.next=Slick.prototype.slickNext=function(){var _=this;_.changeSlide({data:{message:'next'}})};Slick.prototype.orientationChange=function(){var _=this;_.checkResponsive();_.setPosition()};Slick.prototype.pause=Slick.prototype.slickPause=function(){var _=this;_.autoPlayClear();_.paused=!0};Slick.prototype.play=Slick.prototype.slickPlay=function(){var _=this;_.autoPlay();_.options.autoplay=!0;_.paused=!1;_.focussed=!1;_.interrupted=!1};Slick.prototype.postSlide=function(index){var _=this;if(!_.unslicked){_.$slider.trigger('afterChange',[_,index]);_.animating=!1;if(_.slideCount>_.options.slidesToShow){_.setPosition()}
_.swipeLeft=null;if(_.options.autoplay){_.autoPlay()}
if(_.options.accessibility===!0){_.initADA();if(_.options.focusOnChange){var $currentSlide=$(_.$slides.get(_.currentSlide));$currentSlide.attr('tabindex',0).focus()}}}};Slick.prototype.prev=Slick.prototype.slickPrev=function(){var _=this;_.changeSlide({data:{message:'previous'}})};Slick.prototype.preventDefault=function(event){event.preventDefault()};Slick.prototype.progressiveLazyLoad=function(tryCount){tryCount=tryCount||1;var _=this,$imgsToLoad=$('img[data-lazy]',_.$slider),image,imageSource,imageSrcSet,imageSizes,imageToLoad;if($imgsToLoad.length){image=$imgsToLoad.first();imageSource=image.attr('data-lazy');imageSrcSet=image.attr('data-srcset');imageSizes=image.attr('data-sizes')||_.$slider.attr('data-sizes');imageToLoad=document.createElement('img');imageToLoad.onload=function(){if(imageSrcSet){image.attr('srcset',imageSrcSet);if(imageSizes){image.attr('sizes',imageSizes)}}
image.attr('src',imageSource).removeAttr('data-lazy data-srcset data-sizes').removeClass('slick-loading');if(_.options.adaptiveHeight===!0){_.setPosition()}
_.$slider.trigger('lazyLoaded',[_,image,imageSource]);_.progressiveLazyLoad()};imageToLoad.onerror=function(){if(tryCount<3){setTimeout(function(){_.progressiveLazyLoad(tryCount+1)},500)}else{image.removeAttr('data-lazy').removeClass('slick-loading').addClass('slick-lazyload-error');_.$slider.trigger('lazyLoadError',[_,image,imageSource]);_.progressiveLazyLoad()}};imageToLoad.src=imageSource}else{_.$slider.trigger('allImagesLoaded',[_])}};Slick.prototype.refresh=function(initializing){var _=this,currentSlide,lastVisibleIndex;lastVisibleIndex=_.slideCount-_.options.slidesToShow;if(!_.options.infinite&&(_.currentSlide>lastVisibleIndex)){_.currentSlide=lastVisibleIndex}
if(_.slideCount<=_.options.slidesToShow){_.currentSlide=0}
currentSlide=_.currentSlide;_.destroy(!0);$.extend(_,_.initials,{currentSlide:currentSlide});_.init();if(!initializing){_.changeSlide({data:{message:'index',index:currentSlide}},!1)}};Slick.prototype.registerBreakpoints=function(){var _=this,breakpoint,currentBreakpoint,l,responsiveSettings=_.options.responsive||null;if($.type(responsiveSettings)==='array'&&responsiveSettings.length){_.respondTo=_.options.respondTo||'window';for(breakpoint in responsiveSettings){l=_.breakpoints.length-1;if(responsiveSettings.hasOwnProperty(breakpoint)){currentBreakpoint=responsiveSettings[breakpoint].breakpoint;while(l>=0){if(_.breakpoints[l]&&_.breakpoints[l]===currentBreakpoint){_.breakpoints.splice(l,1)}
l--}
_.breakpoints.push(currentBreakpoint);_.breakpointSettings[currentBreakpoint]=responsiveSettings[breakpoint].settings}}
_.breakpoints.sort(function(a,b){return(_.options.mobileFirst)?a-b:b-a})}};Slick.prototype.reinit=function(){var _=this;_.$slides=_.$slideTrack.children(_.options.slide).addClass('slick-slide');_.slideCount=_.$slides.length;if(_.currentSlide>=_.slideCount&&_.currentSlide!==0){_.currentSlide=_.currentSlide-_.options.slidesToScroll}
if(_.slideCount<=_.options.slidesToShow){_.currentSlide=0}
_.registerBreakpoints();_.setProps();_.setupInfinite();_.buildArrows();_.updateArrows();_.initArrowEvents();_.buildDots();_.updateDots();_.initDotEvents();_.cleanUpSlideEvents();_.initSlideEvents();_.checkResponsive(!1,!0);if(_.options.focusOnSelect===!0){$(_.$slideTrack).children().on('click.slick',_.selectHandler)}
_.setSlideClasses(typeof _.currentSlide==='number'?_.currentSlide:0);_.setPosition();_.focusHandler();_.paused=!_.options.autoplay;_.autoPlay();_.$slider.trigger('reInit',[_])};Slick.prototype.resize=function(){var _=this;if($(window).width()!==_.windowWidth){clearTimeout(_.windowDelay);_.windowDelay=window.setTimeout(function(){_.windowWidth=$(window).width();_.checkResponsive();if(!_.unslicked){_.setPosition()}},50)}};Slick.prototype.removeSlide=Slick.prototype.slickRemove=function(index,removeBefore,removeAll){var _=this;if(typeof(index)==='boolean'){removeBefore=index;index=removeBefore===!0?0:_.slideCount-1}else{index=removeBefore===!0?--index:index}
if(_.slideCount<1||index<0||index>_.slideCount-1){return!1}
_.unload();if(removeAll===!0){_.$slideTrack.children().remove()}else{_.$slideTrack.children(this.options.slide).eq(index).remove()}
_.$slides=_.$slideTrack.children(this.options.slide);_.$slideTrack.children(this.options.slide).detach();_.$slideTrack.append(_.$slides);_.$slidesCache=_.$slides;_.reinit()};Slick.prototype.setCSS=function(position){var _=this,positionProps={},x,y;if(_.options.rtl===!0){position=-position}
x=_.positionProp=='left'?Math.ceil(position)+'px':'0px';y=_.positionProp=='top'?Math.ceil(position)+'px':'0px';positionProps[_.positionProp]=position;if(_.transformsEnabled===!1){_.$slideTrack.css(positionProps)}else{positionProps={};if(_.cssTransitions===!1){positionProps[_.animType]='translate('+x+', '+y+')';_.$slideTrack.css(positionProps)}else{positionProps[_.animType]='translate3d('+x+', '+y+', 0px)';_.$slideTrack.css(positionProps)}}};Slick.prototype.setDimensions=function(){var _=this;if(_.options.vertical===!1){if(_.options.centerMode===!0){_.$list.css({padding:('0px '+_.options.centerPadding)})}}else{setTimeout(function(){_.$list.height(parseInt((_.$slides.first()[0].getBoundingClientRect().height*_.options.slidesToShow)))},100);if(_.options.centerMode===!0){_.$list.css({padding:(_.options.centerPadding+' 0px')})}}
_.listWidth=_.$list.width();_.listHeight=_.$list.height();if(_.options.vertical===!1&&_.options.variableWidth===!1){_.slideWidth=Math.ceil(_.listWidth/_.options.slidesToShow*100)/100;_.$slideTrack.width(Math.ceil((_.slideWidth*_.$slideTrack.children('.slick-slide').length)))}else if(_.options.variableWidth===!0){_.$slideTrack.width(5000*_.slideCount)}else{_.slideWidth=Math.ceil(_.listWidth);_.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(!0)*_.$slideTrack.children('.slick-slide').length)))}
var offset=_.$slides.first().outerWidth(!0)-_.$slides.first().width();if(_.options.variableWidth===!1)_.$slideTrack.children('.slick-slide').width(_.slideWidth-offset)};Slick.prototype.setFade=function(){var _=this,targetLeft;_.$slides.each(function(index,element){targetLeft=(_.slideWidth*index)*-1;if(_.options.rtl===!0){$(element).css({position:'relative',right:targetLeft,top:0,zIndex:_.options.zIndex-2,opacity:0})}else{$(element).css({position:'relative',left:targetLeft,top:0,zIndex:_.options.zIndex-2,opacity:0})}});_.$slides.eq(_.currentSlide).css({zIndex:_.options.zIndex-1,opacity:1})};Slick.prototype.setHeight=function(){var _=this;if(_.options.slidesToShow===1&&_.options.adaptiveHeight===!0&&_.options.vertical===!1){var targetHeight=_.$slides.eq(_.currentSlide).outerHeight(!0);_.$list.css('height',targetHeight)}};Slick.prototype.setOption=Slick.prototype.slickSetOption=function(){var _=this,l,item,option,value,refresh=!1,type;if($.type(arguments[0])==='object'){option=arguments[0];refresh=arguments[1];type='multiple'}else if($.type(arguments[0])==='string'){option=arguments[0];value=arguments[1];refresh=arguments[2];if(arguments[0]==='responsive'&&$.type(arguments[1])==='array'){type='responsive'}else if(typeof arguments[1]!=='undefined'){type='single'}}
if(type==='single'){_.options[option]=value}else if(type==='multiple'){$.each(option,function(opt,val){_.options[opt]=val})}else if(type==='responsive'){for(item in value){if($.type(_.options.responsive)!=='array'){_.options.responsive=[value[item]]}else{l=_.options.responsive.length-1;while(l>=0){if(_.options.responsive[l].breakpoint===value[item].breakpoint){_.options.responsive.splice(l,1)}
l--}
_.options.responsive.push(value[item])}}}
if(refresh){_.unload();_.reinit()}};Slick.prototype.setPosition=function(){var _=this;_.setDimensions();_.setHeight();if(_.options.fade===!1){_.setCSS(_.getLeft(_.currentSlide))}else{_.setFade()}
_.$slider.trigger('setPosition',[_])};Slick.prototype.setProps=function(){var _=this,bodyStyle=document.body.style;_.positionProp=_.options.vertical===!0?'top':'left';if(_.positionProp==='top'){_.$slider.addClass('slick-vertical')}else{_.$slider.removeClass('slick-vertical')}
if(bodyStyle.WebkitTransition!==undefined||bodyStyle.MozTransition!==undefined||bodyStyle.msTransition!==undefined){if(_.options.useCSS===!0){_.cssTransitions=!0}}
if(_.options.fade){if(typeof _.options.zIndex==='number'){if(_.options.zIndex<3){_.options.zIndex=3}}else{_.options.zIndex=_.defaults.zIndex}}
if(bodyStyle.OTransform!==undefined){_.animType='OTransform';_.transformType='-o-transform';_.transitionType='OTransition';if(bodyStyle.perspectiveProperty===undefined&&bodyStyle.webkitPerspective===undefined)_.animType=!1}
if(bodyStyle.MozTransform!==undefined){_.animType='MozTransform';_.transformType='-moz-transform';_.transitionType='MozTransition';if(bodyStyle.perspectiveProperty===undefined&&bodyStyle.MozPerspective===undefined)_.animType=!1}
if(bodyStyle.webkitTransform!==undefined){_.animType='webkitTransform';_.transformType='-webkit-transform';_.transitionType='webkitTransition';if(bodyStyle.perspectiveProperty===undefined&&bodyStyle.webkitPerspective===undefined)_.animType=!1}
if(bodyStyle.msTransform!==undefined){_.animType='msTransform';_.transformType='-ms-transform';_.transitionType='msTransition';if(bodyStyle.msTransform===undefined)_.animType=!1}
if(bodyStyle.transform!==undefined&&_.animType!==!1){_.animType='transform';_.transformType='transform';_.transitionType='transition'}
_.transformsEnabled=_.options.useTransform&&(_.animType!==null&&_.animType!==!1)};Slick.prototype.setSlideClasses=function(index){var _=this,centerOffset,allSlides,indexOffset,remainder;allSlides=_.$slider.find('.slick-slide').removeClass('slick-active slick-center slick-current').attr('aria-hidden','true');_.$slides.eq(index).addClass('slick-current');if(_.options.centerMode===!0){var evenCoef=_.options.slidesToShow%2===0?1:0;centerOffset=Math.floor(_.options.slidesToShow/2);if(_.options.infinite===!0){if(index>=centerOffset&&index<=(_.slideCount-1)-centerOffset){_.$slides.slice(index-centerOffset+evenCoef,index+centerOffset+1).addClass('slick-active').attr('aria-hidden','false')}else{indexOffset=_.options.slidesToShow+index;allSlides.slice(indexOffset-centerOffset+1+evenCoef,indexOffset+centerOffset+2).addClass('slick-active').attr('aria-hidden','false')}
if(index===0){allSlides.eq(allSlides.length-1-_.options.slidesToShow).addClass('slick-center')}else if(index===_.slideCount-1){allSlides.eq(_.options.slidesToShow).addClass('slick-center')}}
_.$slides.eq(index).addClass('slick-center')}else{if(index>=0&&index<=(_.slideCount-_.options.slidesToShow)){_.$slides.slice(index,index+_.options.slidesToShow).addClass('slick-active').attr('aria-hidden','false')}else if(allSlides.length<=_.options.slidesToShow){allSlides.addClass('slick-active').attr('aria-hidden','false')}else{remainder=_.slideCount%_.options.slidesToShow;indexOffset=_.options.infinite===!0?_.options.slidesToShow+index:index;if(_.options.slidesToShow==_.options.slidesToScroll&&(_.slideCount-index)<_.options.slidesToShow){allSlides.slice(indexOffset-(_.options.slidesToShow-remainder),indexOffset+remainder).addClass('slick-active').attr('aria-hidden','false')}else{allSlides.slice(indexOffset,indexOffset+_.options.slidesToShow).addClass('slick-active').attr('aria-hidden','false')}}}
if(_.options.lazyLoad==='ondemand'||_.options.lazyLoad==='anticipated'){_.lazyLoad()}};Slick.prototype.setupInfinite=function(){var _=this,i,slideIndex,infiniteCount;if(_.options.fade===!0){_.options.centerMode=!1}
if(_.options.infinite===!0&&_.options.fade===!1){slideIndex=null;if(_.slideCount>_.options.slidesToShow){if(_.options.centerMode===!0){infiniteCount=_.options.slidesToShow+1}else{infiniteCount=_.options.slidesToShow}
for(i=_.slideCount;i>(_.slideCount-infiniteCount);i-=1){slideIndex=i-1;$(_.$slides[slideIndex]).clone(!0).attr('id','').attr('data-slick-index',slideIndex-_.slideCount).prependTo(_.$slideTrack).addClass('slick-cloned')}
for(i=0;i<infiniteCount+_.slideCount;i+=1){slideIndex=i;$(_.$slides[slideIndex]).clone(!0).attr('id','').attr('data-slick-index',slideIndex+_.slideCount).appendTo(_.$slideTrack).addClass('slick-cloned')}
_.$slideTrack.find('.slick-cloned').find('[id]').each(function(){$(this).attr('id','')})}}};Slick.prototype.interrupt=function(toggle){var _=this;if(!toggle){_.autoPlay()}
_.interrupted=toggle};Slick.prototype.selectHandler=function(event){var _=this;var targetElement=$(event.target).is('.slick-slide')?$(event.target):$(event.target).parents('.slick-slide');var index=parseInt(targetElement.attr('data-slick-index'));if(!index)index=0;if(_.slideCount<=_.options.slidesToShow){_.slideHandler(index,!1,!0);return}
_.slideHandler(index)};Slick.prototype.slideHandler=function(index,sync,dontAnimate){var targetSlide,animSlide,oldSlide,slideLeft,targetLeft=null,_=this,navTarget;sync=sync||!1;if(_.animating===!0&&_.options.waitForAnimate===!0){return}
if(_.options.fade===!0&&_.currentSlide===index){return}
if(sync===!1){_.asNavFor(index)}
targetSlide=index;targetLeft=_.getLeft(targetSlide);slideLeft=_.getLeft(_.currentSlide);_.currentLeft=_.swipeLeft===null?slideLeft:_.swipeLeft;if(_.options.infinite===!1&&_.options.centerMode===!1&&(index<0||index>_.getDotCount()*_.options.slidesToScroll)){if(_.options.fade===!1){targetSlide=_.currentSlide;if(dontAnimate!==!0){_.animateSlide(slideLeft,function(){_.postSlide(targetSlide)})}else{_.postSlide(targetSlide)}}
return}else if(_.options.infinite===!1&&_.options.centerMode===!0&&(index<0||index>(_.slideCount-_.options.slidesToScroll))){if(_.options.fade===!1){targetSlide=_.currentSlide;if(dontAnimate!==!0){_.animateSlide(slideLeft,function(){_.postSlide(targetSlide)})}else{_.postSlide(targetSlide)}}
return}
if(_.options.autoplay){clearInterval(_.autoPlayTimer)}
if(targetSlide<0){if(_.slideCount%_.options.slidesToScroll!==0){animSlide=_.slideCount-(_.slideCount%_.options.slidesToScroll)}else{animSlide=_.slideCount+targetSlide}}else if(targetSlide>=_.slideCount){if(_.slideCount%_.options.slidesToScroll!==0){animSlide=0}else{animSlide=targetSlide-_.slideCount}}else{animSlide=targetSlide}
_.animating=!0;_.$slider.trigger('beforeChange',[_,_.currentSlide,animSlide]);oldSlide=_.currentSlide;_.currentSlide=animSlide;_.setSlideClasses(_.currentSlide);if(_.options.asNavFor){navTarget=_.getNavTarget();navTarget=navTarget.slick('getSlick');if(navTarget.slideCount<=navTarget.options.slidesToShow){navTarget.setSlideClasses(_.currentSlide)}}
_.updateDots();_.updateArrows();if(_.options.fade===!0){if(dontAnimate!==!0){_.fadeSlideOut(oldSlide);_.fadeSlide(animSlide,function(){_.postSlide(animSlide)})}else{_.postSlide(animSlide)}
_.animateHeight();return}
if(dontAnimate!==!0){_.animateSlide(targetLeft,function(){_.postSlide(animSlide)})}else{_.postSlide(animSlide)}};Slick.prototype.startLoad=function(){var _=this;if(_.options.arrows===!0&&_.slideCount>_.options.slidesToShow){_.$prevArrow.hide();_.$nextArrow.hide()}
if(_.options.dots===!0&&_.slideCount>_.options.slidesToShow){_.$dots.hide()}
_.$slider.addClass('slick-loading')};Slick.prototype.swipeDirection=function(){var xDist,yDist,r,swipeAngle,_=this;xDist=_.touchObject.startX-_.touchObject.curX;yDist=_.touchObject.startY-_.touchObject.curY;r=Math.atan2(yDist,xDist);swipeAngle=Math.round(r*180/Math.PI);if(swipeAngle<0){swipeAngle=360-Math.abs(swipeAngle)}
if((swipeAngle<=45)&&(swipeAngle>=0)){return(_.options.rtl===!1?'left':'right')}
if((swipeAngle<=360)&&(swipeAngle>=315)){return(_.options.rtl===!1?'left':'right')}
if((swipeAngle>=135)&&(swipeAngle<=225)){return(_.options.rtl===!1?'right':'left')}
if(_.options.verticalSwiping===!0){if((swipeAngle>=35)&&(swipeAngle<=135)){return'down'}else{return'up'}}
return'vertical'};Slick.prototype.swipeEnd=function(event){var _=this,slideCount,direction;_.dragging=!1;_.swiping=!1;if(_.scrolling){_.scrolling=!1;return!1}
_.interrupted=!1;_.shouldClick=(_.touchObject.swipeLength>10)?!1:!0;if(_.touchObject.curX===undefined){return!1}
if(_.touchObject.edgeHit===!0){_.$slider.trigger('edge',[_,_.swipeDirection()])}
if(_.touchObject.swipeLength>=_.touchObject.minSwipe){direction=_.swipeDirection();switch(direction){case 'left':case 'down':slideCount=_.options.swipeToSlide?_.checkNavigable(_.currentSlide+_.getSlideCount()):_.currentSlide+_.getSlideCount();_.currentDirection=0;break;case 'right':case 'up':slideCount=_.options.swipeToSlide?_.checkNavigable(_.currentSlide-_.getSlideCount()):_.currentSlide-_.getSlideCount();_.currentDirection=1;break;default:}
if(direction!='vertical'){_.slideHandler(slideCount);_.touchObject={};_.$slider.trigger('swipe',[_,direction])}}else{if(_.touchObject.startX!==_.touchObject.curX){_.slideHandler(_.currentSlide);_.touchObject={}}}};Slick.prototype.swipeHandler=function(event){var _=this;if((_.options.swipe===!1)||('ontouchend' in document&&_.options.swipe===!1)){return}else if(_.options.draggable===!1&&event.type.indexOf('mouse')!==-1){return}
_.touchObject.fingerCount=event.originalEvent&&event.originalEvent.touches!==undefined?event.originalEvent.touches.length:1;_.touchObject.minSwipe=_.listWidth/_.options.touchThreshold;if(_.options.verticalSwiping===!0){_.touchObject.minSwipe=_.listHeight/_.options.touchThreshold}
switch(event.data.action){case 'start':_.swipeStart(event);break;case 'move':_.swipeMove(event);break;case 'end':_.swipeEnd(event);break}};Slick.prototype.swipeMove=function(event){var _=this,edgeWasHit=!1,curLeft,swipeDirection,swipeLength,positionOffset,touches,verticalSwipeLength;touches=event.originalEvent!==undefined?event.originalEvent.touches:null;if(!_.dragging||_.scrolling||touches&&touches.length!==1){return!1}
curLeft=_.getLeft(_.currentSlide);_.touchObject.curX=touches!==undefined?touches[0].pageX:event.clientX;_.touchObject.curY=touches!==undefined?touches[0].pageY:event.clientY;_.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(_.touchObject.curX-_.touchObject.startX,2)));verticalSwipeLength=Math.round(Math.sqrt(Math.pow(_.touchObject.curY-_.touchObject.startY,2)));if(!_.options.verticalSwiping&&!_.swiping&&verticalSwipeLength>4){_.scrolling=!0;return!1}
if(_.options.verticalSwiping===!0){_.touchObject.swipeLength=verticalSwipeLength}
swipeDirection=_.swipeDirection();if(event.originalEvent!==undefined&&_.touchObject.swipeLength>4){_.swiping=!0;event.preventDefault()}
positionOffset=(_.options.rtl===!1?1:-1)*(_.touchObject.curX>_.touchObject.startX?1:-1);if(_.options.verticalSwiping===!0){positionOffset=_.touchObject.curY>_.touchObject.startY?1:-1}
swipeLength=_.touchObject.swipeLength;_.touchObject.edgeHit=!1;if(_.options.infinite===!1){if((_.currentSlide===0&&swipeDirection==='right')||(_.currentSlide>=_.getDotCount()&&swipeDirection==='left')){swipeLength=_.touchObject.swipeLength*_.options.edgeFriction;_.touchObject.edgeHit=!0}}
if(_.options.vertical===!1){_.swipeLeft=curLeft+swipeLength*positionOffset}else{_.swipeLeft=curLeft+(swipeLength*(_.$list.height()/_.listWidth))*positionOffset}
if(_.options.verticalSwiping===!0){_.swipeLeft=curLeft+swipeLength*positionOffset}
if(_.options.fade===!0||_.options.touchMove===!1){return!1}
if(_.animating===!0){_.swipeLeft=null;return!1}
_.setCSS(_.swipeLeft)};Slick.prototype.swipeStart=function(event){var _=this,touches;_.interrupted=!0;if(_.touchObject.fingerCount!==1||_.slideCount<=_.options.slidesToShow){_.touchObject={};return!1}
if(event.originalEvent!==undefined&&event.originalEvent.touches!==undefined){touches=event.originalEvent.touches[0]}
_.touchObject.startX=_.touchObject.curX=touches!==undefined?touches.pageX:event.clientX;_.touchObject.startY=_.touchObject.curY=touches!==undefined?touches.pageY:event.clientY;_.dragging=!0};Slick.prototype.unfilterSlides=Slick.prototype.slickUnfilter=function(){var _=this;if(_.$slidesCache!==null){_.unload();_.$slideTrack.children(this.options.slide).detach();_.$slidesCache.appendTo(_.$slideTrack);_.reinit()}};Slick.prototype.unload=function(){var _=this;$('.slick-cloned',_.$slider).remove();if(_.$dots){_.$dots.remove()}
if(_.$prevArrow&&_.htmlExpr.test(_.options.prevArrow)){_.$prevArrow.remove()}
if(_.$nextArrow&&_.htmlExpr.test(_.options.nextArrow)){_.$nextArrow.remove()}
_.$slides.removeClass('slick-slide slick-active slick-visible slick-current').attr('aria-hidden','true').css('width','')};Slick.prototype.unslick=function(fromBreakpoint){var _=this;_.$slider.trigger('unslick',[_,fromBreakpoint]);_.destroy()};Slick.prototype.updateArrows=function(){var _=this,centerOffset;centerOffset=Math.floor(_.options.slidesToShow/2);if(_.options.arrows===!0&&_.slideCount>_.options.slidesToShow&&!_.options.infinite){_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled','false');_.$nextArrow.removeClass('slick-disabled').attr('aria-disabled','false');if(_.currentSlide===0){_.$prevArrow.addClass('slick-disabled').attr('aria-disabled','true');_.$nextArrow.removeClass('slick-disabled').attr('aria-disabled','false')}else if(_.currentSlide>=_.slideCount-_.options.slidesToShow&&_.options.centerMode===!1){_.$nextArrow.addClass('slick-disabled').attr('aria-disabled','true');_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled','false')}else if(_.currentSlide>=_.slideCount-1&&_.options.centerMode===!0){_.$nextArrow.addClass('slick-disabled').attr('aria-disabled','true');_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled','false')}}};Slick.prototype.updateDots=function(){var _=this;if(_.$dots!==null){_.$dots.find('li').removeClass('slick-active').end();_.$dots.find('li').eq(Math.floor(_.currentSlide/_.options.slidesToScroll)).addClass('slick-active')}};Slick.prototype.visibility=function(){var _=this;if(_.options.autoplay){if(document[_.hidden]){_.interrupted=!0}else{_.interrupted=!1}}};$.fn.slick=function(){var _=this,opt=arguments[0],args=Array.prototype.slice.call(arguments,1),l=_.length,i,ret;for(i=0;i<l;i++){if(typeof opt=='object'||typeof opt=='undefined')
_[i].slick=new Slick(_[i],opt);else ret=_[i].slick[opt].apply(_[i].slick,args);if(typeof ret!='undefined')return ret}
return _}}));var check_browser=navigator.userAgent;var leo='mousewheel wheel ';if(check_browser.indexOf('Firefox')>=0){leo=''}
"function"!==typeof Object.create&&(Object.create=function(d){function h(){}h.prototype=d;return new h});(function(d,h,l,m){var k={init:function(b,a){var c=this;c.elem=a;c.$elem=d(a);c.imageSrc=c.$elem.data("zoom-image")?c.$elem.data("zoom-image"):c.$elem.attr("src");c.options=d.extend({},d.fn.elevateZoom.options,b);c.options.tint&&(c.options.lensColour="none",c.options.lensOpacity="1");"inner"==c.options.zoomType&&(c.options.showLens=!1);c.$elem.parent().removeAttr("title").removeAttr("alt");c.zoomImage=c.imageSrc;c.refresh(1);d("#"+c.options.gallery+" a").click(function(a){c.options.galleryActiveClass&&(d("#"+c.options.gallery+" a").removeClass(c.options.galleryActiveClass),d(this).addClass(c.options.galleryActiveClass));a.preventDefault();d(this).data("zoom-image")?c.zoomImagePre=d(this).data("zoom-image"):c.zoomImagePre=d(this).data("image");c.swaptheimage(d(this).data("image"),c.zoomImagePre);return!1})},refresh:function(b){var a=this;setTimeout(function(){a.fetch(a.imageSrc)},b||a.options.refresh)},fetch:function(b){var a=this,c=new Image;c.onload=function(){a.largeWidth=c.width;a.largeHeight=c.height;a.startZoom();a.currentImage=a.imageSrc;a.options.onZoomedImageLoaded(a.$elem)};c.src=b},startZoom:function(){var b=this;b.nzWidth=b.$elem.width();b.nzHeight=b.$elem.height();b.isWindowActive=!1;b.isLensActive=!1;b.isTintActive=!1;b.overWindow=!1;b.options.imageCrossfade&&(b.zoomWrap=b.$elem.wrap('<div style="height:'+b.nzHeight+"px;width:"+b.nzWidth+'px;" class="zoomWrapper" />'),b.$elem.css("position","absolute"));b.zoomLock=1;b.scrollingLock=!1;b.changeBgSize=!1;b.currentZoomLevel=b.options.zoomLevel;b.nzOffset=b.$elem.offset();b.widthRatio=b.largeWidth/b.currentZoomLevel/b.nzWidth;b.heightRatio=b.largeHeight/b.currentZoomLevel/b.nzHeight;"window"==b.options.zoomType&&(b.zoomWindowStyle="overflow: hidden;background-position: 0px 0px;text-align:center;background-color: "+String(b.options.zoomWindowBgColour)+";width: "+String(b.options.zoomWindowWidth)+"px;height: "+String(b.options.zoomWindowHeight)+"px;float: left;background-size: "+b.largeWidth/b.currentZoomLevel+"px "+b.largeHeight/b.currentZoomLevel+"px;display: none;z-index:100;border: "+String(b.options.borderSize)+"px solid "+b.options.borderColour+";background-repeat: no-repeat;position: absolute;");if("inner"==b.options.zoomType){var a=b.$elem.css("border-left-width");b.zoomWindowStyle="overflow: hidden;margin-left: "+String(a)+";margin-top: "+String(a)+";background-position: 0px 0px;width: "+String(b.nzWidth)+"px;height: "+String(b.nzHeight)+"px;float: left;display: none;cursor:"+b.options.cursor+";px solid "+b.options.borderColour+";background-repeat: no-repeat;position: absolute;"}"window"==b.options.zoomType&&(lensHeight=b.nzHeight<b.options.zoomWindowWidth/b.widthRatio?b.nzHeight:String(b.options.zoomWindowHeight/b.heightRatio),lensWidth=b.largeWidth<b.options.zoomWindowWidth?b.nzWidth:b.options.zoomWindowWidth/b.widthRatio,b.lensStyle="background-position: 0px 0px;width: "+String(b.options.zoomWindowWidth/b.widthRatio)+"px;height: "+String(b.options.zoomWindowHeight/b.heightRatio)+"px;float: right;display: none;overflow: hidden;z-index: 999;-webkit-transform: translateZ(0);opacity:"+b.options.lensOpacity+";filter: alpha(opacity = "+100*b.options.lensOpacity+"); zoom:1;width:"+lensWidth+"px;height:"+lensHeight+"px;background-color:"+b.options.lensColour+";cursor:"+b.options.cursor+";border: "+b.options.lensBorderSize+"px solid "+b.options.lensBorderColour+";background-repeat: no-repeat;position: absolute;");b.tintStyle="display: block;position: absolute;background-color: "+b.options.tintColour+";filter:alpha(opacity=0);opacity: 0;width: "+b.nzWidth+"px;height: "+b.nzHeight+"px;";b.lensRound="";"lens"==b.options.zoomType&&(b.lensStyle="background-position: 0px 0px;float: left;display: none;border: "+String(b.options.borderSize)+"px solid "+b.options.borderColour+";width:"+String(b.options.lensSize)+"px;height:"+String(b.options.lensSize)+"px;background-repeat: no-repeat;position: absolute;");"round"==b.options.lensShape&&(b.lensRound="border-top-left-radius: "+String(b.options.lensSize/2+b.options.borderSize)+"px;border-top-right-radius: "+String(b.options.lensSize/2+b.options.borderSize)+"px;border-bottom-left-radius: "+String(b.options.lensSize/2+b.options.borderSize)+"px;border-bottom-right-radius: "+String(b.options.lensSize/2+b.options.borderSize)+"px;");b.zoomContainer=d('<div class="zoomContainer" style="-webkit-transform: translateZ(0);position:absolute;left:'+b.nzOffset.left+"px;top:"+b.nzOffset.top+"px;height:"+b.nzHeight+"px;width:"+b.nzWidth+'px;"></div>');d("body").append(b.zoomContainer);b.options.containLensZoom&&"lens"==b.options.zoomType&&b.zoomContainer.css("overflow","hidden");"inner"!=b.options.zoomType&&(b.zoomLens=d("<div class='zoomLens' style='"+b.lensStyle+b.lensRound+"'>&nbsp;</div>").appendTo(b.zoomContainer).click(function(){b.$elem.trigger("click")}),b.options.tint&&(b.tintContainer=d("<div/>").addClass("tintContainer"),b.zoomTint=d("<div class='zoomTint' style='"+b.tintStyle+"'></div>"),b.zoomLens.wrap(b.tintContainer),b.zoomTintcss=b.zoomLens.after(b.zoomTint),b.zoomTintImage=d('<img style="position: absolute; left: 0px; top: 0px; max-width: none; width: '+b.nzWidth+"px; height: "+b.nzHeight+'px;" src="'+b.imageSrc+'" alt="'+b.elem.attributes.alt.value+'" title="'+b.elem.attributes.title.value+'">').appendTo(b.zoomLens).click(function(){b.$elem.trigger("click")})));isNaN(b.options.zoomWindowPosition)?b.zoomWindow=d("<div style='z-index:999;left:"+b.windowOffsetLeft+"px;top:"+b.windowOffsetTop+"px;"+b.zoomWindowStyle+"' class='zoomWindow'>&nbsp;</div>").appendTo("body").click(function(){b.$elem.trigger("click")}):b.zoomWindow=d("<div style='z-index:999;left:"+b.windowOffsetLeft+"px;top:"+b.windowOffsetTop+"px;"+b.zoomWindowStyle+"' class='zoomWindow'>&nbsp;</div>").appendTo(b.zoomContainer).click(function(){b.$elem.trigger("click")});b.zoomWindowContainer=d("<div/>").addClass("zoomWindowContainer").css("width",b.options.zoomWindowWidth);b.zoomWindow.wrap(b.zoomWindowContainer);"lens"==b.options.zoomType&&b.zoomLens.css({backgroundImage:"url('"+b.imageSrc+"')"});"window"==b.options.zoomType&&b.zoomWindow.css({backgroundImage:"url('"+b.imageSrc+"')"});"inner"==b.options.zoomType&&b.zoomWindow.css({backgroundImage:"url('"+b.imageSrc+"')"});b.$elem.bind("touchmove",function(a){a.preventDefault();b.setPosition(a.originalEvent.touches[0]||a.originalEvent.changedTouches[0])});b.zoomContainer.bind("touchmove",function(a){"inner"==b.options.zoomType&&b.showHideWindow("show");a.preventDefault();b.setPosition(a.originalEvent.touches[0]||a.originalEvent.changedTouches[0])});b.zoomContainer.bind("touchend",function(a){b.showHideWindow("hide");b.options.showLens&&b.showHideLens("hide");b.options.tint&&"inner"!=b.options.zoomType&&b.showHideTint("hide")});b.$elem.bind("touchend",function(a){b.showHideWindow("hide");b.options.showLens&&b.showHideLens("hide");b.options.tint&&"inner"!=b.options.zoomType&&b.showHideTint("hide")});b.options.showLens&&(b.zoomLens.bind("touchmove",function(a){a.preventDefault();b.setPosition(a.originalEvent.touches[0]||a.originalEvent.changedTouches[0])}),b.zoomLens.bind("touchend",function(a){b.showHideWindow("hide");b.options.showLens&&b.showHideLens("hide");b.options.tint&&"inner"!=b.options.zoomType&&b.showHideTint("hide")}));b.$elem.bind("mousemove",function(a){!1==b.overWindow&&b.setElements("show");if(b.lastX!==a.clientX||b.lastY!==a.clientY)b.setPosition(a),b.currentLoc=a;b.lastX=a.clientX;b.lastY=a.clientY});b.zoomContainer.bind("mousemove",function(a){!1==b.overWindow&&b.setElements("show");if(b.lastX!==a.clientX||b.lastY!==a.clientY)b.setPosition(a),b.currentLoc=a;b.lastX=a.clientX;b.lastY=a.clientY});"inner"!=b.options.zoomType&&b.zoomLens.bind("mousemove",function(a){if(b.lastX!==a.clientX||b.lastY!==a.clientY)b.setPosition(a),b.currentLoc=a;b.lastX=a.clientX;b.lastY=a.clientY});b.options.tint&&"inner"!=b.options.zoomType&&b.zoomTint.bind("mousemove",function(a){if(b.lastX!==a.clientX||b.lastY!==a.clientY)b.setPosition(a),b.currentLoc=a;b.lastX=a.clientX;b.lastY=a.clientY});"inner"==b.options.zoomType&&b.zoomWindow.bind("mousemove",function(a){if(b.lastX!==a.clientX||b.lastY!==a.clientY)b.setPosition(a),b.currentLoc=a;b.lastX=a.clientX;b.lastY=a.clientY});b.zoomContainer.add(b.$elem).mouseenter(function(){!1==b.overWindow&&b.setElements("show")}).mouseleave(function(){b.scrollLock||b.setElements("hide")});"inner"!=b.options.zoomType&&b.zoomWindow.mouseenter(function(){b.overWindow=!0;b.setElements("hide")}).mouseleave(function(){b.overWindow=!1});b.minZoomLevel=b.options.minZoomLevel?b.options.minZoomLevel:2*b.options.scrollZoomIncrement;b.options.scrollZoom&&b.zoomContainer.add(b.$elem).bind(leo+"DOMMouseScroll MozMousePixelScroll",function(a){b.scrollLock=!0;clearTimeout(d.data(this,"timer"));d.data(this,"timer",setTimeout(function(){b.scrollLock=!1},250));var e=a.originalEvent.wheelDelta||-1*a.originalEvent.detail;a.stopImmediatePropagation();a.stopPropagation();a.preventDefault();0<e/120?b.currentZoomLevel>=b.minZoomLevel&&b.changeZoomLevel(b.currentZoomLevel-b.options.scrollZoomIncrement):b.options.maxZoomLevel?b.currentZoomLevel<=b.options.maxZoomLevel&&b.changeZoomLevel(parseFloat(b.currentZoomLevel)+b.options.scrollZoomIncrement):b.changeZoomLevel(parseFloat(b.currentZoomLevel)+b.options.scrollZoomIncrement);return!1})},setElements:function(b){if(!this.options.zoomEnabled)return!1;"show"==b&&this.isWindowSet&&("inner"==this.options.zoomType&&this.showHideWindow("show"),"window"==this.options.zoomType&&this.showHideWindow("show"),this.options.showLens&&this.showHideLens("show"),this.options.tint&&"inner"!=this.options.zoomType&&this.showHideTint("show"));"hide"==b&&("window"==this.options.zoomType&&this.showHideWindow("hide"),this.options.tint||this.showHideWindow("hide"),this.options.showLens&&this.showHideLens("hide"),this.options.tint&&this.showHideTint("hide"))},setPosition:function(b){if(!this.options.zoomEnabled)return!1;this.nzHeight=this.$elem.height();this.nzWidth=this.$elem.width();this.nzOffset=this.$elem.offset();this.options.tint&&"inner"!=this.options.zoomType&&(this.zoomTint.css({top:0}),this.zoomTint.css({left:0}));this.options.responsive&&!this.options.scrollZoom&&this.options.showLens&&(lensHeight=this.nzHeight<this.options.zoomWindowWidth/this.widthRatio?this.nzHeight:String(this.options.zoomWindowHeight/
this.heightRatio),lensWidth=this.largeWidth<this.options.zoomWindowWidth?this.nzWidth:this.options.zoomWindowWidth/this.widthRatio,this.widthRatio=this.largeWidth/this.nzWidth,this.heightRatio=this.largeHeight/this.nzHeight,"lens"!=this.options.zoomType&&(lensHeight=this.nzHeight<this.options.zoomWindowWidth/this.widthRatio?this.nzHeight:String(this.options.zoomWindowHeight/this.heightRatio),lensWidth=this.options.zoomWindowWidth<this.options.zoomWindowWidth?this.nzWidth:this.options.zoomWindowWidth/
this.widthRatio,this.zoomLens.css("width",lensWidth),this.zoomLens.css("height",lensHeight),this.options.tint&&(this.zoomTintImage.css("width",this.nzWidth),this.zoomTintImage.css("height",this.nzHeight))),"lens"==this.options.zoomType&&this.zoomLens.css({width:String(this.options.lensSize)+"px",height:String(this.options.lensSize)+"px"}));this.zoomContainer.css({top:this.nzOffset.top});this.zoomContainer.css({left:this.nzOffset.left});this.mouseLeft=parseInt(b.pageX-this.nzOffset.left);this.mouseTop=parseInt(b.pageY-this.nzOffset.top);"window"==this.options.zoomType&&(this.Etoppos=this.mouseTop<this.zoomLens.height()/2,this.Eboppos=this.mouseTop>this.nzHeight-this.zoomLens.height()/2-2*this.options.lensBorderSize,this.Eloppos=this.mouseLeft<0+this.zoomLens.width()/2,this.Eroppos=this.mouseLeft>this.nzWidth-this.zoomLens.width()/2-2*this.options.lensBorderSize);"inner"==this.options.zoomType&&(this.Etoppos=this.mouseTop<this.nzHeight/2/this.heightRatio,this.Eboppos=this.mouseTop>this.nzHeight-this.nzHeight/2/this.heightRatio,this.Eloppos=this.mouseLeft<0+this.nzWidth/2/this.widthRatio,this.Eroppos=this.mouseLeft>this.nzWidth-this.nzWidth/2/this.widthRatio-2*this.options.lensBorderSize);0>=this.mouseLeft||0>this.mouseTop||this.mouseLeft>this.nzWidth||this.mouseTop>this.nzHeight?this.setElements("hide"):(this.options.showLens&&(this.lensLeftPos=String(this.mouseLeft-this.zoomLens.width()/2),this.lensTopPos=String(this.mouseTop-this.zoomLens.height()/2)),this.Etoppos&&(this.lensTopPos=0),this.Eloppos&&(this.tintpos=this.lensLeftPos=this.windowLeftPos=0),"window"==this.options.zoomType&&(this.Eboppos&&(this.lensTopPos=Math.max(this.nzHeight-this.zoomLens.height()-2*this.options.lensBorderSize,0)),this.Eroppos&&(this.lensLeftPos=this.nzWidth-this.zoomLens.width()-2*this.options.lensBorderSize)),"inner"==this.options.zoomType&&(this.Eboppos&&(this.lensTopPos=Math.max(this.nzHeight-2*this.options.lensBorderSize,0)),this.Eroppos&&(this.lensLeftPos=this.nzWidth-this.nzWidth-2*this.options.lensBorderSize)),"lens"==this.options.zoomType&&(this.windowLeftPos=String(-1*((b.pageX-this.nzOffset.left)*this.widthRatio-this.zoomLens.width()/2)),this.windowTopPos=String(-1*((b.pageY-this.nzOffset.top)*this.heightRatio-this.zoomLens.height()/2)),this.zoomLens.css({backgroundPosition:this.windowLeftPos+"px "+this.windowTopPos+"px"}),this.changeBgSize&&(this.nzHeight>this.nzWidth?("lens"==this.options.zoomType&&this.zoomLens.css({"background-size":this.largeWidth/this.newvalueheight+"px "+this.largeHeight/this.newvalueheight+"px"}),this.zoomWindow.css({"background-size":this.largeWidth/this.newvalueheight+"px "+this.largeHeight/this.newvalueheight+"px"})):("lens"==this.options.zoomType&&this.zoomLens.css({"background-size":this.largeWidth/this.newvaluewidth+"px "+this.largeHeight/this.newvaluewidth+"px"}),this.zoomWindow.css({"background-size":this.largeWidth/this.newvaluewidth+"px "+this.largeHeight/this.newvaluewidth+"px"})),this.changeBgSize=!1),this.setWindowPostition(b)),this.options.tint&&"inner"!=this.options.zoomType&&this.setTintPosition(b),"window"==this.options.zoomType&&this.setWindowPostition(b),"inner"==this.options.zoomType&&this.setWindowPostition(b),this.options.showLens&&(this.fullwidth&&"lens"!=this.options.zoomType&&(this.lensLeftPos=0),this.zoomLens.css({left:this.lensLeftPos+"px",top:this.lensTopPos+"px"})))},showHideWindow:function(b){"show"!=b||this.isWindowActive||(this.options.zoomWindowFadeIn?this.zoomWindow.stop(!0,!0,!1).fadeIn(this.options.zoomWindowFadeIn):this.zoomWindow.show(),this.isWindowActive=!0);"hide"==b&&this.isWindowActive&&(this.options.zoomWindowFadeOut?this.zoomWindow.stop(!0,!0).fadeOut(this.options.zoomWindowFadeOut):this.zoomWindow.hide(),this.isWindowActive=!1)},showHideLens:function(b){"show"!=b||this.isLensActive||(this.options.lensFadeIn?this.zoomLens.stop(!0,!0,!1).fadeIn(this.options.lensFadeIn):this.zoomLens.show(),this.isLensActive=!0);"hide"==b&&this.isLensActive&&(this.options.lensFadeOut?this.zoomLens.stop(!0,!0).fadeOut(this.options.lensFadeOut):this.zoomLens.hide(),this.isLensActive=!1)},showHideTint:function(b){"show"!=b||this.isTintActive||(this.options.zoomTintFadeIn?this.zoomTint.css({opacity:this.options.tintOpacity}).animate().stop(!0,!0).fadeIn("slow"):(this.zoomTint.css({opacity:this.options.tintOpacity}).animate(),this.zoomTint.show()),this.isTintActive=!0);"hide"==b&&this.isTintActive&&(this.options.zoomTintFadeOut?this.zoomTint.stop(!0,!0).fadeOut(this.options.zoomTintFadeOut):this.zoomTint.hide(),this.isTintActive=!1)},setLensPostition:function(b){},setWindowPostition:function(b){var a=this;if(isNaN(a.options.zoomWindowPosition))a.externalContainer=d("#"+a.options.zoomWindowPosition),a.externalContainerWidth=a.externalContainer.width(),a.externalContainerHeight=a.externalContainer.height(),a.externalContainerOffset=a.externalContainer.offset(),a.windowOffsetTop=a.externalContainerOffset.top,a.windowOffsetLeft=a.externalContainerOffset.left;else switch(a.options.zoomWindowPosition){case 1:a.windowOffsetTop=a.options.zoomWindowOffety;a.windowOffsetLeft=+a.nzWidth;break;case 2:a.options.zoomWindowHeight>a.nzHeight&&(a.windowOffsetTop=-1*(a.options.zoomWindowHeight/2-a.nzHeight/2),a.windowOffsetLeft=a.nzWidth);break;case 3:a.windowOffsetTop=a.nzHeight-a.zoomWindow.height()-2*a.options.borderSize;a.windowOffsetLeft=a.nzWidth;break;case 4:a.windowOffsetTop=a.nzHeight;a.windowOffsetLeft=a.nzWidth;break;case 5:a.windowOffsetTop=a.nzHeight;a.windowOffsetLeft=a.nzWidth-a.zoomWindow.width()-2*a.options.borderSize;break;case 6:a.options.zoomWindowHeight>a.nzHeight&&(a.windowOffsetTop=a.nzHeight,a.windowOffsetLeft=-1*(a.options.zoomWindowWidth/2-a.nzWidth/2+2*a.options.borderSize));break;case 7:a.windowOffsetTop=a.nzHeight;a.windowOffsetLeft=0;break;case 8:a.windowOffsetTop=a.nzHeight;a.windowOffsetLeft=-1*(a.zoomWindow.width()+2*a.options.borderSize);break;case 9:a.windowOffsetTop=a.nzHeight-a.zoomWindow.height()-2*a.options.borderSize;a.windowOffsetLeft=-1*(a.zoomWindow.width()+2*a.options.borderSize);break;case 10:a.options.zoomWindowHeight>a.nzHeight&&(a.windowOffsetTop=-1*(a.options.zoomWindowHeight/2-a.nzHeight/2),a.windowOffsetLeft=-1*(a.zoomWindow.width()+2*a.options.borderSize));break;case 11:a.windowOffsetTop=a.options.zoomWindowOffety;a.windowOffsetLeft=-1*(a.zoomWindow.width()+2*a.options.borderSize);break;case 12:a.windowOffsetTop=-1*(a.zoomWindow.height()+2*a.options.borderSize);a.windowOffsetLeft=-1*(a.zoomWindow.width()+2*a.options.borderSize);break;case 13:a.windowOffsetTop=-1*(a.zoomWindow.height()+2*a.options.borderSize);a.windowOffsetLeft=0;break;case 14:a.options.zoomWindowHeight>a.nzHeight&&(a.windowOffsetTop=-1*(a.zoomWindow.height()+2*a.options.borderSize),a.windowOffsetLeft=-1*(a.options.zoomWindowWidth/2-a.nzWidth/2+2*a.options.borderSize));break;case 15:a.windowOffsetTop=-1*(a.zoomWindow.height()+2*a.options.borderSize);a.windowOffsetLeft=a.nzWidth-a.zoomWindow.width()-2*a.options.borderSize;break;case 16:a.windowOffsetTop=-1*(a.zoomWindow.height()+2*a.options.borderSize);a.windowOffsetLeft=a.nzWidth;break;default:a.windowOffsetTop=a.options.zoomWindowOffety,a.windowOffsetLeft=a.nzWidth}a.isWindowSet=!0;a.windowOffsetTop+=a.options.zoomWindowOffety;a.windowOffsetLeft+=a.options.zoomWindowOffetx;a.zoomWindow.css({top:a.windowOffsetTop});a.zoomWindow.css({left:a.windowOffsetLeft});"inner"==a.options.zoomType&&(a.zoomWindow.css({top:0}),a.zoomWindow.css({left:0}));a.windowLeftPos=String(-1*((b.pageX-a.nzOffset.left)*a.widthRatio-a.zoomWindow.width()/2));a.windowTopPos=String(-1*((b.pageY-a.nzOffset.top)*a.heightRatio-a.zoomWindow.height()/2));a.Etoppos&&(a.windowTopPos=0);a.Eloppos&&(a.windowLeftPos=0);a.Eboppos&&(a.windowTopPos=-1*(a.largeHeight/a.currentZoomLevel-a.zoomWindow.height()));a.Eroppos&&(a.windowLeftPos=-1*(a.largeWidth/a.currentZoomLevel-a.zoomWindow.width()));a.fullheight&&(a.windowTopPos=0);a.fullwidth&&(a.windowLeftPos=0);if("window"==a.options.zoomType||"inner"==a.options.zoomType)1==a.zoomLock&&(1>=a.widthRatio&&(a.windowLeftPos=0),1>=a.heightRatio&&(a.windowTopPos=0)),a.largeHeight<a.options.zoomWindowHeight&&(a.windowTopPos=0),a.largeWidth<a.options.zoomWindowWidth&&(a.windowLeftPos=0),a.options.easing?(a.xp||(a.xp=0),a.yp||(a.yp=0),a.loop||(a.loop=setInterval(function(){a.xp+=(a.windowLeftPos-a.xp)/a.options.easingAmount;a.yp+=(a.windowTopPos-a.yp)/a.options.easingAmount;a.scrollingLock?(clearInterval(a.loop),a.xp=a.windowLeftPos,a.yp=a.windowTopPos,a.xp=-1*((b.pageX-a.nzOffset.left)*a.widthRatio-a.zoomWindow.width()/2),a.yp=-1*((b.pageY-a.nzOffset.top)*a.heightRatio-a.zoomWindow.height()/2),a.changeBgSize&&(a.nzHeight>a.nzWidth?("lens"==a.options.zoomType&&a.zoomLens.css({"background-size":a.largeWidth/a.newvalueheight+"px "+a.largeHeight/a.newvalueheight+"px"}),a.zoomWindow.css({"background-size":a.largeWidth/a.newvalueheight+"px "+a.largeHeight/a.newvalueheight+"px"})):("lens"!=a.options.zoomType&&a.zoomLens.css({"background-size":a.largeWidth/a.newvaluewidth+"px "+a.largeHeight/a.newvalueheight+"px"}),a.zoomWindow.css({"background-size":a.largeWidth/a.newvaluewidth+"px "+a.largeHeight/a.newvaluewidth+"px"})),a.changeBgSize=!1),a.zoomWindow.css({backgroundPosition:a.windowLeftPos+"px "+a.windowTopPos+"px"}),a.scrollingLock=!1,a.loop=!1):(a.changeBgSize&&(a.nzHeight>a.nzWidth?("lens"==a.options.zoomType&&a.zoomLens.css({"background-size":a.largeWidth/a.newvalueheight+"px "+a.largeHeight/a.newvalueheight+"px"}),a.zoomWindow.css({"background-size":a.largeWidth/a.newvalueheight+"px "+a.largeHeight/a.newvalueheight+"px"})):("lens"!=a.options.zoomType&&a.zoomLens.css({"background-size":a.largeWidth/a.newvaluewidth+"px "+a.largeHeight/a.newvaluewidth+"px"}),a.zoomWindow.css({"background-size":a.largeWidth/a.newvaluewidth+"px "+a.largeHeight/a.newvaluewidth+"px"})),a.changeBgSize=!1),a.zoomWindow.css({backgroundPosition:a.xp+"px "+a.yp+"px"}))},16))):(a.changeBgSize&&(a.nzHeight>a.nzWidth?("lens"==a.options.zoomType&&a.zoomLens.css({"background-size":a.largeWidth/a.newvalueheight+"px "+a.largeHeight/a.newvalueheight+"px"}),a.zoomWindow.css({"background-size":a.largeWidth/a.newvalueheight+"px "+a.largeHeight/a.newvalueheight+"px"})):("lens"==a.options.zoomType&&a.zoomLens.css({"background-size":a.largeWidth/a.newvaluewidth+"px "+a.largeHeight/a.newvaluewidth+"px"}),a.largeHeight/a.newvaluewidth<a.options.zoomWindowHeight?a.zoomWindow.css({"background-size":a.largeWidth/a.newvaluewidth+"px "+a.largeHeight/a.newvaluewidth+"px"}):a.zoomWindow.css({"background-size":a.largeWidth/a.newvalueheight+"px "+a.largeHeight/a.newvalueheight+"px"})),a.changeBgSize=!1),a.zoomWindow.css({backgroundPosition:a.windowLeftPos+"px "+a.windowTopPos+"px"}))},setTintPosition:function(b){this.nzOffset=this.$elem.offset();this.tintpos=String(-1*(b.pageX-this.nzOffset.left-this.zoomLens.width()/2));this.tintposy=String(-1*(b.pageY-this.nzOffset.top-this.zoomLens.height()/2));this.Etoppos&&(this.tintposy=0);this.Eloppos&&(this.tintpos=0);this.Eboppos&&(this.tintposy=-1*(this.nzHeight-this.zoomLens.height()-2*this.options.lensBorderSize));this.Eroppos&&(this.tintpos=-1*(this.nzWidth-this.zoomLens.width()-2*this.options.lensBorderSize));this.options.tint&&(this.fullheight&&(this.tintposy=0),this.fullwidth&&(this.tintpos=0),this.zoomTintImage.css({left:this.tintpos+"px"}),this.zoomTintImage.css({top:this.tintposy+"px"}))},swaptheimage:function(b,a){var c=this,e=new Image;c.options.loadingIcon&&(c.spinner=d("<div style=\"background: url('"+c.options.loadingIcon+"') no-repeat center;height:"+c.nzHeight+"px;width:"+c.nzWidth+'px;z-index: 2000;position: absolute; background-position: center center;"></div>'),c.$elem.after(c.spinner));c.options.onImageSwap(c.$elem);e.onload=function(){c.largeWidth=e.width;c.largeHeight=e.height;c.zoomImage=a;c.zoomWindow.css({"background-size":c.largeWidth+"px "+c.largeHeight+"px"});c.zoomWindow.css({"background-size":c.largeWidth+"px "+c.largeHeight+"px"});c.swapAction(b,a)};e.src=a},swapAction:function(b,a){var c=this,e=new Image;e.onload=function(){c.nzHeight=e.height;c.nzWidth=e.width;c.options.onImageSwapComplete(c.$elem);c.doneCallback()};e.src=b;c.currentZoomLevel=c.options.zoomLevel;c.options.maxZoomLevel=!1;"lens"==c.options.zoomType&&c.zoomLens.css({backgroundImage:"url('"+a+"')"});"window"==c.options.zoomType&&c.zoomWindow.css({backgroundImage:"url('"+a+"')"});"inner"==c.options.zoomType&&c.zoomWindow.css({backgroundImage:"url('"+a+"')"});c.currentImage=a;if(c.options.imageCrossfade){var f=c.$elem,g=f.clone();c.$elem.attr("src",b);c.$elem.after(g);g.stop(!0).fadeOut(c.options.imageCrossfade,function(){d(this).remove()});c.$elem.width("auto").removeAttr("width");c.$elem.height("auto").removeAttr("height");f.fadeIn(c.options.imageCrossfade);c.options.tint&&"inner"!=c.options.zoomType&&(f=c.zoomTintImage,g=f.clone(),c.zoomTintImage.attr("src",a),c.zoomTintImage.after(g),g.stop(!0).fadeOut(c.options.imageCrossfade,function(){d(this).remove()}),f.fadeIn(c.options.imageCrossfade),c.zoomTint.css({height:c.$elem.height()}),c.zoomTint.css({width:c.$elem.width()}));c.zoomContainer.css("height",c.$elem.height());c.zoomContainer.css("width",c.$elem.width());"inner"!=c.options.zoomType||c.options.constrainType||(c.zoomWrap.parent().css("height",c.$elem.height()),c.zoomWrap.parent().css("width",c.$elem.width()),c.zoomWindow.css("height",c.$elem.height()),c.zoomWindow.css("width",c.$elem.width()))}else c.$elem.attr("src",b),c.options.tint&&(c.zoomTintImage.attr("src",a),c.zoomTintImage.attr("height",c.$elem.height()),c.zoomTintImage.css({height:c.$elem.height()}),c.zoomTint.css({height:c.$elem.height()})),c.zoomContainer.css("height",c.$elem.height()),c.zoomContainer.css("width",c.$elem.width());c.options.imageCrossfade&&(c.zoomWrap.css("height",c.$elem.height()),c.zoomWrap.css("width",c.$elem.width()));c.options.constrainType&&("height"==c.options.constrainType&&(c.zoomContainer.css("height",c.options.constrainSize),c.zoomContainer.css("width","auto"),c.options.imageCrossfade?(c.zoomWrap.css("height",c.options.constrainSize),c.zoomWrap.css("width","auto"),c.constwidth=c.zoomWrap.width()):(c.$elem.css("height",c.options.constrainSize),c.$elem.css("width","auto"),c.constwidth=c.$elem.width()),"inner"==c.options.zoomType&&(c.zoomWrap.parent().css("height",c.options.constrainSize),c.zoomWrap.parent().css("width",c.constwidth),c.zoomWindow.css("height",c.options.constrainSize),c.zoomWindow.css("width",c.constwidth)),c.options.tint&&(c.tintContainer.css("height",c.options.constrainSize),c.tintContainer.css("width",c.constwidth),c.zoomTint.css("height",c.options.constrainSize),c.zoomTint.css("width",c.constwidth),c.zoomTintImage.css("height",c.options.constrainSize),c.zoomTintImage.css("width",c.constwidth))),"width"==c.options.constrainType&&(c.zoomContainer.css("height","auto"),c.zoomContainer.css("width",c.options.constrainSize),c.options.imageCrossfade?(c.zoomWrap.css("height","auto"),c.zoomWrap.css("width",c.options.constrainSize),c.constheight=c.zoomWrap.height()):(c.$elem.css("height","auto"),c.$elem.css("width",c.options.constrainSize),c.constheight=c.$elem.height()),"inner"==c.options.zoomType&&(c.zoomWrap.parent().css("height",c.constheight),c.zoomWrap.parent().css("width",c.options.constrainSize),c.zoomWindow.css("height",c.constheight),c.zoomWindow.css("width",c.options.constrainSize)),c.options.tint&&(c.tintContainer.css("height",c.constheight),c.tintContainer.css("width",c.options.constrainSize),c.zoomTint.css("height",c.constheight),c.zoomTint.css("width",c.options.constrainSize),c.zoomTintImage.css("height",c.constheight),c.zoomTintImage.css("width",c.options.constrainSize))))},doneCallback:function(){this.options.loadingIcon&&this.spinner.hide();this.nzOffset=this.$elem.offset();this.nzWidth=this.$elem.width();this.nzHeight=this.$elem.height();this.currentZoomLevel=this.options.zoomLevel;this.widthRatio=this.largeWidth/this.nzWidth;this.heightRatio=this.largeHeight/this.nzHeight;"window"==this.options.zoomType&&(lensHeight=this.nzHeight<this.options.zoomWindowWidth/this.widthRatio?this.nzHeight:String(this.options.zoomWindowHeight/this.heightRatio),lensWidth=this.options.zoomWindowWidth<this.options.zoomWindowWidth?this.nzWidth:this.options.zoomWindowWidth/this.widthRatio,this.zoomLens&&(this.zoomLens.css("width",lensWidth),this.zoomLens.css("height",lensHeight)))},getCurrentImage:function(){return this.zoomImage},getGalleryList:function(){var b=this;b.gallerylist=[];b.options.gallery?d("#"+b.options.gallery+" a").each(function(){var a="";d(this).data("zoom-image")?a=d(this).data("zoom-image"):d(this).data("image")&&(a=d(this).data("image"));a==b.zoomImage?b.gallerylist.unshift({href:""+a+"",title:d(this).find("img").attr("title")}):b.gallerylist.push({href:""+a+"",title:d(this).find("img").attr("title")})}):b.gallerylist.push({href:""+b.zoomImage+"",title:d(this).find("img").attr("title")});return b.gallerylist},changeZoomLevel:function(b){this.scrollingLock=!0;this.newvalue=parseFloat(b).toFixed(2);newvalue=parseFloat(b).toFixed(2);maxheightnewvalue=this.largeHeight/(this.options.zoomWindowHeight/this.nzHeight*this.nzHeight);maxwidthtnewvalue=this.largeWidth/(this.options.zoomWindowWidth/this.nzWidth*this.nzWidth);"inner"!=this.options.zoomType&&(maxheightnewvalue<=newvalue?(this.heightRatio=this.largeHeight/maxheightnewvalue/this.nzHeight,this.newvalueheight=maxheightnewvalue,this.fullheight=!0):(this.heightRatio=this.largeHeight/newvalue/this.nzHeight,this.newvalueheight=newvalue,this.fullheight=!1),maxwidthtnewvalue<=newvalue?(this.widthRatio=this.largeWidth/maxwidthtnewvalue/this.nzWidth,this.newvaluewidth=maxwidthtnewvalue,this.fullwidth=!0):(this.widthRatio=this.largeWidth/newvalue/this.nzWidth,this.newvaluewidth=newvalue,this.fullwidth=!1),"lens"==this.options.zoomType&&(maxheightnewvalue<=newvalue?(this.fullwidth=!0,this.newvaluewidth=maxheightnewvalue):(this.widthRatio=this.largeWidth/newvalue/this.nzWidth,this.newvaluewidth=newvalue,this.fullwidth=!1)));"inner"==this.options.zoomType&&(maxheightnewvalue=parseFloat(this.largeHeight/this.nzHeight).toFixed(2),maxwidthtnewvalue=parseFloat(this.largeWidth/this.nzWidth).toFixed(2),newvalue>maxheightnewvalue&&(newvalue=maxheightnewvalue),newvalue>maxwidthtnewvalue&&(newvalue=maxwidthtnewvalue),maxheightnewvalue<=newvalue?(this.heightRatio=this.largeHeight/
newvalue/this.nzHeight,this.newvalueheight=newvalue>maxheightnewvalue?maxheightnewvalue:newvalue,this.fullheight=!0):(this.heightRatio=this.largeHeight/newvalue/this.nzHeight,this.newvalueheight=newvalue>maxheightnewvalue?maxheightnewvalue:newvalue,this.fullheight=!1),maxwidthtnewvalue<=newvalue?(this.widthRatio=this.largeWidth/newvalue/this.nzWidth,this.newvaluewidth=newvalue>maxwidthtnewvalue?maxwidthtnewvalue:newvalue,this.fullwidth=!0):(this.widthRatio=this.largeWidth/newvalue/this.nzWidth,this.newvaluewidth=newvalue,this.fullwidth=!1));scrcontinue=!1;"inner"==this.options.zoomType&&(this.nzWidth>this.nzHeight&&(this.newvaluewidth<=maxwidthtnewvalue?scrcontinue=!0:(scrcontinue=!1,this.fullwidth=this.fullheight=!0)),this.nzHeight>this.nzWidth&&(this.newvaluewidth<=maxwidthtnewvalue?scrcontinue=!0:(scrcontinue=!1,this.fullwidth=this.fullheight=!0)));"inner"!=this.options.zoomType&&(scrcontinue=!0);scrcontinue&&(this.zoomLock=0,this.changeZoom=!0,this.options.zoomWindowHeight/this.heightRatio<=this.nzHeight&&(this.currentZoomLevel=this.newvalueheight,"lens"!=this.options.zoomType&&"inner"!=this.options.zoomType&&(this.changeBgSize=!0,this.zoomLens.css({height:String(this.options.zoomWindowHeight/this.heightRatio)+"px"})),"lens"==this.options.zoomType||"inner"==this.options.zoomType)&&(this.changeBgSize=!0),this.options.zoomWindowWidth/this.widthRatio<=this.nzWidth&&("inner"!=this.options.zoomType&&this.newvaluewidth>this.newvalueheight&&(this.currentZoomLevel=this.newvaluewidth),"lens"!=this.options.zoomType&&"inner"!=this.options.zoomType&&(this.changeBgSize=!0,this.zoomLens.css({width:String(this.options.zoomWindowWidth/this.widthRatio)+"px"})),"lens"==this.options.zoomType||"inner"==this.options.zoomType)&&(this.changeBgSize=!0),"inner"==this.options.zoomType&&(this.changeBgSize=!0,this.nzWidth>this.nzHeight&&(this.currentZoomLevel=this.newvaluewidth),this.nzHeight>this.nzWidth&&(this.currentZoomLevel=this.newvaluewidth)));this.setPosition(this.currentLoc)},closeAll:function(){self.zoomWindow&&self.zoomWindow.hide();self.zoomLens&&self.zoomLens.hide();self.zoomTint&&self.zoomTint.hide()},changeState:function(b){"enable"==b&&(this.options.zoomEnabled=!0);"disable"==b&&(this.options.zoomEnabled=!1)}};d.fn.elevateZoom=function(b){return this.each(function(){var a=Object.create(k);a.init(b,this);d.data(this,"elevateZoom",a)})};d.fn.elevateZoom.options={zoomActivation:"hover",zoomEnabled:!0,preloading:1,zoomLevel:1,scrollZoom:!1,scrollZoomIncrement:0.1,minZoomLevel:!1,maxZoomLevel:!1,easing:!1,easingAmount:12,lensSize:200,zoomWindowWidth:400,zoomWindowHeight:400,zoomWindowOffetx:0,zoomWindowOffety:0,zoomWindowPosition:1,zoomWindowBgColour:"#fff",lensFadeIn:!1,lensFadeOut:!1,debug:!1,zoomWindowFadeIn:!1,zoomWindowFadeOut:!1,zoomWindowAlwaysShow:!1,zoomTintFadeIn:!1,zoomTintFadeOut:!1,borderSize:4,showLens:!0,borderColour:"#888",lensBorderSize:1,lensBorderColour:"#000",lensShape:"square",zoomType:"window",containLensZoom:!1,lensColour:"white",lensOpacity:0.4,lenszoom:!1,tint:!1,tintColour:"#333",tintOpacity:0.4,gallery:!1,galleryActiveClass:"zoomGalleryActive",imageCrossfade:!1,constrainType:!1,constrainSize:!1,loadingIcon:!1,cursor:"default",responsive:!0,onComplete:d.noop,onZoomedImageLoaded:function(){},onImageSwap:d.noop,onImageSwapComplete:d.noop}})(jQuery,window,document);/*! lightgallery - v1.10.0 - 2020-11-07
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(){"use strict";function b(b,d){if(this.el=b,this.$el=a(b),this.s=a.extend({},c,d),this.s.dynamic&&"undefined"!==this.s.dynamicEl&&this.s.dynamicEl.constructor===Array&&!this.s.dynamicEl.length)throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.modules={},this.lGalleryOn=!1,this.lgBusy=!1,this.hideBarTimeout=!1,this.isTouch="ontouchstart"in document.documentElement,this.s.slideEndAnimatoin&&(this.s.hideControlOnEnd=!1),this.s.dynamic?this.$items=this.s.dynamicEl:"this"===this.s.selector?this.$items=this.$el:""!==this.s.selector?this.s.selectWithin?this.$items=a(this.s.selectWithin).find(this.s.selector):this.$items=this.$el.find(a(this.s.selector)):this.$items=this.$el.children(),this.$slide="",this.$outer="",this.init(),this}var c={mode:"lg-slide",cssEasing:"ease",easing:"linear",speed:600,height:"100%",width:"100%",addClass:"",startClass:"lg-start-zoom",backdropDuration:150,hideBarsDelay:6e3,useLeft:!1,ariaLabelledby:"",ariaDescribedby:"",closable:!0,loop:!0,escKey:!0,keyPress:!0,controls:!0,slideEndAnimatoin:!0,hideControlOnEnd:!1,mousewheel:!0,getCaptionFromTitleOrAlt:!0,appendSubHtmlTo:".lg-sub-html",subHtmlSelectorRelative:!1,preload:1,showAfterLoad:!0,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:!1,iframeMaxWidth:"100%",download:!0,counter:!0,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],galleryId:1,supportLegacyBrowser:!0};b.prototype.init=function(){var b=this;b.s.preload>b.$items.length&&(b.s.preload=b.$items.length);var c=window.location.hash;c.indexOf("lg="+this.s.galleryId)>0&&(b.index=parseInt(c.split("&slide=")[1],10),a("body").addClass("lg-from-hash"),a("body").hasClass("lg-on")||(setTimeout(function(){b.build(b.index)}),a("body").addClass("lg-on"))),b.s.dynamic?(b.$el.trigger("onBeforeOpen.lg"),b.index=b.s.index||0,a("body").hasClass("lg-on")||setTimeout(function(){b.build(b.index),a("body").addClass("lg-on")})):b.$items.on("click.lgcustom",function(c){try{c.preventDefault(),c.preventDefault()}catch(a){c.returnValue=!1}b.$el.trigger("onBeforeOpen.lg"),b.index=b.s.index||b.$items.index(this),a("body").hasClass("lg-on")||(b.build(b.index),a("body").addClass("lg-on"))})},b.prototype.build=function(b){var c=this;c.structure(),a.each(a.fn.lightGallery.modules,function(b){c.modules[b]=new a.fn.lightGallery.modules[b](c.el)}),c.slide(b,!1,!1,!1),c.s.keyPress&&c.keyPress(),c.$items.length>1?(c.arrow(),setTimeout(function(){c.enableDrag(),c.enableSwipe()},50),c.s.mousewheel&&c.mousewheel()):c.$slide.on("click.lg",function(){c.$el.trigger("onSlideClick.lg")}),c.counter(),c.closeGallery(),c.$el.trigger("onAfterOpen.lg"),c.s.hideBarsDelay>0&&c.$outer.on("mousemove.lg click.lg touchstart.lg",function(){c.$outer.removeClass("lg-hide-items"),clearTimeout(c.hideBarTimeout),c.hideBarTimeout=setTimeout(function(){c.$outer.addClass("lg-hide-items")},c.s.hideBarsDelay)}),c.$outer.trigger("mousemove.lg")},b.prototype.structure=function(){var b,c="",d="",e=0,f="",g=this;for(a("body").append('<div class="lg-backdrop"></div>'),a(".lg-backdrop").css("transition-duration",this.s.backdropDuration+"ms"),e=0;e<this.$items.length;e++)c+='<div class="lg-item"></div>';if(this.s.controls&&this.$items.length>1&&(d='<div class="lg-actions"><button type="button" aria-label="Previous slide" class="lg-prev lg-icon">'+this.s.prevHtml+'</button><button type="button" aria-label="Next slide" class="lg-next lg-icon">'+this.s.nextHtml+"</button></div>"),".lg-sub-html"===this.s.appendSubHtmlTo&&(f='<div role="status" aria-live="polite" class="lg-sub-html"></div>'),b='<div tabindex="-1" aria-modal="true" '+(this.s.ariaLabelledby?'aria-labelledby="'+this.s.ariaLabelledby+'"':"")+" "+(this.s.ariaDescribedby?'aria-describedby="'+this.s.ariaDescribedby+'"':"")+' role="dialog" class="lg-outer '+this.s.addClass+" "+this.s.startClass+'"><div class="lg" style="width:'+this.s.width+"; height:"+this.s.height+'"><div class="lg-inner">'+c+'</div><div class="lg-toolbar lg-group"><button type="button" aria-label="Close gallery" class="lg-close lg-icon"></button></div>'+d+f+"</div></div>",a("body").append(b),this.$outer=a(".lg-outer"),this.$outer.focus(),this.$slide=this.$outer.find(".lg-item"),this.s.useLeft?(this.$outer.addClass("lg-use-left"),this.s.mode="lg-slide"):this.$outer.addClass("lg-use-css3"),g.setTop(),a(window).on("resize.lg orientationchange.lg",function(){setTimeout(function(){g.setTop()},100)}),this.$slide.eq(this.index).addClass("lg-current"),this.doCss()?this.$outer.addClass("lg-css3"):(this.$outer.addClass("lg-css"),this.s.speed=0),this.$outer.addClass(this.s.mode),this.s.enableDrag&&this.$items.length>1&&this.$outer.addClass("lg-grab"),this.s.showAfterLoad&&this.$outer.addClass("lg-show-after-load"),this.doCss()){var h=this.$outer.find(".lg-inner");h.css("transition-timing-function",this.s.cssEasing),h.css("transition-duration",this.s.speed+"ms")}setTimeout(function(){a(".lg-backdrop").addClass("in")}),setTimeout(function(){g.$outer.addClass("lg-visible")},this.s.backdropDuration),this.s.download&&this.$outer.find(".lg-toolbar").append('<a id="lg-download" aria-label="Download" target="_blank" download class="lg-download lg-icon"></a>'),this.prevScrollTop=a(window).scrollTop()},b.prototype.setTop=function(){if("100%"!==this.s.height){var b=a(window).height(),c=(b-parseInt(this.s.height,10))/2,d=this.$outer.find(".lg");b>=parseInt(this.s.height,10)?d.css("top",c+"px"):d.css("top","0px")}},b.prototype.doCss=function(){return!!function(){var a=["transition","MozTransition","WebkitTransition","OTransition","msTransition","KhtmlTransition"],b=document.documentElement,c=0;for(c=0;c<a.length;c++)if(a[c]in b.style)return!0}()},b.prototype.isVideo=function(a,b){var c;if(c=this.s.dynamic?this.s.dynamicEl[b].html:this.$items.eq(b).attr("data-html"),!a)return c?{html5:!0}:(console.error("lightGallery :- data-src is not provided on slide item "+(b+1)+". Please make sure the selector property is properly configured. More info - http://sachinchoolur.github.io/lightGallery/demos/html-markup.html"),!1);var d=a.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i),e=a.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)/i),f=a.match(/\/\/(?:www\.)?dai.ly\/([0-9a-z\-_]+)/i),g=a.match(/\/\/(?:www\.)?(?:vk\.com|vkontakte\.ru)\/(?:video_ext\.php\?)(.*)/i);return d?{youtube:d}:e?{vimeo:e}:f?{dailymotion:f}:g?{vk:g}:void 0},b.prototype.counter=function(){this.s.counter&&a(this.s.appendCounterTo).append('<div id="lg-counter" role="status" aria-live="polite"><span id="lg-counter-current">'+(parseInt(this.index,10)+1)+'</span> / <span id="lg-counter-all">'+this.$items.length+"</span></div>")},b.prototype.addHtml=function(b){var c,d,e=null;if(this.s.dynamic?this.s.dynamicEl[b].subHtmlUrl?c=this.s.dynamicEl[b].subHtmlUrl:e=this.s.dynamicEl[b].subHtml:(d=this.$items.eq(b),d.attr("data-sub-html-url")?c=d.attr("data-sub-html-url"):(e=d.attr("data-sub-html"),this.s.getCaptionFromTitleOrAlt&&!e&&(e=d.attr("title")||d.find("img").first().attr("alt")))),!c)if(void 0!==e&&null!==e){var f=e.substring(0,1);"."!==f&&"#"!==f||(e=this.s.subHtmlSelectorRelative&&!this.s.dynamic?d.find(e).html():a(e).html())}else e="";".lg-sub-html"===this.s.appendSubHtmlTo?c?this.$outer.find(this.s.appendSubHtmlTo).load(c):this.$outer.find(this.s.appendSubHtmlTo).html(e):c?this.$slide.eq(b).load(c):this.$slide.eq(b).append(e),void 0!==e&&null!==e&&(""===e?this.$outer.find(this.s.appendSubHtmlTo).addClass("lg-empty-html"):this.$outer.find(this.s.appendSubHtmlTo).removeClass("lg-empty-html")),this.$el.trigger("onAfterAppendSubHtml.lg",[b])},b.prototype.preload=function(a){var b=1,c=1;for(b=1;b<=this.s.preload&&!(b>=this.$items.length-a);b++)this.loadContent(a+b,!1,0);for(c=1;c<=this.s.preload&&!(a-c<0);c++)this.loadContent(a-c,!1,0)},b.prototype.loadContent=function(b,c,d){var e,f,g,h,i,j,k,l=this,m=!1,n=function(b){for(var c=[],d=[],e=0;e<b.length;e++){var g=b[e].split(" ");""===g[0]&&g.splice(0,1),d.push(g[0]),c.push(g[1])}for(var h=a(window).width(),i=0;i<c.length;i++)if(parseInt(c[i],10)>h){f=d[i];break}};if(l.s.dynamic){if(l.s.dynamicEl[b].poster&&(m=!0,g=l.s.dynamicEl[b].poster),j=l.s.dynamicEl[b].html,f=l.s.dynamicEl[b].src,k=l.s.dynamicEl[b].alt,l.s.dynamicEl[b].responsive){n(l.s.dynamicEl[b].responsive.split(","))}h=l.s.dynamicEl[b].srcset,i=l.s.dynamicEl[b].sizes}else{var o=l.$items.eq(b);if(o.attr("data-poster")&&(m=!0,g=o.attr("data-poster")),j=o.attr("data-html"),f=o.attr("href")||o.attr("data-src"),k=o.attr("title")||o.find("img").first().attr("alt"),o.attr("data-responsive")){n(o.attr("data-responsive").split(","))}h=o.attr("data-srcset"),i=o.attr("data-sizes")}var p=!1;l.s.dynamic?l.s.dynamicEl[b].iframe&&(p=!0):"true"===l.$items.eq(b).attr("data-iframe")&&(p=!0);var q=l.isVideo(f,b);if(!l.$slide.eq(b).hasClass("lg-loaded")){if(p)l.$slide.eq(b).prepend('<div class="lg-video-cont lg-has-iframe" style="max-width:'+l.s.iframeMaxWidth+'"><div class="lg-video"><iframe class="lg-object" frameborder="0" src="'+f+'"  allowfullscreen="true"></iframe></div></div>');else if(m){var r="";r=q&&q.youtube?"lg-has-youtube":q&&q.vimeo?"lg-has-vimeo":"lg-has-html5",l.$slide.eq(b).prepend('<div class="lg-video-cont '+r+' "><div class="lg-video"><span class="lg-video-play"></span><img class="lg-object lg-has-poster" src="'+g+'" /></div></div>')}else q?(l.$slide.eq(b).prepend('<div class="lg-video-cont "><div class="lg-video"></div></div>'),l.$el.trigger("hasVideo.lg",[b,f,j])):(k=k?'alt="'+k+'"':"",l.$slide.eq(b).prepend('<div class="lg-img-wrap"><img class="lg-object lg-image" '+k+' src="'+f+'" /></div>'));if(l.$el.trigger("onAferAppendSlide.lg",[b]),e=l.$slide.eq(b).find(".lg-object"),i&&e.attr("sizes",i),h&&(e.attr("srcset",h),this.s.supportLegacyBrowser))try{picturefill({elements:[e[0]]})}catch(a){console.warn("lightGallery :- If you want srcset to be supported for older browser please include picturefil version 2 javascript library in your document.")}".lg-sub-html"!==this.s.appendSubHtmlTo&&l.addHtml(b),l.$slide.eq(b).addClass("lg-loaded")}l.$slide.eq(b).find(".lg-object").on("load.lg error.lg",function(){var c=0;d&&!a("body").hasClass("lg-from-hash")&&(c=d),setTimeout(function(){l.$slide.eq(b).addClass("lg-complete"),l.$el.trigger("onSlideItemLoad.lg",[b,d||0])},c)}),q&&q.html5&&!m&&l.$slide.eq(b).addClass("lg-complete"),!0===c&&(l.$slide.eq(b).hasClass("lg-complete")?l.preload(b):l.$slide.eq(b).find(".lg-object").on("load.lg error.lg",function(){l.preload(b)}))},b.prototype.slide=function(b,c,d,e){var f=this.$outer.find(".lg-current").index(),g=this;if(!g.lGalleryOn||f!==b){var h=this.$slide.length,i=g.lGalleryOn?this.s.speed:0;if(!g.lgBusy){if(this.s.download){var j;j=g.s.dynamic?!1!==g.s.dynamicEl[b].downloadUrl&&(g.s.dynamicEl[b].downloadUrl||g.s.dynamicEl[b].src):"false"!==g.$items.eq(b).attr("data-download-url")&&(g.$items.eq(b).attr("data-download-url")||g.$items.eq(b).attr("href")||g.$items.eq(b).attr("data-src")),j?(a("#lg-download").attr("href",j),g.$outer.removeClass("lg-hide-download")):g.$outer.addClass("lg-hide-download")}if(this.$el.trigger("onBeforeSlide.lg",[f,b,c,d]),g.lgBusy=!0,clearTimeout(g.hideBarTimeout),".lg-sub-html"===this.s.appendSubHtmlTo&&setTimeout(function(){g.addHtml(b)},i),this.arrowDisable(b),e||(b<f?e="prev":b>f&&(e="next")),c){this.$slide.removeClass("lg-prev-slide lg-current lg-next-slide");var k,l;h>2?(k=b-1,l=b+1,0===b&&f===h-1?(l=0,k=h-1):b===h-1&&0===f&&(l=0,k=h-1)):(k=0,l=1),"prev"===e?g.$slide.eq(l).addClass("lg-next-slide"):g.$slide.eq(k).addClass("lg-prev-slide"),g.$slide.eq(b).addClass("lg-current")}else g.$outer.addClass("lg-no-trans"),this.$slide.removeClass("lg-prev-slide lg-next-slide"),"prev"===e?(this.$slide.eq(b).addClass("lg-prev-slide"),this.$slide.eq(f).addClass("lg-next-slide")):(this.$slide.eq(b).addClass("lg-next-slide"),this.$slide.eq(f).addClass("lg-prev-slide")),setTimeout(function(){g.$slide.removeClass("lg-current"),g.$slide.eq(b).addClass("lg-current"),g.$outer.removeClass("lg-no-trans")},50);g.lGalleryOn?(setTimeout(function(){g.loadContent(b,!0,0)},this.s.speed+50),setTimeout(function(){g.lgBusy=!1,g.$el.trigger("onAfterSlide.lg",[f,b,c,d])},this.s.speed)):(g.loadContent(b,!0,g.s.backdropDuration),g.lgBusy=!1,g.$el.trigger("onAfterSlide.lg",[f,b,c,d])),g.lGalleryOn=!0,this.s.counter&&a("#lg-counter-current").text(b+1)}g.index=b}},b.prototype.goToNextSlide=function(a){var b=this,c=b.s.loop;a&&b.$slide.length<3&&(c=!1),b.lgBusy||(b.index+1<b.$slide.length?(b.index++,b.$el.trigger("onBeforeNextSlide.lg",[b.index]),b.slide(b.index,a,!1,"next")):c?(b.index=0,b.$el.trigger("onBeforeNextSlide.lg",[b.index]),b.slide(b.index,a,!1,"next")):b.s.slideEndAnimatoin&&!a&&(b.$outer.addClass("lg-right-end"),setTimeout(function(){b.$outer.removeClass("lg-right-end")},400)))},b.prototype.goToPrevSlide=function(a){var b=this,c=b.s.loop;a&&b.$slide.length<3&&(c=!1),b.lgBusy||(b.index>0?(b.index--,b.$el.trigger("onBeforePrevSlide.lg",[b.index,a]),b.slide(b.index,a,!1,"prev")):c?(b.index=b.$items.length-1,b.$el.trigger("onBeforePrevSlide.lg",[b.index,a]),b.slide(b.index,a,!1,"prev")):b.s.slideEndAnimatoin&&!a&&(b.$outer.addClass("lg-left-end"),setTimeout(function(){b.$outer.removeClass("lg-left-end")},400)))},b.prototype.keyPress=function(){var b=this;this.$items.length>1&&a(window).on("keyup.lg",function(a){b.$items.length>1&&(37===a.keyCode&&(a.preventDefault(),b.goToPrevSlide()),39===a.keyCode&&(a.preventDefault(),b.goToNextSlide()))}),a(window).on("keydown.lg",function(a){!0===b.s.escKey&&27===a.keyCode&&(a.preventDefault(),b.$outer.hasClass("lg-thumb-open")?b.$outer.removeClass("lg-thumb-open"):b.destroy())})},b.prototype.arrow=function(){var a=this;this.$outer.find(".lg-prev").on("click.lg",function(){a.goToPrevSlide()}),this.$outer.find(".lg-next").on("click.lg",function(){a.goToNextSlide()})},b.prototype.arrowDisable=function(a){!this.s.loop&&this.s.hideControlOnEnd&&(a+1<this.$slide.length?this.$outer.find(".lg-next").removeAttr("disabled").removeClass("disabled"):this.$outer.find(".lg-next").attr("disabled","disabled").addClass("disabled"),a>0?this.$outer.find(".lg-prev").removeAttr("disabled").removeClass("disabled"):this.$outer.find(".lg-prev").attr("disabled","disabled").addClass("disabled"))},b.prototype.setTranslate=function(a,b,c){this.s.useLeft?a.css("left",b):a.css({transform:"translate3d("+b+"px, "+c+"px, 0px)"})},b.prototype.touchMove=function(b,c){var d=c-b;Math.abs(d)>15&&(this.$outer.addClass("lg-dragging"),this.setTranslate(this.$slide.eq(this.index),d,0),this.setTranslate(a(".lg-prev-slide"),-this.$slide.eq(this.index).width()+d,0),this.setTranslate(a(".lg-next-slide"),this.$slide.eq(this.index).width()+d,0))},b.prototype.touchEnd=function(a){var b=this;"lg-slide"!==b.s.mode&&b.$outer.addClass("lg-slide"),this.$slide.not(".lg-current, .lg-prev-slide, .lg-next-slide").css("opacity","0"),setTimeout(function(){b.$outer.removeClass("lg-dragging"),a<0&&Math.abs(a)>b.s.swipeThreshold?b.goToNextSlide(!0):a>0&&Math.abs(a)>b.s.swipeThreshold?b.goToPrevSlide(!0):Math.abs(a)<5&&b.$el.trigger("onSlideClick.lg"),b.$slide.removeAttr("style")}),setTimeout(function(){b.$outer.hasClass("lg-dragging")||"lg-slide"===b.s.mode||b.$outer.removeClass("lg-slide")},b.s.speed+100)},b.prototype.enableSwipe=function(){var a=this,b=0,c=0,d=!1;a.s.enableSwipe&&a.doCss()&&(a.$slide.on("touchstart.lg",function(c){a.$outer.hasClass("lg-zoomed")||a.lgBusy||(c.preventDefault(),a.manageSwipeClass(),b=c.originalEvent.targetTouches[0].pageX)}),a.$slide.on("touchmove.lg",function(e){a.$outer.hasClass("lg-zoomed")||(e.preventDefault(),c=e.originalEvent.targetTouches[0].pageX,a.touchMove(b,c),d=!0)}),a.$slide.on("touchend.lg",function(){a.$outer.hasClass("lg-zoomed")||(d?(d=!1,a.touchEnd(c-b)):a.$el.trigger("onSlideClick.lg"))}))},b.prototype.enableDrag=function(){var b=this,c=0,d=0,e=!1,f=!1;b.s.enableDrag&&b.doCss()&&(b.$slide.on("mousedown.lg",function(d){b.$outer.hasClass("lg-zoomed")||b.lgBusy||a(d.target).text().trim()||(d.preventDefault(),b.manageSwipeClass(),c=d.pageX,e=!0,b.$outer.scrollLeft+=1,b.$outer.scrollLeft-=1,b.$outer.removeClass("lg-grab").addClass("lg-grabbing"),b.$el.trigger("onDragstart.lg"))}),a(window).on("mousemove.lg",function(a){e&&(f=!0,d=a.pageX,b.touchMove(c,d),b.$el.trigger("onDragmove.lg"))}),a(window).on("mouseup.lg",function(g){f?(f=!1,b.touchEnd(d-c),b.$el.trigger("onDragend.lg")):(a(g.target).hasClass("lg-object")||a(g.target).hasClass("lg-video-play"))&&b.$el.trigger("onSlideClick.lg"),e&&(e=!1,b.$outer.removeClass("lg-grabbing").addClass("lg-grab"))}))},b.prototype.manageSwipeClass=function(){var a=this.index+1,b=this.index-1;this.s.loop&&this.$slide.length>2&&(0===this.index?b=this.$slide.length-1:this.index===this.$slide.length-1&&(a=0)),this.$slide.removeClass("lg-next-slide lg-prev-slide"),b>-1&&this.$slide.eq(b).addClass("lg-prev-slide"),this.$slide.eq(a).addClass("lg-next-slide")},b.prototype.mousewheel=function(){var a=this;a.$outer.on("mousewheel.lg",function(b){b.deltaY&&(b.deltaY>0?a.goToPrevSlide():a.goToNextSlide(),b.preventDefault())})},b.prototype.closeGallery=function(){var b=this,c=!1;this.$outer.find(".lg-close").on("click.lg",function(){b.destroy()}),b.s.closable&&(b.$outer.on("mousedown.lg",function(b){c=!!(a(b.target).is(".lg-outer")||a(b.target).is(".lg-item ")||a(b.target).is(".lg-img-wrap"))}),b.$outer.on("mousemove.lg",function(){c=!1}),b.$outer.on("mouseup.lg",function(d){(a(d.target).is(".lg-outer")||a(d.target).is(".lg-item ")||a(d.target).is(".lg-img-wrap")&&c)&&(b.$outer.hasClass("lg-dragging")||b.destroy())}))},b.prototype.destroy=function(b){var c=this;b||(c.$el.trigger("onBeforeClose.lg"),a(window).scrollTop(c.prevScrollTop)),b&&(c.s.dynamic||this.$items.off("click.lg click.lgcustom"),a.removeData(c.el,"lightGallery")),this.$el.off(".lg.tm"),a.each(a.fn.lightGallery.modules,function(a){c.modules[a]&&c.modules[a].destroy()}),this.lGalleryOn=!1,clearTimeout(c.hideBarTimeout),this.hideBarTimeout=!1,a(window).off(".lg"),a("body").removeClass("lg-on lg-from-hash"),c.$outer&&c.$outer.removeClass("lg-visible"),a(".lg-backdrop").removeClass("in"),setTimeout(function(){c.$outer&&c.$outer.remove(),a(".lg-backdrop").remove(),b||c.$el.trigger("onCloseAfter.lg"),c.$el.focus()},c.s.backdropDuration+50)},a.fn.lightGallery=function(c){return this.each(function(){if(a.data(this,"lightGallery"))try{a(this).data("lightGallery").init()}catch(a){console.error("lightGallery has not initiated properly",a)}else a.data(this,"lightGallery",new b(this,c))})},a.fn.lightGallery.modules={}}()}),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(){"use strict";var b={autoplay:!1,pause:5e3,progressBar:!0,fourceAutoplay:!1,autoplayControls:!0,appendAutoplayControlsTo:".lg-toolbar"},c=function(c){return this.core=a(c).data("lightGallery"),this.$el=a(c),!(this.core.$items.length<2)&&(this.core.s=a.extend({},b,this.core.s),this.interval=!1,this.fromAuto=!0,this.canceledOnTouch=!1,this.fourceAutoplayTemp=this.core.s.fourceAutoplay,this.core.doCss()||(this.core.s.progressBar=!1),this.init(),this)};c.prototype.init=function(){var a=this;a.core.s.autoplayControls&&a.controls(),a.core.s.progressBar&&a.core.$outer.find(".lg").append('<div class="lg-progress-bar"><div class="lg-progress"></div></div>'),a.progress(),a.core.s.autoplay&&a.$el.one("onSlideItemLoad.lg.tm",function(){a.startlAuto()}),a.$el.on("onDragstart.lg.tm touchstart.lg.tm",function(){a.interval&&(a.cancelAuto(),a.canceledOnTouch=!0)}),a.$el.on("onDragend.lg.tm touchend.lg.tm onSlideClick.lg.tm",function(){!a.interval&&a.canceledOnTouch&&(a.startlAuto(),a.canceledOnTouch=!1)})},c.prototype.progress=function(){var a,b,c=this;c.$el.on("onBeforeSlide.lg.tm",function(){c.core.s.progressBar&&c.fromAuto&&(a=c.core.$outer.find(".lg-progress-bar"),b=c.core.$outer.find(".lg-progress"),c.interval&&(b.removeAttr("style"),a.removeClass("lg-start"),setTimeout(function(){b.css("transition","width "+(c.core.s.speed+c.core.s.pause)+"ms ease 0s"),a.addClass("lg-start")},20))),c.fromAuto||c.core.s.fourceAutoplay||c.cancelAuto(),c.fromAuto=!1})},c.prototype.controls=function(){var b=this;a(this.core.s.appendAutoplayControlsTo).append('<button type="button" aria-label="Toggle autoplay" class="lg-autoplay-button lg-icon"></button>'),b.core.$outer.find(".lg-autoplay-button").on("click.lg",function(){a(b.core.$outer).hasClass("lg-show-autoplay")?(b.cancelAuto(),b.core.s.fourceAutoplay=!1):b.interval||(b.startlAuto(),b.core.s.fourceAutoplay=b.fourceAutoplayTemp)})},c.prototype.startlAuto=function(){var a=this;a.core.$outer.find(".lg-progress").css("transition","width "+(a.core.s.speed+a.core.s.pause)+"ms ease 0s"),a.core.$outer.addClass("lg-show-autoplay"),a.core.$outer.find(".lg-progress-bar").addClass("lg-start"),a.interval=setInterval(function(){a.core.index+1<a.core.$items.length?a.core.index++:a.core.index=0,a.fromAuto=!0,a.core.slide(a.core.index,!1,!1,"next")},a.core.s.speed+a.core.s.pause)},c.prototype.cancelAuto=function(){clearInterval(this.interval),this.interval=!1,this.core.$outer.find(".lg-progress").removeAttr("style"),this.core.$outer.removeClass("lg-show-autoplay"),this.core.$outer.find(".lg-progress-bar").removeClass("lg-start")},c.prototype.destroy=function(){this.cancelAuto(),this.core.$outer.find(".lg-progress-bar").remove()},a.fn.lightGallery.modules.autoplay=c}()}),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(){"use strict";function b(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement}var c={fullScreen:!0},d=function(b){return this.core=a(b).data("lightGallery"),this.$el=a(b),this.core.s=a.extend({},c,this.core.s),this.init(),this};d.prototype.init=function(){var a="";if(this.core.s.fullScreen){if(!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled))return;a='<button type="button" aria-label="Toggle fullscreen" class="lg-fullscreen lg-icon"></button>',this.core.$outer.find(".lg-toolbar").append(a),this.fullScreen()}},d.prototype.requestFullscreen=function(){var a=document.documentElement;a.requestFullscreen?a.requestFullscreen():a.msRequestFullscreen?a.msRequestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullscreen&&a.webkitRequestFullscreen()},d.prototype.exitFullscreen=function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},d.prototype.fullScreen=function(){var c=this;a(document).on("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg",function(){c.core.$outer.toggleClass("lg-fullscreen-on")}),this.core.$outer.find(".lg-fullscreen").on("click.lg",function(){b()?c.exitFullscreen():c.requestFullscreen()})},d.prototype.destroy=function(){b()&&this.exitFullscreen(),a(document).off("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg")},a.fn.lightGallery.modules.fullscreen=d}()}),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(0,function(a){!function(){"use strict";var b={pager:!1},c=function(c){return this.core=a(c).data("lightGallery"),this.$el=a(c),this.core.s=a.extend({},b,this.core.s),this.core.s.pager&&this.core.$items.length>1&&this.init(),this};c.prototype.init=function(){var b,c,d,e=this,f="";if(e.core.$outer.find(".lg").append('<div class="lg-pager-outer"></div>'),e.core.s.dynamic)for(var g=0;g<e.core.s.dynamicEl.length;g++)f+='<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+e.core.s.dynamicEl[g].thumb+'" /></div></span>';else e.core.$items.each(function(){e.core.s.exThumbImage?f+='<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+a(this).attr(e.core.s.exThumbImage)+'" /></div></span>':f+='<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+a(this).find("img").attr("src")+'" /></div></span>'});c=e.core.$outer.find(".lg-pager-outer"),c.html(f),b=e.core.$outer.find(".lg-pager-cont"),b.on("click.lg touchend.lg",function(){var b=a(this);e.core.index=b.index(),e.core.slide(e.core.index,!1,!0,!1)}),c.on("mouseover.lg",function(){clearTimeout(d),c.addClass("lg-pager-hover")}),c.on("mouseout.lg",function(){d=setTimeout(function(){c.removeClass("lg-pager-hover")})}),e.core.$el.on("onBeforeSlide.lg.tm",function(a,c,d){b.removeClass("lg-pager-active"),b.eq(d).addClass("lg-pager-active")})},c.prototype.destroy=function(){},a.fn.lightGallery.modules.pager=c}()}),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(){"use strict";var b={thumbnail:!0,animateThumb:!0,currentPagerPosition:"middle",thumbWidth:100,thumbHeight:"80px",thumbContHeight:100,thumbMargin:5,exThumbImage:!1,showThumbByDefault:!0,toogleThumb:!0,pullCaptionUp:!0,enableThumbDrag:!0,enableThumbSwipe:!0,swipeThreshold:50,loadYoutubeThumbnail:!0,youtubeThumbSize:1,loadVimeoThumbnail:!0,vimeoThumbSize:"thumbnail_small",loadDailymotionThumbnail:!0},c=function(c){return this.core=a(c).data("lightGallery"),this.core.s=a.extend({},b,this.core.s),this.$el=a(c),this.$thumbOuter=null,this.thumbOuterWidth=0,this.thumbTotalWidth=this.core.$items.length*(this.core.s.thumbWidth+this.core.s.thumbMargin),this.thumbIndex=this.core.index,this.core.s.animateThumb&&(this.core.s.thumbHeight="100%"),this.left=0,this.init(),this};c.prototype.init=function(){var a=this;this.core.s.thumbnail&&this.core.$items.length>1&&(this.core.s.showThumbByDefault&&setTimeout(function(){a.core.$outer.addClass("lg-thumb-open")},700),this.core.s.pullCaptionUp&&this.core.$outer.addClass("lg-pull-caption-up"),this.build(),this.core.s.animateThumb&&this.core.doCss()?(this.core.s.enableThumbDrag&&this.enableThumbDrag(),this.core.s.enableThumbSwipe&&this.enableThumbSwipe(),this.thumbClickable=!1):this.thumbClickable=!0,this.toogle(),this.thumbkeyPress())},c.prototype.build=function(){function b(a,b,c){var g,h=d.core.isVideo(a,c)||{},i="";h.youtube||h.vimeo||h.dailymotion?h.youtube?g=d.core.s.loadYoutubeThumbnail?"//img.youtube.com/vi/"+h.youtube[1]+"/"+d.core.s.youtubeThumbSize+".jpg":b:h.vimeo?d.core.s.loadVimeoThumbnail?(g="//i.vimeocdn.com/video/error_"+f+".jpg",i=h.vimeo[1]):g=b:h.dailymotion&&(g=d.core.s.loadDailymotionThumbnail?"//www.dailymotion.com/thumbnail/video/"+h.dailymotion[1]:b):g=b,e+='<div data-vimeo-id="'+i+'" class="lg-thumb-item" style="width:'+d.core.s.thumbWidth+"px; height: "+d.core.s.thumbHeight+"; margin-right: "+d.core.s.thumbMargin+'px"><img src="'+g+'" /></div>',i=""}var c,d=this,e="",f="",g='<div class="lg-thumb-outer"><div class="lg-thumb lg-group"></div></div>';switch(this.core.s.vimeoThumbSize){case"thumbnail_large":f="640";break;case"thumbnail_medium":f="200x150";break;case"thumbnail_small":f="100x75"}if(d.core.$outer.addClass("lg-has-thumb"),d.core.$outer.find(".lg").append(g),d.$thumbOuter=d.core.$outer.find(".lg-thumb-outer"),d.thumbOuterWidth=d.$thumbOuter.width(),d.core.s.animateThumb&&d.core.$outer.find(".lg-thumb").css({width:d.thumbTotalWidth+"px",position:"relative"}),this.core.s.animateThumb&&d.$thumbOuter.css("height",d.core.s.thumbContHeight+"px"),d.core.s.dynamic)for(var h=0;h<d.core.s.dynamicEl.length;h++)b(d.core.s.dynamicEl[h].src,d.core.s.dynamicEl[h].thumb,h);else d.core.$items.each(function(c){d.core.s.exThumbImage?b(a(this).attr("href")||a(this).attr("data-src"),a(this).attr(d.core.s.exThumbImage),c):b(a(this).attr("href")||a(this).attr("data-src"),a(this).find("img").attr("src"),c)});d.core.$outer.find(".lg-thumb").html(e),c=d.core.$outer.find(".lg-thumb-item"),c.each(function(){var b=a(this),c=b.attr("data-vimeo-id");c&&a.getJSON("//www.vimeo.com/api/v2/video/"+c+".json?callback=?",{format:"json"},function(a){b.find("img").attr("src",a[0][d.core.s.vimeoThumbSize])})}),c.eq(d.core.index).addClass("active"),d.core.$el.on("onBeforeSlide.lg.tm",function(){c.removeClass("active"),c.eq(d.core.index).addClass("active")}),c.on("click.lg touchend.lg",function(){var b=a(this);setTimeout(function(){(d.thumbClickable&&!d.core.lgBusy||!d.core.doCss())&&(d.core.index=b.index(),d.core.slide(d.core.index,!1,!0,!1))},50)}),d.core.$el.on("onBeforeSlide.lg.tm",function(){d.animateThumb(d.core.index)}),a(window).on("resize.lg.thumb orientationchange.lg.thumb",function(){setTimeout(function(){d.animateThumb(d.core.index),d.thumbOuterWidth=d.$thumbOuter.width()},200)})},c.prototype.setTranslate=function(a){this.core.$outer.find(".lg-thumb").css({transform:"translate3d(-"+a+"px, 0px, 0px)"})},c.prototype.animateThumb=function(a){var b=this.core.$outer.find(".lg-thumb");if(this.core.s.animateThumb){var c;switch(this.core.s.currentPagerPosition){case"left":c=0;break;case"middle":c=this.thumbOuterWidth/2-this.core.s.thumbWidth/2;break;case"right":c=this.thumbOuterWidth-this.core.s.thumbWidth}this.left=(this.core.s.thumbWidth+this.core.s.thumbMargin)*a-1-c,this.left>this.thumbTotalWidth-this.thumbOuterWidth&&(this.left=this.thumbTotalWidth-this.thumbOuterWidth),this.left<0&&(this.left=0),this.core.lGalleryOn?(b.hasClass("on")||this.core.$outer.find(".lg-thumb").css("transition-duration",this.core.s.speed+"ms"),this.core.doCss()||b.animate({left:-this.left+"px"},this.core.s.speed)):this.core.doCss()||b.css("left",-this.left+"px"),this.setTranslate(this.left)}},c.prototype.enableThumbDrag=function(){var b=this,c=0,d=0,e=!1,f=!1,g=0;b.$thumbOuter.addClass("lg-grab"),b.core.$outer.find(".lg-thumb").on("mousedown.lg.thumb",function(a){b.thumbTotalWidth>b.thumbOuterWidth&&(a.preventDefault(),c=a.pageX,e=!0,b.core.$outer.scrollLeft+=1,b.core.$outer.scrollLeft-=1,b.thumbClickable=!1,b.$thumbOuter.removeClass("lg-grab").addClass("lg-grabbing"))}),a(window).on("mousemove.lg.thumb",function(a){e&&(g=b.left,f=!0,d=a.pageX,b.$thumbOuter.addClass("lg-dragging"),g-=d-c,g>b.thumbTotalWidth-b.thumbOuterWidth&&(g=b.thumbTotalWidth-b.thumbOuterWidth),g<0&&(g=0),b.setTranslate(g))}),a(window).on("mouseup.lg.thumb",function(){f?(f=!1,b.$thumbOuter.removeClass("lg-dragging"),b.left=g,Math.abs(d-c)<b.core.s.swipeThreshold&&(b.thumbClickable=!0)):b.thumbClickable=!0,e&&(e=!1,b.$thumbOuter.removeClass("lg-grabbing").addClass("lg-grab"))})},c.prototype.enableThumbSwipe=function(){var a=this,b=0,c=0,d=!1,e=0;a.core.$outer.find(".lg-thumb").on("touchstart.lg",function(c){a.thumbTotalWidth>a.thumbOuterWidth&&(c.preventDefault(),b=c.originalEvent.targetTouches[0].pageX,a.thumbClickable=!1)}),a.core.$outer.find(".lg-thumb").on("touchmove.lg",function(f){a.thumbTotalWidth>a.thumbOuterWidth&&(f.preventDefault(),c=f.originalEvent.targetTouches[0].pageX,d=!0,a.$thumbOuter.addClass("lg-dragging"),e=a.left,e-=c-b,e>a.thumbTotalWidth-a.thumbOuterWidth&&(e=a.thumbTotalWidth-a.thumbOuterWidth),e<0&&(e=0),a.setTranslate(e))}),a.core.$outer.find(".lg-thumb").on("touchend.lg",function(){a.thumbTotalWidth>a.thumbOuterWidth&&d?(d=!1,a.$thumbOuter.removeClass("lg-dragging"),Math.abs(c-b)<a.core.s.swipeThreshold&&(a.thumbClickable=!0),a.left=e):a.thumbClickable=!0})},c.prototype.toogle=function(){var a=this;a.core.s.toogleThumb&&(a.core.$outer.addClass("lg-can-toggle"),a.$thumbOuter.append('<button type="button" aria-label="Toggle thumbnails" class="lg-toogle-thumb lg-icon"></button>'),a.core.$outer.find(".lg-toogle-thumb").on("click.lg",function(){a.core.$outer.toggleClass("lg-thumb-open")}))},c.prototype.thumbkeyPress=function(){var b=this;a(window).on("keydown.lg.thumb",function(a){38===a.keyCode?(a.preventDefault(),b.core.$outer.addClass("lg-thumb-open")):40===a.keyCode&&(a.preventDefault(),b.core.$outer.removeClass("lg-thumb-open"))})},c.prototype.destroy=function(){this.core.s.thumbnail&&this.core.$items.length>1&&(a(window).off("resize.lg.thumb orientationchange.lg.thumb keydown.lg.thumb"),this.$thumbOuter.remove(),this.core.$outer.removeClass("lg-has-thumb"))},a.fn.lightGallery.modules.Thumbnail=c}()}),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(){"use strict";function b(a,b,c,d){var e=this;if(e.core.$slide.eq(b).find(".lg-video").append(e.loadVideo(c,"lg-object",!0,b,d)),d)if(e.core.s.videojs)try{videojs(e.core.$slide.eq(b).find(".lg-html5").get(0),e.core.s.videojsOptions,function(){!e.videoLoaded&&e.core.s.autoplayFirstVideo&&this.play()})}catch(a){console.error("lightGallery:- Make sure you have included videojs")}else!e.videoLoaded&&e.core.s.autoplayFirstVideo&&e.core.$slide.eq(b).find(".lg-html5").get(0).play()}function c(a,b){var c=this.core.$slide.eq(b).find(".lg-video-cont");c.hasClass("lg-has-iframe")||(c.css("max-width",this.core.s.videoMaxWidth),this.videoLoaded=!0)}function d(b,c,d){var e=this,f=e.core.$slide.eq(c),g=f.find(".lg-youtube").get(0),h=f.find(".lg-vimeo").get(0),i=f.find(".lg-dailymotion").get(0),j=f.find(".lg-vk").get(0),k=f.find(".lg-html5").get(0);if(g)g.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*");else if(h)try{new Vimeo.Player(h).pause().catch(function(a){console.error("Unable to pause the video:",a.name)})}catch(a){console.warn("lightGallery:- Make sure you have included https://github.com/vimeo/player.js")}else if(i)i.contentWindow.postMessage("pause","*");else if(k)if(e.core.s.videojs)try{videojs(k).pause()}catch(a){console.error("lightGallery:- Make sure you have included videojs")}else k.pause();j&&a(j).attr("src",a(j).attr("src").replace("&autoplay","&noplay"));var l;l=e.core.s.dynamic?e.core.s.dynamicEl[d].src:e.core.$items.eq(d).attr("href")||e.core.$items.eq(d).attr("data-src");var m=e.core.isVideo(l,d)||{};(m.youtube||m.vimeo||m.dailymotion||m.vk)&&e.core.$outer.addClass("lg-hide-download")}var e={videoMaxWidth:"855px",autoplayFirstVideo:!0,youtubePlayerParams:!1,vimeoPlayerParams:!1,dailymotionPlayerParams:!1,vkPlayerParams:!1,videojs:!1,videojsOptions:{}},f=function(b){return this.core=a(b).data("lightGallery"),this.$el=a(b),this.core.s=a.extend({},e,this.core.s),this.videoLoaded=!1,this.init(),this};f.prototype.init=function(){var e=this;e.core.$el.on("hasVideo.lg.tm",b.bind(this)),e.core.$el.on("onAferAppendSlide.lg.tm",c.bind(this)),e.core.doCss()&&e.core.$items.length>1&&(e.core.s.enableSwipe||e.core.s.enableDrag)?e.core.$el.on("onSlideClick.lg.tm",function(){var a=e.core.$slide.eq(e.core.index);e.loadVideoOnclick(a)}):e.core.$slide.on("click.lg",function(){e.loadVideoOnclick(a(this))}),e.core.$el.on("onBeforeSlide.lg.tm",d.bind(this)),e.core.$el.on("onAfterSlide.lg.tm",function(a,b){e.core.$slide.eq(b).removeClass("lg-video-playing")}),e.core.s.autoplayFirstVideo&&e.core.$el.on("onAferAppendSlide.lg.tm",function(a,b){if(!e.core.lGalleryOn){var c=e.core.$slide.eq(b);setTimeout(function(){e.loadVideoOnclick(c)},100)}})},f.prototype.loadVideo=function(b,c,d,e,f){var g,h=this,i="",j=1,k="",l=this.core.isVideo(b,e)||{};if(g=h.core.s.dynamic?h.core.s.dynamicEl[h.core.index].title:h.core.$items.eq(h.core.index).attr("title")||h.core.$items.eq(h.core.index).find("img").first().attr("alt"),g=g?'title="'+g+'"':"",d&&(j=this.videoLoaded?0:this.core.s.autoplayFirstVideo?1:0),l.youtube)k="?wmode=opaque&autoplay="+j+"&enablejsapi=1",this.core.s.youtubePlayerParams&&(k=k+"&"+a.param(this.core.s.youtubePlayerParams)),i='<iframe allow="autoplay" class="lg-video-object lg-youtube '+c+'" '+g+' width="560" height="315" src="//www.youtube.com/embed/'+l.youtube[1]+k+'" frameborder="0" allowfullscreen></iframe>';else if(l.vimeo)k="?autoplay="+j,this.core.s.vimeoPlayerParams&&(k=k+"&"+a.param(this.core.s.vimeoPlayerParams)),i='<iframe allow="autoplay" class="lg-video-object lg-vimeo '+c+'" '+g+' width="560" height="315"  src="//player.vimeo.com/video/'+l.vimeo[1]+k+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';else if(l.dailymotion)k="?wmode=opaque&autoplay="+j+"&api=postMessage",this.core.s.dailymotionPlayerParams&&(k=k+"&"+a.param(this.core.s.dailymotionPlayerParams)),i='<iframe allow="autoplay" class="lg-video-object lg-dailymotion '+c+'" '+g+' width="560" height="315" src="//www.dailymotion.com/embed/video/'+l.dailymotion[1]+k+'" frameborder="0" allowfullscreen></iframe>';else if(l.html5){var m=f.substring(0,1);"."!==m&&"#"!==m||(f=a(f).html()),i=f}else l.vk&&(k="&autoplay="+j,this.core.s.vkPlayerParams&&(k=k+"&"+a.param(this.core.s.vkPlayerParams)),i='<iframe allow="autoplay" class="lg-video-object lg-vk '+c+'" '+g+' width="560" height="315" src="//vk.com/video_ext.php?'+l.vk[1]+k+'" frameborder="0" allowfullscreen></iframe>');return i},f.prototype.loadVideoOnclick=function(a){var b=this;if(a.find(".lg-object").hasClass("lg-has-poster")&&a.find(".lg-object").is(":visible"))if(a.hasClass("lg-has-video")){var c=a.find(".lg-youtube").get(0),d=a.find(".lg-vimeo").get(0),e=a.find(".lg-dailymotion").get(0),f=a.find(".lg-html5").get(0);if(c)c.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*");else if(d)try{new Vimeo.Player(d).play().catch(function(a){console.error("error playing the video:",a.name)})}catch(a){console.warn("lightGallery:- Make sure you have included https://github.com/vimeo/player.js")}else if(e)e.contentWindow.postMessage("play","*");else if(f)if(b.core.s.videojs)try{videojs(f).play()}catch(a){console.error("lightGallery:- Make sure you have included videojs")}else f.play();a.addClass("lg-video-playing")}else{a.addClass("lg-video-playing lg-has-video");var g,h,i=function(c,d){if(a.find(".lg-video").append(b.loadVideo(c,"",!1,b.core.index,d)),d)if(b.core.s.videojs)try{videojs(b.core.$slide.eq(b.core.index).find(".lg-html5").get(0),b.core.s.videojsOptions,function(){this.play()})}catch(a){console.error("lightGallery:- Make sure you have included videojs")}else b.core.$slide.eq(b.core.index).find(".lg-html5").get(0).play()};b.core.s.dynamic?(g=b.core.s.dynamicEl[b.core.index].src,h=b.core.s.dynamicEl[b.core.index].html,i(g,h)):(g=b.core.$items.eq(b.core.index).attr("href")||b.core.$items.eq(b.core.index).attr("data-src"),h=b.core.$items.eq(b.core.index).attr("data-html"),i(g,h));var j=a.find(".lg-object");a.find(".lg-video").append(j),a.find(".lg-video-object").hasClass("lg-html5")||(a.removeClass("lg-complete"),a.find(".lg-video-object").on("load.lg error.lg",function(){a.addClass("lg-complete")}))}},f.prototype.destroy=function(){this.videoLoaded=!1},a.fn.lightGallery.modules.video=f}()}),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(){"use strict";var b=function(){var a=!1,b=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);return b&&parseInt(b[2],10)<54&&(a=!0),a},c={scale:1,zoom:!0,actualSize:!0,enableZoomAfter:300,useLeftForZoom:b()},d=function(b){return this.core=a(b).data("lightGallery"),this.core.s=a.extend({},c,this.core.s),this.core.s.zoom&&this.core.doCss()&&(this.init(),this.zoomabletimeout=!1,this.pageX=a(window).width()/2,this.pageY=a(window).height()/2+a(window).scrollTop()),this};d.prototype.init=function(){var b=this,c='<button type="button" aria-label="Zoom in" id="lg-zoom-in" class="lg-icon"></button><button type="button" aria-label="Zoom out" id="lg-zoom-out" class="lg-icon"></button>';b.core.s.actualSize&&(c+='<button type="button" aria-label="Actual size" id="lg-actual-size" class="lg-icon"></button>'),b.core.s.useLeftForZoom?b.core.$outer.addClass("lg-use-left-for-zoom"):b.core.$outer.addClass("lg-use-transition-for-zoom"),this.core.$outer.find(".lg-toolbar").append(c),b.core.$el.on("onSlideItemLoad.lg.tm.zoom",function(c,d,e){var f=b.core.s.enableZoomAfter+e;a("body").hasClass("lg-from-hash")&&e?f=0:a("body").removeClass("lg-from-hash"),b.zoomabletimeout=setTimeout(function(){b.core.$slide.eq(d).addClass("lg-zoomable")},f+30)});var d=1,e=function(c){var d,e,f=b.core.$outer.find(".lg-current .lg-image"),g=(a(window).width()-f.prop("offsetWidth"))/2,h=(a(window).height()-f.prop("offsetHeight"))/2+a(window).scrollTop();d=b.pageX-g,e=b.pageY-h;var i=(c-1)*d,j=(c-1)*e;f.css("transform","scale3d("+c+", "+c+", 1)").attr("data-scale",c),b.core.s.useLeftForZoom?f.parent().css({left:-i+"px",top:-j+"px"}).attr("data-x",i).attr("data-y",j):f.parent().css("transform","translate3d(-"+i+"px, -"+j+"px, 0)").attr("data-x",i).attr("data-y",j)},f=function(){d>1?b.core.$outer.addClass("lg-zoomed"):b.resetZoom(),d<1&&(d=1),e(d)},g=function(c,e,g,h){var i,j=e.prop("offsetWidth");i=b.core.s.dynamic?b.core.s.dynamicEl[g].width||e[0].naturalWidth||j:b.core.$items.eq(g).attr("data-width")||e[0].naturalWidth||j;var k;b.core.$outer.hasClass("lg-zoomed")?d=1:i>j&&(k=i/j,d=k||2),h?(b.pageX=a(window).width()/2,b.pageY=a(window).height()/2+a(window).scrollTop()):(b.pageX=c.pageX||c.originalEvent.targetTouches[0].pageX,b.pageY=c.pageY||c.originalEvent.targetTouches[0].pageY),f(),setTimeout(function(){b.core.$outer.removeClass("lg-grabbing").addClass("lg-grab")},10)},h=!1;b.core.$el.on("onAferAppendSlide.lg.tm.zoom",function(a,c){var d=b.core.$slide.eq(c).find(".lg-image");d.on("dblclick",function(a){g(a,d,c)}),d.on("touchstart",function(a){h?(clearTimeout(h),h=null,g(a,d,c)):h=setTimeout(function(){h=null},300),a.preventDefault()})}),a(window).on("resize.lg.zoom scroll.lg.zoom orientationchange.lg.zoom",function(){b.pageX=a(window).width()/2,b.pageY=a(window).height()/2+a(window).scrollTop(),e(d)}),a("#lg-zoom-out").on("click.lg",function(){b.core.$outer.find(".lg-current .lg-image").length&&(d-=b.core.s.scale,f())}),a("#lg-zoom-in").on("click.lg",function(){b.core.$outer.find(".lg-current .lg-image").length&&(d+=b.core.s.scale,f())}),a("#lg-actual-size").on("click.lg",function(a){g(a,b.core.$slide.eq(b.core.index).find(".lg-image"),b.core.index,!0)}),b.core.$el.on("onBeforeSlide.lg.tm",function(){d=1,b.resetZoom()}),b.zoomDrag(),b.zoomSwipe()},d.prototype.getCurrentTransform=function(a){if(!a)return 0;var b=window.getComputedStyle(a,null),c=b.getPropertyValue("-webkit-transform")||b.getPropertyValue("-moz-transform")||b.getPropertyValue("-ms-transform")||b.getPropertyValue("-o-transform")||b.getPropertyValue("transform")||"none";return"none"!==c?c.split("(")[1].split(")")[0].split(","):0},d.prototype.getCurrentRotation=function(a){if(!a)return 0;var b=this.getCurrentTransform(a);return b?Math.round(Math.atan2(b[1],b[0])*(180/Math.PI)):0},d.prototype.getModifier=function(a,b,c){var d=a;a=Math.abs(a);var e=this.getCurrentTransform(c);if(!e)return 1;var f=1;if("X"===b){var g=Math.sign(parseFloat(e[0]));0===a||180===a?f=1:90===a&&(f=-90===d&&1===g||90===d&&-1===g?-1:1),f*=g}else{var h=Math.sign(parseFloat(e[3]));if(0===a||180===a)f=1;else if(90===a){var i=parseFloat(e[1]),j=parseFloat(e[2]);f=Math.sign(i*j*d*h)}f*=h}return f},d.prototype.getImageSize=function(a,b,c){var d={y:"offsetHeight",x:"offsetWidth"};return 90===b&&(c="x"===c?"y":"x"),a.prop(d[c])},d.prototype.getDragCords=function(a,b){return 90===b?{x:a.pageY,y:a.pageX}:{x:a.pageX,y:a.pageY}},d.prototype.getSwipeCords=function(a,b){var c=a.originalEvent.targetTouches[0].pageX,d=a.originalEvent.targetTouches[0].pageY;return 90===b?{x:d,y:c}:{x:c,y:d}},d.prototype.getPossibleDragCords=function(a,b){var c=(this.core.$outer.find(".lg").height()-this.getImageSize(a,b,"y"))/2,d=Math.abs(this.getImageSize(a,b,"y")*Math.abs(a.attr("data-scale"))-this.core.$outer.find(".lg").height()+c),e=(this.core.$outer.find(".lg").width()-this.getImageSize(a,b,"x"))/2,f=Math.abs(this.getImageSize(a,b,"x")*Math.abs(a.attr("data-scale"))-this.core.$outer.find(".lg").width()+e);return 90===b?{minY:e,maxY:f,minX:c,maxX:d}:{minY:c,maxY:d,minX:e,maxX:f}},d.prototype.getDragAllowedAxises=function(a,b){var c=this.getImageSize(a,b,"y")*a.attr("data-scale")>this.core.$outer.find(".lg").height(),d=this.getImageSize(a,b,"x")*a.attr("data-scale")>this.core.$outer.find(".lg").width();return 90===b?{allowX:c,allowY:d}:{allowX:d,allowY:c}},d.prototype.resetZoom=function(){this.core.$outer.removeClass("lg-zoomed"),this.core.$slide.find(".lg-img-wrap").removeAttr("style data-x data-y"),this.core.$slide.find(".lg-image").removeAttr("style data-scale"),this.pageX=a(window).width()/2,this.pageY=a(window).height()/2+a(window).scrollTop()},d.prototype.zoomSwipe=function(){var a,b=this,c={},d={},e=!1,f=!1,g=!1,h=0;b.core.$slide.on("touchstart.lg",function(d){if(b.core.$outer.hasClass("lg-zoomed")){var e=b.core.$slide.eq(b.core.index).find(".lg-object");a=b.core.$slide.eq(b.core.index).find(".lg-img-rotate")[0],h=b.getCurrentRotation(a);var i=b.getDragAllowedAxises(e,Math.abs(h));g=i.allowY,f=i.allowX,(f||g)&&(d.preventDefault(),c=b.getSwipeCords(d,Math.abs(h)))}}),b.core.$slide.on("touchmove.lg",function(i){if(b.core.$outer.hasClass("lg-zoomed")){var j,k,l=b.core.$slide.eq(b.core.index).find(".lg-img-wrap");i.preventDefault(),e=!0,d=b.getSwipeCords(i,Math.abs(h)),b.core.$outer.addClass("lg-zoom-dragging"),k=g?-Math.abs(l.attr("data-y"))+(d.y-c.y)*b.getModifier(h,"Y",a):-Math.abs(l.attr("data-y")),j=f?-Math.abs(l.attr("data-x"))+(d.x-c.x)*b.getModifier(h,"X",a):-Math.abs(l.attr("data-x")),(Math.abs(d.x-c.x)>15||Math.abs(d.y-c.y)>15)&&(b.core.s.useLeftForZoom?l.css({left:j+"px",top:k+"px"}):l.css("transform","translate3d("+j+"px, "+k+"px, 0)"))}}),b.core.$slide.on("touchend.lg",function(){b.core.$outer.hasClass("lg-zoomed")&&e&&(e=!1,b.core.$outer.removeClass("lg-zoom-dragging"),b.touchendZoom(c,d,f,g,h))})},d.prototype.zoomDrag=function(){var b,c=this,d={},e={},f=!1,g=!1,h=!1,i=!1,j=0;c.core.$slide.on("mousedown.lg.zoom",function(e){b=c.core.$slide.eq(c.core.index).find(".lg-img-rotate")[0],j=c.getCurrentRotation(b);var g=c.core.$slide.eq(c.core.index).find(".lg-object"),k=c.getDragAllowedAxises(g,Math.abs(j));i=k.allowY,h=k.allowX,c.core.$outer.hasClass("lg-zoomed")&&a(e.target).hasClass("lg-object")&&(h||i)&&(e.preventDefault(),d=c.getDragCords(e,Math.abs(j)),f=!0,c.core.$outer.scrollLeft+=1,c.core.$outer.scrollLeft-=1,c.core.$outer.removeClass("lg-grab").addClass("lg-grabbing"))}),a(window).on("mousemove.lg.zoom",function(a){if(f){var k,l,m=c.core.$slide.eq(c.core.index).find(".lg-img-wrap");g=!0,e=c.getDragCords(a,Math.abs(j)),c.core.$outer.addClass("lg-zoom-dragging"),l=i?-Math.abs(m.attr("data-y"))+(e.y-d.y)*c.getModifier(j,"Y",b):-Math.abs(m.attr("data-y")),k=h?-Math.abs(m.attr("data-x"))+(e.x-d.x)*c.getModifier(j,"X",b):-Math.abs(m.attr("data-x")),c.core.s.useLeftForZoom?m.css({left:k+"px",top:l+"px"}):m.css("transform","translate3d("+k+"px, "+l+"px, 0)")}}),a(window).on("mouseup.lg.zoom",function(a){f&&(f=!1,c.core.$outer.removeClass("lg-zoom-dragging"),!g||d.x===e.x&&d.y===e.y||(e=c.getDragCords(a,Math.abs(j)),c.touchendZoom(d,e,h,i,j)),g=!1),c.core.$outer.removeClass("lg-grabbing").addClass("lg-grab")})},d.prototype.touchendZoom=function(a,b,c,d,e){var f=this,g=f.core.$slide.eq(f.core.index).find(".lg-img-wrap"),h=f.core.$slide.eq(f.core.index).find(".lg-object"),i=f.core.$slide.eq(f.core.index).find(".lg-img-rotate")[0],j=-Math.abs(g.attr("data-x"))+(b.x-a.x)*f.getModifier(e,"X",i),k=-Math.abs(g.attr("data-y"))+(b.y-a.y)*f.getModifier(e,"Y",i),l=f.getPossibleDragCords(h,Math.abs(e));(Math.abs(b.x-a.x)>15||Math.abs(b.y-a.y)>15)&&(d&&(k<=-l.maxY?k=-l.maxY:k>=-l.minY&&(k=-l.minY)),c&&(j<=-l.maxX?j=-l.maxX:j>=-l.minX&&(j=-l.minX)),d?g.attr("data-y",Math.abs(k)):k=-Math.abs(g.attr("data-y")),c?g.attr("data-x",Math.abs(j)):j=-Math.abs(g.attr("data-x")),f.core.s.useLeftForZoom?g.css({left:j+"px",top:k+"px"}):g.css("transform","translate3d("+j+"px, "+k+"px, 0)"))},d.prototype.destroy=function(){var b=this;b.core.$el.off(".lg.zoom"),a(window).off(".lg.zoom"),b.core.$slide.off(".lg.zoom"),b.core.$el.off(".lg.tm.zoom"),b.resetZoom(),clearTimeout(b.zoomabletimeout),b.zoomabletimeout=!1},a.fn.lightGallery.modules.zoom=d}()}),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(0,function(a){!function(){"use strict";var b={hash:!0},c=function(c){return this.core=a(c).data("lightGallery"),this.core.s=a.extend({},b,this.core.s),this.core.s.hash&&(this.oldHash=window.location.hash,this.init()),this};c.prototype.init=function(){var b,c=this;c.core.$el.on("onAfterSlide.lg.tm",function(a,b,d){history.replaceState?history.replaceState(null,null,window.location.pathname+window.location.search+"#lg="+c.core.s.galleryId+"&slide="+d):window.location.hash="lg="+c.core.s.galleryId+"&slide="+d}),a(window).on("hashchange.lg.hash",function(){b=window.location.hash;var a=parseInt(b.split("&slide=")[1],10);b.indexOf("lg="+c.core.s.galleryId)>-1?c.core.slide(a,!1,!1):c.core.lGalleryOn&&c.core.destroy()})},c.prototype.destroy=function(){this.core.s.hash&&(this.oldHash&&this.oldHash.indexOf("lg="+this.core.s.galleryId)<0?history.replaceState?history.replaceState(null,null,this.oldHash):window.location.hash=this.oldHash:history.replaceState?history.replaceState(null,document.title,window.location.pathname+window.location.search):window.location.hash="",this.core.$el.off(".lg.hash"))},a.fn.lightGallery.modules.hash=c}()}),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(){"use strict";var b={share:!0,facebook:!0,facebookDropdownText:"Facebook",twitter:!0,twitterDropdownText:"Twitter",googlePlus:!0,googlePlusDropdownText:"GooglePlus",pinterest:!0,pinterestDropdownText:"Pinterest"},c=function(c){return this.core=a(c).data("lightGallery"),this.core.s=a.extend({},b,this.core.s),this.core.s.share&&this.init(),this};c.prototype.init=function(){var b=this,c='<button type="button" aria-label="Share" id="lg-share" class="lg-icon" aria-haspopup="true" aria-expanded="false"><ul class="lg-dropdown" style="position: absolute;">';c+=b.core.s.facebook?'<li><a id="lg-share-facebook" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+this.core.s.facebookDropdownText+"</span></a></li>":"",c+=b.core.s.twitter?'<li><a id="lg-share-twitter" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+this.core.s.twitterDropdownText+"</span></a></li>":"",c+=b.core.s.googlePlus?'<li><a id="lg-share-googleplus" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+this.core.s.googlePlusDropdownText+"</span></a></li>":"",c+=b.core.s.pinterest?'<li><a id="lg-share-pinterest" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">'+this.core.s.pinterestDropdownText+"</span></a></li>":"",c+="</ul></button>",this.core.$outer.find(".lg-toolbar").append(c),this.core.$outer.find(".lg").append('<div id="lg-dropdown-overlay"></div>'),a("#lg-share").on("click.lg",function(){b.core.$outer.toggleClass("lg-dropdown-active");var c=a("#lg-share").attr("aria-expanded");a("#lg-share").attr("aria-expanded","true"!==c)}),a("#lg-dropdown-overlay").on("click.lg",function(){b.core.$outer.removeClass("lg-dropdown-active"),a("#lg-share").attr("aria-expanded",!1)}),b.core.$el.on("onAfterSlide.lg.tm",function(c,d,e){setTimeout(function(){a("#lg-share-facebook").attr("href","https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(b.getSahreProps(e,"facebookShareUrl")||window.location.href)),a("#lg-share-twitter").attr("href","https://twitter.com/intent/tweet?text="+b.getSahreProps(e,"tweetText")+"&url="+encodeURIComponent(b.getSahreProps(e,"twitterShareUrl")||window.location.href)),a("#lg-share-googleplus").attr("href","https://plus.google.com/share?url="+encodeURIComponent(b.getSahreProps(e,"googleplusShareUrl")||window.location.href)),a("#lg-share-pinterest").attr("href","http://www.pinterest.com/pin/create/button/?url="+encodeURIComponent(b.getSahreProps(e,"pinterestShareUrl")||window.location.href)+"&media="+encodeURIComponent(b.getSahreProps(e,"src"))+"&description="+b.getSahreProps(e,"pinterestText"))},100)})},c.prototype.getSahreProps=function(a,b){var c="";if(this.core.s.dynamic)c=this.core.s.dynamicEl[a][b];else{var d=this.core.$items.eq(a).attr("href"),e=this.core.$items.eq(a).data(b);c="src"===b?d||e:e}return c},c.prototype.destroy=function(){},a.fn.lightGallery.modules.share=c}()}),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(){"use strict";var b={rotate:!0,rotateLeft:!0,rotateRight:!0,flipHorizontal:!0,flipVertical:!0},c=function(c){return this.core=a(c).data("lightGallery"),this.core.s=a.extend({},b,this.core.s),this.core.s.rotate&&this.core.doCss()&&this.init(),this};c.prototype.buildTemplates=function(){var a="";this.core.s.flipVertical&&(a+='<button aria-label="Flip vertical" class="lg-flip-ver lg-icon"></button>'),this.core.s.flipHorizontal&&(a+='<button aria-label="flip horizontal" class="lg-flip-hor lg-icon"></button>'),this.core.s.rotateLeft&&(a+='<button aria-label="Rotate left" class="lg-rotate-left lg-icon"></button>'),this.core.s.rotateRight&&(a+='<button aria-label="Rotate right" class="lg-rotate-right lg-icon"></button>'),this.core.$outer.find(".lg-toolbar").append(a)},c.prototype.init=function(){var a=this;this.buildTemplates(),this.rotateValuesList={},this.core.$el.on("onAferAppendSlide.lg.tm.rotate",function(b,c){a.core.$slide.eq(c).find(".lg-img-wrap").wrap('<div class="lg-img-rotate"></div>')}),this.core.$outer.find(".lg-rotate-left").on("click.lg",this.rotateLeft.bind(this)),this.core.$outer.find(".lg-rotate-right").on("click.lg",this.rotateRight.bind(this)),this.core.$outer.find(".lg-flip-hor").on("click.lg",this.flipHorizontal.bind(this)),this.core.$outer.find(".lg-flip-ver").on("click.lg",this.flipVertical.bind(this)),this.core.$el.on("onBeforeSlide.lg.tm.rotate",function(b,c,d){a.rotateValuesList[d]||(a.rotateValuesList[d]={rotate:0,flipHorizontal:1,flipVertical:1})})},c.prototype.applyStyles=function(){this.core.$slide.eq(this.core.index).find(".lg-img-rotate").css("transform","rotate("+this.rotateValuesList[this.core.index].rotate+"deg) scale3d("+this.rotateValuesList[this.core.index].flipHorizontal+", "+this.rotateValuesList[this.core.index].flipVertical+", 1)")},c.prototype.getCurrentRotation=function(a){if(!a)return 0;var b=window.getComputedStyle(a,null),c=b.getPropertyValue("-webkit-transform")||b.getPropertyValue("-moz-transform")||b.getPropertyValue("-ms-transform")||b.getPropertyValue("-o-transform")||b.getPropertyValue("transform")||"none";if("none"!==c){var d=c.split("(")[1].split(")")[0].split(",");if(d){var e=Math.round(Math.atan2(d[1],d[0])*(180/Math.PI));return e<0?e+360:e}}return 0},c.prototype.rotateLeft=function(){this.rotateValuesList[this.core.index].rotate-=90,this.applyStyles()},c.prototype.rotateRight=function(){this.rotateValuesList[this.core.index].rotate+=90,this.applyStyles()},c.prototype.flipHorizontal=function(){var a=this.core.$slide.eq(this.core.index).find(".lg-img-rotate")[0],b=this.getCurrentRotation(a),c="flipHorizontal";90!==b&&270!==b||(c="flipVertical"),this.rotateValuesList[this.core.index][c]*=-1,this.applyStyles()},c.prototype.flipVertical=function(){var a=this.core.$slide.eq(this.core.index).find(".lg-img-rotate")[0],b=this.getCurrentRotation(a),c="flipVertical";90!==b&&270!==b||(c="flipHorizontal"),this.rotateValuesList[this.core.index][c]*=-1,this.applyStyles()},c.prototype.destroy=function(){this.core.$el.off(".lg.tm.rotate"),this.rotateValuesList={}},a.fn.lightGallery.modules.rotate=c}()});(function(a){a.fn.LiteTooltip=function(d,c){return this.each(function(){var f=a.extend({},a.fn.LiteTooltip.defaultSettings,d||{});var e=a(this);var g=new b(f,e);if(g.settings.title!=""){if(!e.is("input")){e.css({cursor:"pointer"})}
var debug=(g.settings.debug!=null)?((g.settings.debug=="true"||g.settings.debug==!0)?!0:!1):!1;if(g.settings.trigger=="hoverable"){this.toggle=!1;e.bind("mouseenter",{settings:g.settings,element:e,$plugin:g,$toggle:this.toggle},g.mouseOverHandler);if(!debug){e.bind("mouseleave",{settings:g.settings,element:e,$plugin:g,$toggle:this.toggle},g.mouseOutHandler)}}else{if(g.settings.trigger=="hover"){e.bind("mouseenter",{settings:g.settings,element:e,$plugin:g},g.mouseOverHandler);if(!debug){e.bind("mouseleave",{settings:g.settings,element:e,$plugin:g},g.mouseOutHandler)}}else{if(g.settings.trigger=="focus"){e.bind("focus",{settings:g.settings,element:e,$plugin:g},g.mouseOverHandler);e.bind("blur",{settings:g.settings,element:e,$plugin:g},g.mouseOutHandler)}else{if(g.settings.trigger=="click"){this.toggle=!1;e.bind("click",{settings:g.settings,element:e,$plugin:g,$toggle:this.toggle},g.mouseOverHandler);if(!g.settings.issticky){if(!debug){e.bind("mouseleave",{settings:g.settings,element:e,$plugin:g,$toggle:this.toggle},g.mouseOutHandler)}}}}}}}})};function b(d,c){this.settings=this.getSettings(d,c);this.$element=c;return this}
b.prototype={getSettings:function(f,d){var e=(d.data("issticky")!=null)?((d.data("issticky")=="true")?!0:!1):!0;var c=a.extend({},f,{location:d.data("location"),title:d.data("title"),backcolor:d.data("backcolor"),textalign:d.data("textalign"),trigger:d.data("trigger"),textcolor:d.data("textcolor"),opacity:d.data("opacity"),templatename:d.data("templatename"),width:d.data("width"),margin:d.data("margin"),padding:d.data("padding"),delay:d.data("delay"),issticky:e,container:d.data("container"),shadow:d.data("shadow")});return c},mouseOverHandler:function(n){if(typeof n.data.settings.onUpdate=="function"){n.data.settings.title=n.data.settings.onUpdate.call(this)}
if(n.data.element.is("input")){if(n.data.element.val()!=""){return!1}}
if(n.data.settings.trigger=="click"){if(!n.data.$toggle){n.data.$toggle=!0;this.toggle=!0;n.data.element.unbind("click");n.data.element.bind("click",{settings:n.data.settings,element:n.data.element,$plugin:n.data.$plugin,$toggle:n.data.$toggle},n.data.$plugin.mouseOutHandler)}else{n.data.$toggle=!1;this.toggle=!1;return!1}}
var c=n.data.element;var d=n.data.settings;var R=parseInt(d.margin.toString().replace("px",""));var T=parseInt(d.padding.toString().replace("px",""));var Y=parseInt(d.width.toString().replace("px",""));var Q=d.container=="body"?d.location:"none";var N=d.backcolor;var X=d.textcolor;var W=d.textalign;var V=d.templatename;var P=d.delay;var K=a(d.template);K.css({opacity:d.opacity});K.css("visibility","visible");K.find(".tooltip-content").css({"text-align":W}).html(d.title+d.clearfix);K.find(".tooltip-content").css({padding:T+"px"});K.find(".tooltip-content p").css({background:N});K.find(".tooltip-content p").css({color:X});if(d.shadow==1){K.find(".tooltip-content").css({"box-shadow":"1px 1px 3px 0px #888888"})}
var M=Q;var L=Q.split("-")[0];var E=M;var D=L;K.removeClass(Q).addClass(M);K.find(".tooltip-arrow").removeClass(Q).addClass(M).css("border-"+L+"-color",N);var l=d.container;if(d.container!="body"){K.addClass("incontainer");l="#"+d.container;a(l).children().each(function(){a(this).remove()})}else{K.removeClass("incontainer");l="body"}
a(l).append(K);if(n.data.settings.trigger=="click"){var O=a('<div id="tooltip-clickoutside"></div>');O.css({width:"100%",height:"100%",position:"absolute",top:a(document).scrollTop()+"px",left:"0px"});a("body").append(O);O.bind("click",{settings:n.data.settings,element:n.data.element,$plugin:n.data.$plugin,$toggle:n.data.$toggle},n.data.$plugin.mouseOutHandler);n.data.$toggle=!1;this.toggle=!1}else{if(n.data.settings.trigger=="hoverable"){n.data.element.unbind("mouseenter")}}
if(d.container=="body"){K.offset({top:0,left:0});var ab=K.outerWidth();var Z=K.outerHeight();var ae=a(document).width();var G=scrollbarWidth();var ac=a(document).width()-a(window).width();if(ac>0){ae=ae-G}
if(ae>a(window).width()){ae=a(window).width()-G}
var ad=a(document).height();if(ac>G){ad=ad-G}
if(Y!=0){if(Y*2>ae){Y=Math.floor((ae/2)-30)}else{Y-=30}
if(Y*1.5>ae/2){Y=Math.floor((ae/2)-30)}}else{if(340*2>ae){Y=Math.floor((ae/2)-30)}else{Y=340}}
K.css({"max-width":Y});ab=K.outerWidth();Z=K.outerHeight();var J=c[Object.keys(c)[0]];var r=J.offsetWidth;var o=J.offsetHeight;var q=c.offset().top;var p=c.offset().left;if(J.tagName.toLowerCase()=="area"){var g=J.parentElement.getAttribute("name");var h=J.getAttribute("shape").toLowerCase();var x=a("img[usemap='#"+g+"']").offset().top;var w=a("img[usemap='#"+g+"']").offset().left;var j=parseInt(J.getAttribute("coords").split(",")[0]);var k=parseInt(J.getAttribute("coords").split(",")[1]);var i=parseInt(J.getAttribute("coords").split(",")[2]);var f=parseInt(J.getAttribute("coords").split(",")[3]||i);var v={top:parseInt(x+k),left:parseInt(w+j)};if(h=="circle"){v={top:parseInt(x+k-i),left:parseInt(w+j-i)};i*=2;f*=2}
if(h=="rect"){v={top:parseInt(x+k),left:parseInt(w+j)};i=i-j;f=f-k}
if(h=="poly"){var m=new Array();var H=J.getAttribute("coords").split(",");for(var y=0;y<H.length;){m.push({x:parseInt(H[y]),y:parseInt(H[y+1])});y=y+2}
m.sort(function(e,af){var ag=e.x,ah=af.x;if(ag==ah){return 0}
return ag<ah?1:-1});var z=m[0].x;m.sort(function(e,af){var ag=e.y,ah=af.y;if(ag==ah){return 0}
return ag<ah?1:-1});var A=m[0].y;m.sort(function(e,af){var ag=e.x,ah=af.x;if(ag==ah){return 0}
return ag>ah?1:-1});var B=m[0].x;m.sort(function(e,af){var ag=e.y,ah=af.y;if(ag==ah){return 0}
return ag>ah?1:-1});var C=m[0].y;v={top:parseInt(x+C),left:parseInt(w+B)};i=z-B;f=A-C}
p=v.left;q=v.top;r=i;o=f}
p=Math.round(p);q=Math.round(q);r=Math.round(r);o=Math.round(o);K.offset({top:0,left:0});var S;switch(Q){case "top":S={top:(q-Z-R),left:p-(ab/2)+(r/2)};break;case "top-left":S={top:(q-Z-R),left:p};break;case "top-right":S={top:(q-Z-R),left:p-ab+r};break;case "right":S={top:(q+(o/2)-(Z/2)),left:p+r+R};break;case "right-top":S={top:(q+o-Z+8),left:p+r+R};break;case "right-bottom":S={top:q-8,left:p+r+R};break;case "bottom":S={top:(q+o+R),left:p-(ab/2)+(r/2)};break;case "bottom-left":S={top:(q+o+R),left:p};break;case "bottom-right":S={top:(q+o+R),left:p-ab+r};break;case "left":S={top:(q+(o/2)-(Z/2)),left:p-ab-R};break;case "left-top":S={top:(q+o-Z+8),left:p-ab-R};break;case "left-bottom":S={top:q-8,left:p-ab-R};break}
var F={top:0,left:0};F.left=S.left;F.top=S.top;var aa=(((M.match("bottom")!=null)||(M=="left")||(M=="right"))?(((M=="left")||(M=="right"))?(Z/2):(Z))>(ad-q-o):!1);if((S.left<0)||(S.top<0)||(S.left+ab>ae)||aa){if(L=="top"||L=="bottom"||L=="left"||L=="right"){var u=!1;switch(L){case "top":S.top=q-Z-R;S.left=p-(ab/2)+(r/2);u=!0;break;case "bottom":S.top=q-Z-R;S.left=p-(ab/2)+(r/2);u=!0;break;case "left":var I=M.replace(L+"-","");if(I=="top"){L="top";M="top-left";K.removeClass(E).addClass(M);K.find(".tooltip-arrow").removeClass(E).css("border-"+D+"-color","").addClass(M).css("border-"+L+"-color",N);D="top";E="top-left";K.removeClass(Q).addClass(M);K.find(".tooltip-arrow").removeClass(Q).addClass(M).css("border-"+L+"-color",N);ab=K.outerWidth();Z=K.outerHeight();S.top=q-Z-R;S.left=p-(ab/2)+(r/2);F.left=p;F.top=q-Z-R;aa=(((M.match("bottom")!=null)||(M=="left")||(M=="right"))?(((M=="left")||(M=="right"))?(Z/2):(Z))>(ad-q-o):!1);if((S.left<0)||(S.top<0)||(S.left+ab>ae)||aa){u=!0}else{S.left=F.left;S.top=F.top}}else{if(I=="bottom"){L="bottom";M="bottom-left";K.removeClass(E).addClass(M);K.find(".tooltip-arrow").removeClass(E).css("border-"+D+"-color","").addClass(M).css("border-"+L+"-color",N);D="bottom";E="bottom-left";K.removeClass(Q).addClass(M);K.find(".tooltip-arrow").removeClass(Q).addClass(M).css("border-"+L+"-color",N);ab=K.outerWidth();Z=K.outerHeight();S.top=q+o+R;S.left=p-(ab/2)+(r/2);F.left=p;F.top=q+o+R;aa=(((M.match("bottom")!=null)||(M=="left")||(M=="right"))?(((M=="left")||(M=="right"))?(Z/2):(Z))>(ad-q-o):!1);if((S.left<0)||(S.top<0)||(S.left+ab>ae)||aa){u=!0}else{S.left=F.left;S.top=F.top}}else{L="top";M="top";K.removeClass(E).addClass(M);K.find(".tooltip-arrow").removeClass(E).css("border-"+D+"-color","").addClass(M).css("border-"+L+"-color",N);D="top";E="top";K.removeClass(Q).addClass(M);K.find(".tooltip-arrow").removeClass(Q).addClass(M).css("border-"+L+"-color",N);ab=K.outerWidth();Z=K.outerHeight();S.top=q-Z-R;S.left=p-(ab/2)+(r/2);F.left=S.left;F.top=S.top;aa=(((M.match("bottom")!=null)||(M=="left")||(M=="right"))?(((M=="left")||(M=="right"))?(Z/2):(Z))>(ad-q-o):!1);if((S.left<0)||(S.top<0)||(S.left+ab>ae)||aa){u=!0}else{S.left=F.left;S.top=F.top}}}
break;case "right":var I=M.replace(L+"-","");if(I=="top"){L="top";M="top-left";K.removeClass(E).addClass(M);K.find(".tooltip-arrow").removeClass(E).css("border-"+D+"-color","").addClass(M).css("border-"+L+"-color",N);D="top";E="top-left";K.removeClass(Q).addClass(M);K.find(".tooltip-arrow").removeClass(Q).addClass(M).css("border-"+L+"-color",N);ab=K.outerWidth();Z=K.outerHeight();S.top=q-Z-R;S.left=p-(ab/2)+(r/2);F.left=p;F.top=q-Z-R;aa=(((M.match("bottom")!=null)||(M=="left")||(M=="right"))?(((M=="left")||(M=="right"))?(Z/2):(Z))>(ad-q-o):!1);if((S.left<0)||(S.top<0)||(S.left+ab>ae)||aa){u=!0}else{S.left=F.left;S.top=F.top}}else{if(I=="bottom"){L="bottom";M="bottom-left";K.removeClass(E).addClass(M);K.find(".tooltip-arrow").removeClass(E).css("border-"+D+"-color","").addClass(M).css("border-"+L+"-color",N);D="bottom";E="bottom-left";K.removeClass(Q).addClass(M);K.find(".tooltip-arrow").removeClass(Q).addClass(M).css("border-"+L+"-color",N);ab=K.outerWidth();Z=K.outerHeight();S.top=q-Z-R;S.left=p-(ab/2)+(r/2);F.left=p;F.top=q+o+R;aa=(((M.match("bottom")!=null)||(M=="left")||(M=="right"))?(((M=="left")||(M=="right"))?(Z/2):(Z))>(ad-q-o):!1);if((S.left<0)||(S.top<0)||(S.left+ab>ae)||aa){u=!0}else{S.left=F.left;S.top=F.top}}else{L="top";M="top";K.removeClass(E).addClass(M);K.find(".tooltip-arrow").removeClass(E).css("border-"+D+"-color","").addClass(M).css("border-"+L+"-color",N);D="top";E="top";K.removeClass(Q).addClass(M);K.find(".tooltip-arrow").removeClass(Q).addClass(M).css("border-"+L+"-color",N);ab=K.outerWidth();Z=K.outerHeight();S.top=q-Z-R;S.left=p-(ab/2)+(r/2);F.left=S.left;F.top=S.top;aa=(((M.match("bottom")!=null)||(M=="left")||(M=="right"))?(((M=="left")||(M=="right"))?(Z/2):(Z))>(ad-q-o):!1);if((S.left<0)||(S.top<0)||(S.left+ab>ae)||aa){u=!0}else{S.left=F.left;S.top=F.top}}}
break}
if(u){var s=!1;var t=!1;if(S.top<0){L="bottom";M="bottom";S.top=q+o+R;t=!0;if(S.left<0){L="bottom";M="bottom-left";S.left=p;s=!0}
if(S.left+ab>ae){S.left=p-ab+r;if(S.left<0){L="bottom";M="bottom";S.left=p-(ab/2)+(r/2);s=!0}else{L="bottom";M="bottom-right";S.left=p-ab+r;s=!0}}}else{L="top";M="top";S.top=q-Z-R;t=!1;if(S.left<0){L="top";M="top-left";S.left=p;s=!0}
if(S.left+ab>ae){S.left=p-ab+r;if(S.left<0){L="top";M="top";S.left=p-(ab/2)+(r/2);s=!0}else{L="top";M="top-right";S.left=p-ab+r;s=!0}}}
if(!s){if(t){M=E.replace("top","bottom");L=D.replace("top","bottom");if(F.left<0){if(L=="bottom"||L=="top"){M=M.replace("right","left");S.left=p}}else{S.left=F.left}}else{M=E.replace("bottom","top");L=D.replace("bottom","top");if(F.left<0){if(L=="bottom"||L=="top"){M=M.replace("right","left");S.left=p}}else{S.left=F.left}}}}}}
K.removeClass(E).addClass(M);K.find(".tooltip-arrow").removeClass(E).css("border-"+D+"-color","").addClass(M).css("border-"+L+"-color",N);if(V!=""){if(K.find(".tooltip-content > .template").hasClass("template")){K.find(".tooltip-content > .template").addClass(V);var U=K.find("."+V).css("background-color")}else{if(K.find(".tooltip-content > .tooltip-menu").hasClass("tooltip-menu")){K.find(".tooltip-content > .tooltip-menu").addClass(V);var U=K.find("."+V).css("background-color");K.find(".tooltip-arrow").css("border-"+D+"-color","");K.find(".tooltip-arrow").css("border-"+L+"-color",U);K.find(".tooltip-content").css({background:U})}}}
K.find(".tooltip-content > .video-wrapper").css({width:(K.width()-(T*2))+"px"});K.offset(S)}
K.hide();c.removeAttr("title");c.removeAttr("alt");if(n.data.settings.trigger=="hoverable"||n.data.settings.trigger=="click"){P=0}
switch(L){case "top":K.delay(P).css({top:"-=20",opacity:0,display:"block"}).stop(!0,!0).animate({top:"+=20",opacity:d.opacity},150);break;case "bottom":K.delay(P).css({top:"+=20",opacity:0,display:"block"}).stop(!0,!0).animate({top:"-=20",opacity:d.opacity},150);break;case "left":K.delay(P).css({left:"-=20",opacity:0,display:"block"}).stop(!0,!0).animate({left:"+=20",opacity:d.opacity},150);break;case "right":K.delay(P).css({left:"+=20",opacity:0,display:"block"}).stop(!0,!0).animate({left:"-=20",opacity:d.opacity},150);break;default:K.delay(P).css({opacity:0,display:"block"}).stop(!0,!0).animate({opacity:d.opacity},150);break}
n.data.$plugin.tooltip=K;n.data.$plugin.location=Q;n.data.$plugin.tooltip_arrow_border=L;K=null;return!1},mouseOutHandler:function(d){var f=d.data.$plugin.tooltip;var g=d.data.$plugin.location;var c=!1;if(d.data.settings.trigger!="hoverable"){if(d.data.settings.trigger=="hover"){a(f).delay(d.data.settings.delay);c=!0}else{c=!0;if(d.data.settings.trigger=="click"){if(!d.data.settings.issticky){d.data.settings.interval=setInterval(function(){a(f).fadeOut(0,function(){a(d.data.$plugin.tooltip).remove()});clearInterval(d.data.settings.interval);this.toggle=!1;d.data.$toggle=!1;d.data.element.unbind("click");d.data.element.unbind("mouseleave");d.data.element.bind("click",{settings:d.data.settings,element:d.data.element,$plugin:d.data.$plugin,$toggle:!1},d.data.$plugin.mouseOverHandler);d.data.element.bind("mouseleave",{settings:d.data.settings,element:d.data.element,$plugin:d.data.$plugin,$toggle:!1},d.data.$plugin.mouseOutHandler)},d.data.settings.delay==0?2000:d.data.settings.delay);d.data.element.unbind("mouseleave");a(f).find(".tooltip-content").bind("mouseenter",{settings:d.data.settings,element:d.data.element,$plugin:d.data.$plugin,$toggle:!0},function(){d.data.element.unbind("click");d.data.element.unbind("mouseleave");this.toggle=!0;d.data.$toggle=!0;clearInterval(d.data.settings.interval)});a(f).find(".tooltip-content").bind("mouseleave",{settings:d.data.settings,element:d.data.element,$plugin:d.data.$plugin,$toggle:d.data.$toggle},function(){a(f).fadeOut(0,function(){a(d.data.$plugin.tooltip).remove()});this.toggle=!1;d.data.$toggle=!1;d.data.element.unbind("click");d.data.element.unbind("mouseleave");d.data.element.bind("click",{settings:d.data.settings,element:d.data.element,$plugin:d.data.$plugin,$toggle:!1},d.data.$plugin.mouseOverHandler);d.data.element.bind("mouseleave",{settings:d.data.settings,element:d.data.element,$plugin:d.data.$plugin,$toggle:!1},d.data.$plugin.mouseOutHandler)});c=!1}else{c=!0}}}}else{d.data.settings.interval=setInterval(function(){a(f).fadeOut(0,function(){a(d.data.$plugin.tooltip).remove()});clearInterval(d.data.settings.interval);d.data.element.unbind("mouseleave");d.data.element.unbind("mouseenter");d.data.element.bind("mouseenter",{settings:d.data.settings,element:d.data.element,$plugin:d.data.$plugin,$toggle:!1},d.data.$plugin.mouseOverHandler);d.data.element.bind("mouseleave",{settings:d.data.settings,element:d.data.element,$plugin:d.data.$plugin,$toggle:!1},d.data.$plugin.mouseOutHandler)},d.data.settings.delay==0?2000:d.data.settings.delay);d.data.element.unbind("mouseleave");a(f).find(".tooltip-content").bind("mouseenter",{settings:d.data.settings,element:d.data.element,$plugin:d.data.$plugin,$toggle:!0},function(){d.data.element.unbind("mouseenter");d.data.element.unbind("mouseleave");this.toggle=!0;d.data.$toggle=!0;clearInterval(d.data.settings.interval)});a(f).find(".tooltip-content").bind("mouseleave",{settings:d.data.settings,element:d.data.element,$plugin:d.data.$plugin,$toggle:!0},function(){a(f).fadeOut(0,function(){a(d.data.$plugin.tooltip).remove()});this.toggle=!1;d.data.$toggle=!1;d.data.element.unbind("mouseleave");d.data.element.unbind("mouseenter");d.data.element.bind("mouseenter",{settings:d.data.settings,element:d.data.element,$plugin:d.data.$plugin,$toggle:!1},d.data.$plugin.mouseOverHandler);d.data.element.bind("mouseleave",{settings:d.data.settings,element:d.data.element,$plugin:d.data.$plugin,$toggle:!1},d.data.$plugin.mouseOutHandler)});c=!1}
if(c){switch(d.data.$plugin.tooltip_arrow_border){case "top":a(f).stop(!0,!0).animate({top:"-=20",opacity:0},150,function(){a(d.data.$plugin.tooltip).remove()});break;case "bottom":a(f).stop(!0,!0).animate({top:"+=20",opacity:0},150,function(){a(d.data.$plugin.tooltip).remove()});break;case "left":a(f).stop(!0,!0).animate({left:"-=20",opacity:0},150,function(){a(d.data.$plugin.tooltip).remove()});break;case "right":a(f).stop(!0,!0).animate({left:"+=20",opacity:0},150,function(){a(d.data.$plugin.tooltip).remove()});break}
a(d.data.$plugin.tooltip).remove()}
if(d.data.settings.trigger=="click"){if(d.data.$toggle){a("body").find("#tooltip-clickoutside").remove();this.toggle=!1;d.data.$toggle=!1;d.data.element.unbind("click");d.data.element.unbind("mouseleave");d.data.element.bind("click",{settings:d.data.settings,element:d.data.element,$plugin:d.data.$plugin,$toggle:d.data.$toggle},d.data.$plugin.mouseOverHandler);if(!d.data.settings.issticky){d.data.element.bind("mouseleave",{settings:d.data.settings,element:d.data.element,$plugin:d.data.$plugin,$toggle:d.data.$toggle},d.data.$plugin.mouseOutHandler)}}}
return!1}};scrollbarWidth=function(){var c=a('<div style="width:50px;height:50px;overflow:hidden;position:absolute;top:-200px;left:-200px;"><div style="height:100px;"></div>');a("body").append(c);var d=a("div",c).innerWidth();c.css("overflow","scroll");var e=a("div",c).innerWidth();a(c).remove();return(d-e)};a.fn.LiteTooltip.defaultSettings={location:"top",title:"",opacity:0.89,backcolor:"#000000",textcolor:"#ffffff",template:'<div class="litetooltip-wrapper"><div class="tooltip-arrow"></div><div class="tooltip-content"></div></div>',margin:5,padding:10,width:0,textalign:"center",trigger:"hover",templatename:"",delay:0,issticky:!0,clearfix:'<div class="clear"></div>',container:"body",shadow:1}})(jQuery);(function($){$.LeoCustomAjax=function(){this.leoData='leoajax=1'};$.LeoCustomAjax.prototype={processAjax:function(){if(typeof leo_allow_ajax!=="undefined"&&!leo_allow_ajax){return}
var myElement=this;if(leoOption.category_qty&&$(".leo-qty").length)
myElement.getCategoryList();else if($(".leo-qty").length)
$(".leo-qty").remove();if(leoOption.product_list_image&&$(".leo-more-info").length)
myElement.getProductListImage();else if($(".leo-more-info").length)
$(".leo-more-info").remove();if(leoOption.product_one_img&&$(".product-additional").length)
myElement.getProductOneImage();else if($(".product-additional").length)
$(".product-additional").remove();if(leoOption.product_one_img&&$(".product-attribute-additional").length)
myElement.getProductAttributeOneImage();else if($(".product-attribute-additional").length)
$(".product-attribute-additional").remove();if(leoOption.product_one_img&&$(".product-all-additional").length)
myElement.getProductAllOneImage();else if($(".product-all-additional").length)
$(".product-all-additional").remove();if(leoOption.productCdown&&$(".leo-more-cdown").length)
myElement.getProductCdownInfo();else if($(".leo-more-cdown").length)
$(".leo-more-cdown").remove();if(leoOption.productCdown&&$(".leo-more-color").length)
myElement.getProductColorInfo();else if($(".leo-more-color").length)
$(".leo-more-color").remove();if($(".product-item-size").length)
myElement.getSizeContent();if($(".product-item-attribute").length)
myElement.getAttributeContent();if($(".product-item-manufacture").length)
myElement.getManufactureName();if($(".leo-ajax-tabs").length)
myElement.getTabContent();if($('.ap-total-wishlist').length||$('.ap-total-compare').length){myElement.getCountWishlistCompare()}
if(myElement.leoData!="leoajax=1"){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:prestashop.urls.base_url+'modules/appagebuilder/apajax.php'+'?token='+appagebuilderToken+'&rand='+new Date().getTime(),async:!0,cache:!1,dataType:"json",data:myElement.leoData,success:function(jsonData){if(jsonData){if(jsonData.cat){for(i=0;i<jsonData.cat.length;i++){var str=jsonData.cat[i].total;var label=$(".leo-qty.leo-cat-"+jsonData.cat[i].id_category).data("str");if(typeof label!="undefined"){str+="<span>"+label+"</span>"}
$(".leo-qty.leo-cat-"+jsonData.cat[i].id_category).html(str);$(".leo-qty.leo-cat-"+jsonData.cat[i].id_category).show()}
$('.leo-qty').each(function(){if($(this).html()==''){$(this).html('0');$(this).show()}})}
if(jsonData.product_list_image){var listProduct=new Array();for(i=0;i<jsonData.product_list_image.length;i++){listProduct[jsonData.product_list_image[i].id]=jsonData.product_list_image[i].content}
$(".leo-more-info").each(function(){$(this).html(listProduct[$(this).data("idproduct")])});addEffectProducts()}
if(jsonData.pro_cdown){var listProduct=new Array();for(i=0;i<jsonData.pro_cdown.length;i++){listProduct[jsonData.pro_cdown[i].id]=jsonData.pro_cdown[i].content}
$(".leo-more-cdown").each(function(){$(this).html(listProduct[$(this).data("idproduct")])})}
if(jsonData.pro_color){var listProduct=new Array();for(i=0;i<jsonData.pro_color.length;i++){listProduct[jsonData.pro_color[i].id]=jsonData.pro_color[i].content}
$(".leo-more-color").each(function(){$(this).html(listProduct[$(this).data("idproduct")])})}
if(jsonData.product_one_img){var listProductImg=new Array();var listProductName=new Array();for(i=0;i<jsonData.product_one_img.length;i++){listProductImg[jsonData.product_one_img[i].id]=jsonData.product_one_img[i].content;listProductName[jsonData.product_one_img[i].id]=jsonData.product_one_img[i].name}
iw=360;ih=360;if(typeof leoOption.homeWidth!=='undefined'){iw=leoOption.homeWidth;ih=leoOption.homeheight}else{iw=$('.product_img_link .img-fluid').first().attr('width');ih=$('.product_img_link .img-fluid').first().attr('height')}
$(".product-additional").each(function(){if(listProductImg[$(this).data("idproduct")]){var str_image=listProductImg[$(this).data("idproduct")];if($(this).data("image-type")){src_image=str_image.replace('home_default',$(this).data("image-type"))}else{src_image=str_image.replace('home_default','home_default')}
var name_image=listProductName[$(this).data("idproduct")];$(this).html('<img loading="lazy"  class="img-fluid" title="'+name_image+'" alt="'+name_image+'" src="'+src_image+'" width="'+iw+'" height="'+ih+'"/>')}})}
if(jsonData.product_attribute_one_img){var listProductImg=new Array();var listProductName=new Array();for(i=0;i<jsonData.product_attribute_one_img.length;i++){listProductImg[jsonData.product_attribute_one_img[i].id]=jsonData.product_attribute_one_img[i].content;listProductName[jsonData.product_attribute_one_img[i].id]=jsonData.product_attribute_one_img[i].name}
iw=360;ih=360;if(typeof leoOption.homeWidth!=='undefined'){iw=leoOption.homeWidth;ih=leoOption.homeheight}else{iw=$('.product_img_link .img-fluid').first().attr('width');ih=$('.product_img_link .img-fluid').first().attr('height')}
$(".product-attribute-additional").each(function(){if(listProductImg[$(this).closest('.js-product-miniature').data("id-product")]){var str_image=listProductImg[$(this).closest('.js-product-miniature').data("id-product")];if($(this).data("image-type")){src_image=str_image.replace('home_default',$(this).data("image-type"))}else{src_image=str_image.replace('home_default','home_default')}
var name_image=listProductName[$(this).closest('.js-product-miniature').data("id-product")];$(this).html('<img loading="lazy"  class="img-fluid" title="'+name_image+'" alt="'+name_image+'" src="'+src_image+'" width="'+iw+'" height="'+ih+'"/>')}})}
if(jsonData.product_attribute){if(typeof jsonData.product_attribute.attribute!=='undefined'){$.each(jsonData.product_attribute.attribute,function(key,value){$('.product-attribute-'+key).html(value);$('.product-attribute-'+key).removeClass('product-item-attribute')})}
if(typeof jsonData.product_attribute.size!=='undefined'){$.each(jsonData.product_attribute.size,function(key,value){$('.product-size-'+key).html(value);$('.product-size-'+key).removeClass('product-item-size')})}}
if(jsonData.product_manufacture){$.each(jsonData.product_manufacture,function(key,value){$('.product-manufacture-'+key).html(value);$('.product-manufacture-'+key).removeClass('product-item-manufacture')})}
if(jsonData.product_all_one_img){var listProductImg=new Array();var listProductName=new Array();for(i=0;i<jsonData.product_all_one_img.length;i++){listProductImg[jsonData.product_all_one_img[i].id]=jsonData.product_all_one_img[i].content;listProductName[jsonData.product_all_one_img[i].id]=jsonData.product_all_one_img[i].name}
iw=360;ih=360;if(typeof leoOption.homeWidth!=='undefined'){iw=leoOption.homeWidth;ih=leoOption.homeheight}else{iw=$('.product_img_link .img-fluid').first().attr('width');ih=$('.product_img_link .img-fluid').first().attr('height')}
$(".product-all-additional").each(function(){if(listProductImg[$(this).closest('.js-product-miniature').data("id-product")]){var str_image=listProductImg[$(this).closest('.js-product-miniature').data("id-product")];if($(this).data("image-type")){src_image=str_image.replace('home_default',$(this).data("image-type"))}else{src_image=str_image.replace('home_default','home_default')}
var name_image=listProductName[$(this).closest('.js-product-miniature').data("id-product")];$(this).html('<img loading="lazy" class="img-fluid" title="'+name_image+'" alt="'+name_image+'" src="'+src_image+'" width="'+iw+'" height="'+ih+'"/>')}})}
if(jsonData.wishlist_products){$('.ap-total-wishlist').data('wishlist-total',jsonData.wishlist_products);$('.ap-total-wishlist').text(jsonData.wishlist_products)}else{$('.ap-total-wishlist').data('wishlist-total',0);$('.ap-total-wishlist').text('0')}
if(jsonData.compared_products){$('.ap-total-compare').data('compare-total',jsonData.compared_products);$('.ap-total-compare').text(jsonData.compared_products)}else{$('.ap-total-compare').data('compare-total',0);$('.ap-total-compare').text(0)}
if(jsonData.ajaxTab){callshowmore=callajaxcontent=0;$(".leo-ajax-tabs").addClass('loaded');$.each(jsonData.ajaxTab,function(key,value){$("#"+key).html(value);if(value.indexOf('ApProductList')>=0){callshowmore=1}
if(value.indexOf('product_list')>=0){callajaxcontent=1}});if(callshowmore){apshowmore()}
if(callajaxcontent){if(typeof $.LeoCustomAjax!=="undefined"&&$.isFunction($.LeoCustomAjax)){var leoCustomAjax=new $.LeoCustomAjax();leoCustomAjax.processAjax()}
callLeoFeature();activeAnimation()}}}},error:function(){}})}},getCountWishlistCompare:function(){this.leoData+='&wishlist_compare=1'},getCategoryList:function(){var leoCatList="";$(".leo-qty").each(function(){if($(this).data("id")){if(leoCatList)
leoCatList+=","+$(this).data("id");else leoCatList=$(this).data("id")}else{if(leoCatList)
leoCatList+=","+$(this).attr("id");else leoCatList=$(this).attr("id")}});if(leoCatList){leoCatList=leoCatList.replace(/leo-cat-/g,"");this.leoData+='&cat_list='+leoCatList}
return!1},getProductListImage:function(){var leoProInfo="";$(".leo-more-info").each(function(){if(!leoProInfo)
leoProInfo+=$(this).data("idproduct");else leoProInfo+=","+$(this).data("idproduct")});if(leoProInfo){this.leoData+='&product_list_image='+leoProInfo}
return!1},getProductCdownInfo:function(){var leoProCdown="";$(".leo-more-cdown").each(function(){if(!leoProCdown)
leoProCdown+=$(this).data("idproduct");else leoProCdown+=","+$(this).data("idproduct")});if(leoProCdown){this.leoData+='&pro_cdown='+leoProCdown}
return!1},getProductColorInfo:function(){var leoProColor="";$(".leo-more-color").each(function(){if(!leoProColor)
leoProColor+=$(this).data("idproduct");else leoProColor+=","+$(this).data("idproduct")});if(leoProColor){this.leoData+='&pro_color='+leoProColor}
return!1},getTabContent:function(){var tabshortcode="";var tabshortcodekey="";$(".leo-ajax-tabs").each(function(){if(!$(this).hasClass('loaded')){if(!tabshortcode)
tabshortcode+=$(this).data("shortcode");else tabshortcode+="@|@"+$(this).data("shortcode");if(!tabshortcodekey)
tabshortcodekey+=$(this).attr("id");else tabshortcodekey+="@|@"+$(this).attr("id");if(!$(this).find('slick-loading').length){$(this).html('<div class="slick-loading" style="display: block;"><div class="slick-list" style="height: 600px;"> </div></div>')}}});if(tabshortcode){this.leoData+='&tabshortcode='+tabshortcode}
if(tabshortcode){this.leoData+='&tabshortcodekey='+tabshortcodekey;if(tabshortcode&&$('input:radio[name=ajaxtabcate]').length&&$('input:radio[name=ajaxtabcate]:checked').val()){this.leoData+='&ajaxtabcate='+$('input:radio[name=ajaxtabcate]:checked').val()}}
return!1},getSizeContent:function(){var leoAdditional="";$(".product-item-size").each(function(){if(!leoAdditional)
leoAdditional+=$(this).data("idproduct");else leoAdditional+=","+$(this).data("idproduct")});if(leoAdditional){this.leoData+='&product_size='+leoAdditional}
return!1},getAttributeContent:function(){var leoAdditional="";$(".product-item-attribute").each(function(){if(!leoAdditional)
leoAdditional+=$(this).data("idproduct");else leoAdditional+=","+$(this).data("idproduct")});if(leoAdditional){this.leoData+='&product_attribute='+leoAdditional}
return!1},getManufactureName:function(){var leoAdditional="";var testArray=[];$(".product-item-manufacture").each(function(){if(!leoAdditional){leoAdditional+=$(this).data("idmanufacturer");testArray.push($(this).data("idmanufacturer"))}else{if(testArray.indexOf($(this).data("idmanufacturer"))<0){leoAdditional+=","+$(this).data("idmanufacturer");testArray.push($(this).data("idmanufacturer"))}}});if(leoAdditional){this.leoData+='&product_manufacture='+leoAdditional}
return!1},getProductOneImage:function(){var leoAdditional="";$(".product-additional").each(function(){if(!leoAdditional)
leoAdditional+=$(this).data("idproduct");else leoAdditional+=","+$(this).data("idproduct")});if(leoAdditional){this.leoData+='&product_one_img='+leoAdditional}
return!1},getProductAttributeOneImage:function(){var leoAdditionalattribute="0-0";$(".product-attribute-additional").each(function(){leoAdditionalattribute+=","+$(this).closest('.js-product-miniature').data("id-product")+'-'+$(this).closest('.js-product-miniature').data("id-product-attribute")});if(leoAdditionalattribute&&leoAdditionalattribute!='0-0'){this.leoData+='&product_attribute_one_img='+leoAdditionalattribute}
return!1},getProductAllOneImage:function(){var leoAdditional="0";var image_product="0";$(".product-all-additional").each(function(){leoAdditional+=","+$(this).closest('.js-product-miniature').data("id-product");image_product+=","+$(this).data("id-image")});if(leoAdditional){this.leoData+='&product_all_one_img='+leoAdditional+'&image_product='+image_product}
return!1},}}(jQuery));function addJSProduct(currentProduct){$('.thumbs_list_'+currentProduct).serialScroll({items:'li:visible',prev:'.view_scroll_left_'+currentProduct,next:'.view_scroll_right_'+currentProduct,axis:'y',offset:0,start:0,stop:!0,duration:700,step:1,lazy:!0,lock:!1,force:!1,cycle:!1,onBefore:function(e,elem,$pane,$items,pos){if(pos==0){$('.view_scroll_left_'+currentProduct).addClass('disable')}else if(pos==$items.length-1){$('.view_scroll_right_'+currentProduct).addClass('disable')}else{$('.view_scroll_left_'+currentProduct).removeClass('disable');$('.view_scroll_right_'+currentProduct).removeClass('disable')}},});$('.thumbs_list_'+currentProduct).trigger('goto',1);$('.thumbs_list_'+currentProduct).trigger('goto',0)}
function addEffectProducts(){if(typeof(leoOption)!='undefined'&&leoOption.product_list_image){$(".leo-more-info").each(function(){addJSProduct($(this).data("idproduct"))});addEffectProduct()}}
function addEffectProduct(){var speed=800;var effect="easeInOutQuad";$(".leo-more-info").each(function(){var leo_preview=this;$(leo_preview).find(".leo-hover-image").each(function(){$(this).mouseover(function(){var big_image=$(this).attr("rel");var imgElement=$(leo_preview).parent().find(".product-thumbnail img").first();if(!imgElement.length){imgElement=$(leo_preview).parent().find(".product_image img").first()}
if(imgElement.length){$(imgElement).stop().animate({opacity:0},{duration:speed,easing:effect});$(imgElement).first().attr("src",big_image);$(imgElement).first().attr("data-rel",big_image);$(imgElement).stop().animate({opacity:1},{duration:speed,easing:effect})}
if(!$(this).hasClass('shown')){$(leo_preview).find('.shown').removeClass('shown');$(this).parent().addClass('shown')}})});$('.thickbox-ajax-'+$(this).data("idproduct")).fancybox({helpers:{overlay:{locked:!1}},'hideOnContentClick':!0,'transitionIn':'elastic','transitionOut':'elastic'})})}
function addEffOneImg(){var speed=800;var effect="easeInOutQuad";$(".product-additional").each(function(){if($(this).find("img").length){var leo_hover_image=$(this).parent().find("img").first();var leo_preview=$(this);$(this).parent().mouseenter(function(){$(this).find("img").first().stop().animate({opacity:0},{duration:speed,easing:effect});$(leo_preview).stop().animate({opacity:1},{duration:speed,easing:effect})});$(this).parent().mouseleave(function(){$(this).find("img").first().stop().animate({opacity:1},{duration:speed,easing:effect});$(leo_preview).stop().animate({opacity:0},{duration:speed,easing:effect})})}})}
function log(message){console.log(message)}
function activeAnimation(){$(".has-animation").each(function(){onScrollInit($(this))})}
function onScrollInit(items){items.each(function(){var osElement=$(this);var animation=$(osElement).data("animation");var osAnimationDelay=$(osElement).data("animation-delay");var osAnimationDuration=$(osElement).data("animation-duration");var osAnimationIterationCount=$(osElement).data("animation-iteration-count");var osAnimationInfinite=$(osElement).data("animation-infinite");if(osAnimationInfinite==1){var loop_animation='infinite'}else{var loop_animation=osAnimationIterationCount}
osElement.css({"-webkit-animation-delay":osAnimationDelay,"-moz-animation-delay":osAnimationDelay,"animation-delay":osAnimationDelay,"-webkit-animation-duration":osAnimationDuration,"-moz-animation-duration":osAnimationDuration,"animation-duration":osAnimationDuration,"-webkit-animation-iteration-count":loop_animation,"-moz-animation-iteration-count":loop_animation,"animation-iteration-count":loop_animation,});osElement.waypoint(function(){if(osElement.hasClass('has-animation')){osElement.addClass('animated '+animation).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend',function(){$(this).removeClass('has-animation animated '+animation)})}
this.destroy()},{triggerOnce:!0,offset:'100%'})})}
function synSize(name){var obj=$("#"+name);var div=$(obj).closest(".gmap-cover");var gmap=$(div).find(".gmap");$(obj).height($(gmap).height())}
function apshowmore(){$(".btn-show-more").click(function(){var page=parseInt($(this).data('page'));var use_animation=parseInt($(this).data('use-animation'));var btn=$(this);var config=$(this).closest(".ApProductList").find(".apconfig").val();btn.data('reset-text',btn.html());btn.html(btn.data('loading-text'));$.ajax({headers:{"cache-control":"no-cache"},url:prestashop.urls.base_url+'modules/appagebuilder/apajax.php',async:!0,cache:!1,dataType:"Json",data:{"config":config,"p":page,"use_animation":use_animation},success:function(response){var boxCover=$(btn).closest(".box-show-more");if(!response.is_more){$(boxCover).removeClass("open").fadeOut()}
if(response.html){$(boxCover).prev().append(response.html)}
$(btn).data("page",(page+1));if(typeof $.LeoCustomAjax!=="undefined"&&$.isFunction($.LeoCustomAjax)){var leoCustomAjax=new $.LeoCustomAjax();leoCustomAjax.processAjax()}
callLeoFeature();activeAnimation();btn.parents('.ApProductList').find('.product-list-images-mobile').each(function(){if($(this).children().length>1&&!$(this).hasClass('slick-slider')){$(this).slick({slidesToShow:1,slidesToScroll:1,arrows:!0,dots:!0,infinite:!1,rtl:$('body').hasClass('lang-rtl')?!0:!1,})}})}}).always(function(){btn.html(btn.data('reset-text'))})})}(function($){window.addRule=function(selector,styles,sheet){styles=(function(styles){if(typeof styles==="string")return styles;var clone="";for(var prop in styles){if(styles.hasOwnProperty(prop)){var val=styles[prop];prop=prop.replace(/([A-Z])/g,"-$1").toLowerCase();clone+=prop+":"+(prop==="content"?'"'+val+'"':val)+"; "}}
return clone}(styles));try{sheet=sheet||document.styleSheets[document.styleSheets.length-1];if(sheet.insertRule){if(sheet.cssRules!==null&&sheet.cssRules.length!==0)
sheet.insertRule(selector+" {"+styles+"}",sheet.cssRules.length)}else if(sheet.addRule)sheet.addRule(selector,styles)}catch(err){var style=(function(){var style=document.createElement("style");style.appendChild(document.createTextNode(""));document.head.appendChild(style);return style})();style.sheet.insertRule(selector+" {"+styles+"}",0)}
return this};if($)$.fn.addRule=function(styles,sheet){addRule(this.selector,styles,sheet);return this}}(this.jQuery||this.Zepto));function apPopupForm(){if($.cookie('apnewletter'))return;$.fancybox({'content':$(".ap-popup").html(),'wrapCSS':'ap-popup-clone',afterClose:function(event,ui){},beforeShow:function(event,ui){this.inner.append("<div class='turnoff-popup-wrapper text-center'><input id='turnoff-popup-bt' name='turnoff-popup-bt' class='turnoff-popup' type='checkbox'><label for='turnoff-popup-bt'>"+turnoff_popup_text+"</label></div>");$("body").find("#turnoff-popup-bt").trigger('click');$.cookie('apnewletter','1');$('.turnoff-popup').addClass('active');$('.turnoff-popup').click(function(){if(!$(this).hasClass('active')){$.cookie('apnewletter','1');$(this).addClass('active')}else{$.cookie('apnewletter',null);$(this).removeClass('active')}})}})}
$(document).ready(function(){if($(".btn-show-more").length)apshowmore();activeAnimation();if($(".ajaxtabcate").length){$('input:radio[name=ajaxtabcate]').click(function(){$(".leo-ajax-tabs").each(function(){if($(this).find(".product-image").length||$(this).find(".product-title").length){$(this).removeClass('loaded');if(typeof $.LeoCustomAjax!=="undefined"&&$.isFunction($.LeoCustomAjax)){var leoCustomAjax=new $.LeoCustomAjax();leoCustomAjax.processAjax()}}})})}
if($(".tabs-dropdown-menu").length){$(".tabs-dropdown-menu").each(function(){wraper=$(this).parent();tabdrop=$(this);if($(this).hasClass("selecttext")){nav_active=$(wraper).find(".nav-link").first();$(this).find('button').html($(nav_active).find("span").html())}
$(this).find('.dropdown-item').first().addClass('active');$(wraper).find('.nav-link').click(function(){if($(this).hasClass('active')){return}
$(tabdrop).find('.dropdown-item').removeClass('active');cclass=$(this).attr('class');var strArray=cclass.split(" ");formClass="";for(var i=0;i<strArray.length;i++){if(strArray[i].indexOf('form')>=0){formClass=strArray[i];break}}
$(wraper).find('.dropdown-item.'+formClass).addClass('active')});$(tabdrop).find('.dropdown-item').click(function(){$(wraper).find('.nav-link').removeClass('active');cclass=$(this).attr('class');var strArray=cclass.split(" ");formClass="";for(var i=0;i<strArray.length;i++){if(strArray[i].indexOf('form')>=0){formClass=strArray[i];break}}
$(wraper).find('.nav-link.'+formClass).trigger('click')})})}
if($('.ap-popup').length){if($('.ap-popup').hasClass('index-only')&&$('body').attr('id')=='index')
apPopupForm();else apPopupForm()}
$(".has-bg.bg-fullwidth").each(function(){id="#"+$(this).attr("id");bg="";if($(this).data("src")!==undefined)bg="url("+$(this).data("src")+")";bg+=$(this).data("bg_data");$(id+":before").addRule({background:bg})});if(typeof stellar!=='undefined'&&stellar)
$.stellar({horizontalScrolling:!1});currentPosX=[];currentPosY=[];$("div[data-mouse-parallax-strength]").each(function(){currentPos=$(this).css("background-position");if(typeof currentPos=="string"){currentPosArray=currentPos.split(" ")}else{currentPosArray=[$(this).css("background-position-x"),$(this).css("background-position-y")]}
currentPosX[$(this).data("mouse-parallax-rid")]=parseFloat(currentPosArray[0]);currentPosY[$(this).data("mouse-parallax-rid")]=parseFloat(currentPosArray[1]);$(this).mousemove(function(e){newPosX=currentPosX[$(this).data("mouse-parallax-rid")];newPosY=currentPosY[$(this).data("mouse-parallax-rid")];if($(this).data("mouse-parallax-axis")!="axis-y"){mparallaxPageX=e.pageX-$(this).offset().left;if($(this).hasClass("full-bg-screen")){mparallaxPageX=mparallaxPageX-1000}
newPosX=(mparallaxPageX*$(this).data("mouse-parallax-strength")*-1)+newPosX}
if($(this).data("mouse-parallax-axis")!="axis-x"){mparallaxPageY=e.pageY-$(this).offset().top;newPosY=mparallaxPageY*$(this).data("mouse-parallax-strength")*-1}
$(this).css("background-position",newPosX+"px "+newPosY+"px")})});var ytIframeId;var ytVideoId;function onYouTubeIframeAPIReady(){$("div.iframe-youtube-api-tag").each(function(){ytIframeId=$(this).attr("id");ytVideoId=$(this).data("youtube-video-id");new YT.Player(ytIframeId,{videoId:ytVideoId,width:"100%",height:"100%",playerVars:{autoplay:1,controls:0,disablekb:1,fs:0,cc_load_policy:0,iv_load_policy:3,modestbranding:0,rel:0,showinfo:0,start:0},events:{"onReady":function(event){event.target.mute();setInterval(function(){event.target.seekTo(0)},(event.target.getDuration()-1)*1000)}}})})}
onYouTubeIframeAPIReady();if(typeof MediaElementPlayer!=='undefined'){var player1=new MediaElementPlayer('#special-youtube-video1');var player2=new MediaElementPlayer('#special-youtube-video2');if(player1){var auto_find=setInterval(function(){if($('#video-1 .mejs-overlay-play').html()){$('#video-1 .mejs-overlay-play>.mejs-overlay-button').before('<div class="video-name">'+$('#special-youtube-video1').data('name')+'</div>');$('#video-1 .mejs-overlay-play').append('<div class="video-description">Watch video and <span>subscribe us<span></div>');clearInterval(auto_find)}},500)}
if(player2){var auto_find1=setInterval(function(){if($('#video-2 .mejs-overlay-play').html()){$('#video-2 .mejs-overlay-play>.mejs-overlay-button').before('<div class="video-name">'+$('#special-youtube-video2').data('name')+'</div>');$('#video-2 .mejs-overlay-play').append('<div class="video-description">Watch video and <span>subscribe us<span></div>');clearInterval(auto_find1)}},500)}}
current_url=window.location.href;$('.apconfig').each(function(){var enableJS=$(this).data('enablejs');if(enableJS==!1){return}
var leochange='&leopanelchange';var current_url=$(this).data('url');if(!current_url){current_url=window.location.href;current_url=current_url.replace(leochange,"")}
var param=$(this).data('type');var value=$(this).data('id');var re=new RegExp("([?|&])"+param+"=.*?(&|$)","i");if(current_url.match(re))
$(this).attr('href',current_url.replace(re,'$1'+param+"="+value+'$2')+leochange);else{if(current_url.indexOf('?')==-1)
$(this).attr('href',current_url+'?'+param+"="+value+leochange);else $(this).attr('href',current_url+'&'+param+"="+value+leochange)}});$(window).resize(function(){if($('.tab-pane .owl-carousel').length){$('.tab-pane .owl-carousel').each(function(index,element){if(!$(element).parents('.tab-pane').hasClass('active')&&typeof($(element).data('owlCarousel'))!=="undefined"){var w_owl_active_tab=$(element).parents('.tab-pane').siblings('.active').find('.owl-carousel').width();$(element).width(w_owl_active_tab);$(element).data('owlCarousel').updateVars();$(element).width('100%')}})}})
var check_window_w=parseInt($(window).width());if(check_window_w>=992&&check_window_w<1200){addClassLoading('lg')}else if(check_window_w>=768&&check_window_w<992){addClassLoading('md')}else if(check_window_w>=576&&check_window_w<768){addClassLoading('sm')}else if(check_window_w<576){addClassLoading('m')}else{addClassLoading('xl')}
if($('.list-images-mobile').length&&$('.list-images-mobile').children().length>1){$('.list-images-mobile').slick({slidesToShow:1,slidesToScroll:1,arrows:!0,dots:!0,infinite:!1,rtl:$('body').hasClass('lang-rtl')?!0:!1})}
if($('.product-list-images-mobile').length){if($('body').hasClass('lang-rtl')){$('.product-list-images-mobile').each(function(){if($(this).children().length>1){$(this).slick({slidesToShow:1,slidesToScroll:1,arrows:!0,dots:!0,infinite:!1,rtl:!0})}})}else{$('.product-list-images-mobile').each(function(){if($(this).children().length>1){$(this).slick({slidesToShow:1,slidesToScroll:1,arrows:!0,dots:!0,infinite:!1,})}})}
$(document).ajaxComplete(function(event,xhr,settings){if(settings.url.indexOf('apajax')>0){$('.product-list-images-mobile').each(function(){if($('.product-list-images-mobile').hasClass('slick-slider')){function offSlideCarousel(selector){selector.parents('.owl-item').on("touchstart mousedown",function(e){e.stopPropagation()})}
if(window.addEventListener){window.addEventListener("load",offSlideCarousel($(this)),!1)}else if(window.attachEvent){window.attachEvent("onload",offSlideCarousel($(this)))}else{window.onload=offSlideCarousel($(this))}}})}
if(settings.url.indexOf('from-xhr')>0||settings.url.indexOf('amazzingfilter/ajax')>0){if($('body').hasClass('lang-rtl')){$('.product-list-images-mobile').each(function(){if($(this).children().length>1){$(this).slick({slidesToShow:1,slidesToScroll:1,arrows:!0,dots:!0,infinite:!1,rtl:!0})}})}else{$('.product-list-images-mobile').each(function(){if($(this).children().length>1){$(this).slick({slidesToShow:1,slidesToScroll:1,arrows:!0,dots:!0,infinite:!1,})}})}}})}
if($("body").attr("id")=="product"){$(document).ajaxComplete(function(event,xhr,settings){if(settings.url.indexOf('controller=product')>0){if($('.list-images-mobile').length&&$('.list-images-mobile').children().length>1){$('.list-images-mobile').slick({slidesToShow:1,slidesToScroll:1,arrows:!0,dots:!0,rtl:$('body').hasClass('lang-rtl')?!0:!1})}}})}});function addClassLoading($type){$('.timeline-wrapper').each(function(){if($(this).data($type)<=$(this).data('item')){var num_remove_item=$(this).data('item')-$(this).data($type);if($(this).data($type)<$(this).data('item')){var num_remove_item=$(this).data('item')-$(this).data($type);$(this).find('.timeline-parent').slice(-num_remove_item).remove()}
if(12%$(this).data($type)==0){if($type=='m'){$(this).find('.timeline-parent').addClass('col-xs-'+12/$(this).data($type))}else{$(this).find('.timeline-parent').addClass('col-'+$type+'-'+12/$(this).data($type))}}else{$(this).find('.timeline-parent').css({'width':100/$(this).data($type)+'%','float':'left'})}
$('.timeline-wrapper').removeClass('prepare')}})}
function callLeoFeature(){if(typeof(leoBtCart)!='undefined'){leoBtCart()}
if(typeof(leoSelectAttr)!='undefined'){leoSelectAttr()}
if(typeof(LeoWishlistButtonAction)!='undefined'){LeoWishlistButtonAction()}
if(typeof(LeoCompareButtonAction)!='undefined'){LeoCompareButtonAction()}
if(typeof(actionQuickViewLoading)!='undefined'){actionQuickViewLoading()}}
function SetOwlCarouselFirstLast(el){el.find(".owl-item").removeClass("first");el.find(".owl-item.active").first().addClass("first");el.find(".owl-item").removeClass("last");el.find(".owl-item.active").last().addClass("last")}
$(document).ready(function(){if(typeof(ap_list_functions)!='undefined'){$.each(ap_list_functions,function(i,val){val();ap_list_functions[i]=null})}
if(typeof(products_list_functions)!='undefined'){$.each(products_list_functions,function(i,val){val();products_list_functions[i]=null})}
if($("body").attr("id")=="category"&&$('#search_filters').length){$('.facet-label').on('click',function(){$(document).ajaxComplete(function(event,xhr,settings){if(typeof xhr!="undefined"&&typeof xhr.responseJSON!="undefined"&&typeof xhr.responseJSON.products!="undefined"){if(typeof(ap_list_functions)!='undefined'){$.each(ap_list_functions,function(i,val){if(typeof val!="undefined"&&val!=null){val();ap_list_functions[i]=null}})}
if(typeof(products_list_functions)!='undefined'){$.each(products_list_functions,function(i,val){val();products_list_functions[i]=null})}}})})}
$('.ApTabs.AjaxTabs .nav-tabs .nav-item a').on('click',function(){if(!$($(this).attr('href')).find('.hide-loading').length){if(typeof(ap_list_functions)!='undefined'){$.each(ap_list_functions,function(i,val){if(typeof val!="undefined"&&val!=null){val();ap_list_functions[i]=null}})}}})});$(window).load(function(){if(typeof(ap_list_functions_loaded)!='undefined'){for(var i=0;i<ap_list_functions_loaded.length;i++){ap_list_functions_loaded[i]()}}})
$(document).ready(function(){if($('#sitemap').length>0){$('#sitemap .sitemap').prepend(leo_site_map)}
if($('.lazy').length&&jQuery().lazy){$(function(){$('.lazy').lazy({effect:'fadeIn'})});$(document).ajaxComplete(function(){if($('.lazy').length){$('.lazy').lazy({effect:'fadeIn'})}})}
if(typeof approfile_multilang_url!="undefined"){$.each(approfile_multilang_url,function(index,profile){var url_search=prestashop.urls.base_url+profile.iso_code;var url_change=prestashop.urls.base_url+profile.iso_code+'/'+profile.friendly_url+'.html';if($('#leo_block_top').length){var parent_o=$('#leo_block_top .language-selector')}else{var parent_o=$('.language-selector-wrapper')}
parent_o.find('li a').each(function(){var lang_href=$(this).attr('href');if(lang_href.indexOf(url_search)>-1){$(this).attr('href',url_change)}})})}
if($('#leo_block_top').length){var parent_o_currency=$('#leo_block_top .currency-selector')}else{var parent_o_currency=$('.currency-selector')}
parent_o_currency.find('li a').each(function(){var url_link=$(this).attr('href');var id_currency=getParamFromURL("id_currency",url_link);var SubmitCurrency=getParamFromURL("SubmitCurrency",url_link);var current_url=window.location.href;if(prestashop.page.page_name=='product'){var current_url=prestashop.urls.current_url}
var current_url=removeParamFromURL('SubmitCurrency',current_url);var current_url=removeParamFromURL('id_currency',current_url);if(current_url.indexOf('?')==-1){var new_url=current_url+'?SubmitCurrency='+SubmitCurrency+"&id_currency="+id_currency;$(this).attr('href',new_url)}else{var new_url=current_url+'&SubmitCurrency='+SubmitCurrency+"&id_currency="+id_currency;$(this).attr('href',new_url)}});prestashop.on('updateProductList',function(){if(typeof $.LeoCustomAjax!=="undefined"&&$.isFunction($.LeoCustomAjax)){var leoCustomAjax=new $.LeoCustomAjax();leoCustomAjax.processAjax()}});if($('.demo-product-detail[data-menu-type=url] a').length&&prestashop.page.page_name!='product'){$.ajax({type:'POST',headers:{"cache-control":"no-cache"},url:prestashop.urls.base_url+'modules/appagebuilder/apajax.php'+'?rand='+new Date().getTime(),async:!0,cache:!1,dataType:"json",data:{"action":"get-product-link"},success:function(jsonData){if(jsonData){$('.demo-product-detail[data-menu-type=url] a').each(function(){var original_url=$(this).attr('href');var layout_key=original_url.substring(original_url.indexOf('?layout='));var new_url=jsonData.replace('.html','.html'+layout_key);$(this).attr('href',new_url).addClass('updated')});if($('.lazy').length&&jQuery().lazy){if(lazyLoadInstance){lazyLoadInstance.update()}}}},error:function(){}})}});function removeParamFromURL(key,sourceURL){var rtn=sourceURL.split("?")[0],param,params_arr=[],queryString=(sourceURL.indexOf("?")!==-1)?sourceURL.split("?")[1]:"";if(queryString!==""){params_arr=queryString.split("&");for(var i=params_arr.length-1;i>=0;i-=1){param=params_arr[i].split("=")[0];if(param===key){params_arr.splice(i,1)}}
if(params_arr.length>0){rtn=rtn+"?"+params_arr.join("&")}}
return rtn}
function getParamFromURL(key,sourceURL){var rtn=sourceURL.split("?")[0],param,params_arr=[],queryString=(sourceURL.indexOf("?")!==-1)?sourceURL.split("?")[1]:"";if(queryString!==""){params_arr=queryString.split("&");for(var i=params_arr.length-1;i>=0;i-=1){param=params_arr[i].split("=")[0];if(param===key){return params_arr[i].split("=")[1]}}}
return!1}