27 lines
256 KiB
JavaScript
27 lines
256 KiB
JavaScript
/*!
|
||
* jQuery JavaScript Library v3.5.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: 2020-05-04T22:49Z
|
||
*/
|
||
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,(function(e,t){"use strict";var n=[],r=Object.getPrototypeOf,i=n.slice,a=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},o=n.push,s=n.indexOf,u={},l=u.toString,c=u.hasOwnProperty,d=c.toString,h=d.call(Object),f={},A=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},p=function(e){return null!=e&&e===e.window},m=e.document,g={type:!0,src:!0,nonce:!0,noModule:!0};function y(e,t,n){var r,i,a=(n=n||m).createElement("script");if(a.text=e,t)for(r in g)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&a.setAttribute(r,i);n.head.appendChild(a).parentNode.removeChild(a)}function v(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?u[l.call(e)]||"object":typeof e}var w="3.5.1",x=function(e,t){return new x.fn.init(e,t)};function b(e){var t=!!e&&"length"in e&&e.length,n=v(e);return!A(e)&&!p(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}x.fn=x.prototype={jquery:w,constructor:x,length:0,toArray:function(){return i.call(this)},get:function(e){return null==e?i.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return x.each(this,e)},map:function(e){return this.pushStack(x.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(x.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(x.grep(this,(function(e,t){return t%2})))},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:o,sort:n.sort,splice:n.splice},x.extend=x.fn.extend=function(){var e,t,n,r,i,a,o=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof o&&(l=o,o=arguments[s]||{},s++),"object"==typeof o||A(o)||(o={}),s===u&&(o=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&o!==r&&(l&&r&&(x.isPlainObject(r)||(i=Array.isArray(r)))?(n=o[t],a=i&&!Array.isArray(n)?[]:i||x.isPlainObject(n)?n:{},i=!1,o[t]=x.extend(l,a,r)):void 0!==r&&(o[t]=r));return o},x.extend({expando:"jQuery"+(w+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]"!==l.call(e))&&(!(t=r(e))||"function"==typeof(n=c.call(t,"constructor")&&t.constructor)&&d.call(n)===h)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){y(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(b(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},makeArray:function(e,t){var n=t||[];return null!=e&&(b(Object(e))?x.merge(n,"string"==typeof e?[e]:e):o.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:s.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,a=e.length,o=!n;i<a;i++)!t(e[i],i)!==o&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,s=[];if(b(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&s.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&s.push(i);return a(s)},guid:1,support:f}),"function"==typeof Symbol&&(x.fn[Symbol.iterator]=n[Symbol.iterator]),x.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){u["[object "+t+"]"]=t.toLowerCase()}));var S=
|
||
/*!
|
||
* Sizzle CSS Selector Engine v2.3.5
|
||
* https://sizzlejs.com/
|
||
*
|
||
* Copyright JS Foundation and other contributors
|
||
* Released under the MIT license
|
||
* https://js.foundation/
|
||
*
|
||
* Date: 2020-03-14
|
||
*/
|
||
function(e){var t,n,r,i,a,o,s,u,l,c,d,h,f,A,p,m,g,y,v,w="sizzle"+1*new Date,x=e.document,b=0,S=0,C=ue(),T=ue(),F=ue(),k=ue(),I=function(e,t){return e===t&&(d=!0),0},E={}.hasOwnProperty,D=[],N=D.pop,L=D.push,M=D.push,O=D.slice,B=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},j="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",H="[\\x20\\t\\r\\n\\f]",_="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",P="\\[[\\x20\\t\\r\\n\\f]*("+_+")(?:"+H+"*([*^$|!~]?=)"+H+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+_+"))|)"+H+"*\\]",R=":("+_+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",W=new RegExp(H+"+","g"),Q=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),V=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),G=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),U=new RegExp(H+"|>"),q=new RegExp(R),z=new RegExp("^"+_+"$"),Z={ID:new RegExp("^#("+_+")"),CLASS:new RegExp("^\\.("+_+")"),TAG:new RegExp("^("+_+"|[*])"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},$=/HTML$/i,Y=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"<22>":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ae=function(){h()},oe=we((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{M.apply(D=O.call(x.childNodes),x.childNodes),D[x.childNodes.length].nodeType}catch(e){M={apply:D.length?function(e,t){L.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,i){var a,s,l,c,d,A,g,y=t&&t.ownerDocument,x=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==x&&9!==x&&11!==x)return r;if(!i&&(h(t),t=t||f,p)){if(11!==x&&(d=K.exec(e)))if(a=d[1]){if(9===x){if(!(l=t.getElementById(a)))return r;if(l.id===a)return r.push(l),r}else if(y&&(l=y.getElementById(a))&&v(t,l)&&l.id===a)return r.push(l),r}else{if(d[2])return M.apply(r,t.getElementsByTagName(e)),r;if((a=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return M.apply(r,t.getElementsByClassName(a)),r}if(n.qsa&&!k[e+" "]&&(!m||!m.test(e))&&(1!==x||"object"!==t.nodeName.toLowerCase())){if(g=e,y=t,1===x&&(U.test(e)||G.test(e))){for((y=ee.test(e)&&ge(t.parentNode)||t)===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(re,ie):t.setAttribute("id",c=w)),s=(A=o(e)).length;s--;)A[s]=(c?"#"+c:":scope")+" "+ve(A[s]);g=A.join(",")}try{return M.apply(r,y.querySelectorAll(g)),r}catch(t){k(e,!0)}finally{c===w&&t.removeAttribute("id")}}}return u(e.replace(Q,"$1"),t,r,i)}function ue(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function le(e){return e[w]=!0,e}function ce(e){var t=f.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("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function he(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 fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function Ae(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pe(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&&oe(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 i,a=e([],n.length,t),o=a.length;o--;)n[i=a[o]]&&(n[i]=!(r[i]=n[i]))}))}))}function ge(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},a=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!$.test(t||n&&n.nodeName||"HTML")},h=se.setDocument=function(e){var t,i,o=e?e.ownerDocument||e:x;return o!=f&&9===o.nodeType&&o.documentElement?(A=(f=o).documentElement,p=!a(f),x!=f&&(i=f.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",ae,!1):i.attachEvent&&i.attachEvent("onunload",ae)),n.scope=ce((function(e){return A.appendChild(e).appendChild(f.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ce((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ce((function(e){return e.appendChild(f.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=X.test(f.getElementsByClassName),n.getById=ce((function(e){return A.appendChild(e).id=w,!f.getElementsByName||!f.getElementsByName(w).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&&p){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&&p){var n,r,i,a=t.getElementById(e);if(a){if((n=a.getAttributeNode("id"))&&n.value===e)return[a];for(i=t.getElementsByName(e),r=0;a=i[r++];)if((n=a.getAttributeNode("id"))&&n.value===e)return[a]}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=[],i=0,a=t.getElementsByTagName(e);if("*"===e){for(;n=a[i++];)1===n.nodeType&&r.push(n);return r}return a},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&p)return t.getElementsByClassName(e)},g=[],m=[],(n.qsa=X.test(f.querySelectorAll))&&(ce((function(e){var t;A.appendChild(e).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+j+")"),e.querySelectorAll("[id~="+w+"-]").length||m.push("~="),(t=f.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||m.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+w+"+*").length||m.push(".#.+[+~]"),e.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]")})),ce((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=f.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),A.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")}))),(n.matchesSelector=X.test(y=A.matches||A.webkitMatchesSelector||A.mozMatchesSelector||A.oMatchesSelector||A.msMatchesSelector))&&ce((function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),g.push("!=",R)})),m=m.length&&new RegExp(m.join("|")),g=g.length&&new RegExp(g.join("|")),t=X.test(A.compareDocumentPosition),v=t||X.test(A.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},I=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==f||e.ownerDocument==x&&v(x,e)?-1:t==f||t.ownerDocument==x&&v(x,t)?1:c?B(c,e)-B(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,r=0,i=e.parentNode,a=t.parentNode,o=[e],s=[t];if(!i||!a)return e==f?-1:t==f?1:i?-1:a?1:c?B(c,e)-B(c,t):0;if(i===a)return he(e,t);for(n=e;n=n.parentNode;)o.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;o[r]===s[r];)r++;return r?he(o[r],s[r]):o[r]==x?-1:s[r]==x?1:0},f):f},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(h(e),n.matchesSelector&&p&&!k[t+" "]&&(!g||!g.test(t))&&(!m||!m.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){k(t,!0)}return se(t,f,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!=f&&h(e),v(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=f&&h(e);var i=r.attrHandle[t.toLowerCase()],a=i&&E.call(r.attrHandle,t.toLowerCase())?i(e,t,!p):void 0;return void 0!==a?a:n.attributes||!p?e.getAttribute(t):(a=e.getAttributeNode(t))&&a.specified?a.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],i=0,a=0;if(d=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(I),d){for(;t=e[a++];)t===e[a]&&(i=r.push(a));for(;i--;)e.splice(r[i],1)}return c=null,e},i=se.getText=function(e){var t,n="",r=0,a=e.nodeType;if(a){if(1===a||9===a||11===a){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===a||4===a)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=se.selectors={cacheLength:50,createPseudo:le,match:Z,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 Z.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&q.test(n)&&(t=o(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=C[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"("+H+"|$)"))&&C(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 i=se.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(W," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var a="nth"!==e.slice(0,3),o="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,d,h,f,A,p=a!==o?"nextSibling":"previousSibling",m=t.parentNode,g=s&&t.nodeName.toLowerCase(),y=!u&&!s,v=!1;if(m){if(a){for(;p;){for(h=t;h=h[p];)if(s?h.nodeName.toLowerCase()===g:1===h.nodeType)return!1;A=p="only"===e&&!A&&"nextSibling"}return!0}if(A=[o?m.firstChild:m.lastChild],o&&y){for(v=(f=(l=(c=(d=(h=m)[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===b&&l[1])&&l[2],h=f&&m.childNodes[f];h=++f&&h&&h[p]||(v=f=0)||A.pop();)if(1===h.nodeType&&++v&&h===t){c[e]=[b,f,v];break}}else if(y&&(v=f=(l=(c=(d=(h=t)[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===b&&l[1]),!1===v)for(;(h=++f&&h&&h[p]||(v=f=0)||A.pop())&&((s?h.nodeName.toLowerCase()!==g:1!==h.nodeType)||!++v||(y&&((c=(d=h[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]=[b,v]),h!==t)););return(v-=i)===r||v%r==0&&v/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return i[w]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?le((function(e,n){for(var r,a=i(e,t),o=a.length;o--;)e[r=B(e,a[o])]=!(n[r]=a[o])})):function(e){return i(e,0,n)}):i}},pseudos:{not:le((function(e){var t=[],n=[],r=s(e.replace(Q,"$1"));return r[w]?le((function(e,t,n,i){for(var a,o=r(e,null,i,[]),s=e.length;s--;)(a=o[s])&&(e[s]=!(t[s]=a))})):function(e,i,a){return t[0]=e,r(t,null,a,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||i(t)).indexOf(e)>-1}})),lang:le((function(e){return z.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=p?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===A},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:pe(!1),disabled:pe(!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 J.test(e.nodeName)},input:function(e){return Y.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]=fe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=Ae(t);function ye(){}function ve(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function we(e,t,n){var r=t.dir,i=t.next,a=i||r,o=n&&"parentNode"===a,s=S++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||o)return e(t,n,i);return!1}:function(t,n,u){var l,c,d,h=[b,s];if(u){for(;t=t[r];)if((1===t.nodeType||o)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||o)if(c=(d=t[w]||(t[w]={}))[t.uniqueID]||(d[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[a])&&l[0]===b&&l[1]===s)return h[2]=l[2];if(c[a]=h,h[2]=e(t,n,u))return!0}return!1}}function xe(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function be(e,t,n,r,i){for(var a,o=[],s=0,u=e.length,l=null!=t;s<u;s++)(a=e[s])&&(n&&!n(a,r,i)||(o.push(a),l&&t.push(s)));return o}function Se(e,t,n,r,i,a){return r&&!r[w]&&(r=Se(r)),i&&!i[w]&&(i=Se(i,a)),le((function(a,o,s,u){var l,c,d,h=[],f=[],A=o.length,p=a||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),m=!e||!a&&t?p:be(p,h,e,s,u),g=n?i||(a?e:A||r)?[]:o:m;if(n&&n(m,g,s,u),r)for(l=be(g,f),r(l,[],s,u),c=l.length;c--;)(d=l[c])&&(g[f[c]]=!(m[f[c]]=d));if(a){if(i||e){if(i){for(l=[],c=g.length;c--;)(d=g[c])&&l.push(m[c]=d);i(null,g=[],l,u)}for(c=g.length;c--;)(d=g[c])&&(l=i?B(a,d):h[c])>-1&&(a[l]=!(o[l]=d))}}else g=be(g===o?g.splice(A,g.length):g),i?i(null,o,g,u):M.apply(o,g)}))}function Ce(e){for(var t,n,i,a=e.length,o=r.relative[e[0].type],s=o||r.relative[" "],u=o?1:0,c=we((function(e){return e===t}),s,!0),d=we((function(e){return B(t,e)>-1}),s,!0),h=[function(e,n,r){var i=!o&&(r||n!==l)||((t=n).nodeType?c(e,n,r):d(e,n,r));return t=null,i}];u<a;u++)if(n=r.relative[e[u].type])h=[we(xe(h),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[w]){for(i=++u;i<a&&!r.relative[e[i].type];i++);return Se(u>1&&xe(h),u>1&&ve(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(Q,"$1"),n,u<i&&Ce(e.slice(u,i)),i<a&&Ce(e=e.slice(i)),i<a&&ve(e))}h.push(n)}return xe(h)}return ye.prototype=r.filters=r.pseudos,r.setFilters=new ye,o=se.tokenize=function(e,t){var n,i,a,o,s,u,l,c=T[e+" "];if(c)return t?0:c.slice(0);for(s=e,u=[],l=r.preFilter;s;){for(o in n&&!(i=V.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(a=[])),n=!1,(i=G.exec(s))&&(n=i.shift(),a.push({value:n,type:i[0].replace(Q," ")}),s=s.slice(n.length)),r.filter)!(i=Z[o].exec(s))||l[o]&&!(i=l[o](i))||(n=i.shift(),a.push({value:n,type:o,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?se.error(e):T(e,u).slice(0)},s=se.compile=function(e,t){var n,i=[],a=[],s=F[e+" "];if(!s){for(t||(t=o(e)),n=t.length;n--;)(s=Ce(t[n]))[w]?i.push(s):a.push(s);(s=F(e,function(e,t){var n=t.length>0,i=e.length>0,a=function(a,o,s,u,c){var d,A,m,g=0,y="0",v=a&&[],w=[],x=l,S=a||i&&r.find.TAG("*",c),C=b+=null==x?1:Math.random()||.1,T=S.length;for(c&&(l=o==f||o||c);y!==T&&null!=(d=S[y]);y++){if(i&&d){for(A=0,o||d.ownerDocument==f||(h(d),s=!p);m=e[A++];)if(m(d,o||f,s)){u.push(d);break}c&&(b=C)}n&&((d=!m&&d)&&g--,a&&v.push(d))}if(g+=y,n&&y!==g){for(A=0;m=t[A++];)m(v,w,o,s);if(a){if(g>0)for(;y--;)v[y]||w[y]||(w[y]=N.call(u));w=be(w)}M.apply(u,w),c&&!a&&w.length>0&&g+t.length>1&&se.uniqueSort(u)}return c&&(b=C,l=x),v};return n?le(a):a}(a,i))).selector=e}return s},u=se.select=function(e,t,n,i){var a,u,l,c,d,h="function"==typeof e&&e,f=!i&&o(e=h.selector||e);if(n=n||[],1===f.length){if((u=f[0]=f[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&p&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(te,ne),t)||[])[0]))return n;h&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(a=Z.needsContext.test(e)?0:u.length;a--&&(l=u[a],!r.relative[c=l.type]);)if((d=r.find[c])&&(i=d(l.matches[0].replace(te,ne),ee.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(a,1),!(e=i.length&&ve(u)))return M.apply(n,i),n;break}}return(h||s(e,f))(i,t,!p,n,!t||ee.test(e)&&ge(t.parentNode)||t),n},n.sortStable=w.split("").sort(I).join("")===w,n.detectDuplicates=!!d,h(),n.sortDetached=ce((function(e){return 1&e.compareDocumentPosition(f.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(j,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),se}(e);x.find=S,x.expr=S.selectors,x.expr[":"]=x.expr.pseudos,x.uniqueSort=x.unique=S.uniqueSort,x.text=S.getText,x.isXMLDoc=S.isXML,x.contains=S.contains,x.escapeSelector=S.escape;var C=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&x(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},F=x.expr.match.needsContext;function k(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var I=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function E(e,t,n){return A(t)?x.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?x.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?x.grep(e,(function(e){return s.call(t,e)>-1!==n})):x.filter(t,e,n)}x.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,(function(e){return 1===e.nodeType})))},x.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(x(e).filter((function(){for(t=0;t<r;t++)if(x.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)x.find(e,i[t],n);return r>1?x.uniqueSort(n):n},filter:function(e){return this.pushStack(E(this,e||[],!1))},not:function(e){return this.pushStack(E(this,e||[],!0))},is:function(e){return!!E(this,"string"==typeof e&&F.test(e)?x(e):e||[],!1).length}});var D,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(x.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:N.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 x?t[0]:t,x.merge(this,x.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:m,!0)),I.test(r[1])&&x.isPlainObject(t))for(r in t)A(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=m.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):A(e)?void 0!==n.ready?n.ready(e):e(x):x.makeArray(e,this)}).prototype=x.fn,D=x(m);var L=/^(?:parents|prev(?:Until|All))/,M={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}x.fn.extend({has:function(e){var t=x(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(x.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,i=this.length,a=[],o="string"!=typeof e&&x(e);if(!F.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){a.push(n);break}return this.pushStack(a.length>1?x.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?s.call(x(e),this[0]):s.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(x.uniqueSort(x.merge(this.get(),x(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return C(e,"parentNode")},parentsUntil:function(e,t,n){return C(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return C(e,"nextSibling")},prevAll:function(e){return C(e,"previousSibling")},nextUntil:function(e,t,n){return C(e,"nextSibling",n)},prevUntil:function(e,t,n){return C(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(k(e,"template")&&(e=e.content||e),x.merge([],e.childNodes))}},(function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(M[e]||x.uniqueSort(i),L.test(e)&&i.reverse()),this.pushStack(i)}}));var B=/[^\x20\t\r\n\f]+/g;function j(e){return e}function H(e){throw e}function _(e,t,n,r){var i;try{e&&A(i=e.promise)?i.call(e).done(t).fail(n):e&&A(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}x.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return x.each(e.match(B)||[],(function(e,n){t[n]=!0})),t}(e):x.extend({},e);var t,n,r,i,a=[],o=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;o.length;s=-1)for(n=o.shift();++s<a.length;)!1===a[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=a.length,n=!1);e.memory||(n=!1),t=!1,i&&(a=n?[]:"")},l={add:function(){return a&&(n&&!t&&(s=a.length-1,o.push(n)),function t(n){x.each(n,(function(n,r){A(r)?e.unique&&l.has(r)||a.push(r):r&&r.length&&"string"!==v(r)&&t(r)}))}(arguments),n&&!t&&u()),this},remove:function(){return x.each(arguments,(function(e,t){for(var n;(n=x.inArray(t,a,n))>-1;)a.splice(n,1),n<=s&&s--})),this},has:function(e){return e?x.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=o=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=o=[],n||t||(a=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],o.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},x.extend({Deferred:function(t){var n=[["notify","progress",x.Callbacks("memory"),x.Callbacks("memory"),2],["resolve","done",x.Callbacks("once memory"),x.Callbacks("once memory"),0,"resolved"],["reject","fail",x.Callbacks("once memory"),x.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return x.Deferred((function(t){x.each(n,(function(n,r){var i=A(e[r[4]])&&e[r[4]];a[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&A(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(t,r,i){var a=0;function o(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t<a)){if((e=r.apply(s,u))===n.promise())throw new TypeError("Thenable self-resolution");l=e&&("object"==typeof e||"function"==typeof e)&&e.then,A(l)?i?l.call(e,o(a,n,j,i),o(a,n,H,i)):(a++,l.call(e,o(a,n,j,i),o(a,n,H,i),o(a,n,j,n.notifyWith))):(r!==j&&(s=void 0,u=[e]),(i||n.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(e){x.Deferred.exceptionHook&&x.Deferred.exceptionHook(e,c.stackTrace),t+1>=a&&(r!==H&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(x.Deferred.getStackHook&&(c.stackTrace=x.Deferred.getStackHook()),e.setTimeout(c))}}return x.Deferred((function(e){n[0][3].add(o(0,e,A(i)?i:j,e.notifyWith)),n[1][3].add(o(0,e,A(t)?t:j)),n[2][3].add(o(0,e,A(r)?r:H))})).promise()},promise:function(e){return null!=e?x.extend(e,i):i}},a={};return x.each(n,(function(e,t){var o=t[2],s=t[5];i[t[1]]=o.add,s&&o.add((function(){r=s}),n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),o.add(t[3].fire),a[t[0]]=function(){return a[t[0]+"With"](this===a?void 0:this,arguments),this},a[t[0]+"With"]=o.fireWith})),i.promise(a),t&&t.call(a,a),a},when:function(e){var t=arguments.length,n=t,r=Array(n),a=i.call(arguments),o=x.Deferred(),s=function(e){return function(n){r[e]=this,a[e]=arguments.length>1?i.call(arguments):n,--t||o.resolveWith(r,a)}};if(t<=1&&(_(e,o.done(s(n)).resolve,o.reject,!t),"pending"===o.state()||A(a[n]&&a[n].then)))return o.then();for(;n--;)_(a[n],s(n),o.reject);return o.promise()}});var P=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;x.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&P.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},x.readyException=function(t){e.setTimeout((function(){throw t}))};var R=x.Deferred();function W(){m.removeEventListener("DOMContentLoaded",W),e.removeEventListener("load",W),x.ready()}x.fn.ready=function(e){return R.then(e).catch((function(e){x.readyException(e)})),this},x.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--x.readyWait:x.isReady)||(x.isReady=!0,!0!==e&&--x.readyWait>0||R.resolveWith(m,[x]))}}),x.ready.then=R.then,"complete"===m.readyState||"loading"!==m.readyState&&!m.documentElement.doScroll?e.setTimeout(x.ready):(m.addEventListener("DOMContentLoaded",W),e.addEventListener("load",W));var Q=function(e,t,n,r,i,a,o){var s=0,u=e.length,l=null==n;if("object"===v(n))for(s in i=!0,n)Q(e,t,s,n[s],!0,a,o);else if(void 0!==r&&(i=!0,A(r)||(o=!0),l&&(o?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(x(e),n)})),t))for(;s<u;s++)t(e[s],n,o?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):a},V=/^-ms-/,G=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function q(e){return e.replace(V,"ms-").replace(G,U)}var z=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Z(){this.expando=x.expando+Z.uid++}Z.uid=1,Z.prototype={cache:function(e){var t=e[this.expando];return t||(t={},z(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[q(t)]=n;else for(r in t)i[q(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][q(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(q):(t=q(t))in r?[t]:t.match(B)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||x.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&&!x.isEmptyObject(t)}};var $=new Z,Y=new Z,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,X=/[A-Z]/g;function K(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(X,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:J.test(e)?JSON.parse(e):e)}(n)}catch(e){}Y.set(e,t,n)}else n=void 0;return n}x.extend({hasData:function(e){return Y.hasData(e)||$.hasData(e)},data:function(e,t,n){return Y.access(e,t,n)},removeData:function(e,t){Y.remove(e,t)},_data:function(e,t,n){return $.access(e,t,n)},_removeData:function(e,t){$.remove(e,t)}}),x.fn.extend({data:function(e,t){var n,r,i,a=this[0],o=a&&a.attributes;if(void 0===e){if(this.length&&(i=Y.get(a),1===a.nodeType&&!$.get(a,"hasDataAttrs"))){for(n=o.length;n--;)o[n]&&0===(r=o[n].name).indexOf("data-")&&(r=q(r.slice(5)),K(a,r,i[r]));$.set(a,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){Y.set(this,e)})):Q(this,(function(t){var n;if(a&&void 0===t)return void 0!==(n=Y.get(a,e))||void 0!==(n=K(a,e))?n:void 0;this.each((function(){Y.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){Y.remove(this,e)}))}}),x.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=$.get(e,t),n&&(!r||Array.isArray(n)?r=$.access(e,t,x.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),a=x._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete a.stop,i.call(e,(function(){x.dequeue(e,t)}),a)),!r&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return $.get(e,n)||$.access(e,n,{empty:x.Callbacks("once memory").add((function(){$.remove(e,[t+"queue",n])}))})}}),x.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?x.queue(this[0],e):void 0===t?this:this.each((function(){var n=x.queue(this,e,t);x._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&x.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){x.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=x.Deferred(),a=this,o=this.length,s=function(){--r||i.resolveWith(a,[a])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";o--;)(n=$.get(a[o],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=m.documentElement,ie=function(e){return x.contains(e.ownerDocument,e)},ae={composed:!0};re.getRootNode&&(ie=function(e){return x.contains(e.ownerDocument,e)||e.getRootNode(ae)===e.ownerDocument});var oe=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===x.css(e,"display")};function se(e,t,n,r){var i,a,o=20,s=r?function(){return r.cur()}:function(){return x.css(e,t,"")},u=s(),l=n&&n[3]||(x.cssNumber[t]?"":"px"),c=e.nodeType&&(x.cssNumber[t]||"px"!==l&&+u)&&te.exec(x.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;o--;)x.style(e,t,c+l),(1-a)*(1-(a=s()/u||.5))<=0&&(o=0),c/=a;c*=2,x.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e){var t,n=e.ownerDocument,r=e.nodeName,i=ue[r];return i||(t=n.body.appendChild(n.createElement(r)),i=x.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),ue[r]=i,i)}function ce(e,t){for(var n,r,i=[],a=0,o=e.length;a<o;a++)(r=e[a]).style&&(n=r.style.display,t?("none"===n&&(i[a]=$.get(r,"display")||null,i[a]||(r.style.display="")),""===r.style.display&&oe(r)&&(i[a]=le(r))):"none"!==n&&(i[a]="none",$.set(r,"display",n)));for(a=0;a<o;a++)null!=i[a]&&(e[a].style.display=i[a]);return e}x.fn.extend({show:function(){return ce(this,!0)},hide:function(){return ce(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){oe(this)?x(this).show():x(this).hide()}))}});var de,he,fe=/^(?:checkbox|radio)$/i,Ae=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,pe=/^$|^module$|\/(?:java|ecma)script/i;de=m.createDocumentFragment().appendChild(m.createElement("div")),(he=m.createElement("input")).setAttribute("type","radio"),he.setAttribute("checked","checked"),he.setAttribute("name","t"),de.appendChild(he),f.checkClone=de.cloneNode(!0).cloneNode(!0).lastChild.checked,de.innerHTML="<textarea>x</textarea>",f.noCloneChecked=!!de.cloneNode(!0).lastChild.defaultValue,de.innerHTML="<option></option>",f.option=!!de.lastChild;var me={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 ge(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&k(e,t)?x.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)$.set(e[n],"globalEval",!t||$.get(t[n],"globalEval"))}me.tbody=me.tfoot=me.colgroup=me.caption=me.thead,me.th=me.td,f.option||(me.optgroup=me.option=[1,"<select multiple='multiple'>","</select>"]);var ve=/<|&#?\w+;/;function we(e,t,n,r,i){for(var a,o,s,u,l,c,d=t.createDocumentFragment(),h=[],f=0,A=e.length;f<A;f++)if((a=e[f])||0===a)if("object"===v(a))x.merge(h,a.nodeType?[a]:a);else if(ve.test(a)){for(o=o||d.appendChild(t.createElement("div")),s=(Ae.exec(a)||["",""])[1].toLowerCase(),u=me[s]||me._default,o.innerHTML=u[1]+x.htmlPrefilter(a)+u[2],c=u[0];c--;)o=o.lastChild;x.merge(h,o.childNodes),(o=d.firstChild).textContent=""}else h.push(t.createTextNode(a));for(d.textContent="",f=0;a=h[f++];)if(r&&x.inArray(a,r)>-1)i&&i.push(a);else if(l=ie(a),o=ge(d.appendChild(a),"script"),l&&ye(o),n)for(c=0;a=o[c++];)pe.test(a.type||"")&&n.push(a);return d}var xe=/^key/,be=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Se=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function Te(){return!1}function Fe(e,t){return e===function(){try{return m.activeElement}catch(e){}}()==("focus"===t)}function ke(e,t,n,r,i,a){var o,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)ke(e,s,n,r,t[s],a);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===a&&(o=i,(i=function(e){return x().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=x.guid++)),e.each((function(){x.event.add(this,t,i,r,n)}))}function Ie(e,t,n){n?($.set(e,t,!1),x.event.add(e,t,{namespace:!1,handler:function(e){var r,a,o=$.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(x.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=i.call(arguments),$.set(this,t,o),r=n(this,t),this[t](),o!==(a=$.get(this,t))||r?$.set(this,t,!1):a={},o!==a)return e.stopImmediatePropagation(),e.preventDefault(),a.value}else o.length&&($.set(this,t,{value:x.event.trigger(x.extend(o[0],x.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===$.get(e,t)&&x.event.add(e,t,Ce)}x.event={global:{},add:function(e,t,n,r,i){var a,o,s,u,l,c,d,h,f,A,p,m=$.get(e);if(z(e))for(n.handler&&(n=(a=n).handler,i=a.selector),i&&x.find.matchesSelector(re,i),n.guid||(n.guid=x.guid++),(u=m.events)||(u=m.events=Object.create(null)),(o=m.handle)||(o=m.handle=function(t){return void 0!==x&&x.event.triggered!==t.type?x.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(B)||[""]).length;l--;)f=p=(s=Se.exec(t[l])||[])[1],A=(s[2]||"").split(".").sort(),f&&(d=x.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,d=x.event.special[f]||{},c=x.extend({type:f,origType:p,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&x.expr.match.needsContext.test(i),namespace:A.join(".")},a),(h=u[f])||((h=u[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,A,o)||e.addEventListener&&e.addEventListener(f,o)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,c):h.push(c),x.event.global[f]=!0)},remove:function(e,t,n,r,i){var a,o,s,u,l,c,d,h,f,A,p,m=$.hasData(e)&&$.get(e);if(m&&(u=m.events)){for(l=(t=(t||"").match(B)||[""]).length;l--;)if(f=p=(s=Se.exec(t[l])||[])[1],A=(s[2]||"").split(".").sort(),f){for(d=x.event.special[f]||{},h=u[f=(r?d.delegateType:d.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+A.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=h.length;a--;)c=h[a],!i&&p!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(h.splice(a,1),c.selector&&h.delegateCount--,d.remove&&d.remove.call(e,c));o&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,A,m.handle)||x.removeEvent(e,f,m.handle),delete u[f])}else for(f in u)x.event.remove(e,f+t[l],n,r,!0);x.isEmptyObject(u)&&$.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,a,o,s=new Array(arguments.length),u=x.event.fix(e),l=($.get(this,"events")||Object.create(null))[u.type]||[],c=x.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){for(o=x.event.handlers.call(this,u,l),t=0;(i=o[t++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(a=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==a.namespace&&!u.rnamespace.test(a.namespace)||(u.handleObj=a,u.data=a.data,void 0!==(r=((x.event.special[a.origType]||{}).handle||a.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,a,o,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(a=[],o={},n=0;n<u;n++)void 0===o[i=(r=t[n]).selector+" "]&&(o[i]=r.needsContext?x(i,this).index(l)>-1:x.find(i,this,null,[l]).length),o[i]&&a.push(r);a.length&&s.push({elem:l,handlers:a})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(x.Event.prototype,e,{enumerable:!0,configurable:!0,get:A(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[x.expando]?e:new x.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return fe.test(t.type)&&t.click&&k(t,"input")&&Ie(t,"click",Ce),!1},trigger:function(e){var t=this||e;return fe.test(t.type)&&t.click&&k(t,"input")&&Ie(t,"click"),!0},_default:function(e){var t=e.target;return fe.test(t.type)&&t.click&&k(t,"input")&&$.get(t,"click")||k(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},x.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},x.Event=function(e,t){if(!(this instanceof x.Event))return new x.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ce:Te,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&&x.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[x.expando]=!0},x.Event.prototype={constructor:x.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ce,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ce,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ce,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},x.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&&xe.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&be.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},x.event.addProp),x.each({focus:"focusin",blur:"focusout"},(function(e,t){x.event.special[e]={setup:function(){return Ie(this,e,Fe),!1},trigger:function(){return Ie(this,e),!0},delegateType:t}})),x.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,a=e.handleObj;return i&&(i===r||x.contains(r,i))||(e.type=a.origType,n=a.handler.apply(this,arguments),e.type=t),n}}})),x.fn.extend({on:function(e,t,n,r){return ke(this,e,t,n,r)},one:function(e,t,n,r){return ke(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,x(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each((function(){x.event.remove(this,e,n,t)}))}});var Ee=/<script|<style|<link/i,De=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Le(e,t){return k(e,"table")&&k(11!==t.nodeType?t:t.firstChild,"tr")&&x(e).children("tbody")[0]||e}function Me(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Be(e,t){var n,r,i,a,o,s;if(1===t.nodeType){if($.hasData(e)&&(s=$.get(e).events))for(i in $.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)x.event.add(t,i,s[i][n]);Y.hasData(e)&&(a=Y.access(e),o=x.extend({},a),Y.set(t,o))}}function je(e,t){var n=t.nodeName.toLowerCase();"input"===n&&fe.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function He(e,t,n,r){t=a(t);var i,o,s,u,l,c,d=0,h=e.length,p=h-1,m=t[0],g=A(m);if(g||h>1&&"string"==typeof m&&!f.checkClone&&De.test(m))return e.each((function(i){var a=e.eq(i);g&&(t[0]=m.call(this,i,a.html())),He(a,t,n,r)}));if(h&&(o=(i=we(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=x.map(ge(i,"script"),Me)).length;d<h;d++)l=i,d!==p&&(l=x.clone(l,!0,!0),u&&x.merge(s,ge(l,"script"))),n.call(e[d],l,d);if(u)for(c=s[s.length-1].ownerDocument,x.map(s,Oe),d=0;d<u;d++)l=s[d],pe.test(l.type||"")&&!$.access(l,"globalEval")&&x.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?x._evalUrl&&!l.noModule&&x._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},c):y(l.textContent.replace(Ne,""),l,c))}return e}function _e(e,t,n){for(var r,i=t?x.filter(t,e):e,a=0;null!=(r=i[a]);a++)n||1!==r.nodeType||x.cleanData(ge(r)),r.parentNode&&(n&&ie(r)&&ye(ge(r,"script")),r.parentNode.removeChild(r));return e}x.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,a,o,s=e.cloneNode(!0),u=ie(e);if(!(f.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(o=ge(s),r=0,i=(a=ge(e)).length;r<i;r++)je(a[r],o[r]);if(t)if(n)for(a=a||ge(e),o=o||ge(s),r=0,i=a.length;r<i;r++)Be(a[r],o[r]);else Be(e,s);return(o=ge(s,"script")).length>0&&ye(o,!u&&ge(e,"script")),s},cleanData:function(e){for(var t,n,r,i=x.event.special,a=0;void 0!==(n=e[a]);a++)if(z(n)){if(t=n[$.expando]){if(t.events)for(r in t.events)i[r]?x.event.remove(n,r):x.removeEvent(n,r,t.handle);n[$.expando]=void 0}n[Y.expando]&&(n[Y.expando]=void 0)}}}),x.fn.extend({detach:function(e){return _e(this,e,!0)},remove:function(e){return _e(this,e)},text:function(e){return Q(this,(function(e){return void 0===e?x.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 He(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)}))},prepend:function(){return He(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return He(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return He(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&&(x.cleanData(ge(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return x.clone(this,e,t)}))},html:function(e){return Q(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&&!Ee.test(e)&&!me[(Ae.exec(e)||["",""])[1].toLowerCase()]){e=x.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(x.cleanData(ge(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return He(this,arguments,(function(t){var n=this.parentNode;x.inArray(this,e)<0&&(x.cleanData(ge(this)),n&&n.replaceChild(t,this))}),e)}}),x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){x.fn[e]=function(e){for(var n,r=[],i=x(e),a=i.length-1,s=0;s<=a;s++)n=s===a?this:this.clone(!0),x(i[s])[t](n),o.apply(r,n.get());return this.pushStack(r)}}));var Pe=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Re=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},We=function(e,t,n){var r,i,a={};for(i in t)a[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=a[i];return r},Qe=new RegExp(ne.join("|"),"i");function Ve(e,t,n){var r,i,a,o,s=e.style;return(n=n||Re(e))&&(""!==(o=n.getPropertyValue(t)||n[t])||ie(e)||(o=x.style(e,t)),!f.pixelBoxStyles()&&Pe.test(o)&&Qe.test(t)&&(r=s.width,i=s.minWidth,a=s.maxWidth,s.minWidth=s.maxWidth=s.width=o,o=n.width,s.width=r,s.minWidth=i,s.maxWidth=a)),void 0!==o?o+"":o}function Ge(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function t(){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%",re.appendChild(l).appendChild(c);var t=e.getComputedStyle(c);r="1%"!==t.top,u=12===n(t.marginLeft),c.style.right="60%",o=36===n(t.right),i=36===n(t.width),c.style.position="absolute",a=12===n(c.offsetWidth/3),re.removeChild(l),c=null}}function n(e){return Math.round(parseFloat(e))}var r,i,a,o,s,u,l=m.createElement("div"),c=m.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===c.style.backgroundClip,x.extend(f,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),o},pixelPosition:function(){return t(),r},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),a},reliableTrDimensions:function(){var t,n,r,i;return null==s&&(t=m.createElement("table"),n=m.createElement("tr"),r=m.createElement("div"),t.style.cssText="position:absolute;left:-11111px",n.style.height="1px",r.style.height="9px",re.appendChild(t).appendChild(n).appendChild(r),i=e.getComputedStyle(n),s=parseInt(i.height)>3,re.removeChild(t)),s}}))}();var Ue=["Webkit","Moz","ms"],qe=m.createElement("div").style,ze={};function Ze(e){var t=x.cssProps[e]||ze[e];return t||(e in qe?e:ze[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Ue.length;n--;)if((e=Ue[n]+t)in qe)return e}(e)||e)}var $e=/^(none|table(?!-c[ea]).+)/,Ye=/^--/,Je={position:"absolute",visibility:"hidden",display:"block"},Xe={letterSpacing:"0",fontWeight:"400"};function Ke(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function et(e,t,n,r,i,a){var o="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;o<4;o+=2)"margin"===n&&(u+=x.css(e,n+ne[o],!0,i)),r?("content"===n&&(u-=x.css(e,"padding"+ne[o],!0,i)),"margin"!==n&&(u-=x.css(e,"border"+ne[o]+"Width",!0,i))):(u+=x.css(e,"padding"+ne[o],!0,i),"padding"!==n?u+=x.css(e,"border"+ne[o]+"Width",!0,i):s+=x.css(e,"border"+ne[o]+"Width",!0,i));return!r&&a>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-a-u-s-.5))||0),u}function tt(e,t,n){var r=Re(e),i=(!f.boxSizingReliable()||n)&&"border-box"===x.css(e,"boxSizing",!1,r),a=i,o=Ve(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Pe.test(o)){if(!n)return o;o="auto"}return(!f.boxSizingReliable()&&i||!f.reliableTrDimensions()&&k(e,"tr")||"auto"===o||!parseFloat(o)&&"inline"===x.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===x.css(e,"boxSizing",!1,r),(a=s in e)&&(o=e[s])),(o=parseFloat(o)||0)+et(e,t,n||(i?"border":"content"),a,r,o)+"px"}function nt(e,t,n,r,i){return new nt.prototype.init(e,t,n,r,i)}x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ve(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,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,a,o,s=q(t),u=Ye.test(t),l=e.style;if(u||(t=Ze(s)),o=x.cssHooks[t]||x.cssHooks[s],void 0===n)return o&&"get"in o&&void 0!==(i=o.get(e,!1,r))?i:l[t];"string"===(a=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),a="number"),null!=n&&n==n&&("number"!==a||u||(n+=i&&i[3]||(x.cssNumber[s]?"":"px")),f.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),o&&"set"in o&&void 0===(n=o.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,a,o,s=q(t);return Ye.test(t)||(t=Ze(s)),(o=x.cssHooks[t]||x.cssHooks[s])&&"get"in o&&(i=o.get(e,!0,n)),void 0===i&&(i=Ve(e,t,r)),"normal"===i&&t in Xe&&(i=Xe[t]),""===n||n?(a=parseFloat(i),!0===n||isFinite(a)?a||0:i):i}}),x.each(["height","width"],(function(e,t){x.cssHooks[t]={get:function(e,n,r){if(n)return!$e.test(x.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?tt(e,t,r):We(e,Je,(function(){return tt(e,t,r)}))},set:function(e,n,r){var i,a=Re(e),o=!f.scrollboxSize()&&"absolute"===a.position,s=(o||r)&&"border-box"===x.css(e,"boxSizing",!1,a),u=r?et(e,t,r,s,a):0;return s&&o&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(a[t])-et(e,t,"border",!1,a)-.5)),u&&(i=te.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=x.css(e,t)),Ke(0,n,u)}}})),x.cssHooks.marginLeft=Ge(f.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ve(e,"marginLeft"))||e.getBoundingClientRect().left-We(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),x.each({margin:"",padding:"",border:"Width"},(function(e,t){x.cssHooks[e+t]={expand:function(n){for(var r=0,i={},a="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+ne[r]+t]=a[r]||a[r-2]||a[0];return i}},"margin"!==e&&(x.cssHooks[e+t].set=Ke)})),x.fn.extend({css:function(e,t){return Q(this,(function(e,t,n){var r,i,a={},o=0;if(Array.isArray(t)){for(r=Re(e),i=t.length;o<i;o++)a[t[o]]=x.css(e,t[o],!1,r);return a}return void 0!==n?x.style(e,t,n):x.css(e,t)}),e,t,arguments.length>1)}}),x.Tween=nt,nt.prototype={constructor:nt,init:function(e,t,n,r,i,a){this.elem=e,this.prop=n,this.easing=i||x.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=a||(x.cssNumber[n]?"":"px")},cur:function(){var e=nt.propHooks[this.prop];return e&&e.get?e.get(this):nt.propHooks._default.get(this)},run:function(e){var t,n=nt.propHooks[this.prop];return this.options.duration?this.pos=t=x.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):nt.propHooks._default.set(this),this}},nt.prototype.init.prototype=nt.prototype,nt.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=x.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):1!==e.elem.nodeType||!x.cssHooks[e.prop]&&null==e.elem.style[Ze(e.prop)]?e.elem[e.prop]=e.now:x.style(e.elem,e.prop,e.now+e.unit)}}},nt.propHooks.scrollTop=nt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},x.fx=nt.prototype.init,x.fx.step={};var rt,it,at=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function st(){it&&(!1===m.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(st):e.setTimeout(st,x.fx.interval),x.fx.tick())}function ut(){return e.setTimeout((function(){rt=void 0})),rt=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var r,i=(dt.tweeners[t]||[]).concat(dt.tweeners["*"]),a=0,o=i.length;a<o;a++)if(r=i[a].call(n,t,e))return r}function dt(e,t,n){var r,i,a=0,o=dt.prefilters.length,s=x.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var t=rt||ut(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),a=0,o=l.tweens.length;a<o;a++)l.tweens[a].run(r);return s.notifyWith(e,[l,r,n]),r<1&&o?n:(o||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{},easing:x.easing._default},n),originalProperties:t,originalOptions:n,startTime:rt||ut(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(!function(e,t){var n,r,i,a,o;for(n in e)if(i=t[r=q(n)],a=e[n],Array.isArray(a)&&(i=a[1],a=e[n]=a[0]),n!==r&&(e[r]=a,delete e[n]),(o=x.cssHooks[r])&&"expand"in o)for(n in a=o.expand(a),delete e[r],a)n in e||(e[n]=a[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);a<o;a++)if(r=dt.prefilters[a].call(l,e,c,l.opts))return A(r.stop)&&(x._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return x.map(c,ct,l),A(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),x.fx.timer(x.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}x.Animation=x.extend(dt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){A(e)?(t=e,e=["*"]):e=e.match(B);for(var n,r=0,i=e.length;r<i;r++)n=e[r],dt.tweeners[n]=dt.tweeners[n]||[],dt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,a,o,s,u,l,c,d="width"in t||"height"in t,h=this,f={},A=e.style,p=e.nodeType&&oe(e),m=$.get(e,"fxshow");for(r in n.queue||(null==(o=x._queueHooks(e,"fx")).unqueued&&(o.unqueued=0,s=o.empty.fire,o.empty.fire=function(){o.unqueued||s()}),o.unqueued++,h.always((function(){h.always((function(){o.unqueued--,x.queue(e,"fx").length||o.empty.fire()}))}))),t)if(i=t[r],at.test(i)){if(delete t[r],a=a||"toggle"===i,i===(p?"hide":"show")){if("show"!==i||!m||void 0===m[r])continue;p=!0}f[r]=m&&m[r]||x.style(e,r)}if((u=!x.isEmptyObject(t))||!x.isEmptyObject(f))for(r in d&&1===e.nodeType&&(n.overflow=[A.overflow,A.overflowX,A.overflowY],null==(l=m&&m.display)&&(l=$.get(e,"display")),"none"===(c=x.css(e,"display"))&&(l?c=l:(ce([e],!0),l=e.style.display||l,c=x.css(e,"display"),ce([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===x.css(e,"float")&&(u||(h.done((function(){A.display=l})),null==l&&(c=A.display,l="none"===c?"":c)),A.display="inline-block")),n.overflow&&(A.overflow="hidden",h.always((function(){A.overflow=n.overflow[0],A.overflowX=n.overflow[1],A.overflowY=n.overflow[2]}))),u=!1,f)u||(m?"hidden"in m&&(p=m.hidden):m=$.access(e,"fxshow",{display:l}),a&&(m.hidden=!p),p&&ce([e],!0),h.done((function(){for(r in p||ce([e]),$.remove(e,"fxshow"),f)x.style(e,r,f[r])}))),u=ct(p?m[r]:0,r,h),r in m||(m[r]=u.start,p&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?dt.prefilters.unshift(e):dt.prefilters.push(e)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||A(e)&&e,duration:e,easing:n&&t||t&&!A(t)&&t};return x.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in x.fx.speeds?r.duration=x.fx.speeds[r.duration]:r.duration=x.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){A(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(oe).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),a=x.speed(t,n,r),o=function(){var t=dt(this,x.extend({},e),a);(i||$.get(this,"finish"))&&t.stop(!0)};return o.finish=o,i||!1===a.queue?this.each(o):this.queue(a.queue,o)},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&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",a=x.timers,o=$.get(this);if(i)o[i]&&o[i].stop&&r(o[i]);else for(i in o)o[i]&&o[i].stop&&ot.test(i)&&r(o[i]);for(i=a.length;i--;)a[i].elem!==this||null!=e&&a[i].queue!==e||(a[i].anim.stop(n),t=!1,a.splice(i,1));!t&&n||x.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=$.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],a=x.timers,o=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=a.length;t--;)a[t].elem===this&&a[t].queue===e&&(a[t].anim.stop(!0),a.splice(t,1));for(t=0;t<o;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),x.each(["toggle","show","hide"],(function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(lt(t,!0),e,r,i)}})),x.each({slideDown:lt("show"),slideUp:lt("hide"),slideToggle:lt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),x.timers=[],x.fx.tick=function(){var e,t=0,n=x.timers;for(rt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||x.fx.stop(),rt=void 0},x.fx.timer=function(e){x.timers.push(e),x.fx.start()},x.fx.interval=13,x.fx.start=function(){it||(it=!0,st())},x.fx.stop=function(){it=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fn.delay=function(t,n){return t=x.fx&&x.fx.speeds[t]||t,n=n||"fx",this.queue(n,(function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}}))},function(){var e=m.createElement("input"),t=m.createElement("select").appendChild(m.createElement("option"));e.type="checkbox",f.checkOn=""!==e.value,f.optSelected=t.selected,(e=m.createElement("input")).value="t",e.type="radio",f.radioValue="t"===e.value}();var ht,ft=x.expr.attrHandle;x.fn.extend({attr:function(e,t){return Q(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){x.removeAttr(this,e)}))}}),x.extend({attr:function(e,t,n){var r,i,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===e.getAttribute?x.prop(e,t,n):(1===a&&x.isXMLDoc(e)||(i=x.attrHooks[t.toLowerCase()]||(x.expr.match.bool.test(t)?ht:void 0)),void 0!==n?null===n?void x.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=x.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!f.radioValue&&"radio"===t&&k(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(B);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),ht={set:function(e,t,n){return!1===t?x.removeAttr(e,n):e.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=ft[t]||x.find.attr;ft[t]=function(e,t,r){var i,a,o=t.toLowerCase();return r||(a=ft[o],ft[o]=i,i=null!=n(e,t,r)?o:null,ft[o]=a),i}}));var At=/^(?:input|select|textarea|button)$/i,pt=/^(?:a|area)$/i;function mt(e){return(e.match(B)||[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function yt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(B)||[]}x.fn.extend({prop:function(e,t){return Q(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[x.propFix[e]||e]}))}}),x.extend({prop:function(e,t,n){var r,i,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&x.isXMLDoc(e)||(t=x.propFix[t]||t,i=x.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):At.test(e.nodeName)||pt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||(x.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)}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){x.propFix[this.toLowerCase()]=this})),x.fn.extend({addClass:function(e){var t,n,r,i,a,o,s,u=0;if(A(e))return this.each((function(t){x(this).addClass(e.call(this,t,gt(this)))}));if((t=yt(e)).length)for(;n=this[u++];)if(i=gt(n),r=1===n.nodeType&&" "+mt(i)+" "){for(o=0;a=t[o++];)r.indexOf(" "+a+" ")<0&&(r+=a+" ");i!==(s=mt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,a,o,s,u=0;if(A(e))return this.each((function(t){x(this).removeClass(e.call(this,t,gt(this)))}));if(!arguments.length)return this.attr("class","");if((t=yt(e)).length)for(;n=this[u++];)if(i=gt(n),r=1===n.nodeType&&" "+mt(i)+" "){for(o=0;a=t[o++];)for(;r.indexOf(" "+a+" ")>-1;)r=r.replace(" "+a+" "," ");i!==(s=mt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):A(e)?this.each((function(n){x(this).toggleClass(e.call(this,n,gt(this),t),t)})):this.each((function(){var t,i,a,o;if(r)for(i=0,a=x(this),o=yt(e);t=o[i++];)a.hasClass(t)?a.removeClass(t):a.addClass(t);else void 0!==e&&"boolean"!==n||((t=gt(this))&&$.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":$.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+mt(gt(n))+" ").indexOf(t)>-1)return!0;return!1}});var vt=/\r/g;x.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=A(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,x(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=x.map(i,(function(e){return null==e?"":e+""}))),(t=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=x.valHooks[i.type]||x.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(vt,""):null==n?"":n:void 0}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:mt(x.text(e))}},select:{get:function(e){var t,n,r,i=e.options,a=e.selectedIndex,o="select-one"===e.type,s=o?null:[],u=o?a+1:i.length;for(r=a<0?u:o?a:0;r<u;r++)if(((n=i[r]).selected||r===a)&&!n.disabled&&(!n.parentNode.disabled||!k(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,a=x.makeArray(t),o=i.length;o--;)((r=i[o]).selected=x.inArray(x.valHooks.option.get(r),a)>-1)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),x.each(["radio","checkbox"],(function(){x.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=x.inArray(x(e).val(),t)>-1}},f.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),f.focusin="onfocusin"in e;var wt=/^(?:focusinfocus|focusoutblur)$/,xt=function(e){e.stopPropagation()};x.extend(x.event,{trigger:function(t,n,r,i){var a,o,s,u,l,d,h,f,g=[r||m],y=c.call(t,"type")?t.type:t,v=c.call(t,"namespace")?t.namespace.split("."):[];if(o=f=s=r=r||m,3!==r.nodeType&&8!==r.nodeType&&!wt.test(y+x.event.triggered)&&(y.indexOf(".")>-1&&(v=y.split("."),y=v.shift(),v.sort()),l=y.indexOf(":")<0&&"on"+y,(t=t[x.expando]?t:new x.Event(y,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=v.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:x.makeArray(n,[t]),h=x.event.special[y]||{},i||!h.trigger||!1!==h.trigger.apply(r,n))){if(!i&&!h.noBubble&&!p(r)){for(u=h.delegateType||y,wt.test(u+y)||(o=o.parentNode);o;o=o.parentNode)g.push(o),s=o;s===(r.ownerDocument||m)&&g.push(s.defaultView||s.parentWindow||e)}for(a=0;(o=g[a++])&&!t.isPropagationStopped();)f=o,t.type=a>1?u:h.bindType||y,(d=($.get(o,"events")||Object.create(null))[t.type]&&$.get(o,"handle"))&&d.apply(o,n),(d=l&&o[l])&&d.apply&&z(o)&&(t.result=d.apply(o,n),!1===t.result&&t.preventDefault());return t.type=y,i||t.isDefaultPrevented()||h._default&&!1!==h._default.apply(g.pop(),n)||!z(r)||l&&A(r[y])&&!p(r)&&((s=r[l])&&(r[l]=null),x.event.triggered=y,t.isPropagationStopped()&&f.addEventListener(y,xt),r[y](),t.isPropagationStopped()&&f.removeEventListener(y,xt),x.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(e,t,n){var r=x.extend(new x.Event,n,{type:e,isSimulated:!0});x.event.trigger(r,null,t)}}),x.fn.extend({trigger:function(e,t){return this.each((function(){x.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return x.event.trigger(e,t,n,!0)}}),f.focusin||x.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){x.event.simulate(t,e.target,x.event.fix(e))};x.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=$.access(r,t);i||r.addEventListener(e,n,!0),$.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=$.access(r,t)-1;i?$.access(r,t,i):(r.removeEventListener(e,n,!0),$.remove(r,t))}}}));var bt=e.location,St={guid:Date.now()},Ct=/\?/;x.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+t),n};var Tt=/\[\]$/,Ft=/\r?\n/g,kt=/^(?:submit|button|image|reset|file)$/i,It=/^(?:input|select|textarea|keygen)/i;function Et(e,t,n,r){var i;if(Array.isArray(t))x.each(t,(function(t,i){n||Tt.test(e)?r(e,i):Et(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==v(t))r(e,t);else for(i in t)Et(e+"["+i+"]",t[i],n,r)}x.param=function(e,t){var n,r=[],i=function(e,t){var n=A(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,(function(){i(this.name,this.value)}));else for(n in e)Et(n,e[n],t,i);return r.join("&")},x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&It.test(this.nodeName)&&!kt.test(e)&&(this.checked||!fe.test(e))})).map((function(e,t){var n=x(this).val();return null==n?null:Array.isArray(n)?x.map(n,(function(e){return{name:t.name,value:e.replace(Ft,"\r\n")}})):{name:t.name,value:n.replace(Ft,"\r\n")}})).get()}});var Dt=/%20/g,Nt=/#.*$/,Lt=/([?&])_=[^&]*/,Mt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ot=/^(?:GET|HEAD)$/,Bt=/^\/\//,jt={},Ht={},_t="*/".concat("*"),Pt=m.createElement("a");function Rt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,a=t.toLowerCase().match(B)||[];if(A(n))for(;r=a[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Wt(e,t,n,r){var i={},a=e===Ht;function o(s){var u;return i[s]=!0,x.each(e[s]||[],(function(e,s){var l=s(t,n,r);return"string"!=typeof l||a||i[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),o(l),!1)})),u}return o(t.dataTypes[0])||!i["*"]&&o("*")}function Qt(e,t){var n,r,i=x.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&x.extend(!0,e,r),e}Pt.href=bt.href,x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:bt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(bt.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":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Qt(Qt(e,x.ajaxSettings),t):Qt(x.ajaxSettings,e)},ajaxPrefilter:Rt(jt),ajaxTransport:Rt(Ht),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var r,i,a,o,s,u,l,c,d,h,f=x.ajaxSetup({},n),A=f.context||f,p=f.context&&(A.nodeType||A.jquery)?x(A):x.event,g=x.Deferred(),y=x.Callbacks("once memory"),v=f.statusCode||{},w={},b={},S="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(l){if(!o)for(o={};t=Mt.exec(a);)o[t[1].toLowerCase()+" "]=(o[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=o[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return l?a:null},setRequestHeader:function(e,t){return null==l&&(e=b[e.toLowerCase()]=b[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==l&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)C.always(e[C.status]);else for(t in e)v[t]=[v[t],e[t]];return this},abort:function(e){var t=e||S;return r&&r.abort(t),T(0,t),this}};if(g.promise(C),f.url=((t||f.url||bt.href)+"").replace(Bt,bt.protocol+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(B)||[""],null==f.crossDomain){u=m.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=Pt.protocol+"//"+Pt.host!=u.protocol+"//"+u.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=x.param(f.data,f.traditional)),Wt(jt,f,n,C),l)return C;for(d in(c=x.event&&f.global)&&0==x.active++&&x.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Ot.test(f.type),i=f.url.replace(Nt,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Dt,"+")):(h=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=(Ct.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(Lt,"$1"),h=(Ct.test(i)?"&":"?")+"_="+St.guid+++h),f.url=i+h),f.ifModified&&(x.lastModified[i]&&C.setRequestHeader("If-Modified-Since",x.lastModified[i]),x.etag[i]&&C.setRequestHeader("If-None-Match",x.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&C.setRequestHeader("Content-Type",f.contentType),C.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+_t+"; q=0.01":""):f.accepts["*"]),f.headers)C.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(A,C,f)||l))return C.abort();if(S="abort",y.add(f.complete),C.done(f.success),C.fail(f.error),r=Wt(Ht,f,n,C)){if(C.readyState=1,c&&p.trigger("ajaxSend",[C,f]),l)return C;f.async&&f.timeout>0&&(s=e.setTimeout((function(){C.abort("timeout")}),f.timeout));try{l=!1,r.send(w,T)}catch(e){if(l)throw e;T(-1,e)}}else T(-1,"No Transport");function T(t,n,o,u){var d,h,m,w,b,S=n;l||(l=!0,s&&e.clearTimeout(s),r=void 0,a=u||"",C.readyState=t>0?4:0,d=t>=200&&t<300||304===t,o&&(w=function(e,t,n){for(var r,i,a,o,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)a=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){a=i;break}o||(o=i)}a=a||o}if(a)return a!==u[0]&&u.unshift(a),n[a]}(f,C,o)),!d&&x.inArray("script",f.dataTypes)>-1&&(f.converters["text script"]=function(){}),w=function(e,t,n,r){var i,a,o,s,u,l={},c=e.dataTypes.slice();if(c[1])for(o in e.converters)l[o.toLowerCase()]=e.converters[o];for(a=c.shift();a;)if(e.responseFields[a]&&(n[e.responseFields[a]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=a,a=c.shift())if("*"===a)a=u;else if("*"!==u&&u!==a){if(!(o=l[u+" "+a]||l["* "+a]))for(i in l)if((s=i.split(" "))[1]===a&&(o=l[u+" "+s[0]]||l["* "+s[0]])){!0===o?o=l[i]:!0!==l[i]&&(a=s[0],c.unshift(s[1]));break}if(!0!==o)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+u+" to "+a}}}return{state:"success",data:t}}(f,w,C,d),d?(f.ifModified&&((b=C.getResponseHeader("Last-Modified"))&&(x.lastModified[i]=b),(b=C.getResponseHeader("etag"))&&(x.etag[i]=b)),204===t||"HEAD"===f.type?S="nocontent":304===t?S="notmodified":(S=w.state,h=w.data,d=!(m=w.error))):(m=S,!t&&S||(S="error",t<0&&(t=0))),C.status=t,C.statusText=(n||S)+"",d?g.resolveWith(A,[h,S,C]):g.rejectWith(A,[C,S,m]),C.statusCode(v),v=void 0,c&&p.trigger(d?"ajaxSuccess":"ajaxError",[C,f,d?h:m]),y.fireWith(A,[C,S]),c&&(p.trigger("ajaxComplete",[C,f]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,t){return x.get(e,void 0,t,"script")}}),x.each(["get","post"],(function(e,t){x[t]=function(e,n,r,i){return A(n)&&(i=i||r,r=n,n=void 0),x.ajax(x.extend({url:e,type:t,dataType:i,data:n,success:r},x.isPlainObject(e)&&e))}})),x.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),x._evalUrl=function(e,t,n){return x.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){x.globalEval(e,t,n)}})},x.fn.extend({wrapAll:function(e){var t;return this[0]&&(A(e)&&(e=e.call(this[0])),t=x(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 A(e)?this.each((function(t){x(this).wrapInner(e.call(this,t))})):this.each((function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=A(e);return this.each((function(n){x(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){x(this).replaceWith(this.childNodes)})),this}}),x.expr.pseudos.hidden=function(e){return!x.expr.pseudos.visible(e)},x.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},x.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Vt={0:200,1223:204},Gt=x.ajaxSettings.xhr();f.cors=!!Gt&&"withCredentials"in Gt,f.ajax=Gt=!!Gt,x.ajaxTransport((function(t){var n,r;if(f.cors||Gt&&!t.crossDomain)return{send:function(i,a){var o,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)s[o]=t.xhrFields[o];for(o in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(o,i[o]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?a(0,"error"):a(s.status,s.statusText):a(Vt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout((function(){n&&r()}))},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}})),x.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),x.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 x.globalEval(e),e}}}),x.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),x.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=x("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),m.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Ut,qt=[],zt=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=qt.pop()||x.expando+"_"+St.guid++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",(function(t,n,r){var i,a,o,s=!1!==t.jsonp&&(zt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&zt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=A(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(zt,"$1"+i):!1!==t.jsonp&&(t.url+=(Ct.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return o||x.error(i+" was not called"),o[0]},t.dataTypes[0]="json",a=e[i],e[i]=function(){o=arguments},r.always((function(){void 0===a?x(e).removeProp(i):e[i]=a,t[i]&&(t.jsonpCallback=n.jsonpCallback,qt.push(i)),o&&A(a)&&a(o[0]),o=a=void 0})),"script"})),f.createHTMLDocument=((Ut=m.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ut.childNodes.length),x.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(f.createHTMLDocument?((r=(t=m.implementation.createHTMLDocument("")).createElement("base")).href=m.location.href,t.head.appendChild(r)):t=m),a=!n&&[],(i=I.exec(e))?[t.createElement(i[1])]:(i=we([e],t,a),a&&a.length&&x(a).remove(),x.merge([],i.childNodes)));var r,i,a},x.fn.load=function(e,t,n){var r,i,a,o=this,s=e.indexOf(" ");return s>-1&&(r=mt(e.slice(s)),e=e.slice(0,s)),A(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),o.length>0&&x.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){a=arguments,o.html(r?x("<div>").append(x.parseHTML(e)).find(r):e)})).always(n&&function(e,t){o.each((function(){n.apply(this,a||[e.responseText,t,e])}))}),this},x.expr.pseudos.animated=function(e){return x.grep(x.timers,(function(t){return e===t.elem})).length},x.offset={setOffset:function(e,t,n){var r,i,a,o,s,u,l=x.css(e,"position"),c=x(e),d={};"static"===l&&(e.style.position="relative"),s=c.offset(),a=x.css(e,"top"),u=x.css(e,"left"),("absolute"===l||"fixed"===l)&&(a+u).indexOf("auto")>-1?(o=(r=c.position()).top,i=r.left):(o=parseFloat(a)||0,i=parseFloat(u)||0),A(t)&&(t=t.call(e,n,x.extend({},s))),null!=t.top&&(d.top=t.top-s.top+o),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):("number"==typeof d.top&&(d.top+="px"),"number"==typeof d.left&&(d.left+="px"),c.css(d))}},x.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){x.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],i={top:0,left:0};if("fixed"===x.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"===x.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=x(e).offset()).top+=x.css(e,"borderTopWidth",!0),i.left+=x.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-x.css(r,"marginTop",!0),left:t.left-i.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===x.css(e,"position");)e=e.offsetParent;return e||re}))}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;x.fn[e]=function(r){return Q(this,(function(e,r,i){var a;if(p(e)?a=e:9===e.nodeType&&(a=e.defaultView),void 0===i)return a?a[t]:e[r];a?a.scrollTo(n?a.pageXOffset:i,n?i:a.pageYOffset):e[r]=i}),e,r,arguments.length)}})),x.each(["top","left"],(function(e,t){x.cssHooks[t]=Ge(f.pixelPosition,(function(e,n){if(n)return n=Ve(e,t),Pe.test(n)?x(e).position()[t]+"px":n}))})),x.each({Height:"height",Width:"width"},(function(e,t){x.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){x.fn[r]=function(i,a){var o=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===a?"margin":"border");return Q(this,(function(t,n,i){var a;return p(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(a=t.documentElement,Math.max(t.body["scroll"+e],a["scroll"+e],t.body["offset"+e],a["offset"+e],a["client"+e])):void 0===i?x.css(t,n,s):x.style(t,n,i,s)}),t,o?i:void 0,o)}}))})),x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){x.fn[t]=function(e){return this.on(t,e)}})),x.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)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),x.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){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}));var Zt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;x.proxy=function(e,t){var n,r,a;if("string"==typeof t&&(n=e[t],t=e,e=n),A(e))return r=i.call(arguments,2),(a=function(){return e.apply(t||this,r.concat(i.call(arguments)))}).guid=e.guid=e.guid||x.guid++,a},x.holdReady=function(e){e?x.readyWait++:x.ready(!0)},x.isArray=Array.isArray,x.parseJSON=JSON.parse,x.nodeName=k,x.isFunction=A,x.isWindow=p,x.camelCase=q,x.type=v,x.now=Date.now,x.isNumeric=function(e){var t=x.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},x.trim=function(e){return null==e?"":(e+"").replace(Zt,"")},"function"==typeof define&&define.amd&&define("jquery",[],(function(){return x}));var $t=e.jQuery,Yt=e.$;return x.noConflict=function(t){return e.$===x&&(e.$=Yt),t&&e.jQuery===x&&(e.jQuery=$t),x},void 0===t&&(e.jQuery=e.$=x),x})),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports&&"function"==typeof require?require("jquery"):jQuery)}((function(e){"use strict";function t(n,r){var i=e.noop,a=this,o={ajaxSettings:{},autoSelectFirst:!1,appendTo:document.body,serviceUrl:null,lookup:null,onSelect:null,width:"auto",minChars:1,maxHeight:300,deferRequestBy:0,params:{},formatResult:t.formatResult,delimiter:null,zIndex:9999,type:"GET",noCache:!1,onSearchStart:i,onSearchComplete:i,onSearchError:i,preserveInput:!1,containerClass:"autocomplete-suggestions",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0,preventBadQueries:!0,lookupFilter:function(e,t,n){return-1!==e.value.toLowerCase().indexOf(n)},paramName:"query",transformResult:function(t){return"string"==typeof t?e.parseJSON(t):t},showNoSuggestionNotice:!1,noSuggestionNotice:"No results",orientation:"bottom",forceFixPosition:!1};a.element=n,a.el=e(n),a.suggestions=[],a.badQueries=[],a.selectedIndex=-1,a.currentValue=a.element.value,a.intervalId=0,a.cachedResponse={},a.onChangeInterval=null,a.onChange=null,a.isLocal=!1,a.suggestionsContainer=null,a.noSuggestionsContainer=null,a.options=e.extend({},o,r),a.classes={selected:"autocomplete-selected",suggestion:"autocomplete-suggestion"},a.hint=null,a.hintValue="",a.selection=null,a.initialize(),a.setOptions(r)}var n={escapeRegExChars:function(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},createNode:function(e){var t=document.createElement("div");return t.className=e,t.style.position="absolute",t.style.display="none",t}},r=27,i=9,a=13,o=38,s=39,u=40;t.utils=n,e.Autocomplete=t,t.formatResult=function(e,t){if(!t)return e.value;var r="("+n.escapeRegExChars(t)+")";return e.value.replace(new RegExp(r,"gi"),"<strong>$1</strong>").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/<(\/?strong)>/g,"<$1>")},t.prototype={killerFn:null,initialize:function(){var n,r=this,i="."+r.classes.suggestion,a=r.classes.selected,o=r.options;r.element.setAttribute("autocomplete","off"),r.killerFn=function(t){e(t.target).closest("."+r.options.containerClass).length||(r.killSuggestions(),r.disableKillerFn())},r.noSuggestionsContainer=e('<div class="autocomplete-no-suggestion"></div>').html(this.options.noSuggestionNotice).get(0),r.suggestionsContainer=t.utils.createNode(o.containerClass),(n=e(r.suggestionsContainer)).appendTo(o.appendTo),"auto"!==o.width&&n.css("width",o.width),n.on("mouseover.autocomplete",i,(function(){r.activate(e(this).data("index"))})),n.on("mouseout.autocomplete",(function(){r.selectedIndex=-1,n.children("."+a).removeClass(a)})),n.on("click.autocomplete",i,(function(){return r.select(e(this).data("index")),!1})),r.fixPositionCapture=function(){r.visible&&r.fixPosition()},e(window).on("resize.autocomplete",r.fixPositionCapture),r.el.on("keydown.autocomplete",(function(e){r.onKeyPress(e)})),r.el.on("keyup.autocomplete",(function(e){r.onKeyUp(e)})),r.el.on("blur.autocomplete",(function(){r.onBlur()})),r.el.on("focus.autocomplete",(function(){r.onFocus()})),r.el.on("change.autocomplete",(function(e){r.onKeyUp(e)})),r.el.on("input.autocomplete",(function(e){r.onKeyUp(e)}))},onFocus:function(){var e=this;e.fixPosition(),e.el.val().length>=e.options.minChars&&e.onValueChange()},onBlur:function(){this.enableKillerFn()},abortAjax:function(){var e=this;e.currentRequest&&(e.currentRequest.abort(),e.currentRequest=null)},setOptions:function(t){var n=this,r=n.options;e.extend(r,t),n.isLocal=e.isArray(r.lookup),n.isLocal&&(r.lookup=n.verifySuggestionsFormat(r.lookup)),r.orientation=n.validateOrientation(r.orientation,"bottom"),e(n.suggestionsContainer).css({"max-height":r.maxHeight+"px",width:r.width+"px","z-index":r.zIndex})},clearCache:function(){this.cachedResponse={},this.badQueries=[]},clear:function(){this.clearCache(),this.currentValue="",this.suggestions=[]},disable:function(){var e=this;e.disabled=!0,clearInterval(e.onChangeInterval),e.abortAjax()},enable:function(){this.disabled=!1},fixPosition:function(){var t=this,n=e(t.suggestionsContainer),r=n.parent().get(0);if(r===document.body||t.options.forceFixPosition){var i=t.options.orientation,a=n.outerHeight(),o=t.el.outerHeight(),s=t.el.offset(),u={top:s.top,left:s.left};if("auto"===i){var l=e(window).height(),c=e(window).scrollTop(),d=-c+s.top-a,h=c+l-(s.top+o+a);i=Math.max(d,h)===d?"top":"bottom"}if(u.top+="top"===i?-a:o,r!==document.body){var f,A=n.css("opacity");t.visible||n.css("opacity",0).show(),f=n.offsetParent().offset(),u.top-=f.top,u.left-=f.left,t.visible||n.css("opacity",A).hide()}"auto"===t.options.width&&(u.width=t.el.outerWidth()+"px"),n.css(u)}},enableKillerFn:function(){e(document).on("click.autocomplete",this.killerFn)},disableKillerFn:function(){e(document).off("click.autocomplete",this.killerFn)},killSuggestions:function(){var e=this;e.stopKillSuggestions(),e.intervalId=window.setInterval((function(){e.visible&&(e.options.preserveInput||e.el.val(e.currentValue),e.hide()),e.stopKillSuggestions()}),50)},stopKillSuggestions:function(){window.clearInterval(this.intervalId)},isCursorAtEnd:function(){var e,t=this.el.val().length,n=this.element.selectionStart;return"number"==typeof n?n===t:!document.selection||((e=document.selection.createRange()).moveStart("character",-t),t===e.text.length)},onKeyPress:function(e){var t=this;if(t.disabled||t.visible||e.which!==u||!t.currentValue){if(!t.disabled&&t.visible){switch(e.which){case r:t.el.val(t.currentValue),t.hide();break;case s:if(t.hint&&t.options.onHint&&t.isCursorAtEnd()){t.selectHint();break}return;case i:if(t.hint&&t.options.onHint)return void t.selectHint();if(-1===t.selectedIndex)return void t.hide();if(t.select(t.selectedIndex),!1===t.options.tabDisabled)return;break;case a:if(-1===t.selectedIndex)return void t.hide();t.select(t.selectedIndex);break;case o:t.moveUp();break;case u:t.moveDown();break;default:return}e.stopImmediatePropagation(),e.preventDefault()}}else t.suggest()},onKeyUp:function(e){var t=this;if(!t.disabled){switch(e.which){case o:case u:return}clearInterval(t.onChangeInterval),t.currentValue!==t.el.val()&&(t.findBestHint(),t.options.deferRequestBy>0?t.onChangeInterval=setInterval((function(){t.onValueChange()}),t.options.deferRequestBy):t.onValueChange())}},onValueChange:function(){var t=this,n=t.options,r=t.el.val(),i=t.getQuery(r);return t.selection&&t.currentValue!==i&&(t.selection=null,(n.onInvalidateSelection||e.noop).call(t.element)),clearInterval(t.onChangeInterval),t.currentValue=r,t.selectedIndex=-1,n.triggerSelectOnValidInput&&t.isExactMatch(i)?void t.select(0):void(i.length<n.minChars?t.hide():t.getSuggestions(i))},isExactMatch:function(e){var t=this.suggestions;return 1===t.length&&t[0].value.toLowerCase()===e.toLowerCase()},getQuery:function(t){var n,r=this.options.delimiter;return r?(n=t.split(r),e.trim(n[n.length-1])):t},getSuggestionsLocal:function(t){var n,r=this.options,i=t.toLowerCase(),a=r.lookupFilter,o=parseInt(r.lookupLimit,10);return n={suggestions:e.grep(r.lookup,(function(e){return a(e,t,i)}))},o&&n.suggestions.length>o&&(n.suggestions=n.suggestions.slice(0,o)),n},getSuggestions:function(t){var n,r,i,a,o=this,s=o.options,u=s.serviceUrl;if(s.params[s.paramName]=t,r=s.ignoreParams?null:s.params,!1!==s.onSearchStart.call(o.element,s.params)){if(e.isFunction(s.lookup))return void s.lookup(t,(function(e){o.suggestions=e.suggestions,o.suggest(),s.onSearchComplete.call(o.element,t,e.suggestions)}));o.isLocal?n=o.getSuggestionsLocal(t):(e.isFunction(u)&&(u=u.call(o.element,t)),i=u+"?"+e.param(r||{}),n=o.cachedResponse[i]),n&&e.isArray(n.suggestions)?(o.suggestions=n.suggestions,o.suggest(),s.onSearchComplete.call(o.element,t,n.suggestions)):o.isBadQuery(t)?s.onSearchComplete.call(o.element,t,[]):(o.abortAjax(),a={url:u,data:r,type:s.type,dataType:s.dataType},e.extend(a,s.ajaxSettings),o.currentRequest=e.ajax(a).done((function(e){var n;o.currentRequest=null,n=s.transformResult(e,t),o.processResponse(n,t,i),s.onSearchComplete.call(o.element,t,n.suggestions)})).fail((function(e,n,r){s.onSearchError.call(o.element,t,e,n,r)})))}},isBadQuery:function(e){if(!this.options.preventBadQueries)return!1;for(var t=this.badQueries,n=t.length;n--;)if(0===e.indexOf(t[n]))return!0;return!1},hide:function(){var t=this,n=e(t.suggestionsContainer);e.isFunction(t.options.onHide)&&t.visible&&t.options.onHide.call(t.element,n),t.visible=!1,t.selectedIndex=-1,clearInterval(t.onChangeInterval),e(t.suggestionsContainer).hide(),t.signalHint(null)},suggest:function(){if(this.suggestions.length){var t,n=this,r=n.options,i=r.groupBy,a=r.formatResult,o=n.getQuery(n.currentValue),s=n.classes.suggestion,u=n.classes.selected,l=e(n.suggestionsContainer),c=e(n.noSuggestionsContainer),d=r.beforeRender,h="",f=function(e,n){var r=e.data[i];return t===r?"":'<div class="autocomplete-group"><strong>'+(t=r)+"</strong></div>"};return r.triggerSelectOnValidInput&&n.isExactMatch(o)?void n.select(0):(e.each(n.suggestions,(function(e,t){i&&(h+=f(t,0)),h+='<div class="'+s+'" data-index="'+e+'">'+a(t,o,e)+"</div>"})),this.adjustContainerWidth(),c.detach(),l.html(h),e.isFunction(d)&&d.call(n.element,l,n.suggestions),n.fixPosition(),l.show(),r.autoSelectFirst&&(n.selectedIndex=0,l.scrollTop(0),l.children("."+s).first().addClass(u)),n.visible=!0,void n.findBestHint())}this.options.showNoSuggestionNotice?this.noSuggestions():this.hide()},noSuggestions:function(){var t=this,n=e(t.suggestionsContainer),r=e(t.noSuggestionsContainer);this.adjustContainerWidth(),r.detach(),n.empty(),n.append(r),t.fixPosition(),n.show(),t.visible=!0},adjustContainerWidth:function(){var t,n=this,r=n.options,i=e(n.suggestionsContainer);"auto"===r.width&&(t=n.el.outerWidth(),i.css("width",t>0?t:300))},findBestHint:function(){var t=this,n=t.el.val().toLowerCase(),r=null;n&&(e.each(t.suggestions,(function(e,t){var i=0===t.value.toLowerCase().indexOf(n);return i&&(r=t),!i})),t.signalHint(r))},signalHint:function(t){var n="",r=this;t&&(n=r.currentValue+t.value.substr(r.currentValue.length)),r.hintValue!==n&&(r.hintValue=n,r.hint=t,(this.options.onHint||e.noop)(n))},verifySuggestionsFormat:function(t){return t.length&&"string"==typeof t[0]?e.map(t,(function(e){return{value:e,data:null}})):t},validateOrientation:function(t,n){return t=e.trim(t||"").toLowerCase(),-1===e.inArray(t,["auto","bottom","top"])&&(t=n),t},processResponse:function(e,t,n){var r=this,i=r.options;e.suggestions=r.verifySuggestionsFormat(e.suggestions),i.noCache||(r.cachedResponse[n]=e,i.preventBadQueries&&!e.suggestions.length&&r.badQueries.push(t)),t===r.getQuery(r.currentValue)&&(r.suggestions=e.suggestions,r.suggest())},activate:function(t){var n,r=this,i=r.classes.selected,a=e(r.suggestionsContainer),o=a.find("."+r.classes.suggestion);return a.find("."+i).removeClass(i),r.selectedIndex=t,-1!==r.selectedIndex&&o.length>r.selectedIndex?(n=o.get(r.selectedIndex),e(n).addClass(i),n):null},selectHint:function(){var t=this,n=e.inArray(t.hint,t.suggestions);t.select(n)},select:function(e){this.hide(),this.onSelect(e)},moveUp:function(){var t=this;if(-1!==t.selectedIndex)return 0===t.selectedIndex?(e(t.suggestionsContainer).children().first().removeClass(t.classes.selected),t.selectedIndex=-1,t.el.val(t.currentValue),void t.findBestHint()):void t.adjustScroll(t.selectedIndex-1)},moveDown:function(){var e=this;e.selectedIndex!==e.suggestions.length-1&&e.adjustScroll(e.selectedIndex+1)},adjustScroll:function(t){var n=this,r=n.activate(t);if(r){var i,a,o,s=e(r).outerHeight();i=r.offsetTop,o=(a=e(n.suggestionsContainer).scrollTop())+n.options.maxHeight-s,a>i?e(n.suggestionsContainer).scrollTop(i):i>o&&e(n.suggestionsContainer).scrollTop(i-n.options.maxHeight+s),n.options.preserveInput||n.el.val(n.getValue(n.suggestions[t].value)),n.signalHint(null)}},onSelect:function(t){var n=this,r=n.options.onSelect,i=n.suggestions[t];n.currentValue=n.getValue(i.value),n.currentValue===n.el.val()||n.options.preserveInput||n.el.val(n.currentValue),n.signalHint(null),n.suggestions=[],n.selection=i,e.isFunction(r)&&r.call(n.element,i)},getValue:function(e){var t,n,r=this.options.delimiter;return r?1===(n=(t=this.currentValue).split(r)).length?e:t.substr(0,t.length-n[n.length-1].length)+e:e},dispose:function(){var t=this;t.el.off(".autocomplete").removeData("autocomplete"),t.disableKillerFn(),e(window).off("resize.autocomplete",t.fixPositionCapture),e(t.suggestionsContainer).remove()}},e.fn.autocomplete=e.fn.devbridgeAutocomplete=function(n,r){var i="autocomplete";return arguments.length?this.each((function(){var a=e(this),o=a.data(i);"string"==typeof n?o&&"function"==typeof o[n]&&o[n](r):(o&&o.dispose&&o.dispose(),o=new t(this,n),a.data(i,o))})):this.first().data(i)}})),
|
||
/*! NoSleep.js v0.11.0 - git.io/vfn01 - Rich Tibbett - MIT license */
|
||
function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.NoSleep=t():e.NoSleep=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return 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 i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));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=0)}([function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=n(1),a=i.webm,o=i.mp4,s="undefined"!=typeof navigator&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream,u="wakeLock"in navigator,l=function(){function e(){var t=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),u){this._wakeLock=null;var n=function(){null!==t._wakeLock&&"visible"===document.visibilityState&&t.enable()};document.addEventListener("visibilitychange",n),document.addEventListener("fullscreenchange",n)}else s?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",a),this._addSourceToVideo(this.noSleepVideo,"mp4",o),this.noSleepVideo.addEventListener("loadedmetadata",(function(){t.noSleepVideo.duration<=1?t.noSleepVideo.setAttribute("loop",""):t.noSleepVideo.addEventListener("timeupdate",(function(){t.noSleepVideo.currentTime>.5&&(t.noSleepVideo.currentTime=Math.random())}))})))}return r(e,[{key:"_addSourceToVideo",value:function(e,t,n){var r=document.createElement("source");r.src=n,r.type="video/"+t,e.appendChild(r)}},{key:"enable",value:function(){var e=this;u?navigator.wakeLock.request("screen").then((function(t){e._wakeLock=t,console.log("Wake Lock active."),e._wakeLock.addEventListener("release",(function(){console.log("Wake Lock released.")}))})).catch((function(e){console.error(e.name+", "+e.message)})):s?(this.disable(),console.warn("\n NoSleep enabled for older iOS devices. This can interrupt\n active or long-running network requests from completing successfully.\n See https://github.com/richtr/NoSleep.js/issues/15 for more details.\n "),this.noSleepTimer=window.setInterval((function(){document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))}),15e3)):this.noSleepVideo.play()}},{key:"disable",value:function(){u?(this._wakeLock.release(),this._wakeLock=null):s?this.noSleepTimer&&(console.warn("\n NoSleep now disabled for older iOS devices.\n "),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause()}}]),e}();e.exports=l},function(e,t,n){"use strict";e.exports={webm:"data:video/webm;base64,GkXfo0AgQoaBAUL3gQFC8oEEQvOBCEKCQAR3ZWJtQoeBAkKFgQIYU4BnQI0VSalmQCgq17FAAw9CQE2AQAZ3aGFtbXlXQUAGd2hhbW15RIlACECPQAAAAAAAFlSua0AxrkAu14EBY8WBAZyBACK1nEADdW5khkAFVl9WUDglhohAA1ZQOIOBAeBABrCBCLqBCB9DtnVAIueBAKNAHIEAAIAwAQCdASoIAAgAAUAmJaQAA3AA/vz0AAA=",mp4:"data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC8wYF///v3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0MiByMjQ3OSBkZDc5YTYxIC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTEgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9MiBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0wIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MCA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0wIHRocmVhZHM9NiBsb29rYWhlYWRfdGhyZWFkcz0xIHNsaWNlZF90aHJlYWRzPTAgbnI9MCBkZWNpbWF0ZT0xIGludGVybGFjZWQ9MCBibHVyYXlfY29tcGF0PTAgY29uc3RyYWluZWRfaW50cmE9MCBiZnJhbWVzPTMgYl9weXJhbWlkPTIgYl9hZGFwdD0xIGJfYmlhcz0wIGRpcmVjdD0xIHdlaWdodGI9MSBvcGVuX2dvcD0wIHdlaWdodHA9MSBrZXlpbnQ9MzAwIGtleWludF9taW49MzAgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD0xMCByYz1jcmYgbWJ0cmVlPTEgY3JmPTIwLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IHZidl9tYXhyYXRlPTIwMDAwIHZidl9idWZzaXplPTI1MDAwIGNyZl9tYXg9MC4wIG5hbF9ocmQ9bm9uZSBmaWxsZXI9MCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAAOWWIhAA3//p+C7v8tDDSTjf97w55i3SbRPO4ZY+hkjD5hbkAkL3zpJ6h/LR1CAABzgB1kqqzUorlhQAAAAxBmiQYhn/+qZYADLgAAAAJQZ5CQhX/AAj5IQADQGgcIQADQGgcAAAACQGeYUQn/wALKCEAA0BoHAAAAAkBnmNEJ/8ACykhAANAaBwhAANAaBwAAAANQZpoNExDP/6plgAMuSEAA0BoHAAAAAtBnoZFESwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBnqVEJ/8ACykhAANAaBwAAAAJAZ6nRCf/AAsoIQADQGgcIQADQGgcAAAADUGarDRMQz/+qZYADLghAANAaBwAAAALQZ7KRRUsK/8ACPkhAANAaBwAAAAJAZ7pRCf/AAsoIQADQGgcIQADQGgcAAAACQGe60Qn/wALKCEAA0BoHAAAAA1BmvA0TEM//qmWAAy5IQADQGgcIQADQGgcAAAAC0GfDkUVLCv/AAj5IQADQGgcAAAACQGfLUQn/wALKSEAA0BoHCEAA0BoHAAAAAkBny9EJ/8ACyghAANAaBwAAAANQZs0NExDP/6plgAMuCEAA0BoHAAAAAtBn1JFFSwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBn3FEJ/8ACyghAANAaBwAAAAJAZ9zRCf/AAsoIQADQGgcIQADQGgcAAAADUGbeDRMQz/+qZYADLkhAANAaBwAAAALQZ+WRRUsK/8ACPghAANAaBwhAANAaBwAAAAJAZ+1RCf/AAspIQADQGgcAAAACQGft0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bm7w0TEM//qmWAAy4IQADQGgcAAAAC0Gf2kUVLCv/AAj5IQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHAAAAAkBn/tEJ/8ACykhAANAaBwAAAANQZvgNExDP/6plgAMuSEAA0BoHCEAA0BoHAAAAAtBnh5FFSwr/wAI+CEAA0BoHAAAAAkBnj1EJ/8ACyghAANAaBwhAANAaBwAAAAJAZ4/RCf/AAspIQADQGgcAAAADUGaJDRMQz/+qZYADLghAANAaBwAAAALQZ5CRRUsK/8ACPkhAANAaBwhAANAaBwAAAAJAZ5hRCf/AAsoIQADQGgcAAAACQGeY0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bmmg0TEM//qmWAAy5IQADQGgcAAAAC0GehkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGepUQn/wALKSEAA0BoHAAAAAkBnqdEJ/8ACyghAANAaBwAAAANQZqsNExDP/6plgAMuCEAA0BoHCEAA0BoHAAAAAtBnspFFSwr/wAI+SEAA0BoHAAAAAkBnulEJ/8ACyghAANAaBwhAANAaBwAAAAJAZ7rRCf/AAsoIQADQGgcAAAADUGa8DRMQz/+qZYADLkhAANAaBwhAANAaBwAAAALQZ8ORRUsK/8ACPkhAANAaBwAAAAJAZ8tRCf/AAspIQADQGgcIQADQGgcAAAACQGfL0Qn/wALKCEAA0BoHAAAAA1BmzQ0TEM//qmWAAy4IQADQGgcAAAAC0GfUkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGfcUQn/wALKCEAA0BoHAAAAAkBn3NEJ/8ACyghAANAaBwhAANAaBwAAAANQZt4NExC//6plgAMuSEAA0BoHAAAAAtBn5ZFFSwr/wAI+CEAA0BoHCEAA0BoHAAAAAkBn7VEJ/8ACykhAANAaBwAAAAJAZ+3RCf/AAspIQADQGgcAAAADUGbuzRMQn/+nhAAYsAhAANAaBwhAANAaBwAAAAJQZ/aQhP/AAspIQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHAAACiFtb292AAAAbG12aGQAAAAA1YCCX9WAgl8AAAPoAAAH/AABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAGGlvZHMAAAAAEICAgAcAT////v7/AAAF+XRyYWsAAABcdGtoZAAAAAPVgIJf1YCCXwAAAAEAAAAAAAAH0AAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAygAAAMoAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAB9AAABdwAAEAAAAABXFtZGlhAAAAIG1kaGQAAAAA1YCCX9WAgl8AAV+QAAK/IFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAUcbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAAE3HN0YmwAAACYc3RzZAAAAAAAAAABAAAAiGF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAygDKAEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAAyYXZjQwFNQCj/4QAbZ01AKOyho3ySTUBAQFAAAAMAEAAr8gDxgxlgAQAEaO+G8gAAABhzdHRzAAAAAAAAAAEAAAA8AAALuAAAABRzdHNzAAAAAAAAAAEAAAABAAAB8GN0dHMAAAAAAAAAPAAAAAEAABdwAAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAAC7gAAAAAQAAF3AAAAABAAAAAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAEEc3RzegAAAAAAAAAAAAAAPAAAAzQAAAAQAAAADQAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAANAAAADQAAAQBzdGNvAAAAAAAAADwAAAAwAAADZAAAA3QAAAONAAADoAAAA7kAAAPQAAAD6wAAA/4AAAQXAAAELgAABEMAAARcAAAEbwAABIwAAAShAAAEugAABM0AAATkAAAE/wAABRIAAAUrAAAFQgAABV0AAAVwAAAFiQAABaAAAAW1AAAFzgAABeEAAAX+AAAGEwAABiwAAAY/AAAGVgAABnEAAAaEAAAGnQAABrQAAAbPAAAG4gAABvUAAAcSAAAHJwAAB0AAAAdTAAAHcAAAB4UAAAeeAAAHsQAAB8gAAAfjAAAH9gAACA8AAAgmAAAIQQAACFQAAAhnAAAIhAAACJcAAAMsdHJhawAAAFx0a2hkAAAAA9WAgl/VgIJfAAAAAgAAAAAAAAf8AAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAACsm1kaWEAAAAgbWRoZAAAAADVgIJf1YCCXwAArEQAAWAAVcQAAAAAACdoZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU3RlcmVvAAAAAmNtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAidzdGJsAAAAZ3N0c2QAAAAAAAAAAQAAAFdtcDRhAAAAAAAAAAEAAAAAAAAAAAACABAAAAAArEQAAAAAADNlc2RzAAAAAAOAgIAiAAIABICAgBRAFQAAAAADDUAAAAAABYCAgAISEAaAgIABAgAAABhzdHRzAAAAAAAAAAEAAABYAAAEAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAAUc3RzegAAAAAAAAAGAAAAWAAAAXBzdGNvAAAAAAAAAFgAAAOBAAADhwAAA5oAAAOtAAADswAAA8oAAAPfAAAD5QAAA/gAAAQLAAAEEQAABCgAAAQ9AAAEUAAABFYAAARpAAAEgAAABIYAAASbAAAErgAABLQAAATHAAAE3gAABPMAAAT5AAAFDAAABR8AAAUlAAAFPAAABVEAAAVXAAAFagAABX0AAAWDAAAFmgAABa8AAAXCAAAFyAAABdsAAAXyAAAF+AAABg0AAAYgAAAGJgAABjkAAAZQAAAGZQAABmsAAAZ+AAAGkQAABpcAAAauAAAGwwAABskAAAbcAAAG7wAABwYAAAcMAAAHIQAABzQAAAc6AAAHTQAAB2QAAAdqAAAHfwAAB5IAAAeYAAAHqwAAB8IAAAfXAAAH3QAAB/AAAAgDAAAICQAACCAAAAg1AAAIOwAACE4AAAhhAAAIeAAACH4AAAiRAAAIpAAACKoAAAiwAAAItgAACLwAAAjCAAAAFnVkdGEAAAAObmFtZVN0ZXJlbwAAAHB1ZHRhAAAAaG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAO2lsc3QAAAAzqXRvbwAAACtkYXRhAAAAAQAAAABIYW5kQnJha2UgMC4xMC4yIDIwMTUwNjExMDA="}}])})),document.addEventListener("DOMContentLoaded",()=>{index.init()});const index=(()=>{const e={},t=6e5,n=new NoSleep;let r=!1,i=null,a=null,o=0,s=!1;const u=e=>{const t=e.target.value;localStorage.setItem("TwcUnits",t),m(),C("units",t)},l=t=>{let n;this.previousSuggestionValue!==t.value&&(e[t.value]?c(e[t.value]):(n=$.ajax({url:"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/find",data:{text:t.value,magicKey:t.data,f:"json"}}),n.done(e=>{const t=e.locations[0];t?c(t.feature.geometry):alert("An unexpected error occurred. Please try a different search string.")})))},c=e=>{const t={lat:Math.round2(e.y,4),lon:Math.round2(e.x,4)};p(t),localStorage.setItem("TwcQuery",document.getElementById("txtAddress").value)},d=()=>(document.fullscreenElement?f():h(),navigation.isPlaying()?D():N(),x(),!1),h=()=>{const e=document.getElementById("divTwc"),t=e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen;t?t.call(e,{navigationUI:"hide"}):(window.scrollTo(0,0),s=!0),x()},f=()=>{s&&(s=!1),document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()},A=()=>(C("navButton","menu"),x(),!1),p=e=>{e&&(p.latLon=e);const t=p.latLon;if(!t)return;document.getElementById("txtAddress").blur(),F(),i=null,m(),C("latLon",t)},m=()=>{let e="(None)";if(i)switch(navigation.units()){case UNITS.english:e=i.toLocaleString("en-US",{weekday:"short",month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"});break;default:e=i.toLocaleString("en-GB",{weekday:"short",month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"})}document.getElementById("spanLastRefresh").innerHTML=e,i&&document.getElementById("chkAutoRefresh").checked&&T()},g=()=>(p(),x(),!1),y=()=>(C("navButton","next"),x(),!1),v=()=>(C("navButton","previous"),x(),!1);let w=null;const x=()=>{document.activeElement.blur(),document.getElementById("divTwcBottom").classList.remove("hidden"),document.getElementById("divTwcBottom").classList.add("visible"),w&&(clearTimeout(w),w=null),w=setTimeout(()=>{document.fullscreenElement&&(document.getElementById("divTwcBottom").classList.remove("visible"),document.getElementById("divTwcBottom").classList.add("hidden"))},2e3)},b=e=>{const t=e.keyCode||e.which;if(document.fullscreenElement||document.activeElement===document.body)switch(t){case 32:return S(),!1;case 39:case 34:return y(),!1;case 37:case 33:return v(),!1;case 36:return A(),!1;case 48:return g(),!1;case 70:return d(),!1}};Math.round2=(e,t)=>Number(Math.round(e+"e"+t)+"e-"+t);const S=()=>(C("navButton","playToggle"),x(),!1),C=(e,t={})=>{navigation.message({type:e,message:t})},T=()=>{if(a)return;o=0;const e=()=>{o+=500;let e=t-o;e<0&&(e=0);const n=new Date(e);document.getElementById("spanRefreshCountDown").innerHTML=(n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes())+":"+(n.getSeconds()<10?"0"+n.getSeconds():n.getSeconds()),o>=t&&p()};a=window.setInterval(e,500),e()},F=()=>{a&&(window.clearInterval(a),document.getElementById("spanRefreshCountDown").innerHTML="--:--",a=null)},k=async()=>{if(!navigator.geolocation)return;const e=await new Promise(e=>{navigator.geolocation.getCurrentPosition(e)}),t=e.coords.latitude,n=e.coords.longitude;let r;try{r=await $.ajax({url:location.protocol+"//geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/reverseGeocode",data:{location:n+","+t,distance:1e3,f:"json"}})}catch(e){console.error("Unable to fetch reverse geocode"),console.error(e.status,e.responseJSONe)}const i=`${r.address.Postal}, ${r.address.City}, ${states.getTwoDigitCode(r.address.Region)}, ${r.address.CountryCode}`,a=document.getElementById("txtAddress");a.value=i,a.blur(),a.focus(),localStorage.setItem("TwcQuery",i)},I=e=>{document.getElementById("spanCity").innerHTML=e.city+", ",document.getElementById("spanState").innerHTML=e.state,document.getElementById("spanStationId").innerHTML=e.stationId,document.getElementById("spanRadarId").innerHTML=e.radarId,document.getElementById("spanZoneId").innerHTML=e.zoneId};let E=!1;const D=()=>{n.enable(),E=!0},N=()=>{E&&(n.disable(),E=!1)};return{init:()=>{document.getElementById("txtAddress").addEventListener("focus",e=>{e.target.select()}),document.getElementById("NavigateMenu").addEventListener("click",A),document.getElementById("NavigateRefresh").addEventListener("click",g),document.getElementById("NavigateNext").addEventListener("click",y),document.getElementById("NavigatePrevious").addEventListener("click",v),document.getElementById("NavigatePlay").addEventListener("click",S),document.getElementById("ToggleFullScreen").addEventListener("click",d),document.getElementById("btnGetGps").addEventListener("click",k),document.getElementById("divTwc").addEventListener("click",()=>{document.fullscreenElement&&x()}),document.addEventListener("keydown",b),document.addEventListener("touchmove",e=>{s&&e.preventDefault()});const e=["Land Features","Bay","Channel","Cove","Dam","Delta","Gulf","Lagoon","Lake","Ocean","Reef","Reservoir","Sea","Sound","Strait","Waterfall","Wharf","Amusement Park","Historical Monument","Landmark","Tourist Attraction","Zoo","College","Beach","Campground","Golf Course","Harbor","Nature Reserve","Other Parks and Outdoors","Park","Racetrack","Scenic Overlook","Ski Resort","Sports Center","Sports Field","Wildlife Reserve","Airport","Ferry","Marina","Pier","Port","Resort","Postal","Populated Place"].join(",");$("#frmGetLatLng #txtAddress").devbridgeAutocomplete({serviceUrl:location.protocol+"//geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/suggest",deferRequestBy:300,paramName:"text",params:{f:"json",countryCode:"USA",category:e,maxSuggestions:10},dataType:"json",transformResult:e=>(r&&(r=!1,window.setTimeout(()=>{$(t.suggestionsContainer.children[0]).click()},1)),{suggestions:$.map(e.suggestions,(function(e){return{value:e.text,data:e.magicKey}}))}),minChars:3,showNoSuggestionNotice:!0,noSuggestionNotice:"No results found. Please try a different search string.",onSelect:l,width:490});const t=$("#frmGetLatLng #txtAddress").devbridgeAutocomplete();$("#frmGetLatLng").submit(()=>(t.suggestions[0]&&$(t.suggestionsContainer.children[0]).click(),!1));const n=localStorage.getItem("TwcQuery");if(n){r=!0;const e=document.getElementById("txtAddress");e.value=n,e.blur(),e.focus()}const a=localStorage.getItem("TwcPlay");null!==a&&"true"!==a||C("navButton","play"),document.getElementById("btnClearQuery").addEventListener("click",()=>{document.getElementById("spanCity").innerHTML="",document.getElementById("spanState").innerHTML="",document.getElementById("spanStationId").innerHTML="",document.getElementById("spanRadarId").innerHTML="",document.getElementById("spanZoneId").innerHTML="",localStorage.removeItem("TwcScrollText"),localStorage.removeItem("TwcScrollTextChecked"),document.getElementById("chkAutoRefresh").checked=!0,localStorage.removeItem("TwcAutoRefresh"),document.getElementById("radEnglish").checked=!0,localStorage.removeItem("TwcUnits"),localStorage.removeItem("TwcPlay"),C("navButton","play"),localStorage.removeItem("TwcQuery")});const o=localStorage.getItem("TwcUnits");o&&"ENGLISH"!==o?"METRIC"===o&&(document.getElementById("radMetric").checked=!0):document.getElementById("radEnglish").checked=!0,document.getElementById("radEnglish").addEventListener("change",u),document.getElementById("radMetric").addEventListener("change",u),document.getElementById("chkAutoRefresh").addEventListener("change",e=>{const t=e.target.checked;i&&(t?T():F()),localStorage.setItem("TwcAutoRefresh",t)});const c=localStorage.getItem("TwcAutoRefresh");document.getElementById("chkAutoRefresh").checked=!c||"true"===c},message:e=>{const t=document.getElementById("NavigatePlay");if(e.type)switch(e.type){case"loaded":i=new Date,m();break;case"weatherParameters":I(e.message);break;case"isPlaying":localStorage.setItem("TwcPlay",navigation.isPlaying()),navigation.isPlaying()?(D(),t.title="Pause",t.src="images/nav/ic_pause_white_24dp_1x.png"):(N(),t.title="Play",t.src="images/nav/ic_play_arrow_white_24dp_1x.png");break;default:console.error("Unknown event '"+e.eventType)}}}})();!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.SuperGif=t()}(this,(function(){var e=function(e){return e.reduce((function(e,t){return 2*e+t}),0)},t=function(e){for(var t=[],n=7;n>=0;n--)t.push(!!(e&1<<n));return t},n=function(e){this.data=e,this.len=this.data.length,this.pos=0,this.readByte=function(){if(this.pos>=this.data.length)throw new Error("Attempted to read past end of stream.");return e instanceof Uint8Array?e[this.pos++]:255&e.charCodeAt(this.pos++)},this.readBytes=function(e){for(var t=[],n=0;n<e;n++)t.push(this.readByte());return t},this.read=function(e){for(var t="",n=0;n<e;n++)t+=String.fromCharCode(this.readByte());return t},this.readUnsigned=function(){var e=this.readBytes(2);return(e[1]<<8)+e[0]}},r=function(n,r){r||(r={});var i=function(e){for(var t=[],r=0;r<e;r++)t.push(n.readBytes(3));return t},a=function(){var e,t;t="";do{e=n.readByte(),t+=n.read(e)}while(0!==e);return t},o=function(o){o.leftPos=n.readUnsigned(),o.topPos=n.readUnsigned(),o.width=n.readUnsigned(),o.height=n.readUnsigned();var s=t(n.readByte());o.lctFlag=s.shift(),o.interlaced=s.shift(),o.sorted=s.shift(),o.reserved=s.splice(0,2),o.lctSize=e(s.splice(0,3)),o.lctFlag&&(o.lct=i(1<<o.lctSize+1)),o.lzwMinCodeSize=n.readByte();var u=a();o.pixels=function(e,t){for(var n,r,i=0,a=function(e){for(var n=0,r=0;r<e;r++)t.charCodeAt(i>>3)&1<<(7&i)&&(n|=1<<r),i++;return n},o=[],s=1<<e,u=s+1,l=e+1,c=[],d=function(){c=[],l=e+1;for(var t=0;t<s;t++)c[t]=[t];c[s]=[],c[u]=null};;)if(r=n,(n=a(l))!==s){if(n===u)break;if(n<c.length)r!==s&&c.push(c[r].concat(c[n][0]));else{if(n!==c.length)throw new Error("Invalid LZW code.");c.push(c[r].concat(c[r][0]))}o.push.apply(o,c[n]),c.length===1<<l&&l<12&&l++}else d();return o}(o.lzwMinCodeSize,u),o.interlaced&&(o.pixels=function(e,t){for(var n=new Array(e.length),r=e.length/t,i=function(r,i){var a=e.slice(i*t,(i+1)*t);n.splice.apply(n,[r*t,t].concat(a))},a=[0,4,2,1],o=[8,8,4,2],s=0,u=0;u<4;u++)for(var l=a[u];l<r;l+=o[u])i(l,s),s++;return n}(o.pixels,o.width)),r.img&&r.img(o)},s=function(){var i={};switch(i.sentinel=n.readByte(),String.fromCharCode(i.sentinel)){case"!":i.type="ext",function(i){switch(i.label=n.readByte(),i.label){case 249:i.extType="gce",function(i){n.readByte();var a=t(n.readByte());i.reserved=a.splice(0,3),i.disposalMethod=e(a.splice(0,3)),i.userInput=a.shift(),i.transparencyGiven=a.shift(),i.delayTime=n.readUnsigned(),i.transparencyIndex=n.readByte(),i.terminator=n.readByte(),r.gce&&r.gce(i)}(i);break;case 254:i.extType="com",function(e){e.comment=a(),r.com&&r.com(e)}(i);break;case 1:i.extType="pte",function(e){n.readByte(),e.ptHeader=n.readBytes(12),e.ptData=a(),r.pte&&r.pte(e)}(i);break;case 255:i.extType="app",function(e){switch(n.readByte(),e.identifier=n.read(8),e.authCode=n.read(3),e.identifier){case"NETSCAPE":!function(e){n.readByte(),e.unknown=n.readByte(),e.iterations=n.readUnsigned(),e.terminator=n.readByte(),r.app&&r.app.NETSCAPE&&r.app.NETSCAPE(e)}(e);break;default:!function(e){e.appData=a(),r.app&&r.app[e.identifier]&&r.app[e.identifier](e)}(e)}}(i);break;default:i.extType="unknown",function(e){e.data=a(),r.unknown&&r.unknown(e)}(i)}}(i);break;case",":i.type="img",o(i);break;case";":i.type="eof",r.eof&&r.eof(i);break;default:throw new Error("Unknown block: 0x"+i.sentinel.toString(16))}"eof"!==i.type&&setTimeout(s,0)};!function(){var a={};if(a.sig=n.read(3),a.ver=n.read(3),"GIF"!==a.sig)throw new Error("Not a GIF file.");a.width=n.readUnsigned(),a.height=n.readUnsigned();var o=t(n.readByte());a.gctFlag=o.shift(),a.colorRes=e(o.splice(0,3)),a.sorted=o.shift(),a.gctSize=e(o.splice(0,3)),a.bgColor=n.readByte(),a.pixelAspectRatio=n.readByte(),a.gctFlag&&(a.gct=i(1<<a.gctSize+1)),r.hdr&&r.hdr(a)}(),setTimeout(s,0)};return function(e){var t,i,a={vp_l:0,vp_t:0,vp_w:null,vp_h:null,c_w:null,c_h:null};for(var o in e)a[o]=e[o];a.vp_w&&a.vp_h&&(a.is_vp=!0);var s=null,u=!1,l=null,c=null,d=null,h=null,f=null,A=null,p=null,m=!0,g=!1,y=[],v=[],w=a.src;a.gif||(a.gif=document.createElement("img"),a.gif.setAttribute("rel:animated_src",w),a.gif.src="");var x=a.gif;void 0===a.auto_play&&(a.auto_play=!x.getAttribute("rel:auto_play")||"1"==x.getAttribute("rel:auto_play"));var b,S,C,T,F=a.hasOwnProperty("on_end")?a.on_end:null,k=a.hasOwnProperty("loop_delay")?a.loop_delay:0,I=a.hasOwnProperty("loop_mode")?a.loop_mode:"auto",E=!a.hasOwnProperty("draw_while_loading")||a.draw_while_loading,D=!!E&&(!a.hasOwnProperty("show_progress_bar")||a.show_progress_bar),N=a.hasOwnProperty("progressbar_height")?a.progressbar_height:25,L=a.hasOwnProperty("progressbar_background_color")?a.progressbar_background_color:"rgba(255,255,255,0.4)",M=a.hasOwnProperty("progressbar_foreground_color")?a.progressbar_foreground_color:"rgba(255,0,22,.8)",O=function(){l=null,c=null,f=d,d=null,A=null},B=function(){try{r(t,G)}catch(e){_("parse")}},j=function(e,t){b.width=e*q(),b.height=t*q(),C.style.minWidth=e*q()+"px",T.width=e,T.height=t,T.style.width=e+"px",T.style.height=t+"px",T.getContext("2d").setTransform(1,0,0,1,0,0)},H=function(e,t,n){if(n&&D){var r,i,o,s=N;if(a.is_vp)g?(i=(a.vp_t+a.vp_h-s)/q(),s/=q(),r=a.vp_l/q()+e/t*(a.vp_w/q()),o=b.width/q()):(i=a.vp_t+a.vp_h-s,s=s,r=a.vp_l+e/t*a.vp_w,o=b.width);else i=(b.height-s)/(g?q():1),r=e/t*b.width/(g?q():1),o=b.width/(g?q():1),s/=g?q():1;S.fillStyle=L,S.fillRect(r,i,o-r,s),S.fillStyle=M,S.fillRect(0,i,r,s)}},_=function(e){s=e,i={width:x.width,height:x.height},y=[],S.fillStyle="black",S.fillRect(0,0,a.c_w?a.c_w:i.width,a.c_h?a.c_h:i.height),S.strokeStyle="red",S.lineWidth=3,S.moveTo(0,0),S.lineTo(a.c_w?a.c_w:i.width,a.c_h?a.c_h:i.height),S.moveTo(0,a.c_h?a.c_h:i.height),S.lineTo(a.c_w?a.c_w:i.width,0),S.stroke()},P=function(){A&&(y.push({data:A.getImageData(0,0,i.width,i.height),delay:c}),v.push({x:0,y:0}))},R=function(){var e,t,n,r=-1,i=0,o=function(e){r+=e,l()},u=(e=!1,t=function(){null!==F&&F(x),i++,!1!==I||i<0?n():(e=!1,m=!1)},n=function(){if(e=m){o(1);var i=10*y[r].delay;i||(i=100),0==(r+1+y.length)%y.length?(i+=k,setTimeout(t,i)):setTimeout(n,i)}},function(){e||setTimeout(n,0)}),l=function(){var e;(r=parseInt(r,10))>y.length-1&&(r=0),r<0&&(r=0),e=v[r],T.getContext("2d").putImageData(y[r].data,e.x,e.y),S.globalCompositeOperation="copy",S.drawImage(T,0,0),a.canvas.getContext("2d").drawImage(b,a.x,a.y)};return{init:function(){s||(a.c_w&&a.c_h||S.scale(q(),q()),a.auto_play?u():(r=0,l()))},step:u,play:function(){m=!0,u()},pause:function(){m=!1},playing:m,move_relative:o,current_frame:function(){return r},length:function(){return y.length},move_to:function(e){r=e,l()}}}(),W=function(e){H(t.pos,t.data.length,e)},Q=function(){},V=function(e,t){return function(n){e(n),W(t)}},G={hdr:V((function(e){j((i=e).width,i.height)})),gce:V((function(e){P(),O(),l=e.transparencyGiven?e.transparencyIndex:null,c=e.delayTime,d=e.disposalMethod})),com:V(Q),app:{NETSCAPE:V(Q)},img:V((function(e){A||(A=T.getContext("2d"));var t=y.length,n=e.lctFlag?e.lct:i.gct;t>0&&(3===f?null!==h?A.putImageData(y[h].data,0,0):A.clearRect(p.leftPos,p.topPos,p.width,p.height):h=t-1,2===f&&A.clearRect(p.leftPos,p.topPos,p.width,p.height));var r=A.getImageData(e.leftPos,e.topPos,e.width,e.height);e.pixels.forEach((function(e,t){e!==l&&(r.data[4*t+0]=n[e][0],r.data[4*t+1]=n[e][1],r.data[4*t+2]=n[e][2],r.data[4*t+3]=255)})),A.putImageData(r,e.leftPos,e.topPos),g||(S.scale(q(),q()),g=!0),E&&(S.drawImage(T,0,0),E=a.auto_play),p=e}),!0),eof:function(e){P(),W(!1),a.c_w&&a.c_h||(b.width=i.width*q(),b.height=i.height*q()),R.init(),u=!1,Z&&Z(x)}},U=function(){var e=x.parentNode,t=document.createElement("div");b=document.createElement("canvas"),S=b.getContext("2d"),C=document.createElement("div"),T=document.createElement("canvas"),t.width=b.width=x.width,t.height=b.height=x.height,C.style.minWidth=x.width+"px",t.className="jsgif",C.className="jsgif_toolbar",t.style.display="none",t.appendChild(b),t.appendChild(C),e&&(e.insertBefore(t,x),e.removeChild(x)),a.c_w&&a.c_h&&j(a.c_w,a.c_h),z=!0},q=function(){return a.max_width&&i&&i.width>a.max_width?a.max_width/i.width:a.max_height&&i&&i.height>a.max_height?a.max_height/i.height:1},z=!1,Z=!1,$=function(e){return!u&&(Z=e||!1,u=!0,y=[],O(),h=null,f=null,A=null,p=null,!0)};return{play:R.play,pause:R.pause,move_relative:R.move_relative,move_to:R.move_to,get_playing:function(){return m},get_canvas:function(){return b},get_canvas_scale:function(){return q()},get_loading:function(){return u},get_auto_play:function(){return a.auto_play},get_length:function(){return R.length()},get_current_frame:function(){return R.current_frame()},load_url:function(e,r){if($(r)){var i=new XMLHttpRequest;i.open("GET",e,!0),"overrideMimeType"in i?i.overrideMimeType("text/plain; charset=x-user-defined"):"responseType"in i?i.responseType="arraybuffer":i.setRequestHeader("Accept-Charset","x-user-defined"),i.onloadstart=function(){z||U()},i.onload=function(e){200!=this.status&&_("xhr - response"),"response"in this||(this.response=new VBArray(this.responseText).toArray().map(String.fromCharCode).join(""));var r=this.response;r.toString().indexOf("ArrayBuffer")>0&&(r=new Uint8Array(r)),t=new n(r),setTimeout(B,0)},i.onprogress=function(e){e.lengthComputable&&H(e.loaded,e.total,!0)},i.onerror=function(){_("xhr")},i.send()}},load:function(e){this.load_url(x.getAttribute("rel:animated_src")||x.src,e)},load_raw:function(e,r){$(r)&&(z||U(),t=new n(e),setTimeout(B,0))},set_frame_offset:function(e,t){v[e]?(void 0!==t.x&&(v[e].x=t.x),void 0!==t.y&&(v[e].y=t.y)):v[e]=t},getX:function(){return a.x},setX:function(e){a.x=e},getY:function(){return a.y},setY:function(e){a.y=e},setFirstTime:function(){!0}}}}));var luxon=function(e){"use strict";function t(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 n(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function s(e,t,n){return(s=o()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&a(i,n.prototype),i}).apply(null,arguments)}function u(e){var t="function"==typeof Map?new Map:void 0;return(u=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return s(e,arguments,i(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a(r,e)})(e)}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}var d=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t}(u(Error)),h=function(e){function t(t){return e.call(this,"Invalid DateTime: "+t.toMessage())||this}return r(t,e),t}(d),f=function(e){function t(t){return e.call(this,"Invalid Interval: "+t.toMessage())||this}return r(t,e),t}(d),A=function(e){function t(t){return e.call(this,"Invalid Duration: "+t.toMessage())||this}return r(t,e),t}(d),p=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t}(d),m=function(e){function t(t){return e.call(this,"Invalid unit "+t)||this}return r(t,e),t}(d),g=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t}(d),y=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return r(t,e),t}(d),v="numeric",w="short",x="long",b={year:v,month:v,day:v},S={year:v,month:w,day:v},C={year:v,month:w,day:v,weekday:w},T={year:v,month:x,day:v},F={year:v,month:x,day:v,weekday:x},k={hour:v,minute:v},I={hour:v,minute:v,second:v},E={hour:v,minute:v,second:v,timeZoneName:w},D={hour:v,minute:v,second:v,timeZoneName:x},N={hour:v,minute:v,hour12:!1},L={hour:v,minute:v,second:v,hour12:!1},M={hour:v,minute:v,second:v,hour12:!1,timeZoneName:w},O={hour:v,minute:v,second:v,hour12:!1,timeZoneName:x},B={year:v,month:v,day:v,hour:v,minute:v},j={year:v,month:v,day:v,hour:v,minute:v,second:v},H={year:v,month:w,day:v,hour:v,minute:v},_={year:v,month:w,day:v,hour:v,minute:v,second:v},P={year:v,month:w,day:v,weekday:w,hour:v,minute:v},R={year:v,month:x,day:v,hour:v,minute:v,timeZoneName:w},W={year:v,month:x,day:v,hour:v,minute:v,second:v,timeZoneName:w},Q={year:v,month:x,day:v,weekday:x,hour:v,minute:v,timeZoneName:x},V={year:v,month:x,day:v,weekday:x,hour:v,minute:v,second:v,timeZoneName:x};function G(e){return void 0===e}function U(e){return"number"==typeof e}function q(e){return"number"==typeof e&&e%1==0}function z(){try{return"undefined"!=typeof Intl&&Intl.DateTimeFormat}catch(e){return!1}}function Z(){return!G(Intl.DateTimeFormat.prototype.formatToParts)}function $(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function Y(e,t,n){if(0!==e.length)return e.reduce((function(e,r){var i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i}),null)[1]}function J(e,t){return t.reduce((function(t,n){return t[n]=e[n],t}),{})}function X(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function K(e,t,n){return q(e)&&e>=t&&e<=n}function ee(e,t){return void 0===t&&(t=2),e.toString().length<t?("0".repeat(t)+e).slice(-t):e.toString()}function te(e){return G(e)||null===e||""===e?void 0:parseInt(e,10)}function ne(e){if(!G(e)&&null!==e&&""!==e){var t=1e3*parseFloat("0."+e);return Math.floor(t)}}function re(e,t,n){void 0===n&&(n=!1);var r=Math.pow(10,t);return(n?Math.trunc:Math.round)(e*r)/r}function ie(e){return e%4==0&&(e%100!=0||e%400==0)}function ae(e){return ie(e)?366:365}function oe(e,t){var n=function(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===n?ie(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function se(e){var t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t)).setUTCFullYear(t.getUTCFullYear()-1900),+t}function ue(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,n=e-1,r=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return 4===t||3===r?53:52}function le(e){return e>99?e:e>60?1900+e:2e3+e}function ce(e,t,n,r){void 0===r&&(r=null);var i=new Date(e),a={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(a.timeZone=r);var o=Object.assign({timeZoneName:t},a),s=z();if(s&&Z()){var u=new Intl.DateTimeFormat(n,o).formatToParts(i).find((function(e){return"timezonename"===e.type.toLowerCase()}));return u?u.value:null}if(s){var l=new Intl.DateTimeFormat(n,a).format(i);return new Intl.DateTimeFormat(n,o).format(i).substring(l.length).replace(/^[, \u200e]+/,"")}return null}function de(e,t){var n=parseInt(e,10);Number.isNaN(n)&&(n=0);var r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function he(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new g("Invalid unit value "+e);return t}function fe(e,t,n){var r={};for(var i in e)if(X(e,i)){if(n.indexOf(i)>=0)continue;var a=e[i];if(null==a)continue;r[t(i)]=he(a)}return r}function Ae(e,t){var n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return""+i+ee(n,2)+":"+ee(r,2);case"narrow":return""+i+n+(r>0?":"+r:"");case"techie":return""+i+ee(n,2)+ee(r,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function pe(e){return J(e,["hour","minute","second","millisecond"])}var me=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function ge(e){return JSON.stringify(e,Object.keys(e).sort())}var ye=["January","February","March","April","May","June","July","August","September","October","November","December"],ve=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],we=["J","F","M","A","M","J","J","A","S","O","N","D"];function xe(e){switch(e){case"narrow":return we;case"short":return ve;case"long":return ye;case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var be=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Se=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ce=["M","T","W","T","F","S","S"];function Te(e){switch(e){case"narrow":return Ce;case"short":return Se;case"long":return be;case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Fe=["AM","PM"],ke=["Before Christ","Anno Domini"],Ie=["BC","AD"],Ee=["B","A"];function De(e){switch(e){case"narrow":return Ee;case"short":return Ie;case"long":return ke;default:return null}}function Ne(e,t){for(var n,r="",i=c(e);!(n=i()).done;){var a=n.value;a.literal?r+=a.val:r+=t(a.val)}return r}var Le={D:b,DD:S,DDD:T,DDDD:F,t:k,tt:I,ttt:E,tttt:D,T:N,TT:L,TTT:M,TTTT:O,f:B,ff:H,fff:R,ffff:Q,F:j,FF:_,FFF:W,FFFF:V},Me=function(){function e(e,t){this.opts=t,this.loc=e,this.systemLoc=null}e.create=function(t,n){return void 0===n&&(n={}),new e(t,n)},e.parseFormat=function(e){for(var t=null,n="",r=!1,i=[],a=0;a<e.length;a++){var o=e.charAt(a);"'"===o?(n.length>0&&i.push({literal:r,val:n}),t=null,n="",r=!r):r||o===t?n+=o:(n.length>0&&i.push({literal:!1,val:n}),n=o,t=o)}return n.length>0&&i.push({literal:r,val:n}),i},e.macroTokenToFormatOpts=function(e){return Le[e]};var t=e.prototype;return t.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,Object.assign({},this.opts,t)).format()},t.formatDateTime=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).format()},t.formatDateTimeParts=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).formatToParts()},t.resolvedOptions=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).resolvedOptions()},t.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return ee(e,t);var n=Object.assign({},this.opts);return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)},t.formatDateTimeFromString=function(t,n){var r=this,i="en"===this.loc.listingMode(),a=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&Z(),o=function(e,n){return r.loc.extract(t,e,n)},s=function(e){return t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):""},u=function(){return i?function(e){return Fe[e.hour<12?0:1]}(t):o({hour:"numeric",hour12:!0},"dayperiod")},l=function(e,n){return i?function(e,t){return xe(t)[e.month-1]}(t,e):o(n?{month:e}:{month:e,day:"numeric"},"month")},c=function(e,n){return i?function(e,t){return Te(t)[e.weekday-1]}(t,e):o(n?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},d=function(e){return i?function(e,t){return De(t)[e.year<0?0:1]}(t,e):o({era:e},"era")};return Ne(e.parseFormat(n),(function(n){switch(n){case"S":return r.num(t.millisecond);case"u":case"SSS":return r.num(t.millisecond,3);case"s":return r.num(t.second);case"ss":return r.num(t.second,2);case"m":return r.num(t.minute);case"mm":return r.num(t.minute,2);case"h":return r.num(t.hour%12==0?12:t.hour%12);case"hh":return r.num(t.hour%12==0?12:t.hour%12,2);case"H":return r.num(t.hour);case"HH":return r.num(t.hour,2);case"Z":return s({format:"narrow",allowZ:r.opts.allowZ});case"ZZ":return s({format:"short",allowZ:r.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:r.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:r.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:r.loc.locale});case"z":return t.zoneName;case"a":return u();case"d":return a?o({day:"numeric"},"day"):r.num(t.day);case"dd":return a?o({day:"2-digit"},"day"):r.num(t.day,2);case"c":return r.num(t.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return r.num(t.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return a?o({month:"numeric",day:"numeric"},"month"):r.num(t.month);case"LL":return a?o({month:"2-digit",day:"numeric"},"month"):r.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return a?o({month:"numeric"},"month"):r.num(t.month);case"MM":return a?o({month:"2-digit"},"month"):r.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return a?o({year:"numeric"},"year"):r.num(t.year);case"yy":return a?o({year:"2-digit"},"year"):r.num(t.year.toString().slice(-2),2);case"yyyy":return a?o({year:"numeric"},"year"):r.num(t.year,4);case"yyyyyy":return a?o({year:"numeric"},"year"):r.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return r.num(t.weekYear.toString().slice(-2),2);case"kkkk":return r.num(t.weekYear,4);case"W":return r.num(t.weekNumber);case"WW":return r.num(t.weekNumber,2);case"o":return r.num(t.ordinal);case"ooo":return r.num(t.ordinal,3);case"q":return r.num(t.quarter);case"qq":return r.num(t.quarter,2);case"X":return r.num(Math.floor(t.ts/1e3));case"x":return r.num(t.ts);default:return function(n){var i=e.macroTokenToFormatOpts(n);return i?r.formatWithSystemDefault(t,i):n}(n)}}))},t.formatDurationFromString=function(t,n){var r,i=this,a=function(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},o=e.parseFormat(n),s=o.reduce((function(e,t){var n=t.literal,r=t.val;return n?e:e.concat(r)}),[]),u=t.shiftTo.apply(t,s.map(a).filter((function(e){return e})));return Ne(o,(r=u,function(e){var t=a(e);return t?i.num(r.get(t),e.length):e}))},e}(),Oe=function(){function e(e,t){this.reason=e,this.explanation=t}return e.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Be=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new y},t.formatOffset=function(e,t){throw new y},t.offset=function(e){throw new y},t.equals=function(e){throw new y},n(e,[{key:"type",get:function(){throw new y}},{key:"name",get:function(){throw new y}},{key:"universal",get:function(){throw new y}},{key:"isValid",get:function(){throw new y}}]),e}(),je=null,He=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var i=t.prototype;return i.offsetName=function(e,t){return ce(e,t.format,t.locale)},i.formatOffset=function(e,t){return Ae(this.offset(e),t)},i.offset=function(e){return-new Date(e).getTimezoneOffset()},i.equals=function(e){return"local"===e.type},n(t,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return z()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return null===je&&(je=new t),je}}]),t}(Be),_e=RegExp("^"+me.source+"$"),Pe={};var Re={year:0,month:1,day:2,hour:3,minute:4,second:5};var We={},Qe=function(e){function t(n){var r;return(r=e.call(this)||this).zoneName=n,r.valid=t.isValidZone(n),r}r(t,e),t.create=function(e){return We[e]||(We[e]=new t(e)),We[e]},t.resetCache=function(){We={},Pe={}},t.isValidSpecifier=function(e){return!(!e||!e.match(_e))},t.isValidZone=function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}},t.parseGMTOffset=function(e){if(e){var t=e.match(/^Etc\/GMT([+-]\d{1,2})$/i);if(t)return-60*parseInt(t[1])}return null};var i=t.prototype;return i.offsetName=function(e,t){return ce(e,t.format,t.locale,this.name)},i.formatOffset=function(e,t){return Ae(this.offset(e),t)},i.offset=function(e){var t,n=new Date(e),r=(t=this.name,Pe[t]||(Pe[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Pe[t]),i=r.formatToParts?function(e,t){for(var n=e.formatToParts(t),r=[],i=0;i<n.length;i++){var a=n[i],o=a.type,s=a.value,u=Re[o];G(u)||(r[u]=parseInt(s,10))}return r}(r,n):function(e,t){var n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n),i=r[1],a=r[2];return[r[3],i,a,r[4],r[5],r[6]]}(r,n),a=i[0],o=i[1],s=i[2],u=i[3],l=+n,c=l%1e3;return(se({year:a,month:o,day:s,hour:24===u?0:u,minute:i[4],second:i[5],millisecond:0})-(l-=c>=0?c:1e3+c))/6e4},i.equals=function(e){return"iana"===e.type&&e.name===this.name},n(t,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),t}(Be),Ve=null,Ge=function(e){function t(t){var n;return(n=e.call(this)||this).fixed=t,n}r(t,e),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){var n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new t(de(n[1],n[2]))}return null},n(t,null,[{key:"utcInstance",get:function(){return null===Ve&&(Ve=new t(0)),Ve}}]);var i=t.prototype;return i.offsetName=function(){return this.name},i.formatOffset=function(e,t){return Ae(this.fixed,t)},i.offset=function(){return this.fixed},i.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},n(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+Ae(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),t}(Be),Ue=function(e){function t(t){var n;return(n=e.call(this)||this).zoneName=t,n}r(t,e);var i=t.prototype;return i.offsetName=function(){return null},i.formatOffset=function(){return""},i.offset=function(){return NaN},i.equals=function(){return!1},n(t,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),t}(Be);function qe(e,t){var n;if(G(e)||null===e)return t;if(e instanceof Be)return e;if("string"==typeof e){var r=e.toLowerCase();return"local"===r?t:"utc"===r||"gmt"===r?Ge.utcInstance:null!=(n=Qe.parseGMTOffset(e))?Ge.instance(n):Qe.isValidSpecifier(r)?Qe.create(e):Ge.parseSpecifier(r)||new Ue(e)}return U(e)?Ge.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new Ue(e)}var ze=function(){return Date.now()},Ze=null,$e=null,Ye=null,Je=null,Xe=!1,Ke=function(){function e(){}return e.resetCaches=function(){ct.resetCache(),Qe.resetCache()},n(e,null,[{key:"now",get:function(){return ze},set:function(e){ze=e}},{key:"defaultZoneName",get:function(){return e.defaultZone.name},set:function(e){Ze=e?qe(e):null}},{key:"defaultZone",get:function(){return Ze||He.instance}},{key:"defaultLocale",get:function(){return $e},set:function(e){$e=e}},{key:"defaultNumberingSystem",get:function(){return Ye},set:function(e){Ye=e}},{key:"defaultOutputCalendar",get:function(){return Je},set:function(e){Je=e}},{key:"throwOnInvalid",get:function(){return Xe},set:function(e){Xe=e}}]),e}(),et={};function tt(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=et[n];return r||(r=new Intl.DateTimeFormat(e,t),et[n]=r),r}var nt={};var rt={};function it(e,t){void 0===t&&(t={});var n=t,r=(n.base,function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(n,["base"])),i=JSON.stringify([e,r]),a=rt[i];return a||(a=new Intl.RelativeTimeFormat(e,t),rt[i]=a),a}var at=null;function ot(e,t,n,r,i){var a=e.listingMode(n);return"error"===a?null:"en"===a?r(t):i(t)}var st=function(){function e(e,t,n){if(this.padTo=n.padTo||0,this.floor=n.floor||!1,!t&&z()){var r={useGrouping:!1};n.padTo>0&&(r.minimumIntegerDigits=n.padTo),this.inf=function(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=nt[n];return r||(r=new Intl.NumberFormat(e,t),nt[n]=r),r}(e,r)}}return e.prototype.format=function(e){if(this.inf){var t=this.floor?Math.floor(e):e;return this.inf.format(t)}return ee(this.floor?Math.floor(e):re(e,3),this.padTo)},e}(),ut=function(){function e(e,t,n){var r;if(this.opts=n,this.hasIntl=z(),e.zone.universal&&this.hasIntl?(r="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:cr.fromMillis(e.ts+60*e.offset*1e3)):"local"===e.zone.type?this.dt=e:(this.dt=e,r=e.zone.name),this.hasIntl){var i=Object.assign({},this.opts);r&&(i.timeZone=r),this.dtf=tt(t,i)}}var t=e.prototype;return t.format=function(){if(this.hasIntl)return this.dtf.format(this.dt.toJSDate());var e=function(e){var t="EEEE, LLLL d, yyyy, h:mm a";switch(ge(J(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]))){case ge(b):return"M/d/yyyy";case ge(S):return"LLL d, yyyy";case ge(C):return"EEE, LLL d, yyyy";case ge(T):return"LLLL d, yyyy";case ge(F):return"EEEE, LLLL d, yyyy";case ge(k):return"h:mm a";case ge(I):return"h:mm:ss a";case ge(E):case ge(D):return"h:mm a";case ge(N):return"HH:mm";case ge(L):return"HH:mm:ss";case ge(M):case ge(O):return"HH:mm";case ge(B):return"M/d/yyyy, h:mm a";case ge(H):return"LLL d, yyyy, h:mm a";case ge(R):return"LLLL d, yyyy, h:mm a";case ge(Q):return t;case ge(j):return"M/d/yyyy, h:mm:ss a";case ge(_):return"LLL d, yyyy, h:mm:ss a";case ge(P):return"EEE, d LLL yyyy, h:mm a";case ge(W):return"LLLL d, yyyy, h:mm:ss a";case ge(V):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return t}}(this.opts),t=ct.create("en-US");return Me.create(t).formatDateTimeFromString(this.dt,e)},t.formatToParts=function(){return this.hasIntl&&Z()?this.dtf.formatToParts(this.dt.toJSDate()):[]},t.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},e}(),lt=function(){function e(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&$()&&(this.rtf=it(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n,r){void 0===n&&(n="always"),void 0===r&&(r=!1);var i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},a=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&a){var o="days"===e;switch(t){case 1:return o?"tomorrow":"next "+i[e][0];case-1:return o?"yesterday":"last "+i[e][0];case 0:return o?"today":"this "+i[e][0]}}var s=Object.is(t,-0)||t<0,u=Math.abs(t),l=1===u,c=i[e],d=r?l?c[1]:c[2]||c[1]:l?i[e][0]:e;return s?u+" "+d+" ago":"in "+u+" "+d}(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),ct=function(){function e(e,t,n,r){var i=function(e){var t=e.indexOf("-u-");if(-1===t)return[e];var n,r=e.substring(0,t);try{n=tt(e).resolvedOptions()}catch(e){n=tt(r).resolvedOptions()}var i=n;return[r,i.numberingSystem,i.calendar]}(e),a=i[0],o=i[1],s=i[2];this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=n||s||null,this.intl=function(e,t,n){return z()?n||t?(e+="-u",n&&(e+="-ca-"+n),t&&(e+="-nu-"+t),e):e:[]}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}e.fromOpts=function(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)},e.create=function(t,n,r,i){void 0===i&&(i=!1);var a=t||Ke.defaultLocale;return new e(a||(i?"en-US":function(){if(at)return at;if(z()){var e=(new Intl.DateTimeFormat).resolvedOptions().locale;return at=e&&"und"!==e?e:"en-US"}return at="en-US"}()),n||Ke.defaultNumberingSystem,r||Ke.defaultOutputCalendar,a)},e.resetCache=function(){at=null,et={},nt={},rt={}},e.fromObject=function(t){var n=void 0===t?{}:t,r=n.locale,i=n.numberingSystem,a=n.outputCalendar;return e.create(r,i,a)};var t=e.prototype;return t.listingMode=function(e){void 0===e&&(e=!0);var t=z()&&Z(),n=this.isEnglish(),r=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t||n&&r||e?!t||n&&r?"en":"intl":"error"},t.clone=function(t){return t&&0!==Object.getOwnPropertyNames(t).length?e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1):this},t.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!0}))},t.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!1}))},t.months=function(e,t,n){var r=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),ot(this,e,n,xe,(function(){var n=t?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";return r.monthsCache[i][e]||(r.monthsCache[i][e]=function(e){for(var t=[],n=1;n<=12;n++){var r=cr.utc(2016,n,1);t.push(e(r))}return t}((function(e){return r.extract(e,n,"month")}))),r.monthsCache[i][e]}))},t.weekdays=function(e,t,n){var r=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),ot(this,e,n,Te,(function(){var n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=t?"format":"standalone";return r.weekdaysCache[i][e]||(r.weekdaysCache[i][e]=function(e){for(var t=[],n=1;n<=7;n++){var r=cr.utc(2016,11,13+n);t.push(e(r))}return t}((function(e){return r.extract(e,n,"weekday")}))),r.weekdaysCache[i][e]}))},t.meridiems=function(e){var t=this;return void 0===e&&(e=!0),ot(this,void 0,e,(function(){return Fe}),(function(){if(!t.meridiemCache){var e={hour:"numeric",hour12:!0};t.meridiemCache=[cr.utc(2016,11,13,9),cr.utc(2016,11,13,19)].map((function(n){return t.extract(n,e,"dayperiod")}))}return t.meridiemCache}))},t.eras=function(e,t){var n=this;return void 0===t&&(t=!0),ot(this,e,t,De,(function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[cr.utc(-40,1,1),cr.utc(2017,1,1)].map((function(e){return n.extract(e,t,"era")}))),n.eraCache[e]}))},t.extract=function(e,t,n){var r=this.dtFormatter(e,t).formatToParts().find((function(e){return e.type.toLowerCase()===n}));return r?r.value:null},t.numberFormatter=function(e){return void 0===e&&(e={}),new st(this.intl,e.forceSimple||this.fastNumbers,e)},t.dtFormatter=function(e,t){return void 0===t&&(t={}),new ut(e,this.intl,t)},t.relFormatter=function(e){return void 0===e&&(e={}),new lt(this.intl,this.isEnglish(),e)},t.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||z()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},t.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},n(e,[{key:"fastNumbers",get:function(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||z()&&"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}}]),e}();function dt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.reduce((function(e,t){return e+t.source}),"");return RegExp("^"+r+"$")}function ht(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduce((function(t,n){var r=t[0],i=t[1],a=t[2],o=n(e,a),s=o[0],u=o[1],l=o[2];return[Object.assign(r,s),i||u,l]}),[{},null,1]).slice(0,2)}}function ft(e){if(null==e)return[null,null];for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i],s=o[0],u=o[1],l=s.exec(e);if(l)return u(l)}return[null,null]}function At(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n){var r,i={};for(r=0;r<t.length;r++)i[t[r]]=te(e[n+r]);return[i,null,n+r]}}var pt=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,mt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,gt=RegExp(""+mt.source+pt.source+"?"),yt=RegExp("(?:T"+gt.source+")?"),vt=At("weekYear","weekNumber","weekDay"),wt=At("year","ordinal"),xt=RegExp(mt.source+" ?(?:"+pt.source+"|("+me.source+"))?"),bt=RegExp("(?: "+xt.source+")?");function St(e,t,n){var r=e[t];return G(r)?n:te(r)}function Ct(e,t){return[{year:St(e,t),month:St(e,t+1,1),day:St(e,t+2,1)},null,t+3]}function Tt(e,t){return[{hour:St(e,t,0),minute:St(e,t+1,0),second:St(e,t+2,0),millisecond:ne(e[t+3])},null,t+4]}function Ft(e,t){var n=!e[t]&&!e[t+1],r=de(e[t+1],e[t+2]);return[{},n?null:Ge.instance(r),t+3]}function kt(e,t){return[{},e[t]?Qe.create(e[t]):null,t+1]}var It=/^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function Et(e){var t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],u=e[7],l=e[8],c="-"===t[0],d=function(e){return e&&c?-e:e};return[{years:d(te(n)),months:d(te(r)),weeks:d(te(i)),days:d(te(a)),hours:d(te(o)),minutes:d(te(s)),seconds:d(te(u)),milliseconds:d(ne(l))}]}var Dt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Nt(e,t,n,r,i,a,o){var s={year:2===t.length?le(te(t)):te(t),month:ve.indexOf(n)+1,day:te(r),hour:te(i),minute:te(a)};return o&&(s.second=te(o)),e&&(s.weekday=e.length>3?be.indexOf(e)+1:Se.indexOf(e)+1),s}var Lt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Mt(e){var t,n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],u=e[7],l=e[8],c=e[9],d=e[10],h=e[11],f=Nt(n,a,i,r,o,s,u);return t=l?Dt[l]:c?0:de(d,h),[f,new Ge(t)]}var Ot=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Bt=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,jt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Ht(e){var t=e[1],n=e[2],r=e[3];return[Nt(t,e[4],r,n,e[5],e[6],e[7]),Ge.utcInstance]}function _t(e){var t=e[1],n=e[2],r=e[3],i=e[4],a=e[5],o=e[6];return[Nt(t,e[7],n,r,i,a,o),Ge.utcInstance]}var Pt=dt(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,yt),Rt=dt(/(\d{4})-?W(\d\d)(?:-?(\d))?/,yt),Wt=dt(/(\d{4})-?(\d{3})/,yt),Qt=dt(gt),Vt=ht(Ct,Tt,Ft),Gt=ht(vt,Tt,Ft),Ut=ht(wt,Tt),qt=ht(Tt,Ft);var zt=dt(/(\d{4})-(\d\d)-(\d\d)/,bt),Zt=dt(xt),$t=ht(Ct,Tt,Ft,kt),Yt=ht(Tt,Ft,kt);var Jt={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},Xt=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},Jt),Kt=365.2425,en=30.436875,tn=Object.assign({years:{quarters:4,months:12,weeks:52.1775,days:Kt,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:en,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3}},Jt),nn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],rn=nn.slice(0).reverse();function an(e,t,n){void 0===n&&(n=!1);var r={values:n?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new sn(r)}function on(e,t,n,r,i){var a=e[i][n],o=t[n]/a,s=!(Math.sign(o)===Math.sign(r[i]))&&0!==r[i]&&Math.abs(o)<=1?function(e){return e<0?Math.floor(e):Math.ceil(e)}(o):Math.trunc(o);r[i]+=s,t[n]-=s*a}var sn=function(){function e(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||ct.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?tn:Xt,this.isLuxonDuration=!0}e.fromMillis=function(t,n){return e.fromObject(Object.assign({milliseconds:t},n))},e.fromObject=function(t){if(null==t||"object"!=typeof t)throw new g("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new e({values:fe(t,e.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:ct.fromObject(t),conversionAccuracy:t.conversionAccuracy})},e.fromISO=function(t,n){var r=function(e){return ft(e,[It,Et])}(t)[0];if(r){var i=Object.assign(r,n);return e.fromObject(i)}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new g("need to specify a reason the Duration is invalid");var r=t instanceof Oe?t:new Oe(t,n);if(Ke.throwOnInvalid)throw new A(r);return new e({invalid:r})},e.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new m(e);return t},e.isDuration=function(e){return e&&e.isLuxonDuration||!1};var t=e.prototype;return t.toFormat=function(e,t){void 0===t&&(t={});var n=Object.assign({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Me.create(this.loc,n).formatDurationFromString(this,e):"Invalid Duration"},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.values);return e.includeConfig&&(t.conversionAccuracy=this.conversionAccuracy,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toISO=function(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=re(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},t.toJSON=function(){return this.toISO()},t.toString=function(){return this.toISO()},t.valueOf=function(){return this.as("milliseconds")},t.plus=function(e){if(!this.isValid)return this;for(var t,n=un(e),r={},i=c(nn);!(t=i()).done;){var a=t.value;(X(n.values,a)||X(this.values,a))&&(r[a]=n.get(a)+this.get(a))}return an(this,{values:r},!0)},t.minus=function(e){if(!this.isValid)return this;var t=un(e);return this.plus(t.negate())},t.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,r=Object.keys(this.values);n<r.length;n++){var i=r[n];t[i]=he(e(this.values[i],i))}return an(this,{values:t},!0)},t.get=function(t){return this[e.normalizeUnit(t)]},t.set=function(t){return this.isValid?an(this,{values:Object.assign(this.values,fe(t,e.normalizeUnit,[]))}):this},t.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,r=t.numberingSystem,i=t.conversionAccuracy,a={loc:this.loc.clone({locale:n,numberingSystem:r})};return i&&(a.conversionAccuracy=i),an(this,a)},t.as=function(e){return this.isValid?this.shiftTo(e).get(e):NaN},t.normalize=function(){if(!this.isValid)return this;var e=this.toObject();return function(e,t){rn.reduce((function(n,r){return G(t[r])?n:(n&&on(e,t,n,t,r),r)}),null)}(this.matrix,e),an(this,{values:e},!0)},t.shiftTo=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!this.isValid)return this;if(0===n.length)return this;n=n.map((function(t){return e.normalizeUnit(t)}));for(var i,a,o={},s={},u=this.toObject(),l=c(nn);!(a=l()).done;){var d=a.value;if(n.indexOf(d)>=0){i=d;var h=0;for(var f in s)h+=this.matrix[f][d]*s[f],s[f]=0;U(u[d])&&(h+=u[d]);var A=Math.trunc(h);for(var p in o[d]=A,s[d]=h-A,u)nn.indexOf(p)>nn.indexOf(d)&&on(this.matrix,u,p,o,d)}else U(u[d])&&(s[d]=u[d])}for(var m in s)0!==s[m]&&(o[i]+=m===i?s[m]:s[m]/this.matrix[i][m]);return an(this,{values:o},!0).normalize()},t.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);t<n.length;t++){var r=n[t];e[r]=-this.values[r]}return an(this,{values:e},!0)},t.equals=function(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(var t,n=c(nn);!(t=n()).done;){var r=t.value;if(this.values[r]!==e.values[r])return!1}return!0},n(e,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),e}();function un(e){if(U(e))return sn.fromMillis(e);if(sn.isDuration(e))return e;if("object"==typeof e)return sn.fromObject(e);throw new g("Unknown duration argument "+e+" of type "+typeof e)}var ln="Invalid Interval";function cn(e,t){return e&&e.isValid?t&&t.isValid?t<e?dn.invalid("end before start","The end of an interval must be after its start, but you had start="+e.toISO()+" and end="+t.toISO()):null:dn.invalid("missing or invalid end"):dn.invalid("missing or invalid start")}var dn=function(){function e(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new g("need to specify a reason the Interval is invalid");var r=t instanceof Oe?t:new Oe(t,n);if(Ke.throwOnInvalid)throw new f(r);return new e({invalid:r})},e.fromDateTimes=function(t,n){var r=dr(t),i=dr(n),a=cn(r,i);return null==a?new e({start:r,end:i}):a},e.after=function(t,n){var r=un(n),i=dr(t);return e.fromDateTimes(i,i.plus(r))},e.before=function(t,n){var r=un(n),i=dr(t);return e.fromDateTimes(i.minus(r),i)},e.fromISO=function(t,n){var r=(t||"").split("/",2),i=r[0],a=r[1];if(i&&a){var o,s,u,l;try{s=(o=cr.fromISO(i,n)).isValid}catch(a){s=!1}try{l=(u=cr.fromISO(a,n)).isValid}catch(a){l=!1}if(s&&l)return e.fromDateTimes(o,u);if(s){var c=sn.fromISO(a,n);if(c.isValid)return e.after(o,c)}else if(l){var d=sn.fromISO(i,n);if(d.isValid)return e.before(u,d)}}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.isInterval=function(e){return e&&e.isLuxonInterval||!1};var t=e.prototype;return t.length=function(e){return void 0===e&&(e="milliseconds"),this.isValid?this.toDuration.apply(this,[e]).get(e):NaN},t.count=function(e){if(void 0===e&&(e="milliseconds"),!this.isValid)return NaN;var t=this.start.startOf(e),n=this.end.startOf(e);return Math.floor(n.diff(t,e).get(e))+1},t.hasSame=function(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))},t.isEmpty=function(){return this.s.valueOf()===this.e.valueOf()},t.isAfter=function(e){return!!this.isValid&&this.s>e},t.isBefore=function(e){return!!this.isValid&&this.e<=e},t.contains=function(e){return!!this.isValid&&(this.s<=e&&this.e>e)},t.set=function(t){var n=void 0===t?{}:t,r=n.start,i=n.end;return this.isValid?e.fromDateTimes(r||this.s,i||this.e):this},t.splitAt=function(){var t=this;if(!this.isValid)return[];for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var a=r.map(dr).filter((function(e){return t.contains(e)})).sort(),o=[],s=this.s,u=0;s<this.e;){var l=a[u]||this.e,c=+l>+this.e?this.e:l;o.push(e.fromDateTimes(s,c)),s=c,u+=1}return o},t.splitBy=function(t){var n=un(t);if(!this.isValid||!n.isValid||0===n.as("milliseconds"))return[];for(var r,i,a=this.s,o=[];a<this.e;)i=+(r=a.plus(n))>+this.e?this.e:r,o.push(e.fromDateTimes(a,i)),a=i;return o},t.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},t.overlaps=function(e){return this.e>e.s&&this.s<e.e},t.abutsStart=function(e){return!!this.isValid&&+this.e==+e.s},t.abutsEnd=function(e){return!!this.isValid&&+e.e==+this.s},t.engulfs=function(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)},t.equals=function(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))},t.intersection=function(t){if(!this.isValid)return this;var n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>r?null:e.fromDateTimes(n,r)},t.union=function(t){if(!this.isValid)return this;var n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return e.fromDateTimes(n,r)},e.merge=function(e){var t=e.sort((function(e,t){return e.s-t.s})).reduce((function(e,t){var n=e[0],r=e[1];return r?r.overlaps(t)||r.abutsStart(t)?[n,r.union(t)]:[n.concat([r]),t]:[n,t]}),[[],null]),n=t[0],r=t[1];return r&&n.push(r),n},e.xor=function(t){for(var n,r,i=null,a=0,o=[],s=t.map((function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]})),u=c((n=Array.prototype).concat.apply(n,s).sort((function(e,t){return e.time-t.time})));!(r=u()).done;){var l=r.value;1===(a+="s"===l.type?1:-1)?i=l.time:(i&&+i!=+l.time&&o.push(e.fromDateTimes(i,l.time)),i=null)}return e.merge(o)},t.difference=function(){for(var t=this,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.xor([this].concat(r)).map((function(e){return t.intersection(e)})).filter((function(e){return e&&!e.isEmpty()}))},t.toString=function(){return this.isValid?"["+this.s.toISO()+" – "+this.e.toISO()+")":ln},t.toISO=function(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):ln},t.toISODate=function(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():ln},t.toISOTime=function(e){return this.isValid?this.s.toISOTime(e)+"/"+this.e.toISOTime(e):ln},t.toFormat=function(e,t){var n=(void 0===t?{}:t).separator,r=void 0===n?" – ":n;return this.isValid?""+this.s.toFormat(e)+r+this.e.toFormat(e):ln},t.toDuration=function(e,t){return this.isValid?this.e.diff(this.s,e,t):sn.invalid(this.invalidReason)},t.mapEndpoints=function(t){return e.fromDateTimes(t(this.s),t(this.e))},n(e,[{key:"start",get:function(){return this.isValid?this.s:null}},{key:"end",get:function(){return this.isValid?this.e:null}},{key:"isValid",get:function(){return null===this.invalidReason}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),e}(),hn=function(){function e(){}return e.hasDST=function(e){void 0===e&&(e=Ke.defaultZone);var t=cr.local().setZone(e).set({month:12});return!e.universal&&t.offset!==t.set({month:6}).offset},e.isValidIANAZone=function(e){return Qe.isValidSpecifier(e)&&Qe.isValidZone(e)},e.normalizeZone=function(e){return qe(e,Ke.defaultZone)},e.months=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,r=n.locale,i=void 0===r?null:r,a=n.numberingSystem,o=void 0===a?null:a,s=n.outputCalendar,u=void 0===s?"gregory":s;return ct.create(i,o,u).months(e)},e.monthsFormat=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,r=n.locale,i=void 0===r?null:r,a=n.numberingSystem,o=void 0===a?null:a,s=n.outputCalendar,u=void 0===s?"gregory":s;return ct.create(i,o,u).months(e,!0)},e.weekdays=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,r=n.locale,i=void 0===r?null:r,a=n.numberingSystem,o=void 0===a?null:a;return ct.create(i,o,null).weekdays(e)},e.weekdaysFormat=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,r=n.locale,i=void 0===r?null:r,a=n.numberingSystem,o=void 0===a?null:a;return ct.create(i,o,null).weekdays(e,!0)},e.meridiems=function(e){var t=(void 0===e?{}:e).locale,n=void 0===t?null:t;return ct.create(n).meridiems()},e.eras=function(e,t){void 0===e&&(e="short");var n=(void 0===t?{}:t).locale,r=void 0===n?null:n;return ct.create(r,null,"gregory").eras(e)},e.features=function(){var e=!1,t=!1,n=!1,r=!1;if(z()){e=!0,t=Z(),r=$();try{n="America/New_York"===new Intl.DateTimeFormat("en",{timeZone:"America/New_York"}).resolvedOptions().timeZone}catch(e){n=!1}}return{intl:e,intlTokens:t,zones:n,relative:r}},e}();function fn(e,t){var n=function(e){return e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()},r=n(t)-n(e);return Math.floor(sn.fromMillis(r).as("days"))}function An(e,t,n,r){var i=function(e,t,n){for(var r,i,a={},o=0,s=[["years",function(e,t){return t.year-e.year}],["months",function(e,t){return t.month-e.month+12*(t.year-e.year)}],["weeks",function(e,t){var n=fn(e,t);return(n-n%7)/7}],["days",fn]];o<s.length;o++){var u=s[o],l=u[0],c=u[1];if(n.indexOf(l)>=0){var d;r=l;var h,f=c(e,t);(i=e.plus(((d={})[l]=f,d)))>t?(e=e.plus(((h={})[l]=f-1,h)),f-=1):e=i,a[l]=f}}return[e,a,i,r]}(e,t,n),a=i[0],o=i[1],s=i[2],u=i[3],l=t-a,c=n.filter((function(e){return["hours","minutes","seconds","milliseconds"].indexOf(e)>=0}));if(0===c.length){var d;if(s<t)s=a.plus(((d={})[u]=1,d));s!==a&&(o[u]=(o[u]||0)+l/(s-a))}var h,f=sn.fromObject(Object.assign(o,r));return c.length>0?(h=sn.fromMillis(l,r)).shiftTo.apply(h,c).plus(f):f}var pn={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},mn={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},gn=pn.hanidec.replace(/[\[|\]]/g,"").split("");function yn(e,t){var n=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+pn[n||"latn"]+t)}function vn(e,t){return void 0===t&&(t=function(e){return e}),{regex:e,deser:function(e){var n=e[0];return t(function(e){var t=parseInt(e,10);if(isNaN(t)){t="";for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(-1!==e[n].search(pn.hanidec))t+=gn.indexOf(e[n]);else for(var i in mn){var a=mn[i],o=a[0],s=a[1];r>=o&&r<=s&&(t+=r-o)}}return parseInt(t,10)}return t}(n))}}}var wn="( |"+String.fromCharCode(160)+")",xn=new RegExp(wn,"g");function bn(e){return e.replace(/\./g,"\\.?").replace(xn,wn)}function Sn(e){return e.replace(/\./g,"").replace(xn," ").toLowerCase()}function Cn(e,t){return null===e?null:{regex:RegExp(e.map(bn).join("|")),deser:function(n){var r=n[0];return e.findIndex((function(e){return Sn(r)===Sn(e)}))+t}}}function Tn(e,t){return{regex:e,deser:function(e){return de(e[1],e[2])},groups:t}}function Fn(e){return{regex:e,deser:function(e){return e[0]}}}var kn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};var In=null;function En(e,t){if(e.literal)return e;var n=Me.macroTokenToFormatOpts(e.val);if(!n)return e;var r=Me.create(t,n).formatDateTimeParts((In||(In=cr.fromMillis(1555555555555)),In)).map((function(e){return function(e,t,n){var r=e.type,i=e.value;if("literal"===r)return{literal:!0,val:i};var a=n[r],o=kn[r];return"object"==typeof o&&(o=o[a]),o?{literal:!1,val:o}:void 0}(e,0,n)}));return r.includes(void 0)?e:r}function Dn(e,t,n){var r=function(e,t){var n;return(n=Array.prototype).concat.apply(n,e.map((function(e){return En(e,t)})))}(Me.parseFormat(n),e),i=r.map((function(t){return n=t,i=yn(r=e),a=yn(r,"{2}"),o=yn(r,"{3}"),s=yn(r,"{4}"),u=yn(r,"{6}"),l=yn(r,"{1,2}"),c=yn(r,"{1,3}"),d=yn(r,"{1,6}"),h=yn(r,"{1,9}"),f=yn(r,"{2,4}"),A=yn(r,"{4,6}"),p=function(e){return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:function(e){return e[0]},literal:!0};var t},(m=function(e){if(n.literal)return p(e);switch(e.val){case"G":return Cn(r.eras("short",!1),0);case"GG":return Cn(r.eras("long",!1),0);case"y":return vn(d);case"yy":return vn(f,le);case"yyyy":return vn(s);case"yyyyy":return vn(A);case"yyyyyy":return vn(u);case"M":return vn(l);case"MM":return vn(a);case"MMM":return Cn(r.months("short",!0,!1),1);case"MMMM":return Cn(r.months("long",!0,!1),1);case"L":return vn(l);case"LL":return vn(a);case"LLL":return Cn(r.months("short",!1,!1),1);case"LLLL":return Cn(r.months("long",!1,!1),1);case"d":return vn(l);case"dd":return vn(a);case"o":return vn(c);case"ooo":return vn(o);case"HH":return vn(a);case"H":return vn(l);case"hh":return vn(a);case"h":return vn(l);case"mm":return vn(a);case"m":case"q":return vn(l);case"qq":return vn(a);case"s":return vn(l);case"ss":return vn(a);case"S":return vn(c);case"SSS":return vn(o);case"u":return Fn(h);case"a":return Cn(r.meridiems(),0);case"kkkk":return vn(s);case"kk":return vn(f,le);case"W":return vn(l);case"WW":return vn(a);case"E":case"c":return vn(i);case"EEE":return Cn(r.weekdays("short",!1,!1),1);case"EEEE":return Cn(r.weekdays("long",!1,!1),1);case"ccc":return Cn(r.weekdays("short",!0,!1),1);case"cccc":return Cn(r.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Tn(new RegExp("([+-]"+l.source+")(?::("+a.source+"))?"),2);case"ZZZ":return Tn(new RegExp("([+-]"+l.source+")("+a.source+")?"),2);case"z":return Fn(/[a-z_+-/]{1,256}?/i);default:return p(e)}}(n)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"}).token=n,m;var n,r,i,a,o,s,u,l,c,d,h,f,A,p,m})),a=i.find((function(e){return e.invalidReason}));if(a)return{input:t,tokens:r,invalidReason:a.invalidReason};var o=function(e){return["^"+e.map((function(e){return e.regex})).reduce((function(e,t){return e+"("+t.source+")"}),"")+"$",e]}(i),s=o[0],u=o[1],l=RegExp(s,"i"),c=function(e,t,n){var r=e.match(t);if(r){var i={},a=1;for(var o in n)if(X(n,o)){var s=n[o],u=s.groups?s.groups+1:1;!s.literal&&s.token&&(i[s.token.val[0]]=s.deser(r.slice(a,a+u))),a+=u}return[r,i]}return[r,{}]}(t,l,u),d=c[0],h=c[1],f=h?function(e){var t;return t=G(e.Z)?G(e.z)?null:Qe.create(e.z):new Ge(e.Z),G(e.q)||(e.M=3*(e.q-1)+1),G(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),G(e.u)||(e.S=ne(e.u)),[Object.keys(e).reduce((function(t,n){var r=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(n);return r&&(t[r]=e[n]),t}),{}),t]}(h):[null,null],A=f[0],m=f[1];if(X(h,"a")&&X(h,"H"))throw new p("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:r,regex:l,rawMatches:d,matches:h,result:A,zone:m}}var Nn=[0,31,59,90,120,151,181,212,243,273,304,334],Ln=[0,31,60,91,121,152,182,213,244,274,305,335];function Mn(e,t){return new Oe("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function On(e,t,n){var r=new Date(Date.UTC(e,t-1,n)).getUTCDay();return 0===r?7:r}function Bn(e,t,n){return n+(ie(e)?Ln:Nn)[t-1]}function jn(e,t){var n=ie(e)?Ln:Nn,r=n.findIndex((function(e){return e<t}));return{month:r+1,day:t-n[r]}}function Hn(e){var t,n=e.year,r=e.month,i=e.day,a=Bn(n,r,i),o=On(n,r,i),s=Math.floor((a-o+10)/7);return s<1?s=ue(t=n-1):s>ue(n)?(t=n+1,s=1):t=n,Object.assign({weekYear:t,weekNumber:s,weekday:o},pe(e))}function _n(e){var t,n=e.weekYear,r=e.weekNumber,i=e.weekday,a=On(n,1,4),o=ae(n),s=7*r+i-a-3;s<1?s+=ae(t=n-1):s>o?(t=n+1,s-=ae(n)):t=n;var u=jn(t,s),l=u.month,c=u.day;return Object.assign({year:t,month:l,day:c},pe(e))}function Pn(e){var t=e.year,n=Bn(t,e.month,e.day);return Object.assign({year:t,ordinal:n},pe(e))}function Rn(e){var t=e.year,n=jn(t,e.ordinal),r=n.month,i=n.day;return Object.assign({year:t,month:r,day:i},pe(e))}function Wn(e){var t=q(e.year),n=K(e.month,1,12),r=K(e.day,1,oe(e.year,e.month));return t?n?!r&&Mn("day",e.day):Mn("month",e.month):Mn("year",e.year)}function Qn(e){var t=e.hour,n=e.minute,r=e.second,i=e.millisecond,a=K(t,0,23)||24===t&&0===n&&0===r&&0===i,o=K(n,0,59),s=K(r,0,59),u=K(i,0,999);return a?o?s?!u&&Mn("millisecond",i):Mn("second",r):Mn("minute",n):Mn("hour",t)}var Vn="Invalid DateTime",Gn=864e13;function Un(e){return new Oe("unsupported zone",'the zone "'+e.name+'" is not supported')}function qn(e){return null===e.weekData&&(e.weekData=Hn(e.c)),e.weekData}function zn(e,t){var n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new cr(Object.assign({},n,t,{old:n}))}function Zn(e,t,n){var r=e-60*t*1e3,i=n.offset(r);if(t===i)return[r,t];r-=60*(i-t)*1e3;var a=n.offset(r);return i===a?[r,i]:[e-60*Math.min(i,a)*1e3,Math.max(i,a)]}function $n(e,t){var n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Yn(e,t,n){return Zn(se(e),t,n)}function Jn(e,t){var n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),a=Object.assign({},e.c,{year:r,month:i,day:Math.min(e.c.day,oe(r,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),o=sn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),s=Zn(se(a),n,e.zone),u=s[0],l=s[1];return 0!==o&&(u+=o,l=e.zone.offset(u)),{ts:u,o:l}}function Xn(e,t,n,r,i){var a=n.setZone,o=n.zone;if(e&&0!==Object.keys(e).length){var s=t||o,u=cr.fromObject(Object.assign(e,n,{zone:s,setZone:void 0}));return a?u:u.setZone(o)}return cr.invalid(new Oe("unparsable",'the input "'+i+"\" can't be parsed as "+r))}function Kn(e,t,n){return void 0===n&&(n=!0),e.isValid?Me.create(ct.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function er(e,t){var n=t.suppressSeconds,r=void 0!==n&&n,i=t.suppressMilliseconds,a=void 0!==i&&i,o=t.includeOffset,s=t.includeZone,u=void 0!==s&&s,l=t.spaceZone,c=void 0!==l&&l,d=t.format,h=void 0===d?"extended":d,f="basic"===h?"HHmm":"HH:mm";return r&&0===e.second&&0===e.millisecond||(f+="basic"===h?"ss":":ss",a&&0===e.millisecond||(f+=".SSS")),(u||o)&&c&&(f+=" "),u?f+="z":o&&(f+="basic"===h?"ZZZ":"ZZ"),Kn(e,f)}var tr={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},nr={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},rr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ir=["year","month","day","hour","minute","second","millisecond"],ar=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],or=["year","ordinal","hour","minute","second","millisecond"];function sr(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new m(e);return t}function ur(e,t){for(var n,r=c(ir);!(n=r()).done;){var i=n.value;G(e[i])&&(e[i]=tr[i])}var a=Wn(e)||Qn(e);if(a)return cr.invalid(a);var o=Ke.now(),s=Yn(e,t.offset(o),t),u=s[0],l=s[1];return new cr({ts:u,zone:t,o:l})}function lr(e,t,n){var r=!!G(n.round)||n.round,i=function(e,i){return e=re(e,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(e,i)},a=function(r){return n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r)};if(n.unit)return i(a(n.unit),n.unit);for(var o,s=c(n.units);!(o=s()).done;){var u=o.value,l=a(u);if(Math.abs(l)>=1)return i(l,u)}return i(0,n.units[n.units.length-1])}var cr=function(){function e(e){var t=e.zone||Ke.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new Oe("invalid input"):null)||(t.isValid?null:Un(t));this.ts=G(e.ts)?Ke.now():e.ts;var r=null,i=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t)){var a=[e.old.c,e.old.o];r=a[0],i=a[1]}else{var o=t.offset(this.ts);r=$n(this.ts,o),r=(n=Number.isNaN(r.year)?new Oe("invalid input"):null)?null:r,i=n?null:o}this._zone=t,this.loc=e.loc||ct.create(),this.invalid=n,this.weekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}e.local=function(t,n,r,i,a,o,s){return G(t)?new e({ts:Ke.now()}):ur({year:t,month:n,day:r,hour:i,minute:a,second:o,millisecond:s},Ke.defaultZone)},e.utc=function(t,n,r,i,a,o,s){return G(t)?new e({ts:Ke.now(),zone:Ge.utcInstance}):ur({year:t,month:n,day:r,hour:i,minute:a,second:o,millisecond:s},Ge.utcInstance)},e.fromJSDate=function(t,n){void 0===n&&(n={});var r,i=(r=t,"[object Date]"===Object.prototype.toString.call(r)?t.valueOf():NaN);if(Number.isNaN(i))return e.invalid("invalid input");var a=qe(n.zone,Ke.defaultZone);return a.isValid?new e({ts:i,zone:a,loc:ct.fromObject(n)}):e.invalid(Un(a))},e.fromMillis=function(t,n){if(void 0===n&&(n={}),U(t))return t<-Gn||t>Gn?e.invalid("Timestamp out of range"):new e({ts:t,zone:qe(n.zone,Ke.defaultZone),loc:ct.fromObject(n)});throw new g("fromMillis requires a numerical input, but received a "+typeof t+" with value "+t)},e.fromSeconds=function(t,n){if(void 0===n&&(n={}),U(t))return new e({ts:1e3*t,zone:qe(n.zone,Ke.defaultZone),loc:ct.fromObject(n)});throw new g("fromSeconds requires a numerical input")},e.fromObject=function(t){var n=qe(t.zone,Ke.defaultZone);if(!n.isValid)return e.invalid(Un(n));var r=Ke.now(),i=n.offset(r),a=fe(t,sr,["zone","locale","outputCalendar","numberingSystem"]),o=!G(a.ordinal),s=!G(a.year),u=!G(a.month)||!G(a.day),l=s||u,d=a.weekYear||a.weekNumber,h=ct.fromObject(t);if((l||o)&&d)throw new p("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&o)throw new p("Can't mix ordinal dates with month/day");var f,A,m=d||a.weekday&&!l,g=$n(r,i);m?(f=ar,A=nr,g=Hn(g)):o?(f=or,A=rr,g=Pn(g)):(f=ir,A=tr);for(var y,v=!1,w=c(f);!(y=w()).done;){var x=y.value;G(a[x])?a[x]=v?A[x]:g[x]:v=!0}var b=(m?function(e){var t=q(e.weekYear),n=K(e.weekNumber,1,ue(e.weekYear)),r=K(e.weekday,1,7);return t?n?!r&&Mn("weekday",e.weekday):Mn("week",e.week):Mn("weekYear",e.weekYear)}(a):o?function(e){var t=q(e.year),n=K(e.ordinal,1,ae(e.year));return t?!n&&Mn("ordinal",e.ordinal):Mn("year",e.year)}(a):Wn(a))||Qn(a);if(b)return e.invalid(b);var S=Yn(m?_n(a):o?Rn(a):a,i,n),C=new e({ts:S[0],zone:n,o:S[1],loc:h});return a.weekday&&l&&t.weekday!==C.weekday?e.invalid("mismatched weekday","you can't specify both a weekday of "+a.weekday+" and a date of "+C.toISO()):C},e.fromISO=function(e,t){void 0===t&&(t={});var n=function(e){return ft(e,[Pt,Vt],[Rt,Gt],[Wt,Ut],[Qt,qt])}(e);return Xn(n[0],n[1],t,"ISO 8601",e)},e.fromRFC2822=function(e,t){void 0===t&&(t={});var n=function(e){return ft(function(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Lt,Mt])}(e);return Xn(n[0],n[1],t,"RFC 2822",e)},e.fromHTTP=function(e,t){void 0===t&&(t={});var n=function(e){return ft(e,[Ot,Ht],[Bt,Ht],[jt,_t])}(e);return Xn(n[0],n[1],t,"HTTP",t)},e.fromFormat=function(t,n,r){if(void 0===r&&(r={}),G(t)||G(n))throw new g("fromFormat requires an input string and a format");var i=r,a=i.locale,o=void 0===a?null:a,s=i.numberingSystem,u=void 0===s?null:s,l=function(e,t,n){var r=Dn(e,t,n);return[r.result,r.zone,r.invalidReason]}(ct.fromOpts({locale:o,numberingSystem:u,defaultToEN:!0}),t,n),c=l[0],d=l[1],h=l[2];return h?e.invalid(h):Xn(c,d,r,"format "+n,t)},e.fromString=function(t,n,r){return void 0===r&&(r={}),e.fromFormat(t,n,r)},e.fromSQL=function(e,t){void 0===t&&(t={});var n=function(e){return ft(e,[zt,$t],[Zt,Yt])}(e);return Xn(n[0],n[1],t,"SQL",e)},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new g("need to specify a reason the DateTime is invalid");var r=t instanceof Oe?t:new Oe(t,n);if(Ke.throwOnInvalid)throw new h(r);return new e({invalid:r})},e.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var t=e.prototype;return t.get=function(e){return this[e]},t.resolvedLocaleOpts=function(e){void 0===e&&(e={});var t=Me.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t.locale,numberingSystem:t.numberingSystem,outputCalendar:t.calendar}},t.toUTC=function(e,t){return void 0===e&&(e=0),void 0===t&&(t={}),this.setZone(Ge.instance(e),t)},t.toLocal=function(){return this.setZone(Ke.defaultZone)},t.setZone=function(t,n){var r=void 0===n?{}:n,i=r.keepLocalTime,a=void 0!==i&&i,o=r.keepCalendarTime,s=void 0!==o&&o;if((t=qe(t,Ke.defaultZone)).equals(this.zone))return this;if(t.isValid){var u=this.ts;if(a||s){var l=t.offset(this.ts);u=Yn(this.toObject(),l,t)[0]}return zn(this,{ts:u,zone:t})}return e.invalid(Un(t))},t.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,r=t.numberingSystem,i=t.outputCalendar;return zn(this,{loc:this.loc.clone({locale:n,numberingSystem:r,outputCalendar:i})})},t.setLocale=function(e){return this.reconfigure({locale:e})},t.set=function(e){if(!this.isValid)return this;var t,n=fe(e,sr,[]);!G(n.weekYear)||!G(n.weekNumber)||!G(n.weekday)?t=_n(Object.assign(Hn(this.c),n)):G(n.ordinal)?(t=Object.assign(this.toObject(),n),G(n.day)&&(t.day=Math.min(oe(t.year,t.month),t.day))):t=Rn(Object.assign(Pn(this.c),n));var r=Yn(t,this.o,this.zone);return zn(this,{ts:r[0],o:r[1]})},t.plus=function(e){return this.isValid?zn(this,Jn(this,un(e))):this},t.minus=function(e){return this.isValid?zn(this,Jn(this,un(e).negate())):this},t.startOf=function(e){if(!this.isValid)return this;var t={},n=sn.normalizeUnit(e);switch(n){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}if("weeks"===n&&(t.weekday=1),"quarters"===n){var r=Math.ceil(this.month/3);t.month=3*(r-1)+1}return this.set(t)},t.endOf=function(e){var t;return this.isValid?this.plus((t={},t[e]=1,t)).startOf(e).minus(1):this},t.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?Me.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Vn},t.toLocaleString=function(e){return void 0===e&&(e=b),this.isValid?Me.create(this.loc.clone(e),e).formatDateTime(this):Vn},t.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?Me.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},t.toISO=function(e){return void 0===e&&(e={}),this.isValid?this.toISODate(e)+"T"+this.toISOTime(e):null},t.toISODate=function(e){var t=(void 0===e?{}:e).format,n="basic"===(void 0===t?"extended":t)?"yyyyMMdd":"yyyy-MM-dd";return this.year>9999&&(n="+"+n),Kn(this,n)},t.toISOWeekDate=function(){return Kn(this,"kkkk-'W'WW-c")},t.toISOTime=function(e){var t=void 0===e?{}:e,n=t.suppressMilliseconds,r=void 0!==n&&n,i=t.suppressSeconds,a=void 0!==i&&i,o=t.includeOffset,s=void 0===o||o,u=t.format;return er(this,{suppressSeconds:a,suppressMilliseconds:r,includeOffset:s,format:void 0===u?"extended":u})},t.toRFC2822=function(){return Kn(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},t.toHTTP=function(){return Kn(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},t.toSQLDate=function(){return Kn(this,"yyyy-MM-dd")},t.toSQLTime=function(e){var t=void 0===e?{}:e,n=t.includeOffset,r=void 0===n||n,i=t.includeZone;return er(this,{includeOffset:r,includeZone:void 0!==i&&i,spaceZone:!0})},t.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},t.toString=function(){return this.isValid?this.toISO():Vn},t.valueOf=function(){return this.toMillis()},t.toMillis=function(){return this.isValid?this.ts:NaN},t.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},t.toJSON=function(){return this.toISO()},t.toBSON=function(){return this.toJSDate()},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},t.diff=function(e,t,n){if(void 0===t&&(t="milliseconds"),void 0===n&&(n={}),!this.isValid||!e.isValid)return sn.invalid(this.invalid||e.invalid,"created by diffing an invalid DateTime");var r,i=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),a=(r=t,Array.isArray(r)?r:[r]).map(sn.normalizeUnit),o=e.valueOf()>this.valueOf(),s=An(o?this:e,o?e:this,a,i);return o?s.negate():s},t.diffNow=function(t,n){return void 0===t&&(t="milliseconds"),void 0===n&&(n={}),this.diff(e.local(),t,n)},t.until=function(e){return this.isValid?dn.fromDateTimes(this,e):this},t.hasSame=function(e,t){if(!this.isValid)return!1;if("millisecond"===t)return this.valueOf()===e.valueOf();var n=e.valueOf();return this.startOf(t)<=n&&n<=this.endOf(t)},t.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},t.toRelative=function(t){if(void 0===t&&(t={}),!this.isValid)return null;var n=t.base||e.fromObject({zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0;return lr(n,this.plus(r),Object.assign(t,{numeric:"always",units:["years","months","days","hours","minutes","seconds"]}))},t.toRelativeCalendar=function(t){return void 0===t&&(t={}),this.isValid?lr(t.base||e.fromObject({zone:this.zone}),this,Object.assign(t,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},e.min=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.every(e.isDateTime))throw new g("min requires all arguments be DateTimes");return Y(n,(function(e){return e.valueOf()}),Math.min)},e.max=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.every(e.isDateTime))throw new g("max requires all arguments be DateTimes");return Y(n,(function(e){return e.valueOf()}),Math.max)},e.fromFormatExplain=function(e,t,n){void 0===n&&(n={});var r=n,i=r.locale,a=void 0===i?null:i,o=r.numberingSystem,s=void 0===o?null:o;return Dn(ct.fromOpts({locale:a,numberingSystem:s,defaultToEN:!0}),e,t)},e.fromStringExplain=function(t,n,r){return void 0===r&&(r={}),e.fromFormatExplain(t,n,r)},n(e,[{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function(){return this._zone}},{key:"zoneName",get:function(){return this.isValid?this.zone.name:null}},{key:"year",get:function(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function(){return this.isValid?this.c.month:NaN}},{key:"day",get:function(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function(){return this.isValid?qn(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?qn(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?qn(this).weekday:NaN}},{key:"ordinal",get:function(){return this.isValid?Pn(this.c).ordinal:NaN}},{key:"monthShort",get:function(){return this.isValid?hn.months("short",{locale:this.locale})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?hn.months("long",{locale:this.locale})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?hn.weekdays("short",{locale:this.locale})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?hn.weekdays("long",{locale:this.locale})[this.weekday-1]:null}},{key:"offset",get:function(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function(){return this.isValid?this.zone.universal:null}},{key:"isInDST",get:function(){return!this.isOffsetFixed&&(this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return ie(this.year)}},{key:"daysInMonth",get:function(){return oe(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?ae(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?ue(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return b}},{key:"DATE_MED",get:function(){return S}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return C}},{key:"DATE_FULL",get:function(){return T}},{key:"DATE_HUGE",get:function(){return F}},{key:"TIME_SIMPLE",get:function(){return k}},{key:"TIME_WITH_SECONDS",get:function(){return I}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return E}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return D}},{key:"TIME_24_SIMPLE",get:function(){return N}},{key:"TIME_24_WITH_SECONDS",get:function(){return L}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return M}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return O}},{key:"DATETIME_SHORT",get:function(){return B}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return j}},{key:"DATETIME_MED",get:function(){return H}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return _}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return P}},{key:"DATETIME_FULL",get:function(){return R}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return W}},{key:"DATETIME_HUGE",get:function(){return Q}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return V}}]),e}();function dr(e){if(cr.isDateTime(e))return e;if(e&&e.valueOf&&U(e.valueOf()))return cr.fromJSDate(e);if(e&&"object"==typeof e)return cr.fromObject(e);throw new g("Unknown datetime argument: "+e+", of type "+typeof e)}return e.DateTime=cr,e.Duration=sn,e.FixedOffsetZone=Ge,e.IANAZone=Qe,e.Info=hn,e.Interval=dn,e.InvalidZone=Ue,e.LocalZone=He,e.Settings=Ke,e.Zone=Be,e}({});!function(){"use strict";var e=Math.PI,t=Math.sin,n=Math.cos,r=Math.tan,i=Math.asin,a=Math.atan2,o=Math.acos,s=e/180,u=864e5,l=2440588,c=2451545;function d(e){return new Date((e+.5-l)*u)}function h(e){return function(e){return e.valueOf()/u-.5+l}(e)-c}var f=23.4397*s;function A(e,i){return a(t(e)*n(f)-r(i)*t(f),n(e))}function p(e,r){return i(t(r)*n(f)+n(r)*t(f)*t(e))}function m(e,i,o){return a(t(e),n(e)*t(i)-r(o)*n(i))}function g(e,r,a){return i(t(r)*t(a)+n(r)*n(a)*n(e))}function y(e,t){return s*(280.16+360.9856235*e)-t}function v(e){return s*(357.5291+.98560028*e)}function w(n){return n+s*(1.9148*t(n)+.02*t(2*n)+3e-4*t(3*n))+102.9372*s+e}function x(e){var t=w(v(e));return{dec:p(t,0),ra:A(t,0)}}var b={getPosition:function(e,t,n){var r=s*-n,i=s*t,a=h(e),o=x(a),u=y(a,r)-o.ra;return{azimuth:m(u,i,o.dec),altitude:g(u,i,o.dec)}}},S=b.times=[[-.833,"sunrise","sunset"],[-.3,"sunriseEnd","sunsetStart"],[-6,"dawn","dusk"],[-12,"nauticalDawn","nauticalDusk"],[-18,"nightEnd","night"],[6,"goldenHourEnd","goldenHour"]];b.addTime=function(e,t,n){S.push([e,t,n])};var C=9e-4;function T(t,n,r){return C+(t+n)/(2*e)+r}function F(e,n,r){return c+e+.0053*t(n)-.0069*t(2*r)}function k(e,r,i,a,s,u,l){return F(T(function(e,r,i){return o((t(e)-t(r)*t(i))/(n(r)*n(i)))}(e,i,a),r,s),u,l)}function I(e){var r=s*(134.963+13.064993*e),i=s*(93.272+13.22935*e),a=s*(218.316+13.176396*e)+6.289*s*t(r),o=5.128*s*t(i),u=385001-20905*n(r);return{ra:A(a,o),dec:p(a,o),dist:u}}function E(e,t){return new Date(e.valueOf()+t*u/24)}b.getTimes=function(t,n,r){var i,a,o,u,l,c=s*-r,f=s*n,A=function(t,n){return Math.round(t-C-n/(2*e))}(h(t),c),m=T(0,c,A),g=v(m),y=w(g),x=p(y,0),b=F(m,g,y),I={solarNoon:d(b),nadir:d(b-.5)};for(i=0,a=S.length;i<a;i+=1)l=b-((u=k((o=S[i])[0]*s,c,f,x,A,g,y))-b),I[o[1]]=d(l),I[o[2]]=d(u);return I},b.getMoonPosition=function(e,i,o){var u=s*-o,l=s*i,c=h(e),d=I(c),f=y(c,u)-d.ra,A=g(f,l,d.dec),p=a(t(f),r(l)*n(d.dec)-t(d.dec)*n(f));return A+=function(e){return e<0&&(e=0),2967e-7/Math.tan(e+.00312536/(e+.08901179))}(A),{azimuth:m(f,l,d.dec),altitude:A,distance:d.dist,parallacticAngle:p}},b.getMoonIllumination=function(e){var r=h(e||new Date),i=x(r),s=I(r),u=149598e3,l=o(t(i.dec)*t(s.dec)+n(i.dec)*n(s.dec)*n(i.ra-s.ra)),c=a(u*t(l),s.dist-u*n(l)),d=a(n(i.dec)*t(i.ra-s.ra),t(i.dec)*n(s.dec)-n(i.dec)*t(s.dec)*n(i.ra-s.ra));return{fraction:(1+n(c))/2,phase:.5+.5*c*(d<0?-1:1)/Math.PI,angle:d}},b.getMoonTimes=function(e,t,n,r){var i=new Date(e);r?i.setUTCHours(0,0,0,0):i.setHours(0,0,0,0);for(var a,o,u,l,c,d,h,f,A,p,m,g,y,v=.133*s,w=b.getMoonPosition(i,t,n).altitude-v,x=1;x<=24&&(a=b.getMoonPosition(E(i,x),t,n).altitude-v,f=((c=(w+(o=b.getMoonPosition(E(i,x+1),t,n).altitude-v))/2-a)*(h=-(d=(o-w)/2)/(2*c))+d)*h+a,p=0,(A=d*d-4*c*a)>=0&&(m=h-(y=Math.sqrt(A)/(2*Math.abs(c))),g=h+y,Math.abs(m)<=1&&p++,Math.abs(g)<=1&&p++,m<-1&&(m=g)),1===p?w<0?u=x+m:l=x+m:2===p&&(u=x+(f<0?g:m),l=x+(f<0?m:g)),!u||!l);x+=2)w=o;var S={};return u&&(S.rise=E(i,u)),l&&(S.set=E(i,l)),u||l||(S[f>0?"alwaysUp":"alwaysDown"]=!0),S},"object"==typeof exports&&"undefined"!=typeof module?module.exports=b:"function"==typeof define&&define.amd?define(b):window.SunCalc=b}();const draw=(()=>{const e=(e,t,n,r,i,a,o,s=0,u="start")=>{e.textAlign=u,e.font=n+` '${t}'`,e.shadowColor="#000000",e.shadowOffsetX=s,e.shadowOffsetY=s,e.strokeStyle="#000000",e.lineWidth=2,e.strokeText(o,i,a),e.fillStyle=r,e.fillText(o,i,a),e.fillStyle="",e.strokeStyle="",e.shadowOffsetX=0,e.shadowOffsetY=0};return{horizontalGradient:(e,t,n,r,i,a,o)=>{const s=e.createLinearGradient(0,n,0,i);s.addColorStop(0,a),s.addColorStop(.4,o),s.addColorStop(.6,o),s.addColorStop(1,a),e.fillStyle=s,e.fillRect(t,n,r-t,i-n)},horizontalGradientSingle:(e,t,n,r,i,a,o)=>{const s=e.createLinearGradient(0,n,0,i);s.addColorStop(0,a),s.addColorStop(1,o),e.fillStyle=s,e.fillRect(t,n,r-t,i-n)},triangle:(e,t,n,r,i,a,o,s)=>{e.fillStyle=t,e.beginPath(),e.moveTo(n,r),e.lineTo(i,a),e.lineTo(o,s),e.fill()},titleText:(t,n,r)=>{const i="Star4000",a="24pt",o="#ffff00";let s=55;r?(e(t,i,a,o,170,s,n,3),s+=30,e(t,i,a,o,170,s,r,3),s+=30):(s+=15,e(t,i,a,o,170,s,n,3),s+=30)},text:e,box:(e,t,n,r,i,a)=>{e.fillStyle=t,e.fillRect(n,r,i,a)},border:(e,t,n,r,i,a,o)=>{e.strokeStyle=t,e.lineWidth=n,e.strokeRect(r,i,a,o)},theme:1,topColor1:"rgb(192, 91, 2)",topColor2:"rgb(72, 34, 64)",sideColor1:"rgb(46, 18, 80)",sideColor2:"rgb(192, 91, 2)"}})(),STATUS={loading:Symbol("loading"),loaded:Symbol("loaded"),failed:Symbol("failed"),noData:Symbol("noData"),disabled:Symbol("disabled")};class WeatherDisplay{constructor(e,t,n,r){this.navId=e,this.elemId=void 0,this.gifs=[],this.data=void 0,this.loadingStatus=STATUS.loading,this.name=n||t,this.timing={totalScreens:1,baseDelay:9e3,delay:1},this.navBaseCount=0,this.screenIndex=-1,this.createCanvas(t),"progress"!==t&&this.addCheckbox(r),this.enabled?this.setStatus(STATUS.loading):this.setStatus(STATUS.disabled),this.startNavCount()}addCheckbox(e=!0){let t=window.localStorage.getItem(this.elemId+"Enabled");null===t&&(t=e),this.enabled="true"===t||!0===t,window.localStorage.setItem(this.elemId+"Enabled",this.enabled);const n=document.createElement("template");n.innerHTML=`<label for="${this.elemId}Enabled">\n\t\t\t\t\t\t\t<input type="checkbox" value="true" id="${this.elemId}Enabled" name="${this.elemId}Enabled"${this.enabled?" checked":""}/>\n\t\t\t\t\t\t ${this.name}</label>`,n.content.firstChild.addEventListener("change",e=>this.checkboxChange(e));document.getElementById("enabledDisplays").appendChild(n.content.firstChild)}checkboxChange(e){this.enabled=e.target.checked,window.localStorage.setItem(this.elemId+"Enabled",this.enabled),this.getData()}setStatus(e){this.status=e,navigation.updateStatus({id:this.navId,status:this.status})}get status(){return this.loadingStatus}set status(e){this.loadingStatus=e}createCanvas(e,t=640,n=480){if(this.elemId)return;this.elemId=e;const r=document.createElement("template");r.innerHTML=`<canvas id='${e+"Canvas"}' width='${t}' height='${n}' style='display: none;' />`;document.getElementById("container").appendChild(r.content.firstChild)}getData(e){return this.data=void 0,e&&(this.weatherParameters=e),this.enabled?(this.setStatus(STATUS.loading),this.calcNavTiming(),!0):(this.setStatus(STATUS.disabled),!1)}drawCanvas(){this.gifs.forEach(e=>e.pause()),this.gifs.length=0,this.canvas=document.getElementById(this.elemId+"Canvas"),this.context=this.canvas.getContext("2d"),this.screenIndex<0&&(this.screenIndex=0)}finishDraw(){let e=!0,t=!0,n=!0,r=!0,i=void 0;"almanac"===this.elemId&&(t=!1),"travelForecast"===this.elemId&&(t=!1),"regionalForecast"===this.elemId&&(t=!1),"progress"===this.elemId&&(e=!1,t=!1),"radar"===this.elemId&&(e=!1,n=!1,t=!1),"hazards"===this.elemId&&(t=!1,i=!0,r=!1),n&&(this.drawCurrentDateTime(i),this.dateTimeInterval||setInterval(()=>this.drawCurrentDateTime(i),100)),r&&this.drawLogoImage(),t&&this.drawNoaaImage(),e?currentWeatherScroll.start(this.context):currentWeatherScroll.stop("progress"===this.elemId)}drawCurrentDateTime(e){if(!this.isActive())return;const{DateTime:t}=luxon,n="Star4000 Small",r="24pt",i="#ffffff";if(!this.dateTimeBackground){const e=this.context.getImageData(410,30,175,60);if(0===e.data[0])return;this.dateTimeBackground=e}e?draw.box(this.context,"rgb(25, 50, 112)",0,389,640,16):this.context.putImageData(this.dateTimeBackground,410,30);const a=t.local(),o=a.toLocaleString(t.TIME_WITH_SECONDS).padStart(11," ");let s,u;e?(s=400,u=402):(s=410,u=65),navigation.units()===UNITS.metric&&(s+=45),draw.text(this.context,n,r,i,s,u,o.toUpperCase(),2);const l=a.toFormat(" ccc LLL ")+a.day.toString().padStart(2," ");e?(s=55,u=402):(s=410,u=85),draw.text(this.context,n,r,i,s,u,l.toUpperCase(),2)}async drawNoaaImage(){this.drawNoaaImage.image||(this.drawNoaaImage.image=utils.image.load("images/noaa5.gif"));const e=await this.drawNoaaImage.image;this.context.drawImage(e,356,39)}async drawLogoImage(){this.drawLogoImage.image||(this.drawLogoImage.image=utils.image.load("images/Logo3.png"));const e=await this.drawLogoImage.image;this.context.drawImage(e,50,30,85,67)}showCanvas(e){if(e===navigation.msg.command.firstFrame&&this.navNext(e),e===navigation.msg.command.lastFrame&&this.navPrev(e),"block"===this.canvas.style.display)return!1;this.canvas.style.display="block",this.timing}hideCanvas(){this.resetNavBaseCount(),this.canvas&&(this.canvas.style.display="none")}isActive(){return null!==document.getElementById(this.elemId+"Canvas").offsetParent}isEnabled(){return this.enabled}navBaseTime(){navigation.isPlaying()&&this.isActive()&&(this.navBaseCount++,this.baseCountChange&&this.baseCountChange(this.navBaseCount),this.updateScreenFromBaseCount())}async updateScreenFromBaseCount(){let e=this.screenIndexFromBaseCount();!1!==e?e!==this.screenIndex&&(this.screenIndex=-1===e?0:e,this.screenIndexChange?this.screenIndexChange(this.screenIndex):(await this.drawCanvas(),this.showCanvas())):this.sendNavDisplayMessage(navigation.msg.response.next)}calcNavTiming(){if(!1===this.timing)return;Array.isArray(this.timing.delay)&&(this.timing.totalScreens=this.timing.delay.length);let e=[];if("number"==typeof this.timing.delay)for(let t=0;t<this.timing.totalScreens;t++)e.push(this.timing.delay);else e=this.timing.delay.map(e=>"object"==typeof e?e.time:e);let t=0;if(this.timing.fullDelay=e.map(e=>{const n=t+e;return t+=e,n}),Array.isArray(this.timing.delay)&&"object"==typeof this.timing.delay[0])this.timing.screenIndexes=this.timing.delay.map(e=>e.si);else{this.timing.screenIndexes=[];for(let e=0;e<this.timing.totalScreens;e++)this.timing.screenIndexes.push(e)}}navNext(e){if(e===navigation.msg.command.firstFrame)this.resetNavBaseCount();else{const e=this.timing.fullDelay.find(e=>e>this.navBaseCount);this.navBaseCount=e}this.updateScreenFromBaseCount()}navPrev(e){if(e===navigation.msg.command.lastFrame)this.navBaseCount=this.timing.fullDelay[this.timing.totalScreens-1]-1;else{const e=this.timing.fullDelay.reduce((e,t)=>t<this.navBaseCount?t:e,0);if(0===e&&0===this.navBaseCount)return void this.sendNavDisplayMessage(navigation.msg.response.previous);this.navBaseCount=e}this.updateScreenFromBaseCount()}screenIndexFromBaseCount(){if(!this.timing)return 0;this.timing&&!this.timing.fullDelay&&this.calcNavTiming();const e=this.timing.fullDelay.findIndex(e=>e>this.navBaseCount);return-1!==e&&this.timing.screenIndexes[e]}startNavCount(){this.navInterval||(this.navInterval=setInterval(()=>this.navBaseTime(),this.timing.baseDelay))}resetNavBaseCount(){this.navBaseCount=0,this.screenIndex=-1,this.navInterval&&(clearInterval(this.navInterval),this.navInterval=void 0),this.startNavCount()}sendNavDisplayMessage(e){navigation.displayNavMessage({id:this.navId,type:e})}}const icons={getWeatherIconFromIconLink:function(e,t=!1){const n=e=>"images/"+e;void 0===t&&(t=e.indexOf("/night/")>=0);let r=e.toLowerCase().match(/[^/]+$/)[0].match(/(.*?)[,?&.]/)[1];switch("dualimage"===r&&(r=e.match(/&j=(.*)&/)[1]),r+(t?"-n":"")){case"skc":case"hot":case"haze":return n("CC_Clear1.gif");case"skc-n":case"nskc":case"nskc-n":return n("CC_Clear0.gif");case"sct":case"few":case"bkn":return n("CC_PartlyCloudy1.gif");case"bkn-n":case"few-n":case"nfew-n":case"nfew":case"sct-n":case"nsct":case"nsct-n":return n("CC_PartlyCloudy0.gif");case"ovc":case"novc":case"ovc-n":return n("CC_Cloudy.gif");case"fog":return n("CC_Fog.gif");case"rain_sleet":return n("Sleet.gif");case"rain_showers":case"rain_showers_high":return n("CC_Showers.gif");case"rain_showers-n":case"rain_showers_high-n":return n("CC_Showers.gif");case"rain":return n("CC_Rain.gif");case"snow":return n("CC_Snow.gif");case"rain_snow":return n("CC_RainSnow.gif");case"snow_fzra":case"fzra":return n("CC_FreezingRain.gif");case"snow_sleet":return n("Snow-Sleet.gif");case"tsra_sct":case"tsra":return n("EF_ScatTstorms.gif");case"tsra_sct-n":case"tsra-n":return n("CC_TStorm.gif");case"tsra_hi":case"tsra_hi-n":case"hurricane":return n("CC_TStorm.gif");case"wind_few":case"wind_sct":case"wind_bkn":case"wind_ovc":case"wind_skc":case"wind_skc-n":return n("CC_Windy.gif");case"blizzard":return n("Blowing-Snow.gif");default:return console.log(`Unable to locate icon for ${r} ${e} ${t}`),!1}},getWeatherRegionalIconFromIconLink:(e,t)=>{void 0===t&&(t=e.indexOf("/night/")>=0);const n=e=>"images/r/"+e;let r=e.toLowerCase().match(/[^/]+$/)[0].match(/(.*?)[,?&.]/)[1];switch("dualimage"===r&&(r=e.match(/&j=(.*)&/)[1]),r+(t?"-n":"")){case"skc":case"hot":case"haze":return n("Sunny.gif");case"skc-n":case"nskc":case"nskc-n":return n("Clear-1992.gif");case"bkn":return n("Mostly-Cloudy-1994-2.gif");case"bkn-n":case"few-n":case"nfew-n":case"nfew":return n("Partly-Clear-1994-2.gif");case"sct":case"few":return n("Partly-Cloudy.gif");case"sct-n":case"nsct":case"nsct-n":return n("Mostly-Clear.gif");case"ovc":case"ovc-n":return n("Cloudy.gif");case"fog":case"fog-n":return n("Fog.gif");case"rain_sleet":return n("Sleet.gif");case"rain_showers":case"rain_showers_high":return n("Scattered-Showers-1994-2.gif");case"rain_showers-n":case"rain_showers_high-n":return n("Scattered-Showers-Night-1994-2.gif");case"rain":return n("Rain-1992.gif");case"snow":return n("Heavy-Snow-1994-2.gif");case"rain_snow":return n("Rain-Snow-1992.gif");case"snow_fzra":return n("Freezing-Rain-Snow-1992.gif");case"fzra":return n("Freezing-Rain-1992.gif");case"snow_sleet":return n("Wintry-Mix-1992.gif");case"tsra_sct":case"tsra":return n("Scattered-Tstorms-1994-2.gif");case"tsra_sct-n":case"tsra-n":return n("Scattered-Tstorms-Night-1994-2.gif");case"tsra_hi":case"tsra_hi-n":case"hurricane":return n("Thunderstorm.gif");case"wind_few":case"wind_sct":case"wind_bkn":case"wind_ovc":return n("Wind.gif");case"wind_skc":return n("Sunny-Wind-1994.gif");case"wind_skc-n":return n("Clear-Wind-1994.gif");case"blizzard":return n("Blowing Snow.gif");default:return console.log(`Unable to locate regional icon for ${r} ${e} ${t}`),!1}}},utils=(()=>{const e=[];Math.round2=(e,t)=>Number(Math.round(e+"e"+t)+"e-"+t);const t=e=>e=(e=(e=e.replace("https://api.weather.gov/","")).replace("https://radar.weather.gov/","")).replace("https://www.cpc.ncep.noaa.gov/","");return{image:{load:(e,n=!1)=>new Promise(r=>{const i=new Image;if(i.onload=e=>{r(e.target)},e instanceof Blob)i.src=window.URL.createObjectURL(e);else{let r=e;n&&(r=t(e)),i.src=r}}),superGifAsync:e=>new Promise(t=>{const n=new SuperGif(e);n.load(()=>t(n))}),preload:t=>{if(e.includes(t))return!1;return(new Image).scr=t,e.push(t),!0},drawLocalCanvas:e=>{const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");return n.imageSmoothingEnabled=!1,n.drawImage(e,0,0),n}},weather:{getPoint:async(e,t)=>{try{return await $.ajax({type:"GET",url:`https://api.weather.gov/points/${e},${t}`,dataType:"json",crossDomain:!0})}catch(n){return console.error("Unable to get point"),console.error(e,t),console.error(n.status,n.responseJSON),!1}}},units:{mphToKph:e=>Math.round(1.60934*e),kphToMph:e=>Math.round(e/1.60934),celsiusToFahrenheit:e=>Math.round(9*e/5+32),fahrenheitToCelsius:e=>Math.round2(5*(e-32)/9,1),milesToKilometers:e=>Math.round(1.60934*e),kilometersToMiles:e=>Math.round(e/1.60934),feetToMeters:e=>Math.round(.3048*e),metersToFeet:e=>Math.round(e/.3048),inchesToCentimeters:e=>Math.round2(2.54*e,2),pascalToInHg:e=>Math.round2(2953e-7*e,2)},calc:{relativeHumidity:(e,t)=>{const n=e,r=t;return Math.round(Math.exp(17.625*r/(243.04+r))/Math.exp(17.625*n/(243.04+n))*100)},heatIndex:(e,t)=>{const n=e,r=t;let i,a=.5*(n+61+1.2*(n-68)+.094*r);return n>=80&&(a=2.04901523*n-42.379+10.14333127*r-.22475541*n*r-.00683783*n*n-.05481717*r*r+.00122874*n*n*r+85282e-8*n*r*r-199e-8*n*n*r*r,r<13&&n>80&&n<112?(i=(13-r)/4*Math.sqrt((17-Math.abs(n-95))/17),a-=i):r>85&&n>80&&n<87&&(i=(r-85)/10*((87-n)/5),a+=i)),a<e&&(a=e),Math.round(a)},windChill:(e,t)=>{if("0"===t||"Calm"===t||"NA"===t)return"";const n=e,r=t;return Math.round(35.74+.6215*n-35.75*Math.pow(r,.16)+.4275*n*Math.pow(r,.16))},directionToNSEW:e=>["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"][Math.floor(e/22.5+.5)%16],distance:(e,t,n,r)=>Math.sqrt((n-=e)*n+(r-=t)*r),wrap:(e,t)=>(e%t+t)%t},string:{wordWrap:(e,...t)=>{let n,r,i,a,o,s=t.length>=1?t[0]:75,u=t.length>=2?t[1]:"\n",l=t.length>=3&&t[2];if(e+="",s<1)return e;for(n=-1,i=(o=e.split(/\r\n|\n|\r/)).length;++n<i;o[n]+=a)for(a=o[n],o[n]="";a.length>s;o[n]+=a.slice(0,r)+((a=a.slice(r)).length?u:""))r=2===l||(r=a.slice(0,s+1).match(/\S*(\s)?$/))[1]?s:r.input.length-r[0].length||!0===l&&s||r.input.length+(r=a.slice(s).match(/^\S*/))[0].length;return o.join("\n").replace(/\n /g,"\n")}},cors:{rewriteUrl:t}}})();$.ajaxCORS=function(e){return e.url=utils.cors.rewriteUrl(e.url),$.ajax(e)};class CurrentWeather extends WeatherDisplay{constructor(e,t){super(e,t,"Current Conditions"),this.backgroundImage=utils.image.load("images/BackGround1_1.png")}async getData(e){let t,n;super.getData(e),e||(e=this.weatherParameters);try{const r=$.ajaxCORS({type:"GET",url:`https://api.weather.gov/stations/${e.stationId}/observations`,data:{limit:2},dataType:"json",crossDomain:!0}),i=$.ajax({type:"GET",url:"https://api.weather.gov/stations/"+e.stationId,dataType:"json",crossDomain:!0});[t,n]=await Promise.all([r,i])}catch(e){return console.error("Unable to get current observations"),console.error(e.status,e.responseJSON),void this.setStatus(STATUS.failed)}utils.image.preload(icons.getWeatherIconFromIconLink(t.features[0].properties.icon)),this.data=Object.assign({},t,{station:n}),this.setStatus(STATUS.loaded)}parseData(){if(!this.data)return!1;const e={},t=this.data.features[0].properties;e.observations=t,e.Temperature=Math.round(t.temperature.value),e.TemperatureUnit="C",e.DewPoint=Math.round(t.dewpoint.value),e.Ceiling=Math.round(t.cloudLayers[0].base.value),e.CeilingUnit="m.",e.Visibility=Math.round(t.visibility.value/1e3),e.VisibilityUnit=" km.",e.WindSpeed=Math.round(t.windSpeed.value),e.WindDirection=utils.calc.directionToNSEW(t.windDirection.value),e.Pressure=Math.round(t.barometricPressure.value),e.HeatIndex=Math.round(t.heatIndex.value),e.WindChill=Math.round(t.windChill.value),e.WindGust=Math.round(t.windGust.value),e.WindUnit="KPH",e.Humidity=Math.round(t.relativeHumidity.value),e.Icon=icons.getWeatherIconFromIconLink(t.icon),e.PressureDirection="",e.TextConditions=t.textDescription;const n=t.barometricPressure.value-this.data.features[1].properties.barometricPressure.value;return n>150&&(e.PressureDirection="R"),n<-150&&(e.PressureDirection="F"),navigation.units()===UNITS.english&&(e.Temperature=utils.units.celsiusToFahrenheit(e.Temperature),e.TemperatureUnit="F",e.DewPoint=utils.units.celsiusToFahrenheit(e.DewPoint),e.Ceiling=100*Math.round(utils.units.metersToFeet(e.Ceiling)/100),e.CeilingUnit="ft.",e.Visibility=utils.units.kilometersToMiles(t.visibility.value/1e3),e.VisibilityUnit=" mi.",e.WindSpeed=utils.units.kphToMph(e.WindSpeed),e.WindUnit="MPH",e.Pressure=utils.units.pascalToInHg(e.Pressure).toFixed(2),e.HeatIndex=utils.units.celsiusToFahrenheit(e.HeatIndex),e.WindChill=utils.units.celsiusToFahrenheit(e.WindChill),e.WindGust=utils.units.kphToMph(e.WindGust)),e}async drawCanvas(){super.drawCanvas();const e=this.parseData();this.context.drawImage(await this.backgroundImage,0,0),draw.horizontalGradientSingle(this.context,0,30,500,90,draw.topColor1,draw.topColor2),draw.triangle(this.context,"rgb(28, 10, 87)",500,30,450,90,500,90),draw.horizontalGradientSingle(this.context,0,90,52,399,draw.sideColor1,draw.sideColor2),draw.horizontalGradientSingle(this.context,584,90,640,399,draw.sideColor1,draw.sideColor2),draw.titleText(this.context,"Current","Conditions"),draw.text(this.context,"Star4000 Large","24pt","#FFFFFF",170,135,e.Temperature+String.fromCharCode(176),2);let t=e.observations.textDescription;switch(t.length>15&&(t=this.shortConditions(t)),draw.text(this.context,"Star4000 Extended","24pt","#FFFFFF",195,170,t,2,"center"),draw.text(this.context,"Star4000 Extended","24pt","#FFFFFF",80,330,"Wind:",2),draw.text(this.context,"Star4000 Extended","24pt","#FFFFFF",300,330,e.WindDirection+" "+e.WindSpeed,2,"right"),e.WindGust&&draw.text(this.context,"Star4000 Extended","24pt","#FFFFFF",80,375,"Gusts to "+e.WindGust,2),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFF00",315,120,this.data.station.properties.name.substr(0,20),2),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",340,165,"Humidity:",2),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",560,165,e.Humidity+"%",2,"right"),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",340,205,"Dewpoint:",2),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",560,205,e.DewPoint+String.fromCharCode(176),2,"right"),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",340,245,"Ceiling:",2),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",560,245,""===e.Ceiling?"Unlimited":e.Ceiling+e.CeilingUnit,2,"right"),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",340,285,"Visibility:",2),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",560,285,e.Visibility+e.VisibilityUnit,2,"right"),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",340,325,"Pressure:",2),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",535,325,e.Pressure,2,"right"),e.PressureDirection){case"R":draw.triangle(this.context,"#000000",552,302,542,312,562,312),draw.box(this.context,"#000000",549,312,6,15),draw.triangle(this.context,"#000000",550,300,540,310,560,310),draw.box(this.context,"#000000",547,310,6,15),draw.triangle(this.context,"#FFFF00",550,301,541,309,559,309),draw.box(this.context,"#FFFF00",548,309,4,15);break;case"F":draw.triangle(this.context,"#000000",552,327,542,317,562,317),draw.box(this.context,"#000000",549,302,6,15),draw.triangle(this.context,"#000000",550,325,540,315,560,315),draw.box(this.context,"#000000",547,300,6,15),draw.triangle(this.context,"#FFFF00",550,324,541,314,559,314),draw.box(this.context,"#FFFF00",548,301,4,15)}e.observations.heatIndex.value&&e.HeatIndex!==e.Temperature?(draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",340,365,"Heat Index:",2),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",560,365,e.HeatIndex+String.fromCharCode(176),2,"right")):e.observations.windChill.value&&""!==e.WindChill&&e.WindChill<e.Temperature&&(draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",340,365,"Wind Chill:",2),draw.text(this.context,"Star4000 Large","bold 16pt","#FFFFFF",560,365,e.WindChill+String.fromCharCode(176),2,"right")),this.gifs.push(await utils.image.superGifAsync({src:e.Icon,auto_play:!0,canvas:this.canvas,x:140,y:175,max_width:126})),this.finishDraw()}getCurrentWeather(){return this.parseData()}shortConditions(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/Light/g,"L")).replace(/Heavy/g,"H")).replace(/Partly/g,"P")).replace(/Mostly/g,"M")).replace(/Few/g,"F")).replace(/Thunderstorm/g,"T'storm")).replace(/ in /g,"")).replace(/Vicinity/g,"")).replace(/ and /g," ")).replace(/Freezing Rain/g,"Frz Rn")).replace(/Freezing/g,"Frz")).replace(/Unknown Precip/g,"")).replace(/L Snow Fog/g,"L Snw/Fog")).replace(/ with /g,"/")}}const currentWeatherScroll=(()=>{const e=String.fromCharCode(176);let t,n,r,i,a=0;const o=()=>{n&&t.putImageData(n,0,405),n=void 0,t=void 0},s=()=>{a=(a+1)%l.length,u()},u=()=>{const e=navigation.getCurrentWeather();e&&r&&(t.putImageData(n,0,405),c(l[a](e)))},l=[()=>"Conditions at "+r.name.substr(0,20),t=>{let n=`Temp: ${t.Temperature}${e} ${t.TemperatureUnit}`;return t.HeatIndex!==t.Temperature?n+=` Heat Index: ${t.HeatIndex}${e} ${t.TemperatureUnit}`:""!==t.WindChill&&t.WindChill<t.Temperature&&(n+=` Wind Chill: ${t.WindChill}${e} ${t.TemperatureUnit}`),n},t=>`Humidity: ${t.Humidity}${e} ${t.TemperatureUnit} Dewpoint: ${t.DewPoint}${e} ${t.TemperatureUnit}`,e=>`Barometric Pressure: ${e.Pressure} ${e.PressureDirection}`,e=>{let t="";return t=e.WindSpeed>0?`Wind: ${e.WindDirection} ${e.WindSpeed} ${e.WindUnit}`:"Wind: Calm",e.WindGust>0&&(t+=" Gusts to "+e.WindGust),t},e=>`Visib: ${e.Visibility} ${e.VisibilityUnit} Ceiling: ${0===e.Ceiling?"Unlimited":`${e.Ceiling} ${e.CeilingUnit}`}`],c=e=>{draw.text(t,"Star4000","24pt","#ffffff",70,430,e,2)};return{start:e=>{e&&(e!==t&&(o(),n=e.getImageData(0,405,640,75)),t=e,i||(i=setInterval(s,4e3)),u())},stop:e=>{o(),i&&(i=clearInterval(i)),e&&(a=0)},setStation:e=>{r=e.stations[0].properties}}})();class LatestObservations extends WeatherDisplay{constructor(e,t){super(e,t,"Latest Observations"),this.backgroundImage=utils.image.load("images/BackGround1_1.png"),this.MaximumRegionalStations=7}async getData(e){super.getData(e),e||(e=this.weatherParameters);const t=Object.keys(_StationInfo).map(t=>{const n=_StationInfo[t],r=utils.calc.distance(n.lat,n.lon,e.latitude,e.longitude);return Object.assign({},n,{distance:r})}).sort((e,t)=>e.distance-t.distance).slice(0,30),n=(await Promise.all(t.map(async e=>{try{const t=await $.ajax({type:"GET",url:`https://api.weather.gov/stations/${e.id}/observations/latest`,dataType:"json",crossDomain:!0});return Object.assign({},t.properties,{StationId:e.id,city:e.city})}catch(t){return void console.log("Unable to get latest observations for "+e.id)}}))).filter(e=>e);this.data=n.slice(0,this.MaximumRegionalStations),this.data.length<1?this.setStatus(STATUS.noData):this.setStatus(STATUS.loaded)}async drawCanvas(){super.drawCanvas();const e=this.data.sort((e,t)=>e.Name<t.Name?-1:e.Name>t.Name?1:0);this.context.drawImage(await this.backgroundImage,0,0),draw.horizontalGradientSingle(this.context,0,30,500,90,draw.topColor1,draw.topColor2),draw.triangle(this.context,"rgb(28, 10, 87)",500,30,450,90,500,90),draw.horizontalGradientSingle(this.context,0,90,52,399,draw.sideColor1,draw.sideColor2),draw.horizontalGradientSingle(this.context,584,90,640,399,draw.sideColor1,draw.sideColor2),draw.titleText(this.context,"Latest","Observations"),navigation.units()===UNITS.english?draw.text(this.context,"Star4000 Small","24pt","#FFFFFF",295,105,String.fromCharCode(176)+"F",2):draw.text(this.context,"Star4000 Small","24pt","#FFFFFF",295,105,String.fromCharCode(176)+"C",2),draw.text(this.context,"Star4000 Small","24pt","#FFFFFF",345,105,"WEATHER",2),draw.text(this.context,"Star4000 Small","24pt","#FFFFFF",495,105,"WIND",2);let t=140;e.forEach(e=>{let n=e.temperature.value,r=e.windSpeed.value;const i=utils.calc.directionToNSEW(e.windDirection.value);navigation.units()===UNITS.english&&(n=utils.units.celsiusToFahrenheit(n),r=utils.units.kphToMph(r)),draw.text(this.context,"Star4000","24pt","#FFFFFF",65,t,e.city.substr(0,14),2),draw.text(this.context,"Star4000","24pt","#FFFFFF",345,t,this.shortenCurrentConditions(e.textDescription).substr(0,9),2),r>0?draw.text(this.context,"Star4000","24pt","#FFFFFF",495,t,i+Array(6-i.length-r.toString().length).join(" ")+r.toString(),2):"NA"===r?draw.text(this.context,"Star4000","24pt","#FFFFFF",495,t,"NA",2):draw.text(this.context,"Star4000","24pt","#FFFFFF",495,t,"Calm",2);const a=325-15*n.toString().length;draw.text(this.context,"Star4000","24pt","#FFFFFF",a,t,n,2),t+=40}),this.finishDraw()}shortenCurrentConditions(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/Light/,"L")).replace(/Heavy/,"H")).replace(/Partly/,"P")).replace(/Mostly/,"M")).replace(/Few/,"F")).replace(/Thunderstorm/,"T'storm")).replace(/ in /,"")).replace(/Vicinity/,"")).replace(/ and /," ")).replace(/Freezing Rain/,"Frz Rn")).replace(/Freezing/,"Frz")).replace(/Unknown Precip/,"")).replace(/L Snow Fog/,"L Snw/Fog")).replace(/ with /,"/")}}class TravelForecast extends WeatherDisplay{constructor(e,t,n){super(e,t,"Travel Forecast",n),this.backgroundImage=utils.image.load("images/BackGround6_1.png"),this.cityHeight=72,this.timing.baseDelay=20;const r=_TravelCities.length/4,i=Math.floor(r)-2,a=i%1,o=4*this.cityHeight;this.timing.delay=[150+o];for(let e=0;e<i;e++)this.timing.delay.push(o);0!==a&&this.timing.delay.push(Math.round(this.extra*this.cityHeight)),this.timing.delay.push(150)}async getData(){if(!super.getData())return;const e=_TravelCities.map(async e=>{try{const t=await utils.weather.getPoint(e.Latitude,e.Longitude),n=await $.ajax({url:t.properties.forecast,dataType:"json",crossDomain:!0}),r=n.properties.periods[0].isDaytime?0:1;return{today:0===r,high:n.properties.periods[r].temperature,low:n.properties.periods[r+1].temperature,name:e.Name,icon:icons.getWeatherRegionalIconFromIconLink(n.properties.periods[r].icon)}}catch(t){return console.error(`GetTravelWeather for ${e.Name} failed`),console.error(t.status,t.responseJSON),{name:e.Name}}}),t=await Promise.all(e);this.data=t;this.data.reduce((e,t)=>e||t.high,!1)?(this.setStatus(STATUS.loaded),this.drawLongCanvas()):this.setStatus(STATUS.noData)}async drawLongCanvas(){this.longCanvas||(this.longCanvas=document.createElement("canvas"),this.longCanvas.width=640,this.longCanvas.height=1728,this.longContext=this.longCanvas.getContext("2d"),this.longCanvasGifs=[]);const e=this.data;this.gifs.forEach(e=>e.pause()),this.gifs.length=0,this.longContext.clearRect(0,0,this.longCanvas.width,this.longCanvas.height),draw.box(this.longContext,"rgb(35, 50, 112)",0,0,640,_TravelCities.length*this.cityHeight);for(let e=0;e<=4;e++){const t=346*e;draw.horizontalGradient(this.longContext,0,t,640,t+346,"#102080","#001040")}await Promise.all(e.map(async(e,t)=>{const n=50+this.cityHeight*t;if(draw.text(this.longContext,"Star4000 Large Compressed","24pt","#FFFF00",80,n,e.name,2),e.icon){let{low:t,high:r}=e;navigation.units()===UNITS.metric&&(t=utils.units.fahrenheitToCelsius(t),r=utils.units.fahrenheitToCelsius(r));const i=Math.round(t).toString(),a=Math.round(r).toString(),o=500-20*i.length;draw.text(this.longContext,"Star4000 Large","24pt","#FFFF00",o,n,i,2);const s=560-20*a.length;draw.text(this.longContext,"Star4000 Large","24pt","#FFFF00",s,n,a,2),this.longCanvasGifs.push(await utils.image.superGifAsync({src:e.icon,auto_play:!0,canvas:this.longCanvas,x:330,y:n-35,max_width:47}))}else draw.text(this.longContext,"Star4000 Small","24pt","#FFFFFF",400,n-18,"NO TRAVEL",2),draw.text(this.longContext,"Star4000 Small","24pt","#FFFFFF",400,n,"DATA AVAILABLE",2)}))}async drawCanvas(){super.drawCanvas();const e=this.data;this.context.drawImage(await this.backgroundImage,0,0),draw.horizontalGradientSingle(this.context,0,30,500,90,draw.topColor1,draw.topColor2),draw.triangle(this.context,"rgb(28, 10, 87)",500,30,450,90,500,90),draw.titleText(this.context,"Travel Forecast","For "+this.getTravelCitiesDayName(e)),draw.text(this.context,"Star4000 Small","24pt","#FFFF00",455,105,"LOW",2),draw.text(this.context,"Star4000 Small","24pt","#FFFF00",510,105,"HIGH",2),this.context.drawImage(this.longCanvas,0,0,640,289,0,110,640,289),this.finishDraw()}async showCanvas(){await this.drawCanvas(),super.showCanvas()}screenIndexChange(){this.baseCountChange(this.navBaseCount)}baseCountChange(e){const t=this.getLongCanvas();let n=Math.min(t.height-289,e-150);n<0&&(n=0),this.context.drawImage(t,0,n,640,289,0,110,640,289)}getTravelCitiesDayName(e){const{DateTime:t}=luxon;return e.reduce((e,n)=>{if(n&&""===e){return t.local().plus({days:n.today?0:1}).toLocaleString({weekday:"long"})}return e},"")}getLongCanvas(){return this.longCanvas}}class RegionalForecast extends WeatherDisplay{constructor(e,t){super(e,t,"Regional Forecast"),this.backgroundImage=utils.image.load("images/BackGround5_1.png"),this.timing.totalScreens=3}async getData(e){super.getData(e),e||(e=this.weatherParameters);let t="images/Basemap2.png";"HI"===e.State?t="images/HawaiiRadarMap4.png":"AK"===e.State&&(t="images/AlaskaRadarMap6.png"),this.baseMap=utils.image.load(t);const n={x:240,y:117},r=this.getXYFromLatitudeLongitude(e.latitude,e.longitude,n.x,n.y,e.state),i=this.getMinMaxLatitudeLongitude(r.x,r.y,n.x,n.y,e.state);let a=2.5;"HI"===e.State&&(a=1);const o=Object.keys(_StationInfo).map(e=>Object.assign({},_StationInfo[e],{targetDistance:a})),s=[..._RegionalCities,...o],u=[];s.forEach(e=>{if(e.lat>i.minLat&&e.lat<i.maxLat&&e.lon>i.minLon&&e.lon<i.maxLon-1){const t=e.targetDistance||1;u.reduce((n,r)=>{const i=utils.calc.distance(e.lon,e.lat,r.lon,r.lat);return n&&i>=t},!0)&&u.push(e)}});const l=u.map(async t=>{try{const n=await utils.weather.getPoint(t.lat,t.lon),r=this.getRegionalObservation(n,t),a=await $.ajax({url:n.properties.forecast,dataType:"json",crossDomain:!0}),o=this.getXYForCity(t,i.maxLat,i.minLon,e.state),s=await r,u={daytime:!!s.icon.match(/\/day\//),temperature:utils.units.celsiusToFahrenheit(s.temperature.value),name:this.formatCity(t.city),icon:s.icon,x:o.x,y:o.y};return utils.image.preload(icons.getWeatherRegionalIconFromIconLink(u.icon,!u.daytime)),[u,this.buildForecast(a.properties.periods[1],t,o),this.buildForecast(a.properties.periods[2],t,o)]}catch(e){return console.log(`No regional forecast data for '${t.Name}'`),console.error(e.status,e.responseJSON),!1}}),c=(await Promise.all(l)).filter(e=>e);0!==c.length?(this.data={regionalData:c,offsetXY:n,sourceXY:r},this.setStatus(STATUS.loaded)):this.setStatus(STATUS.noData)}buildForecast(e,t,n){return{daytime:e.isDaytime,temperature:e.temperature||0,name:this.formatCity(t.city),icon:e.icon,x:n.x,y:n.y,time:e.startTime}}async getRegionalObservation(e,t){try{const t=(await $.ajax({type:"GET",url:e.properties.observationStations,dataType:"json",crossDomain:!0})).features[0].id,n=await $.ajax({type:"GET",url:t+"/observations/latest",dataType:"json",crossDomain:!0});return utils.image.preload(icons.getWeatherRegionalIconFromIconLink(n.properties.icon,!n.properties.daytime)),n.properties}catch(e){return console.log("Unable to get regional observations for "+t.Name),console.error(e.status,e.responseJSON),!1}}getXYFromLatitudeLongitude(e,t,n,r,i){if("AK"===i)return this.getXYFromLatitudeLongitudeAK(...arguments);if("HI"===i)return this.getXYFromLatitudeLongitudeHI(...arguments);let a=0,o=0;return a=55.2*(50.5-e),a-=r,a>1600-2*r?a=1600-2*r:a<0&&(a=0),o=41.775*(-127.5-t)*-1,o-=n,o>2550-2*n?o=2550-2*n:o<0&&(o=0),{x:o,y:a}}getXYFromLatitudeLongitudeAK(e,t,n,r){let i=0,a=0;return i=56*(73-e),i-=r,i>1142-2*r?i=1142-2*r:i<0&&(i=0),a=25*(-175-t)*-1,a-=n,a>1200-2*n?a=1200-2*n:a<0&&(a=0),{x:a,y:i}}getXYFromLatitudeLongitudeHI(e,t,n,r){let i=0,a=0;return i=55.2*(25-e),i-=r,i>571-2*r?i=571-2*r:i<0&&(i=0),a=41.775*(-164.5-t)*-1,a-=n,a>600-2*n?a=600-2*n:a<0&&(a=0),{x:a,y:i}}getMinMaxLatitudeLongitude(e,t,n,r,i){if("AK"===i)return this.getMinMaxLatitudeLongitudeAK(...arguments);if("HI"===i)return this.getMinMaxLatitudeLongitudeHI(...arguments);return{minLat:-1*((t+2*r)/55.2-50.5),maxLat:-1*(t/55.2-50.5),minLon:-1*(-1*e/41.775+127.5),maxLon:-1*(-1*(e+2*n)/41.775+127.5)}}getMinMaxLatitudeLongitudeAK(e,t,n,r){return{minLat:-1*((t+2*r)/56-73),maxLat:-1*(t/56-73),minLon:-1*(-1*e/25+175),maxLon:-1*(-1*(e+2*n)/25+175)}}getMinMaxLatitudeLongitudeHI(e,t,n,r){return{minLat:-1*((t+2*r)/55.2-25),maxLat:-1*(t/55.2-25),minLon:-1*(-1*e/41.775+164.5),maxLon:-1*(-1*(e+2*n)/41.775+164.5)}}getXYForCity(e,t,n,r){"AK"===r&&this.getXYForCityAK(...arguments),"HI"===r&&this.getXYForCityHI(...arguments);let i=57*(e.lon-n),a=70*(t-e.lat);return a<30&&(a=30),a>282&&(a=282),i<40&&(i=40),i>580&&(i=580),{x:i,y:a}}getXYForCityAK(e,t,n){let r=37*(e.lon-n),i=70*(t-e.lat);return i<30&&(i=30),i>282&&(i=282),r<40&&(r=40),r>580&&(r=580),{x:r,y:i}}getXYForCityHI(e,t,n){let r=57*(e.lon-n),i=70*(t-e.lat);return i<30&&(i=30),i>282&&(i=282),r<40&&(r=40),r>580&&(r=580),{x:r,y:i}}formatCity(e){return e.match(/[^-;/\\,]*/)[0].substr(0,12)}async drawCanvas(){super.drawCanvas();const{regionalData:e,sourceXY:t,offsetXY:n}=this.data,{DateTime:r}=luxon;if(this.context.drawImage(await this.backgroundImage,0,0),draw.horizontalGradientSingle(this.context,0,30,500,90,draw.topColor1,draw.topColor2),draw.triangle(this.context,"rgb(28, 10, 87)",500,30,450,90,500,90),0===this.screenIndex)draw.titleText(this.context,"Regional","Observations");else{const t=r.fromISO(e[0][this.screenIndex].time).toLocaleString({weekday:"long"});e[0][this.screenIndex].daytime?draw.titleText(this.context,"Forecast for",t):draw.titleText(this.context,"Forecast for",t+" Night")}this.context.drawImage(await this.baseMap,t.x,t.y,2*n.x,2*n.y,0,90,640,312),await Promise.all(e.map(async e=>{const t=e[this.screenIndex],n=icons.getWeatherRegionalIconFromIconLink(t.icon,!t.daytime);n&&this.gifs.push(await utils.image.superGifAsync({src:n,max_width:42,auto_play:!0,canvas:this.canvas,x:t.x,y:t.y-15+90})),draw.text(this.context,"Star4000","20px","#ffffff",t.x-40,t.y-15+90,t.name,2);let r=t.temperature;navigation.units()===UNITS.metric&&(r=Math.round(utils.units.fahrenheitToCelsius(r))),draw.text(this.context,"Star4000 Large Compressed","28px","#ffff00",t.x-15*r.toString().length,t.y+20+90,r,2)})),this.finishDraw()}}class LocalForecast extends WeatherDisplay{constructor(e,t){super(e,t,"Local Forecast"),this.timing.baseDelay=5e3,this.backgroundImage=utils.image.load("images/BackGround1_1.png")}async getData(e){super.getData(e),e||(e=this.weatherParameters);const t=await this.getRawData(e);if(!t)return void this.setStatus(STATUS.failed);const n=this.parseLocalForecast(t);this.screenTexts=[],n.forEach(e=>{let t=e.DayName.toUpperCase()+"...",n=e.Text;navigation.units()===UNITS.metric&&(n=e.TextC),t+=n.toUpperCase().replace("..."," "),t=utils.string.wordWrap(t,32,"\n");const r=t.split("\n"),i=r.length;let a="";let o=0;for(let e=0;e<=i-1;e++)""!==r[e]&&(o>6&&(this.screenTexts.push(a),a="",o=0),a+=r[e]+"\n",o++);this.screenTexts.push(a)}),this.timing.totalScreens=this.screenTexts.length,this.calcNavTiming(),this.setStatus(STATUS.loaded)}async getRawData(e){let t="us";navigation.units()===UNITS.metric&&(t="si");try{return await $.ajax({type:"GET",url:e.forecast,data:{units:t},dataType:"json",crossDomain:!0})}catch(t){return console.error("GetWeatherForecast failed: "+e.forecast),console.error(t.status,t.responseJSON),this.setStatus(STATUS.failed),!1}}async drawCanvas(){super.drawCanvas(),this.context.drawImage(await this.backgroundImage,0,0),draw.horizontalGradientSingle(this.context,0,30,500,90,draw.topColor1,draw.topColor2),draw.triangle(this.context,"rgb(28, 10, 87)",500,30,450,90,500,90),draw.horizontalGradientSingle(this.context,0,90,52,399,draw.sideColor1,draw.sideColor2),draw.horizontalGradientSingle(this.context,584,90,640,399,draw.sideColor1,draw.sideColor2),draw.titleText(this.context,"Local ","Forecast"),draw.box(this.context,"rgb(33, 40, 90)",65,105,505,280),this.screenTexts[this.screenIndex].split("\n").forEach((e,t)=>{draw.text(this.context,"Star4000","24pt","#FFFFFF",75,140+40*t,e,2)}),this.finishDraw()}parseLocalForecast(e){return e.properties.periods.slice(0,6).map(e=>({DayName:e.name.toUpperCase(),Text:e.detailedForecast}))}}class ExtendedForecast extends WeatherDisplay{constructor(e,t){super(e,t,"Extended Forecast"),this.timing.totalScreens=2,this.backgroundImage=utils.image.load("images/BackGround2_1.png")}async getData(e){super.getData(e),e||(e=this.weatherParameters);let t,n="us";navigation.units()===UNITS.metric&&(n="si");try{t=await $.ajax({type:"GET",url:e.forecast,data:{units:n},dataType:"json",crossDomain:!0})}catch(e){return console.error("Unable to get extended forecast"),console.error(e.status,e.responseJSON),void this.setStatus(STATUS.failed)}this.data=this.parseExtendedForecast(t.properties.periods),this.screenIndex=0,this.setStatus(STATUS.loaded)}parseExtendedForecast(e){const t=[0,1,2,3,4,5,6].map(e=>luxon.DateTime.local().startOf("day").plus({days:e}).toLocaleString({weekday:"short"}));let n=0;const r=[];return e.forEach(e=>{r[n]||r.push({dayName:"",low:void 0,high:void 0,text:void 0,icon:void 0});const i=r[n];i.icon=icons.getWeatherIconFromIconLink(e.icon),i.text=this.shortenExtendedForecastText(e.shortForecast),i.dayName=t[n],utils.image.preload(i.icon),e.isDaytime?(i.high=e.temperature,n++):i.low=e.temperature}),r}shortenExtendedForecastText(e){let t=e;t=t.replace(/ and /g," "),t=t.replace(/Slight /g,""),t=t.replace(/Chance /g,""),t=t.replace(/Very /g,""),t=t.replace(/Patchy /g,""),t=t.replace(/Areas /g,""),t=t.replace(/Dense /g,"");let n=t.split(" ");-1!==t.indexOf("then")&&(n=t.split(" then "),n=n[1].split(" "));let r=n[0].substr(0,10),i="";return n[1]&&(r.endsWith(".")?r=r.replace(/\./,""):i=n[1].substr(0,10),"Blowing"===i&&(i="")),t=r,""!==i&&(t+=" "+i),[t,r,i]}async drawCanvas(){super.drawCanvas();const e=this.data.slice(0+3*this.screenIndex,3+3*this.screenIndex),t=await this.backgroundImage;this.context.drawImage(t,0,0),draw.horizontalGradientSingle(this.context,0,30,500,90,draw.topColor1,draw.topColor2),draw.triangle(this.context,"rgb(28, 10, 87)",500,30,450,90,500,90),draw.horizontalGradientSingle(this.context,0,90,640,399,draw.sideColor1,draw.sideColor2),this.context.drawImage(t,38,100,174,297,38,100,174,297),this.context.drawImage(t,232,100,174,297,232,100,174,297),this.context.drawImage(t,426,100,174,297,426,100,174,297),draw.titleText(this.context,"Extended","Forecast"),await Promise.all(e.map(async(e,t)=>{const n=195*t;draw.text(this.context,"Star4000","24pt","#FFFF00",100+n,135,e.dayName.toUpperCase(),2),draw.text(this.context,"Star4000","24pt","#8080FF",85+n,345,"Lo",2,"center"),draw.text(this.context,"Star4000","24pt","#FFFF00",165+n,345,"Hi",2,"center");let r=e.low;void 0!==r&&(navigation.units()===UNITS.metric&&(r=utils.units.rahrenheitToCelsius(r)),draw.text(this.context,"Star4000 Large","24pt","#FFFFFF",85+n,385,r,2,"center"));let i=e.high;navigation.units()===UNITS.metric&&(i=utils.units.rahrenheitToCelsius(i)),draw.text(this.context,"Star4000 Large","24pt","#FFFFFF",165+n,385,i,2,"center"),draw.text(this.context,"Star4000","24pt","#FFFFFF",120+n,270,e.text[1],2,"center"),draw.text(this.context,"Star4000","24pt","#FFFFFF",120+n,310,e.text[2],2,"center"),this.gifs.push(await utils.image.superGifAsync({src:e.icon,auto_play:!0,canvas:this.canvas,x:70+195*t,y:150,max_height:75}))})),this.finishDraw()}}class Almanac extends WeatherDisplay{constructor(e,t){super(e,t,"Almanac"),this.backgroundImage0=utils.image.load("images/BackGround3_1.png"),this.backgroundImage1=utils.image.load("images/BackGround1_1.png"),this.moonImages=[utils.image.load("images/2/Full-Moon.gif"),utils.image.load("images/2/Last-Quarter.gif"),utils.image.load("images/2/New-Moon.gif"),utils.image.load("images/2/First-Quarter.gif")],this.timing.totalScreens=2}async getData(e){super.getData(e),e||(e=this.weatherParameters);const t=[utils.image.load("https://www.cpc.ncep.noaa.gov/products/predictions/30day/off14_temp.gif",!0),utils.image.load("https://www.cpc.ncep.noaa.gov/products/predictions/30day/off14_prcp.gif",!0)],{sun:n,moon:r}=this.calcSunMoonData(e),[i,a]=await Promise.all(t),o=this.parseOutlooks(e.latitude,e.longitude,i,a);this.data={sun:n,moon:r,outlook:o},this.setStatus(STATUS.loaded)}calcSunMoonData(e){const{DateTime:t}=luxon,n=[SunCalc.getTimes(new Date,e.latitude,e.longitude),SunCalc.getTimes(t.local().plus({days:1}).toJSDate(),e.latitude,e.longitude)],r=[];let i=t.local().minus({days:1}),a=SunCalc.getMoonIllumination(i.toJSDate()).phase,o=0;do{const e=a;i=i.plus({days:1}),a=SunCalc.getMoonIllumination(i.toJSDate()).phase,e<.25&&a>=.25&&r.push(this.getMoonTransition(.25,"First",i)),e<.5&&a>=.5&&r.push(this.getMoonTransition(.5,"Full",i)),e<.75&&a>=.75&&r.push(this.getMoonTransition(.75,"Last",i)),e>a&&r.push(this.getMoonTransition(0,"New",i)),o++}while(o<=30&&r.length<4);return{sun:n,moon:r}}getMoonTransition(e,t,n,r=0){let i=n,a=SunCalc.getMoonIllumination(i.toJSDate()).phase,o=0;const s={hours:0===r?-1:0,minutes:1===r?1:0,seconds:2===r?-1:0,milliseconds:3===r?1:0};let u=(e,t,n)=>e<n&&t>=n;r%2==0&&(u=(e,t,n)=>e>n&&t<=n);do{const n=a;if(i=i.plus(s),a=SunCalc.getMoonIllumination(i.toJSDate()).phase,a>.9&&(a-=1),u(n,a,e)){if(r>=3)break;return this.getMoonTransition(e,t,i,r+1)}o++}while(o<1e3);return{phase:t,date:i}}parseOutlooks(e,t,n,r){const{DateTime:i}=luxon,a=i.local(),o=a.toLocaleString({month:"short"}),s=a.plus({months:1}).toLocaleString({month:"short"}),u=utils.image.drawLocalCanvas(n),l=utils.image.drawLocalCanvas(r),c=this.getOutlookColor(e,t,u),d=this.getOutlookColor(e,t,l);return{thisMonth:o,nextMonth:s,temperature:this.getOutlookTemperatureIndicator(c),precipitation:this.getOutlookPrecipitationIndicator(d)}}getOutlookColor(e,t,n){let r=0,i=0;i=(75-e)/53*707,e<48.83&&(i-=2.9*Math.abs(48.83-e)),i-=1.7*Math.abs(-100.46-t),r=(-155-t)/-110*719,t<-100.46?(r-=1*Math.abs(-100.46-t),e>40?r+=4*Math.abs(40-e):r-=4*Math.abs(40-e)):(r+=2*Math.abs(-100.46-t),e<36&&t>-90?r+=8*Math.abs(36-e):r-=6*Math.abs(36-e)),r=Math.round(r),i=Math.round(i);for(let e=r-8;e<=r+8;e++)for(let t=i-8;t<=i+8;t++){const r=this.getPixelColor(n,e,t);if(0!==r.r&&0!==r.g&&0!==r.b||255!==r.r&&255!==r.g&&255!==r.b)return r}return!1}getPixelColor(e,t,n){const r=e.getImageData(t,n,1,1).data;return{r:r[0],g:r[1],b:r[2]}}getOutlookTemperatureIndicator(e){return e.b>e.r?"Below Normal":e.r>e.b?"Above Normal":"Normal"}getOutlookPrecipitationIndicator(e){return e.g>e.r?"Above Normal":e.r>e.g?"Below Normal":"Normal"}async drawCanvas(){super.drawCanvas();const e=this.data,{DateTime:t}=luxon,n=t.local(),r=n.plus({days:1}),[i,a,o,s]=await Promise.all(this.moonImages);switch(this.screenIndex){case 0:default:this.context.drawImage(await this.backgroundImage0,0,0),draw.horizontalGradientSingle(this.context,0,30,500,90,draw.topColor1,draw.topColor2),draw.triangle(this.context,"rgb(28, 10, 87)",500,30,450,90,500,90),draw.horizontalGradientSingle(this.context,0,90,640,190,draw.sideColor1,draw.sideColor2),draw.titleText(this.context,"Almanac","Astronomical"),draw.text(this.context,"Star4000","24pt","#FFFF00",320,120,n.toLocaleString({weekday:"long"}),2,"center"),draw.text(this.context,"Star4000","24pt","#FFFF00",500,120,r.toLocaleString({weekday:"long"}),2,"center"),draw.text(this.context,"Star4000","24pt","#FFFFFF",70,150,"Sunrise:",2),draw.text(this.context,"Star4000","24pt","#FFFFFF",270,150,t.fromJSDate(e.sun[0].sunrise).toLocaleString(t.TIME_SIMPLE).toLowerCase(),2),draw.text(this.context,"Star4000","24pt","#FFFFFF",450,150,t.fromJSDate(e.sun[1].sunrise).toLocaleString(t.TIME_SIMPLE).toLowerCase(),2),draw.text(this.context,"Star4000","24pt","#FFFFFF",70,180," Sunset:",2),draw.text(this.context,"Star4000","24pt","#FFFFFF",270,180,t.fromJSDate(e.sun[0].sunset).toLocaleString(t.TIME_SIMPLE).toLowerCase(),2),draw.text(this.context,"Star4000","24pt","#FFFFFF",450,180,t.fromJSDate(e.sun[1].sunset).toLocaleString(t.TIME_SIMPLE).toLowerCase(),2),draw.text(this.context,"Star4000","24pt","#FFFF00",70,220,"Moon Data:",2),e.moon.forEach((e,t)=>{const n=e.date.toLocaleString({month:"short",day:"numeric"});draw.text(this.context,"Star4000","24pt","#FFFFFF",120+130*t,260,e.phase,2,"center"),draw.text(this.context,"Star4000","24pt","#FFFFFF",120+130*t,390,n,2,"center");const r=(()=>{switch(e.phase){case"Full":return i;case"Last":return a;case"New":return o;case"First":default:return s}})();this.context.drawImage(r,75+130*t,270)});break;case 1:this.context.drawImage(await this.backgroundImage1,0,0),draw.horizontalGradientSingle(this.context,0,30,500,90,draw.topColor1,draw.topColor2),draw.triangle(this.context,"rgb(28, 10, 87)",500,30,450,90,500,90),draw.horizontalGradientSingle(this.context,0,90,52,399,draw.sideColor1,draw.sideColor2),draw.horizontalGradientSingle(this.context,584,90,640,399,draw.sideColor1,draw.sideColor2),draw.titleText(this.context,"Almanac","Outlook"),draw.text(this.context,"Star4000","24pt","#FFFFFF",320,180,"30 Day Outlook",2,"center");var u="MID-"+e.outlook.thisMonth.toUpperCase()+" TO MID-"+e.outlook.nextMonth.toUpperCase();draw.text(this.context,"Star4000","24pt","#FFFFFF",320,220,u,2,"center");var l=e.outlook.temperature;draw.text(this.context,"Star4000","24pt","#FFFFFF",70,300,"Temperatures: "+l,2);var c=e.outlook.precipitation;draw.text(this.context,"Star4000","24pt","#FFFFFF",70,380,"Precipitation: "+c,2)}this.finishDraw()}}class Radar extends WeatherDisplay{constructor(e,t){super(e,t,"Local Radar"),this.dopplerRadarImageMax=6,this.timing.baseDelay=350,this.timing.delay=[{time:4,si:5},{time:1,si:0},{time:1,si:1},{time:1,si:2},{time:1,si:3},{time:1,si:4},{time:4,si:5},{time:1,si:0},{time:1,si:1},{time:1,si:2},{time:1,si:3},{time:1,si:4},{time:4,si:5},{time:1,si:0},{time:1,si:1},{time:1,si:2},{time:1,si:3},{time:1,si:4},{time:12,si:5}],this.backgroundImage=utils.image.load("images/BackGround4_1.png")}async getData(e){if(super.getData(e),e||(e=this.weatherParameters),"AK"===e.state)return void this.setStatus(STATUS.noData);const{DateTime:t}=luxon;let n="images/4000RadarMap2.jpg";"HI"===e.State&&(n="images/HawaiiRadarMap2.png"),this.baseMap=await utils.image.load(n);const r="https://radar.weather.gov/Conus/RadarImg/";let i;try{i=await $.ajaxCORS({type:"GET",url:r,dataType:"text",crossDomain:!0})}catch(e){return console.error("Unable to get list of radars"),console.error(e.status,e.responseJSON),void this.setStatus(STATUS.failed)}const a=(new DOMParser).parseFromString(i,"text/html").getElementsByTagName("a"),o=[];for(let e in a)o.push(a[e].innerHTML);let s=/Conus_\d/;"HI"===e.state&&(s=/hawaii_\d/);const u=o.filter(e=>e&&e.match(s)).slice(-(this.dopplerRadarImageMax-1));"HI"!==e.state&&u.push("latest_radaronly.gif"),"HI"===e.state&&u.push("hawaii_radaronly.gif");let l,c,d,h=120,f=69;"HI"===e.State?(c=600,d=571,l=this.getXYFromLatitudeLongitudeHI(e.latitude,e.longitude,h,f)):(c=2550,d=1600,h*=2,f*=2,l=this.getXYFromLatitudeLongitudeDoppler(e.latitude,e.longitude,h,f));const A=document.createElement("canvas");A.width=c,A.height=d;const p=A.getContext("2d");p.imageSmoothingEnabled=!1;let m=117,g=60,y=this.getXYFromLatitudeLongitudeDoppler(e.latitude,e.longitude,h,f),v=y.x/2,w=y.y/2;"HI"===e.State&&(m=120,g=69,y=this.getXYFromLatitudeLongitudeHI(e.latitude,e.longitude,h,f),v=y.x,w=y.y);const x=await Promise.all(u.map(async n=>{const i=document.createElement("canvas");i.width=640,i.height=367;const a=i.getContext("2d");a.imageSmoothingEnabled=!1;const[o,s,u]=await new Promise((e,t)=>{$.ajaxCORS({type:"GET",url:r+n,xhrFields:{responseType:"blob"},crossDomain:!0,success:(t,n,r)=>e([t,n,r]),error:(e,n,r)=>t(r)})}),c=n.match(/_(\d{4})(\d\d)(\d\d)_(\d\d)(\d\d)_/);let d;if(c){const[,e,n,r,i,a]=c;d=t.fromObject({year:e,month:n,day:r,hour:i,minute:a,zone:"UTC"}).setZone()}else d=t.fromHTTP(u.getResponseHeader("Last-Modified")).setZone();const y=await utils.image.load(o);"HI"===e.State?(p.clearRect(0,0,571,600),p.drawImage(y,0,0,571,600)):(p.clearRect(0,0,2550,1600),p.drawImage(y,0,0,2550,1600)),a.drawImage(await this.baseMap,l.x,l.y,2*h,2*f,0,0,640,367);const x=document.createElement("canvas");x.width=640,x.height=367;const b=x.getContext("2d");return b.imageSmoothingEnabled=!1,b.drawImage(A,v,w,2*m,2.33*g,0,0,640,367),this.removeDopplerRadarImageNoise(b),this.mergeDopplerRadarImage(a,b),{canvas:i,time:d}}));this.timing.totalScreens=x.length,this.data=x.map(e=>e.canvas),this.times=x.map(e=>e.time),this.setStatus(STATUS.loaded)}async drawCanvas(){if(super.drawCanvas(),-1===this.screenIndex)return;this.context.drawImage(await this.backgroundImage,0,0);const{DateTime:e}=luxon;draw.text(this.context,"Arial","bold 28pt","#ffffff",155,60,"Local",2),draw.text(this.context,"Arial","bold 28pt","#ffffff",155,95,"Radar",2),draw.text(this.context,"Star4000","bold 18pt","#ffffff",438,49,"PRECIP",2,"center"),draw.text(this.context,"Star4000","bold 18pt","#ffffff",298,73,"Light",2),draw.text(this.context,"Star4000","bold 18pt","#ffffff",517,73,"Heavy",2);let t=362;const n=52;draw.box(this.context,"#000000",t-2,50,154,28),draw.box(this.context,"rgb(49, 210, 22)",t,n,17,24),t+=19,draw.box(this.context,"rgb(28, 138, 18)",t,n,17,24),t+=19,draw.box(this.context,"rgb(20, 90, 15)",t,n,17,24),t+=19,draw.box(this.context,"rgb(10, 40, 10)",t,n,17,24),t+=19,draw.box(this.context,"rgb(196, 179, 70)",t,n,17,24),t+=19,draw.box(this.context,"rgb(190, 72, 19)",t,n,17,24),t+=19,draw.box(this.context,"rgb(171, 14, 14)",t,n,17,24),t+=19,draw.box(this.context,"rgb(115, 31, 4)",t,n,17,24),t+=19,this.context.drawImage(this.data[this.screenIndex],0,0,640,367,0,113,640,367),draw.text(this.context,"Star4000 Small","24pt","#ffffff",438,105,this.times[this.screenIndex].toLocaleString(e.TIME_SIMPLE),2,"center"),this.finishDraw()}getXYFromLatitudeLongitude(e,t,n,r,i){if("HI"===i)return this.getXYFromLatitudeLongitudeHI(...arguments);let a=0,o=0;return a=55.2*(50.5-e),a-=r,a>1600-2*r?a=1600-2*r:a<0&&(a=0),o=41.775*(-127.5-t)*-1,o-=n,o>2550-2*n?o=2550-2*n:o<0&&(o=0),{x:o,y:a}}getXYFromLatitudeLongitudeHI(e,t,n,r){let i=0,a=0;return i=55.2*(25-e),i-=r,i>571-2*r?i=571-2*r:i<0&&(i=0),a=41.775*(-164.5-t)*-1,a-=n,a>600-2*n?a=600-2*n:a<0&&(a=0),{x:a,y:i}}getXYFromLatitudeLongitudeDoppler(e,t,n,r){let i=0,a=0;return i=55.2*(51.75-e),i-=r,i>3200-2*r?i=3200-2*r:i<0&&(i=0),a=41.775*(-130.37-t)*-1,a-=n,a>5100-2*n?a=5100-2*n:a<0&&(a=0),{x:2*a,y:2*i}}removeDopplerRadarImageNoise(e){const t=e.getImageData(0,0,e.canvas.width,e.canvas.height);for(let e=0;e<t.data.length;e+=4){let[n,r,i,a]=t.data.slice(e,e+4);1===n&&159===r&&244===i||n>=200&&r>=200&&i>=200||4===n&&233===r&&231===i||3===n&&0===r&&244===i?(n=0,r=0,i=0,a=0):2===n&&253===r&&2===i?(n=49,r=210,i=22,a=255):1===n&&197===r&&1===i?(n=0,r=142,i=0,a=255):0===n&&142===r&&0===i?(n=20,r=90,i=15,a=255):253===n&&248===r&&2===i?(n=10,r=40,i=10,a=255):229===n&&188===r&&0===i?(n=196,r=179,i=70,a=255):253===n&&139===r&&0===i?(n=190,r=72,i=19,a=255):212===n&&0===r&&0===i?(n=171,r=14,i=14,a=255):188===n&&0===r&&0===i&&(n=115,r=31,i=4,a=255),t.data[e]=n,t.data[e+1]=r,t.data[e+2]=i,t.data[e+3]=a}e.putImageData(t,0,0)}mergeDopplerRadarImage(e,t){for(var n=e.getImageData(0,0,e.canvas.width,e.canvas.height),r=t.getImageData(0,0,t.canvas.width,t.canvas.height),i=0;i<r.data.length;i+=4)n.data[i]<116&&n.data[i+1]<116&&n.data[i+2]<116&&(r.data[i]=0,r.data[i+1]=0,r.data[i+2]=0,r.data[i+3]=0);t.putImageData(r,0,0),e.drawImage(t.canvas,0,0)}}class Progress extends WeatherDisplay{constructor(e,t){super(e,t),this.backgroundImage=utils.image.load("images/BackGround1_1.png"),this.timing=!1,this.version=document.getElementById("version").innerHTML}async drawCanvas(e,t){super.drawCanvas(),this.eventListener||(this.eventListener=!0,this.canvas.addEventListener("click",e=>this.canvasClick(e),!1));const n=await this.backgroundImage;if(this.backgroundDrawn||(this.context.drawImage(n,0,0,640,480,0,0,640,480),draw.horizontalGradientSingle(this.context,0,90,52,399,draw.sideColor1,draw.sideColor2),draw.horizontalGradientSingle(this.context,584,90,640,399,draw.sideColor1,draw.sideColor2),draw.horizontalGradientSingle(this.context,0,30,500,90,draw.topColor1,draw.topColor2),draw.triangle(this.context,"rgb(28, 10, 87)",500,30,450,90,500,90),draw.titleText(this.context,"WeatherStar","4000+ "+this.version)),this.finishDraw(),!e)return;e.forEach((e,t)=>{const r=120+29*t,i=Array(120-Math.floor(2.5*e.name.length)).join(".");let a,o;switch(draw.text(this.context,"Star4000 Extended","19pt","#ffffff",70,r,e.name+i,2),e.status){case STATUS.loading:a="Loading",o="#ffff00";break;case STATUS.loaded:a="Press Here",o="#00ff00",this.context.drawImage(n,440,r-20,75,25,440,r-20,75,25);break;case STATUS.failed:a="Failed",o="#ff0000";break;case STATUS.noData:a="No Data",o="#C0C0C0",draw.box(this.context,"rgb(33, 40, 90)",475,r-15,75,15);break;case STATUS.disabled:a="Disabled",o="#C0C0C0",this.context.drawImage(n,470,r-20,45,25,470,r-20,45,25)}this.context.drawImage(n,475,r-20,165,30,475,r-20,165,30),draw.text(this.context,"Star4000 Extended","19pt",o,565,r,a,2,"end")});const r=t/e.length;r<1?(draw.box(this.context,"#000000",51,428,534,22),draw.box(this.context,"#ffffff",53,430,530,18),draw.box(this.context,"#1d7fff",55,432,526*r,14)):this.context.drawImage(n,51,428,534,22,51,428,534,22)}canvasClick(e){const t=e.offsetX,n=e.offsetY;if(!this.isActive())return;if(n<100||n>410)return;if(t<440||t>570)return;navigation.message("navButton",stop);const r=Math.floor((n-100)/29),i=navigation.getDisplay(r);i&&i.status===STATUS.loaded&&(i.showCanvas(navigation.msg.command.firstFrame),this.hideCanvas())}}document.addEventListener("DOMContentLoaded",()=>{navigation.init()});const UNITS={english:Symbol("english"),metric:Symbol("metric")},navigation=(()=>{let e,t,n={},r=[],i=UNITS.english,a=!1;const o=(e,t={})=>{index.message({type:e,message:t})},s=async i=>{const a=await utils.weather.getPoint(i.lat,i.lon),s=await fetch(a.properties.observationStations,{method:"GET",mode:"cors",type:"GET"}),u=await s.json(),c=u.features[0].properties.stationIdentifier;let d=a.properties.relativeLocation.properties.city;c in _StationInfo&&(d=_StationInfo[c].city,d=d.split("/")[0]),n.latitude=i.lat,n.longitude=i.lon,n.zoneId=a.properties.forecastZone.substr(-6),n.radarId=a.properties.radarStation.substr(-3),n.stationId=c,n.weatherOffice=a.properties.cwa,n.city=d,n.state=a.properties.relativeLocation.properties.state,n.timeZone=a.properties.relativeLocation.properties.timeZone,n.forecast=a.properties.forecast,n.stations=u.features,o("weatherParameters",n),l(),e=new Progress(-1,"progress"),await e.drawCanvas(),e.showCanvas(),0===r.length&&(t=new CurrentWeather(0,"currentWeather"),r=[t,new LatestObservations(1,"latestObservations"),new TravelForecast(2,"travelForecast",!1),new RegionalForecast(3,"regionalForecast"),new LocalForecast(4,"localForecast"),new ExtendedForecast(5,"extendedForecast"),new Almanac(6,"almanac"),new Radar(7,"radar")]),r.forEach(e=>e.getData(n)),currentWeatherScroll.setStation(n)},u=()=>r.reduce((e,t)=>t.status!==STATUS.loading?e+1:e,0),l=()=>{r.forEach(e=>e.hideCanvas())},c=e=>{const t=e.toLowerCase();i="english"===t?UNITS.english:UNITS.metric},d=()=>a,h={response:{previous:Symbol("previous"),inProgress:Symbol("inProgress"),next:Symbol("next")},command:{firstFrame:Symbol("firstFrame"),previousFrame:Symbol("previousFrame"),nextFrame:Symbol("nextFrame"),lastFrame:Symbol("lastFrame")}},f=t=>{const n=m();e.hideCanvas(),n?(t===h.command.nextFrame&&m().navNext(),t===h.command.previousFrame&&m().navPrev()):r[0].navNext(h.command.firstFrame)},A=e=>{const t=r.length,n=p();let i;for(let a=0;a<t&&(i=utils.calc.wrap(n+(a+1)*e,t),r[i].status!==STATUS.loaded);a++);const a=r[i];l(),e<0&&a.showCanvas(h.command.lastFrame),e>0&&a.showCanvas(h.command.firstFrame)},p=()=>r.findIndex(e=>e.isActive()),m=()=>r[p()],g=t=>{a=t,o("isPlaying",a),e&&a&&!m()&&f(h.command.firstFrame)},y=t=>{switch(t){case"play":g(!0);break;case"playToggle":g(!a);break;case"stop":g(!1);break;case"next":g(!1),f(h.command.nextFrame);break;case"previous":g(!1),f(h.command.previousFrame);break;case"menu":g(!1),e.showCanvas(),l();break;default:console.error("Unknown navButton "+t)}};return{init:async()=>{},message:e=>{if(e.type)switch(e.type){case"latLon":s(e.message);break;case"units":c(e.message);break;case"navButton":y(e.message);break;default:console.error("Unknown event "+e.type)}},updateStatus:t=>{t.id<0||(e.drawCanvas(r,u()),d()&&0===t.id&&t.status===STATUS.loaded&&f(h.command.firstFrame),u()<r.length||o("loaded"))},units:()=>i,isPlaying:d,displayNavMessage:e=>{e.type===h.response.previous&&A(-1),e.type===h.response.next&&A(1)},msg:h,getDisplay:e=>r[e],getCurrentWeather:()=>!!t&&t.getCurrentWeather()}})(); |