36 lines
272 KiB
JavaScript
36 lines
272 KiB
JavaScript
/*!
|
||
* jQuery JavaScript Library v3.6.0
|
||
* https://jquery.com/
|
||
*
|
||
* Includes Sizzle.js
|
||
* https://sizzlejs.com/
|
||
*
|
||
* Copyright OpenJS Foundation and other contributors
|
||
* Released under the MIT license
|
||
* https://jquery.org/license
|
||
*
|
||
* Date: 2021-03-02T17:08Z
|
||
*/
|
||
!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,A=c.toString,d=A.call(Object),h={},f=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},p=function(e){return null!=e&&e===e.window},g=e.document,m={type:!0,src:!0,nonce:!0,noModule:!0};function v(e,t,n){var r,i,a=(n=n||g).createElement("script");if(a.text=e,t)for(r in m)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&a.setAttribute(r,i);n.head.appendChild(a).parentNode.removeChild(a)}function y(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?u[l.call(e)]||"object":typeof e}var w="3.6.0",x=function(e,t){return new x.fn.init(e,t)};function b(e){var t=!!e&&"length"in e&&e.length,n=y(e);return!f(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||f(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)&&A.call(n)===d)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){v(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:h}),"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 C=
|
||
/*!
|
||
* Sizzle CSS Selector Engine v2.3.6
|
||
* https://sizzlejs.com/
|
||
*
|
||
* Copyright JS Foundation and other contributors
|
||
* Released under the MIT license
|
||
* https://js.foundation/
|
||
*
|
||
* Date: 2021-02-16
|
||
*/
|
||
function(e){var t,n,r,i,a,o,s,u,l,c,A,d,h,f,p,g,m,v,y,w="sizzle"+1*new Date,x=e.document,b=0,C=0,S=ue(),T=ue(),I=ue(),k=ue(),F=function(e,t){return e===t&&(A=!0),0},E={}.hasOwnProperty,D=[],M=D.pop,B=D.push,L=D.push,N=D.slice,O=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",R="[\\x20\\t\\r\\n\\f]",V="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",H="\\[[\\x20\\t\\r\\n\\f]*("+V+")(?:"+R+"*([*^$|!~]?=)"+R+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+V+"))|)"+R+"*\\]",P=":("+V+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+H+")*)|.*)\\)|)",W=new RegExp(R+"+","g"),q=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),Q=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),_=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),U=new RegExp(R+"|>"),Z=new RegExp(P),G=new RegExp("^"+V+"$"),z={ID:new RegExp("^#("+V+")"),CLASS:new RegExp("^\\.("+V+")"),TAG:new RegExp("^("+V+"|[*])"),ATTR:new RegExp("^"+H),PSEUDO:new RegExp("^"+P),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")},Y=/HTML$/i,J=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,$=/^[^{]+\{\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(){d()},oe=we((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{L.apply(D=N.call(x.childNodes),x.childNodes),D[x.childNodes.length].nodeType}catch(e){L={apply:D.length?function(e,t){B.apply(e,N.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,A,f,m,v=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&&(d(t),t=t||h,p)){if(11!==x&&(A=K.exec(e)))if(a=A[1]){if(9===x){if(!(l=t.getElementById(a)))return r;if(l.id===a)return r.push(l),r}else if(v&&(l=v.getElementById(a))&&y(t,l)&&l.id===a)return r.push(l),r}else{if(A[2])return L.apply(r,t.getElementsByTagName(e)),r;if((a=A[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(a)),r}if(n.qsa&&!k[e+" "]&&(!g||!g.test(e))&&(1!==x||"object"!==t.nodeName.toLowerCase())){if(m=e,v=t,1===x&&(U.test(e)||_.test(e))){for((v=ee.test(e)&&me(t.parentNode)||t)===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(re,ie):t.setAttribute("id",c=w)),s=(f=o(e)).length;s--;)f[s]=(c?"#"+c:":scope")+" "+ye(f[s]);m=f.join(",")}try{return L.apply(r,v.querySelectorAll(m)),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=h.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function Ae(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function de(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 he(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function fe(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 ge(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 me(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},a=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},d=se.setDocument=function(e){var t,i,o=e?e.ownerDocument||e:x;return o!=h&&9===o.nodeType&&o.documentElement?(f=(h=o).documentElement,p=!a(h),x!=h&&(i=h.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",ae,!1):i.attachEvent&&i.attachEvent("onunload",ae)),n.scope=ce((function(e){return f.appendChild(e).appendChild(h.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(h.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=$.test(h.getElementsByClassName),n.getById=ce((function(e){return f.appendChild(e).id=w,!h.getElementsByName||!h.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)},m=[],g=[],(n.qsa=$.test(h.querySelectorAll))&&(ce((function(e){var t;f.appendChild(e).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+j+")"),e.querySelectorAll("[id~="+w+"-]").length||g.push("~="),(t=h.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||g.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+w+"+*").length||g.push(".#.+[+~]"),e.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),ce((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=h.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),f.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=$.test(v=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ce((function(e){n.disconnectedMatch=v.call(e,"*"),v.call(e,"[s!='']:x"),m.push("!=",P)})),g=g.length&&new RegExp(g.join("|")),m=m.length&&new RegExp(m.join("|")),t=$.test(f.compareDocumentPosition),y=t||$.test(f.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},F=t?function(e,t){if(e===t)return A=!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==h||e.ownerDocument==x&&y(x,e)?-1:t==h||t.ownerDocument==x&&y(x,t)?1:c?O(c,e)-O(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,r=0,i=e.parentNode,a=t.parentNode,o=[e],s=[t];if(!i||!a)return e==h?-1:t==h?1:i?-1:a?1:c?O(c,e)-O(c,t):0;if(i===a)return de(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?de(o[r],s[r]):o[r]==x?-1:s[r]==x?1:0},h):h},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(d(e),n.matchesSelector&&p&&!k[t+" "]&&(!m||!m.test(t))&&(!g||!g.test(t)))try{var r=v.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){k(t,!0)}return se(t,h,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!=h&&d(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=h&&d(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(A=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(F),A){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&&Z.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=S[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"("+R+"|$)"))&&S(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,A,d,h,f,p=a!==o?"nextSibling":"previousSibling",g=t.parentNode,m=s&&t.nodeName.toLowerCase(),v=!u&&!s,y=!1;if(g){if(a){for(;p;){for(d=t;d=d[p];)if(s?d.nodeName.toLowerCase()===m:1===d.nodeType)return!1;f=p="only"===e&&!f&&"nextSibling"}return!0}if(f=[o?g.firstChild:g.lastChild],o&&v){for(y=(h=(l=(c=(A=(d=g)[w]||(d[w]={}))[d.uniqueID]||(A[d.uniqueID]={}))[e]||[])[0]===b&&l[1])&&l[2],d=h&&g.childNodes[h];d=++h&&d&&d[p]||(y=h=0)||f.pop();)if(1===d.nodeType&&++y&&d===t){c[e]=[b,h,y];break}}else if(v&&(y=h=(l=(c=(A=(d=t)[w]||(d[w]={}))[d.uniqueID]||(A[d.uniqueID]={}))[e]||[])[0]===b&&l[1]),!1===y)for(;(d=++h&&d&&d[p]||(y=h=0)||f.pop())&&((s?d.nodeName.toLowerCase()!==m:1!==d.nodeType)||!++y||(v&&((c=(A=d[w]||(d[w]={}))[d.uniqueID]||(A[d.uniqueID]={}))[e]=[b,y]),d!==t)););return(y-=i)===r||y%r==0&&y/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=O(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 G.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===f},focus:function(e){return e===h.activeElement&&(!h.hasFocus||h.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 X.test(e.nodeName)},input:function(e){return J.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ge((function(){return[0]})),last:ge((function(e,t){return[t-1]})),eq:ge((function(e,t,n){return[n<0?n+t:n]})),even:ge((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:ge((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:ge((function(e,t,n){for(var r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e})),gt:ge((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}},r.pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=he(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=fe(t);function ve(){}function ye(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=C++;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,A,d=[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=(A=t[w]||(t[w]={}))[t.uniqueID]||(A[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[a])&&l[0]===b&&l[1]===s)return d[2]=l[2];if(c[a]=d,d[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 Ce(e,t,n,r,i,a){return r&&!r[w]&&(r=Ce(r)),i&&!i[w]&&(i=Ce(i,a)),le((function(a,o,s,u){var l,c,A,d=[],h=[],f=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,[]),g=!e||!a&&t?p:be(p,d,e,s,u),m=n?i||(a?e:f||r)?[]:o:g;if(n&&n(g,m,s,u),r)for(l=be(m,h),r(l,[],s,u),c=l.length;c--;)(A=l[c])&&(m[h[c]]=!(g[h[c]]=A));if(a){if(i||e){if(i){for(l=[],c=m.length;c--;)(A=m[c])&&l.push(g[c]=A);i(null,m=[],l,u)}for(c=m.length;c--;)(A=m[c])&&(l=i?O(a,A):d[c])>-1&&(a[l]=!(o[l]=A))}}else m=be(m===o?m.splice(f,m.length):m),i?i(null,o,m,u):L.apply(o,m)}))}function Se(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),A=we((function(e){return O(t,e)>-1}),s,!0),d=[function(e,n,r){var i=!o&&(r||n!==l)||((t=n).nodeType?c(e,n,r):A(e,n,r));return t=null,i}];u<a;u++)if(n=r.relative[e[u].type])d=[we(xe(d),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 Ce(u>1&&xe(d),u>1&&ye(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(q,"$1"),n,u<i&&Se(e.slice(u,i)),i<a&&Se(e=e.slice(i)),i<a&&ye(e))}d.push(n)}return xe(d)}return ve.prototype=r.filters=r.pseudos,r.setFilters=new ve,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=Q.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(a=[])),n=!1,(i=_.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=I[e+" "];if(!s){for(t||(t=o(e)),n=t.length;n--;)(s=Se(t[n]))[w]?i.push(s):a.push(s);s=I(e,function(e,t){var n=t.length>0,i=e.length>0,a=function(a,o,s,u,c){var A,f,g,m=0,v="0",y=a&&[],w=[],x=l,C=a||i&&r.find.TAG("*",c),S=b+=null==x?1:Math.random()||.1,T=C.length;for(c&&(l=o==h||o||c);v!==T&&null!=(A=C[v]);v++){if(i&&A){for(f=0,o||A.ownerDocument==h||(d(A),s=!p);g=e[f++];)if(g(A,o||h,s)){u.push(A);break}c&&(b=S)}n&&((A=!g&&A)&&m--,a&&y.push(A))}if(m+=v,n&&v!==m){for(f=0;g=t[f++];)g(y,w,o,s);if(a){if(m>0)for(;v--;)y[v]||w[v]||(w[v]=M.call(u));w=be(w)}L.apply(u,w),c&&!a&&w.length>0&&m+t.length>1&&se.uniqueSort(u)}return c&&(b=S,l=x),y};return n?le(a):a}(a,i)),s.selector=e}return s},u=se.select=function(e,t,n,i){var a,u,l,c,A,d="function"==typeof e&&e,h=!i&&o(e=d.selector||e);if(n=n||[],1===h.length){if((u=h[0]=h[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;d&&(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((A=r.find[c])&&(i=A(l.matches[0].replace(te,ne),ee.test(u[0].type)&&me(t.parentNode)||t))){if(u.splice(a,1),!(e=i.length&&ye(u)))return L.apply(n,i),n;break}}return(d||s(e,h))(i,t,!p,n,!t||ee.test(e)&&me(t.parentNode)||t),n},n.sortStable=w.split("").sort(F).join("")===w,n.detectDuplicates=!!A,d(),n.sortDetached=ce((function(e){return 1&e.compareDocumentPosition(h.createElement("fieldset"))})),ce((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||Ae("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")}))||Ae("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ce((function(e){return null==e.getAttribute("disabled")}))||Ae(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=C,x.expr=C.selectors,x.expr[":"]=x.expr.pseudos,x.uniqueSort=x.unique=C.uniqueSort,x.text=C.getText,x.isXMLDoc=C.isXML,x.contains=C.contains,x.escapeSelector=C.escape;var S=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},I=x.expr.match.needsContext;function k(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var F=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function E(e,t,n){return f(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&&I.test(e)?x(e):e||[],!1).length}});var D,M=/^(?:\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]:M.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:g,!0)),F.test(r[1])&&x.isPlainObject(t))for(r in t)f(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=g.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):f(e)?void 0!==n.ready?n.ready(e):e(x):x.makeArray(e,this)}).prototype=x.fn,D=x(g);var B=/^(?:parents|prev(?:Until|All))/,L={children:!0,contents:!0,next:!0,prev:!0};function N(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(!I.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 S(e,"parentNode")},parentsUntil:function(e,t,n){return S(e,"parentNode",n)},next:function(e){return N(e,"nextSibling")},prev:function(e){return N(e,"previousSibling")},nextAll:function(e){return S(e,"nextSibling")},prevAll:function(e){return S(e,"previousSibling")},nextUntil:function(e,t,n){return S(e,"nextSibling",n)},prevUntil:function(e,t,n){return S(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&&(L[e]||x.uniqueSort(i),B.test(e)&&i.reverse()),this.pushStack(i)}}));var O=/[^\x20\t\r\n\f]+/g;function j(e){return e}function R(e){throw e}function V(e,t,n,r){var i;try{e&&f(i=e.promise)?i.call(e).done(t).fail(n):e&&f(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(O)||[],(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){f(r)?e.unique&&l.has(r)||a.push(r):r&&r.length&&"string"!==y(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=f(e[r[4]])&&e[r[4]];a[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&f(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,f(l)?i?l.call(e,o(a,n,j,i),o(a,n,R,i)):(a++,l.call(e,o(a,n,j,i),o(a,n,R,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!==R&&(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,f(i)?i:j,e.notifyWith)),n[1][3].add(o(0,e,f(t)?t:j)),n[2][3].add(o(0,e,f(r)?r:R))})).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&&(V(e,o.done(s(n)).resolve,o.reject,!t),"pending"===o.state()||f(a[n]&&a[n].then)))return o.then();for(;n--;)V(a[n],s(n),o.reject);return o.promise()}});var H=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;x.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&H.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},x.readyException=function(t){e.setTimeout((function(){throw t}))};var P=x.Deferred();function W(){g.removeEventListener("DOMContentLoaded",W),e.removeEventListener("load",W),x.ready()}x.fn.ready=function(e){return P.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||P.resolveWith(g,[x]))}}),x.ready.then=P.then,"complete"===g.readyState||"loading"!==g.readyState&&!g.documentElement.doScroll?e.setTimeout(x.ready):(g.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"===y(n))for(s in i=!0,n)q(e,t,s,n[s],!0,a,o);else if(void 0!==r&&(i=!0,f(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},Q=/^-ms-/,_=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function Z(e){return e.replace(Q,"ms-").replace(_,U)}var G=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={},G(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[Z(t)]=n;else for(r in t)i[Z(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][Z(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(Z):(t=Z(t))in r?[t]:t.match(O)||[]).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 Y=new z,J=new z,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,$=/[A-Z]/g;function K(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace($,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:X.test(e)?JSON.parse(e):e)}(n)}catch(e){}J.set(e,t,n)}else n=void 0;return n}x.extend({hasData:function(e){return J.hasData(e)||Y.hasData(e)},data:function(e,t,n){return J.access(e,t,n)},removeData:function(e,t){J.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.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=J.get(a),1===a.nodeType&&!Y.get(a,"hasDataAttrs"))){for(n=o.length;n--;)o[n]&&0===(r=o[n].name).indexOf("data-")&&(r=Z(r.slice(5)),K(a,r,i[r]));Y.set(a,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){J.set(this,e)})):q(this,(function(t){var n;if(a&&void 0===t)return void 0!==(n=J.get(a,e))||void 0!==(n=K(a,e))?n:void 0;this.each((function(){J.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){J.remove(this,e)}))}}),x.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.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 Y.get(e,n)||Y.access(e,n,{empty:x.Callbacks("once memory").add((function(){Y.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=Y.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=g.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]=Y.get(r,"display")||null,i[a]||(r.style.display="")),""===r.style.display&&oe(r)&&(i[a]=le(r))):"none"!==n&&(i[a]="none",Y.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 Ae,de,he=/^(?:checkbox|radio)$/i,fe=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,pe=/^$|^module$|\/(?:java|ecma)script/i;Ae=g.createDocumentFragment().appendChild(g.createElement("div")),(de=g.createElement("input")).setAttribute("type","radio"),de.setAttribute("checked","checked"),de.setAttribute("name","t"),Ae.appendChild(de),h.checkClone=Ae.cloneNode(!0).cloneNode(!0).lastChild.checked,Ae.innerHTML="<textarea>x</textarea>",h.noCloneChecked=!!Ae.cloneNode(!0).lastChild.defaultValue,Ae.innerHTML="<option></option>",h.option=!!Ae.lastChild;var ge={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 me(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 ve(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,h.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var ye=/<|&#?\w+;/;function we(e,t,n,r,i){for(var a,o,s,u,l,c,A=t.createDocumentFragment(),d=[],h=0,f=e.length;h<f;h++)if((a=e[h])||0===a)if("object"===y(a))x.merge(d,a.nodeType?[a]:a);else if(ye.test(a)){for(o=o||A.appendChild(t.createElement("div")),s=(fe.exec(a)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,o.innerHTML=u[1]+x.htmlPrefilter(a)+u[2],c=u[0];c--;)o=o.lastChild;x.merge(d,o.childNodes),(o=A.firstChild).textContent=""}else d.push(t.createTextNode(a));for(A.textContent="",h=0;a=d[h++];)if(r&&x.inArray(a,r)>-1)i&&i.push(a);else if(l=ie(a),o=me(A.appendChild(a),"script"),l&&ve(o),n)for(c=0;a=o[c++];)pe.test(a.type||"")&&n.push(a);return A}var xe=/^([^.]*)(?:\.(.+)|)/;function be(){return!0}function Ce(){return!1}function Se(e,t){return e===function(){try{return g.activeElement}catch(e){}}()==("focus"===t)}function Te(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)Te(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=Ce;else if(!i)return e;return 1===a&&(o=i,i=function(e){return x().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=x.guid++)),e.each((function(){x.event.add(this,t,i,r,n)}))}function Ie(e,t,n){n?(Y.set(e,t,!1),x.event.add(e,t,{namespace:!1,handler:function(e){var r,a,o=Y.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),Y.set(this,t,o),r=n(this,t),this[t](),o!==(a=Y.get(this,t))||r?Y.set(this,t,!1):a={},o!==a)return e.stopImmediatePropagation(),e.preventDefault(),a&&a.value}else o.length&&(Y.set(this,t,{value:x.event.trigger(x.extend(o[0],x.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,t)&&x.event.add(e,t,be)}x.event={global:{},add:function(e,t,n,r,i){var a,o,s,u,l,c,A,d,h,f,p,g=Y.get(e);if(G(e))for(n.handler&&(n=(a=n).handler,i=a.selector),i&&x.find.matchesSelector(re,i),n.guid||(n.guid=x.guid++),(u=g.events)||(u=g.events=Object.create(null)),(o=g.handle)||(o=g.handle=function(t){return void 0!==x&&x.event.triggered!==t.type?x.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(O)||[""]).length;l--;)h=p=(s=xe.exec(t[l])||[])[1],f=(s[2]||"").split(".").sort(),h&&(A=x.event.special[h]||{},h=(i?A.delegateType:A.bindType)||h,A=x.event.special[h]||{},c=x.extend({type:h,origType:p,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&x.expr.match.needsContext.test(i),namespace:f.join(".")},a),(d=u[h])||((d=u[h]=[]).delegateCount=0,A.setup&&!1!==A.setup.call(e,r,f,o)||e.addEventListener&&e.addEventListener(h,o)),A.add&&(A.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),x.event.global[h]=!0)},remove:function(e,t,n,r,i){var a,o,s,u,l,c,A,d,h,f,p,g=Y.hasData(e)&&Y.get(e);if(g&&(u=g.events)){for(l=(t=(t||"").match(O)||[""]).length;l--;)if(h=p=(s=xe.exec(t[l])||[])[1],f=(s[2]||"").split(".").sort(),h){for(A=x.event.special[h]||{},d=u[h=(r?A.delegateType:A.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=d.length;a--;)c=d[a],!i&&p!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(a,1),c.selector&&d.delegateCount--,A.remove&&A.remove.call(e,c));o&&!d.length&&(A.teardown&&!1!==A.teardown.call(e,f,g.handle)||x.removeEvent(e,h,g.handle),delete u[h])}else for(h in u)x.event.remove(e,h+t[l],n,r,!0);x.isEmptyObject(u)&&Y.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=(Y.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:f(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 he.test(t.type)&&t.click&&k(t,"input")&&Ie(t,"click",be),!1},trigger:function(e){var t=this||e;return he.test(t.type)&&t.click&&k(t,"input")&&Ie(t,"click"),!0},_default:function(e){var t=e.target;return he.test(t.type)&&t.click&&k(t,"input")&&Y.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?be:Ce,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:Ce,isPropagationStopped:Ce,isImmediatePropagationStopped:Ce,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=be,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=be,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=be,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:!0},x.event.addProp),x.each({focus:"focusin",blur:"focusout"},(function(e,t){x.event.special[e]={setup:function(){return Ie(this,e,Se),!1},trigger:function(){return Ie(this,e),!0},_default:function(){return!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 Te(this,e,t,n,r)},one:function(e,t,n,r){return Te(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=Ce),this.each((function(){x.event.remove(this,e,n,t)}))}});var ke=/<script|<style|<link/i,Fe=/checked\s*(?:[^=]|=\s*.checked.)/i,Ee=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function De(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 Be(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,a,o,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)x.event.add(t,i,s[i][n]);J.hasData(e)&&(a=J.access(e),o=x.extend({},a),J.set(t,o))}}function Ne(e,t){var n=t.nodeName.toLowerCase();"input"===n&&he.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Oe(e,t,n,r){t=a(t);var i,o,s,u,l,c,A=0,d=e.length,p=d-1,g=t[0],m=f(g);if(m||d>1&&"string"==typeof g&&!h.checkClone&&Fe.test(g))return e.each((function(i){var a=e.eq(i);m&&(t[0]=g.call(this,i,a.html())),Oe(a,t,n,r)}));if(d&&(o=(i=we(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=x.map(me(i,"script"),Me)).length;A<d;A++)l=i,A!==p&&(l=x.clone(l,!0,!0),u&&x.merge(s,me(l,"script"))),n.call(e[A],l,A);if(u)for(c=s[s.length-1].ownerDocument,x.map(s,Be),A=0;A<u;A++)l=s[A],pe.test(l.type||"")&&!Y.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):v(l.textContent.replace(Ee,""),l,c))}return e}function je(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(me(r)),r.parentNode&&(n&&ie(r)&&ve(me(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(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(o=me(s),r=0,i=(a=me(e)).length;r<i;r++)Ne(a[r],o[r]);if(t)if(n)for(a=a||me(e),o=o||me(s),r=0,i=a.length;r<i;r++)Le(a[r],o[r]);else Le(e,s);return(o=me(s,"script")).length>0&&ve(o,!u&&me(e,"script")),s},cleanData:function(e){for(var t,n,r,i=x.event.special,a=0;void 0!==(n=e[a]);a++)if(G(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?x.event.remove(n,r):x.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),x.fn.extend({detach:function(e){return je(this,e,!0)},remove:function(e){return je(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 Oe(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||De(this,e).appendChild(e)}))},prepend:function(){return Oe(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=De(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Oe(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Oe(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(me(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&&!ke.test(e)&&!ge[(fe.exec(e)||["",""])[1].toLowerCase()]){e=x.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(x.cleanData(me(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Oe(this,arguments,(function(t){var n=this.parentNode;x.inArray(this,e)<0&&(x.cleanData(me(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 Re=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Ve=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},He=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},Pe=new RegExp(ne.join("|"),"i");function We(e,t,n){var r,i,a,o,s=e.style;return(n=n||Ve(e))&&(""!==(o=n.getPropertyValue(t)||n[t])||ie(e)||(o=x.style(e,t)),!h.pixelBoxStyles()&&Re.test(o)&&Pe.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 qe(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=g.createElement("div"),c=g.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",h.clearCloneStyle="content-box"===c.style.backgroundClip,x.extend(h,{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=g.createElement("table"),n=g.createElement("tr"),r=g.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",n.style.cssText="border:1px solid",n.style.height="1px",r.style.height="9px",r.style.display="block",re.appendChild(t).appendChild(n).appendChild(r),i=e.getComputedStyle(n),s=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===n.offsetHeight,re.removeChild(t)),s}}))}();var Qe=["Webkit","Moz","ms"],_e=g.createElement("div").style,Ue={};function Ze(e){var t=x.cssProps[e]||Ue[e];return t||(e in _e?e:Ue[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Qe.length;n--;)if((e=Qe[n]+t)in _e)return e}(e)||e)}var Ge=/^(none|table(?!-c[ea]).+)/,ze=/^--/,Ye={position:"absolute",visibility:"hidden",display:"block"},Je={letterSpacing:"0",fontWeight:"400"};function Xe(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function $e(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 Ke(e,t,n){var r=Ve(e),i=(!h.boxSizingReliable()||n)&&"border-box"===x.css(e,"boxSizing",!1,r),a=i,o=We(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Re.test(o)){if(!n)return o;o="auto"}return(!h.boxSizingReliable()&&i||!h.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)+$e(e,t,n||(i?"border":"content"),a,r,o)+"px"}function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=We(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=Z(t),u=ze.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")),h.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=Z(t);return ze.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=We(e,t,r)),"normal"===i&&t in Je&&(i=Je[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!Ge.test(x.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ke(e,t,r):He(e,Ye,(function(){return Ke(e,t,r)}))},set:function(e,n,r){var i,a=Ve(e),o=!h.scrollboxSize()&&"absolute"===a.position,s=(o||r)&&"border-box"===x.css(e,"boxSizing",!1,a),u=r?$e(e,t,r,s,a):0;return s&&o&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(a[t])-$e(e,t,"border",!1,a)-.5)),u&&(i=te.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=x.css(e,t)),Xe(0,n,u)}}})),x.cssHooks.marginLeft=qe(h.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(We(e,"marginLeft"))||e.getBoundingClientRect().left-He(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=Xe)})),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=Ve(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=et,et.prototype={constructor:et,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=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.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):et.propHooks._default.set(this),this}},et.prototype.init.prototype=et.prototype,et.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)}}},et.propHooks.scrollTop=et.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=et.prototype.init,x.fx.step={};var tt,nt,rt=/^(?:toggle|show|hide)$/,it=/queueHooks$/;function at(){nt&&(!1===g.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(at):e.setTimeout(at,x.fx.interval),x.fx.tick())}function ot(){return e.setTimeout((function(){tt=void 0})),tt=Date.now()}function st(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 ut(e,t,n){for(var r,i=(lt.tweeners[t]||[]).concat(lt.tweeners["*"]),a=0,o=i.length;a<o;a++)if(r=i[a].call(n,t,e))return r}function lt(e,t,n){var r,i,a=0,o=lt.prefilters.length,s=x.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var t=tt||ot(),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:tt||ot(),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=Z(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=lt.prefilters[a].call(l,e,c,l.opts))return f(r.stop)&&(x._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return x.map(c,ut,l),f(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(lt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){f(e)?(t=e,e=["*"]):e=e.match(O);for(var n,r=0,i=e.length;r<i;r++)n=e[r],lt.tweeners[n]=lt.tweeners[n]||[],lt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,a,o,s,u,l,c,A="width"in t||"height"in t,d=this,h={},f=e.style,p=e.nodeType&&oe(e),g=Y.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++,d.always((function(){d.always((function(){o.unqueued--,x.queue(e,"fx").length||o.empty.fire()}))}))),t)if(i=t[r],rt.test(i)){if(delete t[r],a=a||"toggle"===i,i===(p?"hide":"show")){if("show"!==i||!g||void 0===g[r])continue;p=!0}h[r]=g&&g[r]||x.style(e,r)}if((u=!x.isEmptyObject(t))||!x.isEmptyObject(h))for(r in A&&1===e.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(l=g&&g.display)&&(l=Y.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||(d.done((function(){f.display=l})),null==l&&(c=f.display,l="none"===c?"":c)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",d.always((function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}))),u=!1,h)u||(g?"hidden"in g&&(p=g.hidden):g=Y.access(e,"fxshow",{display:l}),a&&(g.hidden=!p),p&&ce([e],!0),d.done((function(){for(r in p||ce([e]),Y.remove(e,"fxshow"),h)x.style(e,r,h[r])}))),u=ut(p?g[r]:0,r,d),r in g||(g[r]=u.start,p&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?lt.prefilters.unshift(e):lt.prefilters.push(e)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||f(e)&&e,duration:e,easing:n&&t||t&&!f(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(){f(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=lt(this,x.extend({},e),a);(i||Y.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=Y.get(this);if(i)o[i]&&o[i].stop&&r(o[i]);else for(i in o)o[i]&&o[i].stop&&it.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=Y.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(st(t,!0),e,r,i)}})),x.each({slideDown:st("show"),slideUp:st("hide"),slideToggle:st("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(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||x.fx.stop(),tt=void 0},x.fx.timer=function(e){x.timers.push(e),x.fx.start()},x.fx.interval=13,x.fx.start=function(){nt||(nt=!0,at())},x.fx.stop=function(){nt=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=g.createElement("input"),t=g.createElement("select").appendChild(g.createElement("option"));e.type="checkbox",h.checkOn=""!==e.value,h.optSelected=t.selected,(e=g.createElement("input")).value="t",e.type="radio",h.radioValue="t"===e.value}();var ct,At=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)?ct: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(!h.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(O);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),ct={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=At[t]||x.find.attr;At[t]=function(e,t,r){var i,a,o=t.toLowerCase();return r||(a=At[o],At[o]=i,i=null!=n(e,t,r)?o:null,At[o]=a),i}}));var dt=/^(?:input|select|textarea|button)$/i,ht=/^(?:a|area)$/i;function ft(e){return(e.match(O)||[]).join(" ")}function pt(e){return e.getAttribute&&e.getAttribute("class")||""}function gt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(O)||[]}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):dt.test(e.nodeName)||ht.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),h.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(f(e))return this.each((function(t){x(this).addClass(e.call(this,t,pt(this)))}));if((t=gt(e)).length)for(;n=this[u++];)if(i=pt(n),r=1===n.nodeType&&" "+ft(i)+" "){for(o=0;a=t[o++];)r.indexOf(" "+a+" ")<0&&(r+=a+" ");i!==(s=ft(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,a,o,s,u=0;if(f(e))return this.each((function(t){x(this).removeClass(e.call(this,t,pt(this)))}));if(!arguments.length)return this.attr("class","");if((t=gt(e)).length)for(;n=this[u++];)if(i=pt(n),r=1===n.nodeType&&" "+ft(i)+" "){for(o=0;a=t[o++];)for(;r.indexOf(" "+a+" ")>-1;)r=r.replace(" "+a+" "," ");i!==(s=ft(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):f(e)?this.each((function(n){x(this).toggleClass(e.call(this,n,pt(this),t),t)})):this.each((function(){var t,i,a,o;if(r)for(i=0,a=x(this),o=gt(e);t=o[i++];)a.hasClass(t)?a.removeClass(t):a.addClass(t);else void 0!==e&&"boolean"!==n||((t=pt(this))&&Y.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Y.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+ft(pt(n))+" ").indexOf(t)>-1)return!0;return!1}});var mt=/\r/g;x.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=f(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(mt,""):null==n?"":n:void 0}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:ft(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}},h.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),h.focusin="onfocusin"in e;var vt=/^(?:focusinfocus|focusoutblur)$/,yt=function(e){e.stopPropagation()};x.extend(x.event,{trigger:function(t,n,r,i){var a,o,s,u,l,A,d,h,m=[r||g],v=c.call(t,"type")?t.type:t,y=c.call(t,"namespace")?t.namespace.split("."):[];if(o=h=s=r=r||g,3!==r.nodeType&&8!==r.nodeType&&!vt.test(v+x.event.triggered)&&(v.indexOf(".")>-1&&(y=v.split("."),v=y.shift(),y.sort()),l=v.indexOf(":")<0&&"on"+v,(t=t[x.expando]?t:new x.Event(v,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=y.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:x.makeArray(n,[t]),d=x.event.special[v]||{},i||!d.trigger||!1!==d.trigger.apply(r,n))){if(!i&&!d.noBubble&&!p(r)){for(u=d.delegateType||v,vt.test(u+v)||(o=o.parentNode);o;o=o.parentNode)m.push(o),s=o;s===(r.ownerDocument||g)&&m.push(s.defaultView||s.parentWindow||e)}for(a=0;(o=m[a++])&&!t.isPropagationStopped();)h=o,t.type=a>1?u:d.bindType||v,(A=(Y.get(o,"events")||Object.create(null))[t.type]&&Y.get(o,"handle"))&&A.apply(o,n),(A=l&&o[l])&&A.apply&&G(o)&&(t.result=A.apply(o,n),!1===t.result&&t.preventDefault());return t.type=v,i||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(m.pop(),n)||!G(r)||l&&f(r[v])&&!p(r)&&((s=r[l])&&(r[l]=null),x.event.triggered=v,t.isPropagationStopped()&&h.addEventListener(v,yt),r[v](),t.isPropagationStopped()&&h.removeEventListener(v,yt),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)}}),h.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=Y.access(r,t);i||r.addEventListener(e,n,!0),Y.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=Y.access(r,t)-1;i?Y.access(r,t,i):(r.removeEventListener(e,n,!0),Y.remove(r,t))}}}));var wt=e.location,xt={guid:Date.now()},bt=/\?/;x.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){}return r=n&&n.getElementsByTagName("parsererror")[0],n&&!r||x.error("Invalid XML: "+(r?x.map(r.childNodes,(function(e){return e.textContent})).join("\n"):t)),n};var Ct=/\[\]$/,St=/\r?\n/g,Tt=/^(?:submit|button|image|reset|file)$/i,It=/^(?:input|select|textarea|keygen)/i;function kt(e,t,n,r){var i;if(Array.isArray(t))x.each(t,(function(t,i){n||Ct.test(e)?r(e,i):kt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==y(t))r(e,t);else for(i in t)kt(e+"["+i+"]",t[i],n,r)}x.param=function(e,t){var n,r=[],i=function(e,t){var n=f(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)kt(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)&&!Tt.test(e)&&(this.checked||!he.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(St,"\r\n")}})):{name:t.name,value:n.replace(St,"\r\n")}})).get()}});var Ft=/%20/g,Et=/#.*$/,Dt=/([?&])_=[^&]*/,Mt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Bt=/^(?:GET|HEAD)$/,Lt=/^\/\//,Nt={},Ot={},jt="*/".concat("*"),Rt=g.createElement("a");function Vt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,a=t.toLowerCase().match(O)||[];if(f(n))for(;r=a[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Ht(e,t,n,r){var i={},a=e===Ot;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 Pt(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}Rt.href=wt.href,x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:wt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(wt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":jt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\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?Pt(Pt(e,x.ajaxSettings),t):Pt(x.ajaxSettings,e)},ajaxPrefilter:Vt(Nt),ajaxTransport:Vt(Ot),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var r,i,a,o,s,u,l,c,A,d,h=x.ajaxSetup({},n),f=h.context||h,p=h.context&&(f.nodeType||f.jquery)?x(f):x.event,m=x.Deferred(),v=x.Callbacks("once memory"),y=h.statusCode||{},w={},b={},C="canceled",S={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&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)S.always(e[S.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||C;return r&&r.abort(t),T(0,t),this}};if(m.promise(S),h.url=((t||h.url||wt.href)+"").replace(Lt,wt.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(O)||[""],null==h.crossDomain){u=g.createElement("a");try{u.href=h.url,u.href=u.href,h.crossDomain=Rt.protocol+"//"+Rt.host!=u.protocol+"//"+u.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=x.param(h.data,h.traditional)),Ht(Nt,h,n,S),l)return S;for(A in(c=x.event&&h.global)&&0==x.active++&&x.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Bt.test(h.type),i=h.url.replace(Et,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Ft,"+")):(d=h.url.slice(i.length),h.data&&(h.processData||"string"==typeof h.data)&&(i+=(bt.test(i)?"&":"?")+h.data,delete h.data),!1===h.cache&&(i=i.replace(Dt,"$1"),d=(bt.test(i)?"&":"?")+"_="+xt.guid+++d),h.url=i+d),h.ifModified&&(x.lastModified[i]&&S.setRequestHeader("If-Modified-Since",x.lastModified[i]),x.etag[i]&&S.setRequestHeader("If-None-Match",x.etag[i])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&S.setRequestHeader("Content-Type",h.contentType),S.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+jt+"; q=0.01":""):h.accepts["*"]),h.headers)S.setRequestHeader(A,h.headers[A]);if(h.beforeSend&&(!1===h.beforeSend.call(f,S,h)||l))return S.abort();if(C="abort",v.add(h.complete),S.done(h.success),S.fail(h.error),r=Ht(Ot,h,n,S)){if(S.readyState=1,c&&p.trigger("ajaxSend",[S,h]),l)return S;h.async&&h.timeout>0&&(s=e.setTimeout((function(){S.abort("timeout")}),h.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 A,d,g,w,b,C=n;l||(l=!0,s&&e.clearTimeout(s),r=void 0,a=u||"",S.readyState=t>0?4:0,A=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]}(h,S,o)),!A&&x.inArray("script",h.dataTypes)>-1&&x.inArray("json",h.dataTypes)<0&&(h.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}}(h,w,S,A),A?(h.ifModified&&((b=S.getResponseHeader("Last-Modified"))&&(x.lastModified[i]=b),(b=S.getResponseHeader("etag"))&&(x.etag[i]=b)),204===t||"HEAD"===h.type?C="nocontent":304===t?C="notmodified":(C=w.state,d=w.data,A=!(g=w.error))):(g=C,!t&&C||(C="error",t<0&&(t=0))),S.status=t,S.statusText=(n||C)+"",A?m.resolveWith(f,[d,C,S]):m.rejectWith(f,[S,C,g]),S.statusCode(y),y=void 0,c&&p.trigger(A?"ajaxSuccess":"ajaxError",[S,h,A?d:g]),v.fireWith(f,[S,C]),c&&(p.trigger("ajaxComplete",[S,h]),--x.active||x.event.trigger("ajaxStop")))}return S},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 f(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]&&(f(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 f(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=f(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 Wt={0:200,1223:204},qt=x.ajaxSettings.xhr();h.cors=!!qt&&"withCredentials"in qt,h.ajax=qt=!!qt,x.ajaxTransport((function(t){var n,r;if(h.cors||qt&&!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(Wt[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)}),g.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Qt,_t=[],Ut=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=_t.pop()||x.expando+"_"+xt.guid++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",(function(t,n,r){var i,a,o,s=!1!==t.jsonp&&(Ut.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=f(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Ut,"$1"+i):!1!==t.jsonp&&(t.url+=(bt.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,_t.push(i)),o&&f(a)&&a(o[0]),o=a=void 0})),"script"})),h.createHTMLDocument=((Qt=g.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Qt.childNodes.length),x.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(h.createHTMLDocument?((r=(t=g.implementation.createHTMLDocument("")).createElement("base")).href=g.location.href,t.head.appendChild(r)):t=g),a=!n&&[],(i=F.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=ft(e.slice(s)),e=e.slice(0,s)),f(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),A={};"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),f(t)&&(t=t.call(e,n,x.extend({},s))),null!=t.top&&(A.top=t.top-s.top+o),null!=t.left&&(A.left=t.left-s.left+i),"using"in t?t.using.call(e,A):c.css(A)}},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]=qe(h.pixelPosition,(function(e,n){if(n)return n=We(e,t),Re.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),f(e))return r=i.call(arguments,2),a=function(){return e.apply(t||this,r.concat(i.call(arguments)))},a.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=f,x.isWindow=p,x.camelCase=Z,x.type=y,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 Gt=e.jQuery,zt=e.$;return x.noConflict=function(t){return e.$===x&&(e.$=zt),t&&e.jQuery===x&&(e.jQuery=Gt),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(),A=-c+s.top-a,d=c+l-(s.top+o+a);i=Math.max(A,d)===A?"top":"bottom"}if(u.top+="top"===i?-a:o,r!==document.body){var h,f=n.css("opacity");t.visible||n.css("opacity",0).show(),h=n.offsetParent().offset(),u.top-=h.top,u.left-=h.left,t.visible||n.css("opacity",f).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),A=r.beforeRender,d="",h=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&&(d+=h(t,0)),d+='<div class="'+s+'" data-index="'+e+'">'+a(t,o,e)+"</div>"})),this.adjustContainerWidth(),c.detach(),l.html(d),e.isFunction(A)&&A.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.12.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()}(this,(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=function(){return"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=function(){return"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),this.enabled=!1,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;return u()?navigator.wakeLock.request("screen").then((function(t){e._wakeLock=t,e.enabled=!0,console.log("Wake Lock active."),e._wakeLock.addEventListener("release",(function(){console.log("Wake Lock released.")}))})).catch((function(t){throw e.enabled=!1,console.error(t.name+", "+t.message),t})):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.enabled=!0,Promise.resolve()):this.noSleepVideo.play().then((function(t){return e.enabled=!0,t})).catch((function(t){throw e.enabled=!1,t}))}},{key:"disable",value:function(){u()?(this._wakeLock&&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(),this.enabled=!1}},{key:"isEnabled",get:function(){return this.enabled}}]),e}();e.exports=l},function(e,t,n){"use strict";e.exports={webm:"data:video/webm;base64,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",mp4:"data:video/mp4;base64,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"}}])})),
|
||
/*!
|
||
* swiped-events.js - v@version@
|
||
* Pure JavaScript swipe events
|
||
* https://github.com/john-doherty/swiped-events
|
||
* @inspiration https://stackoverflow.com/questions/16348031/disable-scrolling-when-touch-moving-certain-element
|
||
* @author John Doherty <www.johndoherty.info>
|
||
* @license MIT
|
||
*/
|
||
function(e,t){"use strict";"function"!=typeof e.CustomEvent&&(e.CustomEvent=function(e,n){n=n||{bubbles:!1,cancelable:!1,detail:void 0};var r=t.createEvent("CustomEvent");return r.initCustomEvent(e,n.bubbles,n.cancelable,n.detail),r},e.CustomEvent.prototype=e.Event.prototype),t.addEventListener("touchstart",(function(e){if("true"===e.target.getAttribute("data-swipe-ignore"))return;s=e.target,o=Date.now(),n=e.touches[0].clientX,r=e.touches[0].clientY,i=0,a=0}),!1),t.addEventListener("touchmove",(function(e){if(!n||!r)return;var t=e.touches[0].clientX,o=e.touches[0].clientY;i=n-t,a=r-o}),!1),t.addEventListener("touchend",(function(e){if(s!==e.target)return;var t=parseInt(u(s,"data-swipe-threshold","20"),10),l=parseInt(u(s,"data-swipe-timeout","500"),10),c=Date.now()-o,A="",d=e.changedTouches||e.touches||[];Math.abs(i)>Math.abs(a)?Math.abs(i)>t&&c<l&&(A=i>0?"swiped-left":"swiped-right"):Math.abs(a)>t&&c<l&&(A=a>0?"swiped-up":"swiped-down");if(""!==A){var h={dir:A.replace(/swiped-/,""),touchType:(d[0]||{}).touchType||"direct",xStart:parseInt(n,10),xEnd:parseInt((d[0]||{}).clientX||-1,10),yStart:parseInt(r,10),yEnd:parseInt((d[0]||{}).clientY||-1,10)};s.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:h})),s.dispatchEvent(new CustomEvent(A,{bubbles:!0,cancelable:!0,detail:h}))}n=null,r=null,o=null}),!1);var n=null,r=null,i=null,a=null,o=null,s=null;function u(e,n,r){for(;e&&e!==t.documentElement;){var i=e.getAttribute(n);if(i)return i;e=e.parentNode}return r}}(window,document),document.addEventListener("DOMContentLoaded",(()=>{index.init()}));const index=(()=>{const e={},t=6e5;let n=!1,r=null,i=null,a=0,o=!1;const s=["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(","),u=e=>{const t=e.target.value;localStorage.setItem("TwcUnits",t),m(),T("units",t)},l=async t=>{if(this.previousSuggestionValue!==t.value)if(e[t.value])c(e[t.value]);else{const e=(await utils.fetch.json("https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/find",{data:{text:t.value,magicKey:t.data,f:"json"}})).locations[0];e?c(e.feature.geometry):console.error("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)},A=()=>(document.fullscreenElement?h():d(),navigation.isPlaying()?M(!0):M(!1),b(),!1),d=()=>{const e=document.getElementById("divTwc"),t=e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen;t?t.call(e,{navigationUI:"hide"}):(window.scrollTo(0,0),o=!0),b()},h=()=>{o&&(o=!1),document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()},f=()=>(T("navButton","menu"),b(),!1),p=e=>{e&&(p.latLon=e);const{latLon:t}=p;t&&(document.getElementById("txtAddress").blur(),k(),r=null,m(),T("latLon",t))},g=e=>{if("left"===e)y();else w()},m=()=>{if(r)if(navigation.units()===UNITS.english)r=r.toLocaleString("en-US",{weekday:"short",month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"});else r=r.toLocaleString("en-GB",{weekday:"short",month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"});document.getElementById("spanLastRefresh").innerHTML=r,r&&document.getElementById("chkAutoRefresh").checked&&I()},v=()=>(p(),b(),!1),y=()=>(T("navButton","next"),b(),!1),w=()=>(T("navButton","previous"),b(),!1);let x=null;const b=()=>{document.activeElement.blur(),document.getElementById("divTwcBottom").classList.remove("hidden"),document.getElementById("divTwcBottom").classList.add("visible"),x&&(clearTimeout(x),x=null),x=setTimeout((()=>{document.fullscreenElement&&(document.getElementById("divTwcBottom").classList.remove("visible"),document.getElementById("divTwcBottom").classList.add("hidden"))}),2e3)},C=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 w(),!1;case 36:return f(),!1;case 48:return v(),!1;case 70:return A(),!1}return!1};Math.round2=(e,t)=>Number(`${Math.round(`${e}e${t}`)}e-${t}`);const S=()=>(T("navButton","playToggle"),b(),!1),T=(e,t={})=>{navigation.message({type:e,message:t})},I=()=>{if(i)return;a=0;const e=()=>{a+=500;let e=t-a;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()}`,a>=t&&p()};i=window.setInterval(e,500),e()},k=()=>{i&&(window.clearInterval(i),document.getElementById("spanRefreshCountDown").innerHTML="--:--",i=null)},F=async()=>{if(!navigator.geolocation)return;const e=await new Promise((e=>{navigator.geolocation.getCurrentPosition(e)})),{latitude:t,longitude:n}=e.coords;let r;try{r=await utils.fetch.json("https://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,{City:a}=r.address,o=`${i}, ${a}, ${states.getTwoDigitCode(r.address.Region)}, ${r.address.CountryCode}`,s=document.getElementById("txtAddress");s.value=o,s.blur(),s.focus(),localStorage.setItem("TwcQuery",o)},E=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 D=!1;const M=(e=!1)=>(M.controller||(M.controller=new NoSleep),D!==e&&(D=e,e?M.controller.enable():M.controller.disable()));return{init:()=>{document.getElementById("txtAddress").addEventListener("focus",(e=>{e.target.select()})),document.getElementById("NavigateMenu").addEventListener("click",f),document.getElementById("NavigateRefresh").addEventListener("click",v),document.getElementById("NavigateNext").addEventListener("click",y),document.getElementById("NavigatePrevious").addEventListener("click",w),document.getElementById("NavigatePlay").addEventListener("click",S),document.getElementById("ToggleFullScreen").addEventListener("click",A),document.getElementById("btnGetGps").addEventListener("click",F),document.getElementById("divTwc").addEventListener("click",(()=>{document.fullscreenElement&&b()})),document.addEventListener("keydown",C),document.addEventListener("touchmove",(e=>{o&&e.preventDefault()})),$("#frmGetLatLng #txtAddress").devbridgeAutocomplete({serviceUrl:"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/suggest",deferRequestBy:300,paramName:"text",params:{f:"json",countryCode:"USA",category:s,maxSuggestions:10},dataType:"json",transformResult:t=>(n&&(n=!1,window.setTimeout((()=>{$(e.suggestionsContainer.children[0]).click()}),1)),{suggestions:$.map(t.suggestions,(e=>({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 e=$("#frmGetLatLng #txtAddress").devbridgeAutocomplete();$("#frmGetLatLng").submit((()=>(e.suggestions[0]&&$(e.suggestionsContainer.children[0]).click(),!1)));const t=localStorage.getItem("TwcQuery");if(t){n=!0;const e=document.getElementById("txtAddress");e.value=t,e.blur(),e.focus()}const i=localStorage.getItem("TwcPlay");null!==i&&"true"!==i||T("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"),T("navButton","play"),localStorage.removeItem("TwcQuery")}));const a=localStorage.getItem("TwcUnits");a&&"ENGLISH"!==a?"METRIC"===a&&(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;r&&(t?I():k()),localStorage.setItem("TwcAutoRefresh",t)}));const c=localStorage.getItem("TwcAutoRefresh");document.getElementById("chkAutoRefresh").checked=!c||"true"===c,document.getElementById("container").addEventListener("swiped-left",(()=>g("left"))),document.getElementById("container").addEventListener("swiped-right",(()=>g("right")))},message:e=>{const t=document.getElementById("NavigatePlay");if(e.type)switch(e.type){case"loaded":r=new Date,m();break;case"weatherParameters":E(e.message);break;case"isPlaying":localStorage.setItem("TwcPlay",navigation.isPlaying()),navigation.isPlaying()?(M(!0),t.title="Pause",t.src="images/nav/ic_pause_white_24dp_1x.png"):(M(!1),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=[],A=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 A();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){n.readByte(),e.identifier=n.read(8),e.authCode=n.read(3),"NETSCAPE"===e.identifier?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):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,A=null,d=null,h=null,f=null,p=null,g=!0,m=!1,v=[],y=[],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,C,S,T,I=a.hasOwnProperty("on_end")?a.on_end:null,k=a.hasOwnProperty("loop_delay")?a.loop_delay:0,F=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),M=a.hasOwnProperty("progressbar_height")?a.progressbar_height:25,B=a.hasOwnProperty("progressbar_background_color")?a.progressbar_background_color:"rgba(255,255,255,0.4)",L=a.hasOwnProperty("progressbar_foreground_color")?a.progressbar_foreground_color:"rgba(255,0,22,.8)",N=function(){l=null,c=null,h=A,A=null,f=null},O=function(){try{r(t,_)}catch(e){V("parse")}},j=function(e,t){b.width=e*Z(),b.height=t*Z(),S.style.minWidth=e*Z()+"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)},R=function(e,t,n){if(n&&D){var r,i,o,s=M;if(a.is_vp)m?(i=(a.vp_t+a.vp_h-s)/Z(),s/=Z(),r=a.vp_l/Z()+e/t*(a.vp_w/Z()),o=b.width/Z()):(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)/(m?Z():1),r=e/t*b.width/(m?Z():1),o=b.width/(m?Z():1),s/=m?Z():1;C.fillStyle=B,C.fillRect(r,i,o-r,s),C.fillStyle=L,C.fillRect(0,i,r,s)}},V=function(e){s=e,i={width:x.width,height:x.height},v=[],C.fillStyle="black",C.fillRect(0,0,a.c_w?a.c_w:i.width,a.c_h?a.c_h:i.height),C.strokeStyle="red",C.lineWidth=3,C.moveTo(0,0),C.lineTo(a.c_w?a.c_w:i.width,a.c_h?a.c_h:i.height),C.moveTo(0,a.c_h?a.c_h:i.height),C.lineTo(a.c_w?a.c_w:i.width,0),C.stroke()},H=function(){f&&(v.push({data:f.getImageData(0,0,i.width,i.height),delay:c}),y.push({x:0,y:0}))},P=function(){var e,t,n,r=-1,i=0,o=function(e){r+=e,l()},u=(e=!1,t=function(){null!==I&&I(x),i++,!1!==F||i<0?n():(e=!1,g=!1)},n=function(){if(e=g){o(1);var i=10*v[r].delay;i||(i=100),0==(r+1+v.length)%v.length?(i+=k,setTimeout(t,i)):setTimeout(n,i)}},function(){e||setTimeout(n,0)}),l=function(){var e;(r=parseInt(r,10))>v.length-1&&(r=0),r<0&&(r=0),e=y[r],T.getContext("2d").putImageData(v[r].data,e.x,e.y),C.globalCompositeOperation="copy",C.drawImage(T,0,0),a.canvas.getContext("2d").drawImage(b,a.x,a.y)};return{init:function(){s||(a.c_w&&a.c_h||C.scale(Z(),Z()),a.auto_play?u():(r=0,l()))},step:u,play:function(){g=!0,u()},pause:function(){g=!1},playing:g,move_relative:o,current_frame:function(){return r},length:function(){return v.length},move_to:function(e){r=e,l()}}}(),W=function(e){R(t.pos,t.data.length,e)},q=function(){},Q=function(e,t){return function(n){e(n),W(t)}},_={hdr:Q((function(e){j((i=e).width,i.height)})),gce:Q((function(e){H(),N(),l=e.transparencyGiven?e.transparencyIndex:null,c=e.delayTime,A=e.disposalMethod})),com:Q(q),app:{NETSCAPE:Q(q)},img:Q((function(e){f||(f=T.getContext("2d"));var t=v.length,n=e.lctFlag?e.lct:i.gct;t>0&&(3===h?null!==d?f.putImageData(v[d].data,0,0):f.clearRect(p.leftPos,p.topPos,p.width,p.height):d=t-1,2===h&&f.clearRect(p.leftPos,p.topPos,p.width,p.height));var r=f.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)})),f.putImageData(r,e.leftPos,e.topPos),m||(C.scale(Z(),Z()),m=!0),E&&(C.drawImage(T,0,0),E=a.auto_play),p=e}),!0),eof:function(e){H(),W(!1),a.c_w&&a.c_h||(b.width=i.width*Z(),b.height=i.height*Z()),P.init(),u=!1,z&&z(x)}},U=function(){var e=x.parentNode,t=document.createElement("div");b=document.createElement("canvas"),C=b.getContext("2d"),S=document.createElement("div"),T=document.createElement("canvas"),t.width=b.width=x.width,t.height=b.height=x.height,S.style.minWidth=x.width+"px",t.className="jsgif",S.className="jsgif_toolbar",t.style.display="none",t.appendChild(b),t.appendChild(S),e&&(e.insertBefore(t,x),e.removeChild(x)),a.c_w&&a.c_h&&j(a.c_w,a.c_h),G=!0},Z=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},G=!1,z=!1,Y=function(e){return!u&&(z=e||!1,u=!0,v=[],N(),d=null,h=null,f=null,p=null,!0)};return{play:P.play,pause:P.pause,move_relative:P.move_relative,move_to:P.move_to,get_playing:function(){return g},get_canvas:function(){return b},get_canvas_scale:function(){return Z()},get_loading:function(){return u},get_auto_play:function(){return a.auto_play},get_length:function(){return P.length()},get_current_frame:function(){return P.current_frame()},load_url:function(e,r){if(Y(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(){G||U()},i.onload=function(e){200!=this.status&&V("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(O,0)},i.onprogress=function(e){e.lengthComputable&&R(e.loaded,e.total,!0)},i.onerror=function(){V("xhr")},i.send()}},load:function(e){this.load_url(x.getAttribute("rel:animated_src")||x.src,e)},load_raw:function(e,r){Y(r)&&(G||U(),t=new n(e),setTimeout(O,0))},set_frame_offset:function(e,t){y[e]?(void 0!==t.x&&(y[e].x=t.x),void 0!==t.y&&(y[e].y=t.y)):y[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(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function o(e,t){return o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function u(e,t,n){return u=s()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&o(i,n.prototype),i},u.apply(null,arguments)}function l(e){var t="function"==typeof Map?new Map:void 0;return l=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 u(e,arguments,a(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),o(r,e)},l(e)}function c(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}function A(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 d(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return A(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(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var h=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),t}(l(Error)),f=function(e){function t(t){return e.call(this,"Invalid DateTime: "+t.toMessage())||this}return i(t,e),t}(h),p=function(e){function t(t){return e.call(this,"Invalid Interval: "+t.toMessage())||this}return i(t,e),t}(h),g=function(e){function t(t){return e.call(this,"Invalid Duration: "+t.toMessage())||this}return i(t,e),t}(h),m=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),t}(h),v=function(e){function t(t){return e.call(this,"Invalid unit "+t)||this}return i(t,e),t}(h),y=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),t}(h),w=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return i(t,e),t}(h),x="numeric",b="short",C="long",S={year:x,month:x,day:x},T={year:x,month:b,day:x},I={year:x,month:b,day:x,weekday:b},k={year:x,month:C,day:x},F={year:x,month:C,day:x,weekday:C},E={hour:x,minute:x},D={hour:x,minute:x,second:x},M={hour:x,minute:x,second:x,timeZoneName:b},B={hour:x,minute:x,second:x,timeZoneName:C},L={hour:x,minute:x,hourCycle:"h23"},N={hour:x,minute:x,second:x,hourCycle:"h23"},O={hour:x,minute:x,second:x,hourCycle:"h23",timeZoneName:b},j={hour:x,minute:x,second:x,hourCycle:"h23",timeZoneName:C},R={year:x,month:x,day:x,hour:x,minute:x},V={year:x,month:x,day:x,hour:x,minute:x,second:x},H={year:x,month:b,day:x,hour:x,minute:x},P={year:x,month:b,day:x,hour:x,minute:x,second:x},W={year:x,month:b,day:x,weekday:b,hour:x,minute:x},q={year:x,month:C,day:x,hour:x,minute:x,timeZoneName:b},Q={year:x,month:C,day:x,hour:x,minute:x,second:x,timeZoneName:b},_={year:x,month:C,day:x,weekday:C,hour:x,minute:x,timeZoneName:C},U={year:x,month:C,day:x,weekday:C,hour:x,minute:x,second:x,timeZoneName:C};function Z(e){return void 0===e}function G(e){return"number"==typeof e}function z(e){return"number"==typeof e&&e%1==0}function Y(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function J(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 X(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function $(e,t,n){return z(e)&&e>=t&&e<=n}function K(e,t){return void 0===t&&(t=2),e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0")}function ee(e){return Z(e)||null===e||""===e?void 0:parseInt(e,10)}function te(e){return Z(e)||null===e||""===e?void 0:parseFloat(e)}function ne(e){if(!Z(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,i){void 0===i&&(i=null);var a=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(o.timeZone=i);var s=r({timeZoneName:t},o),u=new Intl.DateTimeFormat(n,s).formatToParts(a).find((function(e){return"timezonename"===e.type.toLowerCase()}));return u?u.value:null}function Ae(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 de(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new y("Invalid unit value "+e);return t}function he(e,t){var n={};for(var r in e)if(X(e,r)){var i=e[r];if(null==i)continue;n[t(r)]=de(i)}return n}function fe(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+K(n,2)+":"+K(r,2);case"narrow":return""+i+n+(r>0?":"+r:"");case"techie":return""+i+K(n,2)+K(r,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function pe(e){return function(e,t){return t.reduce((function(t,n){return t[n]=e[n],t}),{})}(e,["hour","minute","second","millisecond"])}var ge=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z0-9_+-]{1,256}(\/[A-Za-z0-9_+-]{1,256})?)?/,me=["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"],ye=["J","F","M","A","M","J","J","A","S","O","N","D"];function we(e){switch(e){case"narrow":return[].concat(ye);case"short":return[].concat(ve);case"long":return[].concat(me);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 xe=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],be=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ce=["M","T","W","T","F","S","S"];function Se(e){switch(e){case"narrow":return[].concat(Ce);case"short":return[].concat(be);case"long":return[].concat(xe);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Te=["AM","PM"],Ie=["Before Christ","Anno Domini"],ke=["BC","AD"],Fe=["B","A"];function Ee(e){switch(e){case"narrow":return[].concat(Fe);case"short":return[].concat(ke);case"long":return[].concat(Ie);default:return null}}function De(e,t){for(var n,r="",i=d(e);!(n=i()).done;){var a=n.value;a.literal?r+=a.val:r+=t(a.val)}return r}var Me={D:S,DD:T,DDD:k,DDDD:F,t:E,tt:D,ttt:M,tttt:B,T:L,TT:N,TTT:O,TTTT:j,f:R,ff:H,fff:q,ffff:_,F:V,FF:P,FFF:Q,FFFF:U},Be=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 Me[e]};var t=e.prototype;return t.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,r({},this.opts,t)).format()},t.formatDateTime=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,r({},this.opts,t)).format()},t.formatDateTimeParts=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,r({},this.opts,t)).formatToParts()},t.resolvedOptions=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,r({},this.opts,t)).resolvedOptions()},t.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return K(e,t);var n=r({},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,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 Te[e.hour<12?0:1]}(t):o({hour:"numeric",hourCycle:"h12"},"dayperiod")},l=function(e,n){return i?function(e,t){return we(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 Se(t)[e.weekday-1]}(t,e):o(n?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},A=function(e){return i?function(e,t){return Ee(t)[e.year<0?0:1]}(t,e):o({era:e},"era")};return De(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"uu":return r.num(Math.floor(t.millisecond/10),2);case"uuu":return r.num(Math.floor(t.millisecond/100));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":case"E":return r.num(t.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);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 A("short");case"GG":return A("long");case"GGGGG":return A("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 De(o,(r=u,function(e){var t=a(e);return t?i.num(r.get(t),e.length):e}))},e}(),Le=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}(),Ne=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new w},t.formatOffset=function(e,t){throw new w},t.offset=function(e){throw new w},t.equals=function(e){throw new w},n(e,[{key:"type",get:function(){throw new w}},{key:"name",get:function(){throw new w}},{key:"isUniversal",get:function(){throw new w}},{key:"isValid",get:function(){throw new w}}]),e}(),Oe=null,je=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var r=t.prototype;return r.offsetName=function(e,t){return ce(e,t.format,t.locale)},r.formatOffset=function(e,t){return fe(this.offset(e),t)},r.offset=function(e){return-new Date(e).getTimezoneOffset()},r.equals=function(e){return"system"===e.type},n(t,[{key:"type",get:function(){return"system"}},{key:"name",get:function(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}},{key:"isUniversal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return null===Oe&&(Oe=new t),Oe}}]),t}(Ne);RegExp("^"+ge.source+"$");var Re={};var Ve={year:0,month:1,day:2,hour:3,minute:4,second:5};var He={},Pe=function(e){function t(n){var r;return(r=e.call(this)||this).zoneName=n,r.valid=t.isValidZone(n),r}i(t,e),t.create=function(e){return He[e]||(He[e]=new t(e)),He[e]},t.resetCache=function(){He={},Re={}},t.isValidSpecifier=function(e){return this.isValidZone(e)},t.isValidZone=function(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}};var r=t.prototype;return r.offsetName=function(e,t){return ce(e,t.format,t.locale,this.name)},r.formatOffset=function(e,t){return fe(this.offset(e),t)},r.offset=function(e){var t=new Date(e);if(isNaN(t))return NaN;var n,r=(n=this.name,Re[n]||(Re[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Re[n]),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=Ve[o];Z(u)||(r[u]=parseInt(s,10))}return r}(r,t):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,t),a=i[0],o=i[1],s=i[2],u=i[3],l=+t,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},r.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:"isUniversal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),t}(Ne),We=null,qe=function(e){function t(t){var n;return(n=e.call(this)||this).fixed=t,n}i(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(Ae(n[1],n[2]))}return null};var r=t.prototype;return r.offsetName=function(){return this.name},r.formatOffset=function(e,t){return fe(this.fixed,t)},r.offset=function(){return this.fixed},r.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"+fe(this.fixed,"narrow")}},{key:"isUniversal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}],[{key:"utcInstance",get:function(){return null===We&&(We=new t(0)),We}}]),t}(Ne),Qe=function(e){function t(t){var n;return(n=e.call(this)||this).zoneName=t,n}i(t,e);var r=t.prototype;return r.offsetName=function(){return null},r.formatOffset=function(){return""},r.offset=function(){return NaN},r.equals=function(){return!1},n(t,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"isUniversal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),t}(Ne);function _e(e,t){if(Z(e)||null===e)return t;if(e instanceof Ne)return e;if("string"==typeof e){var n=e.toLowerCase();return"local"===n||"system"===n?t:"utc"===n||"gmt"===n?qe.utcInstance:qe.parseSpecifier(n)||Pe.create(e)}return G(e)?qe.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new Qe(e)}var Ue,Ze=function(){return Date.now()},Ge="system",ze=null,Ye=null,Je=null,Xe=function(){function e(){}return e.resetCaches=function(){ct.resetCache(),Pe.resetCache()},n(e,null,[{key:"now",get:function(){return Ze},set:function(e){Ze=e}},{key:"defaultZone",get:function(){return _e(Ge,je.instance)},set:function(e){Ge=e}},{key:"defaultLocale",get:function(){return ze},set:function(e){ze=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 Ue},set:function(e){Ue=e}}]),e}(),$e=["base"],Ke=["padTo","floor"],et={};var tt={};function nt(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=tt[n];return r||(r=new Intl.DateTimeFormat(e,t),tt[n]=r),r}var rt={};var it={};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){this.padTo=n.padTo||0,this.floor=n.floor||!1,n.padTo,n.floor;var i=c(n,Ke);if(!t||Object.keys(i).length>0){var a=r({useGrouping:!1},n);n.padTo>0&&(a.minimumIntegerDigits=n.padTo),this.inf=function(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=rt[n];return r||(r=new Intl.NumberFormat(e,t),rt[n]=r),r}(e,a)}}return e.prototype.format=function(e){if(this.inf){var t=this.floor?Math.floor(e):e;return this.inf.format(t)}return K(this.floor?Math.floor(e):re(e,3),this.padTo)},e}(),ut=function(){function e(e,t,n){var i;if(this.opts=n,e.zone.isUniversal){var a=e.offset/60*-1,o=a>=0?"Etc/GMT+"+a:"Etc/GMT"+a;0!==e.offset&&Pe.create(o).valid?(i=o,this.dt=e):(i="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:hr.fromMillis(e.ts+60*e.offset*1e3))}else"system"===e.zone.type?this.dt=e:(this.dt=e,i=e.zone.name);var s=r({},this.opts);i&&(s.timeZone=i),this.dtf=nt(t,s)}var t=e.prototype;return t.format=function(){return this.dtf.format(this.dt.toJSDate())},t.formatToParts=function(){return this.dtf.formatToParts(this.dt.toJSDate())},t.resolvedOptions=function(){return this.dtf.resolvedOptions()},e}(),lt=function(){function e(e,t,n){this.opts=r({style:"long"},n),!t&&Y()&&(this.rtf=function(e,t){void 0===t&&(t={});var n=t;n.base;var r=c(n,$e),i=JSON.stringify([e,r]),a=it[i];return a||(a=new Intl.RelativeTimeFormat(e,t),it[i]=a),a}(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],A=r?l?c[1]:c[2]||c[1]:l?i[e][0]:e;return s?u+" "+A+" ago":"in "+u+" "+A}(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=nt(e).resolvedOptions()}catch(e){n=nt(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 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||Xe.defaultLocale;return new e(a||(i?"en-US":at||(at=(new Intl.DateTimeFormat).resolvedOptions().locale)),n||Xe.defaultNumberingSystem,r||Xe.defaultOutputCalendar,a)},e.resetCache=function(){at=null,tt={},rt={},it={}},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(){var e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"},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(r({},e,{defaultToEN:!0}))},t.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(r({},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,we,(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=hr.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,Se,(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=hr.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 Te}),(function(){if(!t.meridiemCache){var e={hour:"numeric",hourCycle:"h12"};t.meridiemCache=[hr.utc(2016,11,13,9),hr.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,Ee,(function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[hr.utc(-40,1,1),hr.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.listFormatter=function(e){return void 0===e&&(e={}),function(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=et[n];return r||(r=new Intl.ListFormat(e,t),et[n]=r),r}(this.intl,e)},t.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||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")||"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}}]),e}();function At(){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 dt(){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 i=t[0],a=t[1],o=t[2],s=n(e,o),u=s[0],l=s[1],c=s[2];return[r({},i,u),a||l,c]}),[{},null,1]).slice(0,2)}}function ht(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 ft(){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]]=ee(e[n+r]);return[i,null,n+r]}}var pt=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,gt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,mt=RegExp(""+gt.source+pt.source+"?"),vt=RegExp("(?:T"+mt.source+")?"),yt=ft("weekYear","weekNumber","weekDay"),wt=ft("year","ordinal"),xt=RegExp(gt.source+" ?(?:"+pt.source+"|("+ge.source+"))?"),bt=RegExp("(?: "+xt.source+")?");function Ct(e,t,n){var r=e[t];return Z(r)?n:ee(r)}function St(e,t){return[{year:Ct(e,t),month:Ct(e,t+1,1),day:Ct(e,t+2,1)},null,t+3]}function Tt(e,t){return[{hours:Ct(e,t,0),minutes:Ct(e,t+1,0),seconds:Ct(e,t+2,0),milliseconds:ne(e[t+3])},null,t+4]}function It(e,t){var n=!e[t]&&!e[t+1],r=Ae(e[t+1],e[t+2]);return[{},n?null:qe.instance(r),t+3]}function kt(e,t){return[{},e[t]?Pe.create(e[t]):null,t+1]}var Ft=RegExp("^T?"+gt.source+"$"),Et=/^-?P(?:(?:(-?\d{1,9}(?:\.\d{1,9})?)Y)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,9}(?:\.\d{1,9})?)W)?(?:(-?\d{1,9}(?:\.\d{1,9})?)D)?(?:T(?:(-?\d{1,9}(?:\.\d{1,9})?)H)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function Dt(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],A=u&&"-"===u[0],d=function(e,t){return void 0===t&&(t=!1),void 0!==e&&(t||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),"-0"===u),milliseconds:d(ne(l),A)}]}var Mt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Bt(e,t,n,r,i,a,o){var s={year:2===t.length?le(ee(t)):ee(t),month:ve.indexOf(n)+1,day:ee(r),hour:ee(i),minute:ee(a)};return o&&(s.second=ee(o)),e&&(s.weekday=e.length>3?xe.indexOf(e)+1:be.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 Nt(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],A=e[10],d=e[11],h=Bt(n,a,i,r,o,s,u);return t=l?Mt[l]:c?0:Ae(A,d),[h,new qe(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$/,jt=/^(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$/,Rt=/^(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 Vt(e){var t=e[1],n=e[2],r=e[3];return[Bt(t,e[4],r,n,e[5],e[6],e[7]),qe.utcInstance]}function Ht(e){var t=e[1],n=e[2],r=e[3],i=e[4],a=e[5],o=e[6];return[Bt(t,e[7],n,r,i,a,o),qe.utcInstance]}var Pt=At(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,vt),Wt=At(/(\d{4})-?W(\d\d)(?:-?(\d))?/,vt),qt=At(/(\d{4})-?(\d{3})/,vt),Qt=At(mt),_t=dt(St,Tt,It),Ut=dt(yt,Tt,It),Zt=dt(wt,Tt,It),Gt=dt(Tt,It);var zt=dt(Tt);var Yt=At(/(\d{4})-(\d\d)-(\d\d)/,bt),Jt=At(xt),Xt=dt(St,Tt,It,kt),$t=dt(Tt,It,kt);var Kt={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}},en=r({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}},Kt),tn=365.2425,nn=30.436875,rn=r({years:{quarters:4,months:12,weeks:52.1775,days:tn,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:nn,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3}},Kt),an=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],on=an.slice(0).reverse();function sn(e,t,n){void 0===n&&(n=!1);var i={values:n?t.values:r({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new ln(i)}function un(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 ln=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?rn:en,this.isLuxonDuration=!0}e.fromMillis=function(t,n){return e.fromObject({milliseconds:t},n)},e.fromObject=function(t,n){if(void 0===n&&(n={}),null==t||"object"!=typeof t)throw new y("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new e({values:he(t,e.normalizeUnit),loc:ct.fromObject(n),conversionAccuracy:n.conversionAccuracy})},e.fromDurationLike=function(t){if(G(t))return e.fromMillis(t);if(e.isDuration(t))return t;if("object"==typeof t)return e.fromObject(t);throw new y("Unknown duration argument "+t+" of type "+typeof t)},e.fromISO=function(t,n){var r=function(e){return ht(e,[Et,Dt])}(t),i=r[0];return i?e.fromObject(i,n):e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.fromISOTime=function(t,n){var r=function(e){return ht(e,[Ft,zt])}(t),i=r[0];return i?e.fromObject(i,n):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 y("need to specify a reason the Duration is invalid");var r=t instanceof Le?t:new Le(t,n);if(Xe.throwOnInvalid)throw new g(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 v(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=r({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Be.create(this.loc,n).formatDurationFromString(this,e):"Invalid Duration"},t.toHuman=function(e){var t=this;void 0===e&&(e={});var n=an.map((function(n){var i=t.values[n];return Z(i)?null:t.loc.numberFormatter(r({style:"unit",unitDisplay:"long"},e,{unit:n.slice(0,-1)})).format(i)})).filter((function(e){return e}));return this.loc.listFormatter(r({type:"conjunction",style:e.listStyle||"narrow"},e)).format(n)},t.toObject=function(){return this.isValid?r({},this.values):{}},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.toISOTime=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=this.toMillis();if(t<0||t>=864e5)return null;e=r({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e);var n=this.shiftTo("hours","minutes","seconds","milliseconds"),i="basic"===e.format?"hhmm":"hh:mm";e.suppressSeconds&&0===n.seconds&&0===n.milliseconds||(i+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===n.milliseconds||(i+=".SSS"));var a=n.toFormat(i);return e.includePrefix&&(a="T"+a),a},t.toJSON=function(){return this.toISO()},t.toString=function(){return this.toISO()},t.toMillis=function(){return this.as("milliseconds")},t.valueOf=function(){return this.toMillis()},t.plus=function(t){if(!this.isValid)return this;for(var n,r=e.fromDurationLike(t),i={},a=d(an);!(n=a()).done;){var o=n.value;(X(r.values,o)||X(this.values,o))&&(i[o]=r.get(o)+this.get(o))}return sn(this,{values:i},!0)},t.minus=function(t){if(!this.isValid)return this;var n=e.fromDurationLike(t);return this.plus(n.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]=de(e(this.values[i],i))}return sn(this,{values:t},!0)},t.get=function(t){return this[e.normalizeUnit(t)]},t.set=function(t){return this.isValid?sn(this,{values:r({},this.values,he(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),sn(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){on.reduce((function(n,r){return Z(t[r])?n:(n&&un(e,t,n,t,r),r)}),null)}(this.matrix,e),sn(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=d(an);!(a=l()).done;){var c=a.value;if(n.indexOf(c)>=0){i=c;var A=0;for(var h in s)A+=this.matrix[h][c]*s[h],s[h]=0;G(u[c])&&(A+=u[c]);var f=Math.trunc(A);for(var p in o[c]=f,s[c]=(1e3*A-1e3*f)/1e3,u)an.indexOf(p)>an.indexOf(c)&&un(this.matrix,u,p,o,c)}else G(u[c])&&(s[c]=u[c])}for(var g in s)0!==s[g]&&(o[i]+=g===i?s[g]:s[g]/this.matrix[i][g]);return sn(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]=0===this.values[r]?0:-this.values[r]}return sn(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=d(an);!(t=n()).done;){var r=t.value;if(i=this.values[r],a=e.values[r],!(void 0===i||0===i?void 0===a||0===a:i===a))return!1}var i,a;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}(),cn="Invalid Interval";function An(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 y("need to specify a reason the Interval is invalid");var r=t instanceof Le?t:new Le(t,n);if(Xe.throwOnInvalid)throw new p(r);return new e({invalid:r})},e.fromDateTimes=function(t,n){var r=fr(t),i=fr(n),a=An(r,i);return null==a?new e({start:r,end:i}):a},e.after=function(t,n){var r=ln.fromDurationLike(n),i=fr(t);return e.fromDateTimes(i,i.plus(r))},e.before=function(t,n){var r=ln.fromDurationLike(n),i=fr(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=hr.fromISO(i,n)).isValid}catch(a){s=!1}try{l=(u=hr.fromISO(a,n)).isValid}catch(a){l=!1}if(s&&l)return e.fromDateTimes(o,u);if(s){var c=ln.fromISO(a,n);if(c.isValid)return e.after(o,c)}else if(l){var A=ln.fromISO(i,n);if(A.isValid)return e.before(u,A)}}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(fr).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=ln.fromDurationLike(t);if(!this.isValid||!n.isValid||0===n.as("milliseconds"))return[];for(var r,i=this.s,a=1,o=[];i<this.e;){var s=this.start.plus(n.mapUnits((function(e){return e*a})));r=+s>+this.e?this.e:s,o.push(e.fromDateTimes(i,r)),i=r,a+=1}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=d((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()+")":cn},t.toISO=function(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):cn},t.toISODate=function(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():cn},t.toISOTime=function(e){return this.isValid?this.s.toISOTime(e)+"/"+this.e.toISOTime(e):cn},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):cn},t.toDuration=function(e,t){return this.isValid?this.e.diff(this.s,e,t):ln.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=Xe.defaultZone);var t=hr.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset},e.isValidIANAZone=function(e){return Pe.isValidZone(e)},e.normalizeZone=function(e){return _e(e,Xe.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.locObj,u=void 0===s?null:s,l=n.outputCalendar,c=void 0===l?"gregory":l;return(u||ct.create(i,o,c)).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.locObj,u=void 0===s?null:s,l=n.outputCalendar,c=void 0===l?"gregory":l;return(u||ct.create(i,o,c)).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,s=n.locObj;return((void 0===s?null:s)||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,s=n.locObj;return((void 0===s?null:s)||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(){return{relative:Y()}},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(ln.fromMillis(r).as("days"))}function pn(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}],["quarters",function(e,t){return t.quarter-e.quarter}],["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 A;r=l;var d,h=c(e,t);(i=e.plus(((A={})[l]=h,A)))>t?(e=e.plus(((d={})[l]=h-1,d)),h-=1):e=i,a[l]=h}}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 A;if(s<t)s=a.plus(((A={})[u]=1,A));s!==a&&(o[u]=(o[u]||0)+l/(s-a))}var d,h=ln.fromObject(o,r);return c.length>0?(d=ln.fromMillis(l,r)).shiftTo.apply(d,c).plus(h):h}var gn={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]},vn=gn.hanidec.replace(/[\[|\]]/g,"").split("");function yn(e,t){var n=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+gn[n||"latn"]+t)}function wn(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(gn.hanidec))t+=vn.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 xn="( |"+String.fromCharCode(160)+")",bn=new RegExp(xn,"g");function Cn(e){return e.replace(/\./g,"\\.?").replace(bn,xn)}function Sn(e){return e.replace(/\./g,"").replace(bn," ").toLowerCase()}function Tn(e,t){return null===e?null:{regex:RegExp(e.map(Cn).join("|")),deser:function(n){var r=n[0];return e.findIndex((function(e){return Sn(r)===Sn(e)}))+t}}}function In(e,t){return{regex:e,deser:function(e){return Ae(e[1],e[2])},groups:t}}function kn(e){return{regex:e,deser:function(e){return e[0]}}}var Fn={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 En=null;function Dn(e,t){if(e.literal)return e;var n=Be.macroTokenToFormatOpts(e.val);if(!n)return e;var r=Be.create(t,n).formatDateTimeParts((En||(En=hr.fromMillis(1555555555555)),En)).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=Fn[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 Mn(e,t,n){var r=function(e,t){var n;return(n=Array.prototype).concat.apply(n,e.map((function(e){return Dn(e,t)})))}(Be.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}"),A=yn(r,"{1,6}"),d=yn(r,"{1,9}"),h=yn(r,"{2,4}"),f=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},g=function(e){if(n.literal)return p(e);switch(e.val){case"G":return Tn(r.eras("short",!1),0);case"GG":return Tn(r.eras("long",!1),0);case"y":return wn(A);case"yy":case"kk":return wn(h,le);case"yyyy":case"kkkk":return wn(s);case"yyyyy":return wn(f);case"yyyyyy":return wn(u);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return wn(l);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return wn(a);case"MMM":return Tn(r.months("short",!0,!1),1);case"MMMM":return Tn(r.months("long",!0,!1),1);case"LLL":return Tn(r.months("short",!1,!1),1);case"LLLL":return Tn(r.months("long",!1,!1),1);case"o":case"S":return wn(c);case"ooo":case"SSS":return wn(o);case"u":return kn(d);case"uu":return kn(l);case"uuu":case"E":case"c":return wn(i);case"a":return Tn(r.meridiems(),0);case"EEE":return Tn(r.weekdays("short",!1,!1),1);case"EEEE":return Tn(r.weekdays("long",!1,!1),1);case"ccc":return Tn(r.weekdays("short",!0,!1),1);case"cccc":return Tn(r.weekdays("long",!0,!1),1);case"Z":case"ZZ":return In(new RegExp("([+-]"+l.source+")(?::("+a.source+"))?"),2);case"ZZZ":return In(new RegExp("([+-]"+l.source+")("+a.source+")?"),2);case"z":return kn(/[a-z_+-/]{1,256}?/i);default:return p(e)}}(n)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"},g.token=n,g;var n,r,i,a,o,s,u,l,c,A,d,h,f,p,g})),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),A=c[0],d=c[1],h=d?function(e){var t,n=null;return Z(e.z)||(n=Pe.create(e.z)),Z(e.Z)||(n||(n=new qe(e.Z)),t=e.Z),Z(e.q)||(e.M=3*(e.q-1)+1),Z(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),Z(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}),{}),n,t]}(d):[null,null,void 0],f=h[0],p=h[1],g=h[2];if(X(d,"a")&&X(d,"H"))throw new m("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:r,regex:l,rawMatches:A,matches:d,result:f,zone:p,specificOffset:g}}var Bn=[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 Nn(e,t){return new Le("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 jn(e,t,n){return n+(ie(e)?Ln:Bn)[t-1]}function Rn(e,t){var n=ie(e)?Ln:Bn,r=n.findIndex((function(e){return e<t}));return{month:r+1,day:t-n[r]}}function Vn(e){var t,n=e.year,i=e.month,a=e.day,o=jn(n,i,a),s=On(n,i,a),u=Math.floor((o-s+10)/7);return u<1?u=ue(t=n-1):u>ue(n)?(t=n+1,u=1):t=n,r({weekYear:t,weekNumber:u,weekday:s},pe(e))}function Hn(e){var t,n=e.weekYear,i=e.weekNumber,a=e.weekday,o=On(n,1,4),s=ae(n),u=7*i+a-o-3;u<1?u+=ae(t=n-1):u>s?(t=n+1,u-=ae(n)):t=n;var l=Rn(t,u);return r({year:t,month:l.month,day:l.day},pe(e))}function Pn(e){var t=e.year;return r({year:t,ordinal:jn(t,e.month,e.day)},pe(e))}function Wn(e){var t=e.year,n=Rn(t,e.ordinal);return r({year:t,month:n.month,day:n.day},pe(e))}function qn(e){var t=z(e.year),n=$(e.month,1,12),r=$(e.day,1,oe(e.year,e.month));return t?n?!r&&Nn("day",e.day):Nn("month",e.month):Nn("year",e.year)}function Qn(e){var t=e.hour,n=e.minute,r=e.second,i=e.millisecond,a=$(t,0,23)||24===t&&0===n&&0===r&&0===i,o=$(n,0,59),s=$(r,0,59),u=$(i,0,999);return a?o?s?!u&&Nn("millisecond",i):Nn("second",r):Nn("minute",n):Nn("hour",t)}var _n="Invalid DateTime",Un=864e13;function Zn(e){return new Le("unsupported zone",'the zone "'+e.name+'" is not supported')}function Gn(e){return null===e.weekData&&(e.weekData=Vn(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 hr(r({},n,t,{old:n}))}function Yn(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 Jn(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 Xn(e,t,n){return Yn(se(e),t,n)}function $n(e,t){var n=e.o,i=e.c.year+Math.trunc(t.years),a=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),o=r({},e.c,{year:i,month:a,day:Math.min(e.c.day,oe(i,a))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),s=ln.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"),u=Yn(se(o),n,e.zone),l=u[0],c=u[1];return 0!==s&&(l+=s,c=e.zone.offset(l)),{ts:l,o:c}}function Kn(e,t,n,i,a,o){var s=n.setZone,u=n.zone;if(e&&0!==Object.keys(e).length){var l=t||u,c=hr.fromObject(e,r({},n,{zone:l,specificOffset:o}));return s?c:c.setZone(u)}return hr.invalid(new Le("unparsable",'the input "'+a+"\" can't be parsed as "+i))}function er(e,t,n){return void 0===n&&(n=!0),e.isValid?Be.create(ct.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function tr(e,t){var n=e.c.year>9999||e.c.year<0,r="";return n&&e.c.year>=0&&(r+="+"),r+=K(e.c.year,n?6:4),t?(r+="-",r+=K(e.c.month),r+="-",r+=K(e.c.day)):(r+=K(e.c.month),r+=K(e.c.day)),r}function nr(e,t,n,r,i){var a=K(e.c.hour);return t?(a+=":",a+=K(e.c.minute),0===e.c.second&&n||(a+=":")):a+=K(e.c.minute),0===e.c.second&&n||(a+=K(e.c.second),0===e.c.millisecond&&r||(a+=".",a+=K(e.c.millisecond,3))),i&&(e.isOffsetFixed&&0===e.offset?a+="Z":e.o<0?(a+="-",a+=K(Math.trunc(-e.o/60)),a+=":",a+=K(Math.trunc(-e.o%60))):(a+="+",a+=K(Math.trunc(e.o/60)),a+=":",a+=K(Math.trunc(e.o%60)))),a}var rr={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ir={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ar={ordinal:1,hour:0,minute:0,second:0,millisecond:0},or=["year","month","day","hour","minute","second","millisecond"],sr=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],ur=["year","ordinal","hour","minute","second","millisecond"];function lr(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 v(e);return t}function cr(e,t){var n,r,i=_e(t.zone,Xe.defaultZone),a=ct.fromObject(t),o=Xe.now();if(Z(e.year))n=o;else{for(var s,u=d(or);!(s=u()).done;){var l=s.value;Z(e[l])&&(e[l]=rr[l])}var c=qn(e)||Qn(e);if(c)return hr.invalid(c);var A=Xn(e,i.offset(o),i);n=A[0],r=A[1]}return new hr({ts:n,zone:i,loc:a,o:r})}function Ar(e,t,n){var r=!!Z(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=d(n.units);!(o=s()).done;){var u=o.value,l=a(u);if(Math.abs(l)>=1)return i(l,u)}return i(e>t?-0:0,n.units[n.units.length-1])}function dr(e){var t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}var hr=function(){function e(e){var t=e.zone||Xe.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new Le("invalid input"):null)||(t.isValid?null:Zn(t));this.ts=Z(e.ts)?Xe.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=Jn(this.ts,o),r=(n=Number.isNaN(r.year)?new Le("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.now=function(){return new e({})},e.local=function(){var e=dr(arguments),t=e[0],n=e[1],r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],u=n[5],l=n[6];return cr({year:r,month:i,day:a,hour:o,minute:s,second:u,millisecond:l},t)},e.utc=function(){var e=dr(arguments),t=e[0],n=e[1],r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],u=n[5],l=n[6];return t.zone=qe.utcInstance,cr({year:r,month:i,day:a,hour:o,minute:s,second:u,millisecond:l},t)},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=_e(n.zone,Xe.defaultZone);return a.isValid?new e({ts:i,zone:a,loc:ct.fromObject(n)}):e.invalid(Zn(a))},e.fromMillis=function(t,n){if(void 0===n&&(n={}),G(t))return t<-Un||t>Un?e.invalid("Timestamp out of range"):new e({ts:t,zone:_e(n.zone,Xe.defaultZone),loc:ct.fromObject(n)});throw new y("fromMillis requires a numerical input, but received a "+typeof t+" with value "+t)},e.fromSeconds=function(t,n){if(void 0===n&&(n={}),G(t))return new e({ts:1e3*t,zone:_e(n.zone,Xe.defaultZone),loc:ct.fromObject(n)});throw new y("fromSeconds requires a numerical input")},e.fromObject=function(t,n){void 0===n&&(n={}),t=t||{};var r=_e(n.zone,Xe.defaultZone);if(!r.isValid)return e.invalid(Zn(r));var i=Xe.now(),a=Z(n.specificOffset)?r.offset(i):n.specificOffset,o=he(t,lr),s=!Z(o.ordinal),u=!Z(o.year),l=!Z(o.month)||!Z(o.day),c=u||l,A=o.weekYear||o.weekNumber,h=ct.fromObject(n);if((c||s)&&A)throw new m("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&s)throw new m("Can't mix ordinal dates with month/day");var f,p,g=A||o.weekday&&!c,v=Jn(i,a);g?(f=sr,p=ir,v=Vn(v)):s?(f=ur,p=ar,v=Pn(v)):(f=or,p=rr);for(var y,w=!1,x=d(f);!(y=x()).done;){var b=y.value;Z(o[b])?o[b]=w?p[b]:v[b]:w=!0}var C=g?function(e){var t=z(e.weekYear),n=$(e.weekNumber,1,ue(e.weekYear)),r=$(e.weekday,1,7);return t?n?!r&&Nn("weekday",e.weekday):Nn("week",e.week):Nn("weekYear",e.weekYear)}(o):s?function(e){var t=z(e.year),n=$(e.ordinal,1,ae(e.year));return t?!n&&Nn("ordinal",e.ordinal):Nn("year",e.year)}(o):qn(o),S=C||Qn(o);if(S)return e.invalid(S);var T=Xn(g?Hn(o):s?Wn(o):o,a,r),I=new e({ts:T[0],zone:r,o:T[1],loc:h});return o.weekday&&c&&t.weekday!==I.weekday?e.invalid("mismatched weekday","you can't specify both a weekday of "+o.weekday+" and a date of "+I.toISO()):I},e.fromISO=function(e,t){void 0===t&&(t={});var n=function(e){return ht(e,[Pt,_t],[Wt,Ut],[qt,Zt],[Qt,Gt])}(e);return Kn(n[0],n[1],t,"ISO 8601",e)},e.fromRFC2822=function(e,t){void 0===t&&(t={});var n=function(e){return ht(function(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Lt,Nt])}(e);return Kn(n[0],n[1],t,"RFC 2822",e)},e.fromHTTP=function(e,t){void 0===t&&(t={});var n=function(e){return ht(e,[Ot,Vt],[jt,Vt],[Rt,Ht])}(e);return Kn(n[0],n[1],t,"HTTP",t)},e.fromFormat=function(t,n,r){if(void 0===r&&(r={}),Z(t)||Z(n))throw new y("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=Mn(e,t,n);return[r.result,r.zone,r.specificOffset,r.invalidReason]}(ct.fromOpts({locale:o,numberingSystem:u,defaultToEN:!0}),t,n),c=l[0],A=l[1],d=l[2],h=l[3];return h?e.invalid(h):Kn(c,A,r,"format "+n,t,d)},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 ht(e,[Yt,Xt],[Jt,$t])}(e);return Kn(n[0],n[1],t,"SQL",e)},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new y("need to specify a reason the DateTime is invalid");var r=t instanceof Le?t:new Le(t,n);if(Xe.throwOnInvalid)throw new f(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.resolvedLocaleOptions=function(e){void 0===e&&(e={});var t=Be.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(qe.instance(e),t)},t.toLocal=function(){return this.setZone(Xe.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=_e(t,Xe.defaultZone)).equals(this.zone))return this;if(t.isValid){var u=this.ts;if(a||s){var l=t.offset(this.ts);u=Xn(this.toObject(),l,t)[0]}return zn(this,{ts:u,zone:t})}return e.invalid(Zn(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=he(e,lr),i=!Z(n.weekYear)||!Z(n.weekNumber)||!Z(n.weekday),a=!Z(n.ordinal),o=!Z(n.year),s=!Z(n.month)||!Z(n.day),u=o||s,l=n.weekYear||n.weekNumber;if((u||a)&&l)throw new m("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&a)throw new m("Can't mix ordinal dates with month/day");i?t=Hn(r({},Vn(this.c),n)):Z(n.ordinal)?(t=r({},this.toObject(),n),Z(n.day)&&(t.day=Math.min(oe(t.year,t.month),t.day))):t=Wn(r({},Pn(this.c),n));var c=Xn(t,this.o,this.zone);return zn(this,{ts:c[0],o:c[1]})},t.plus=function(e){return this.isValid?zn(this,$n(this,ln.fromDurationLike(e))):this},t.minus=function(e){return this.isValid?zn(this,$n(this,ln.fromDurationLike(e).negate())):this},t.startOf=function(e){if(!this.isValid)return this;var t={},n=ln.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?Be.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):_n},t.toLocaleString=function(e,t){return void 0===e&&(e=S),void 0===t&&(t={}),this.isValid?Be.create(this.loc.clone(t),e).formatDateTime(this):_n},t.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?Be.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},t.toISO=function(e){var t=void 0===e?{}:e,n=t.format,r=void 0===n?"extended":n,i=t.suppressSeconds,a=void 0!==i&&i,o=t.suppressMilliseconds,s=void 0!==o&&o,u=t.includeOffset,l=void 0===u||u;if(!this.isValid)return null;var c="extended"===r,A=tr(this,c);return A+="T",A+=nr(this,c,a,s,l)},t.toISODate=function(e){var t=(void 0===e?{}:e).format,n=void 0===t?"extended":t;return this.isValid?tr(this,"extended"===n):null},t.toISOWeekDate=function(){return er(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.includePrefix,l=void 0!==u&&u,c=t.format,A=void 0===c?"extended":c;return this.isValid?(l?"T":"")+nr(this,"extended"===A,a,r,s):null},t.toRFC2822=function(){return er(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},t.toHTTP=function(){return er(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},t.toSQLDate=function(){return this.isValid?tr(this,!0):null},t.toSQLTime=function(e){var t=void 0===e?{}:e,n=t.includeOffset,r=void 0===n||n,i=t.includeZone,a=void 0!==i&&i,o=t.includeOffsetSpace,s="HH:mm:ss.SSS";return(a||r)&&((void 0===o||o)&&(s+=" "),a?s+="z":r&&(s+="ZZ")),er(this,s,!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():_n},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.toUnixInteger=function(){return this.isValid?Math.floor(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=r({},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 ln.invalid("created by diffing an invalid DateTime");var i,a=r({locale:this.locale,numberingSystem:this.numberingSystem},n),o=(i=t,Array.isArray(i)?i:[i]).map(ln.normalizeUnit),s=e.valueOf()>this.valueOf(),u=pn(s?this:e,s?e:this,o,a);return s?u.negate():u},t.diffNow=function(t,n){return void 0===t&&(t="milliseconds"),void 0===n&&(n={}),this.diff(e.now(),t,n)},t.until=function(e){return this.isValid?dn.fromDateTimes(this,e):this},t.hasSame=function(e,t){if(!this.isValid)return!1;var n=e.valueOf(),r=this.setZone(e.zone,{keepLocalTime:!0});return r.startOf(t)<=n&&n<=r.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}),i=t.padding?this<n?-t.padding:t.padding:0,a=["years","months","days","hours","minutes","seconds"],o=t.unit;return Array.isArray(t.unit)&&(a=t.unit,o=void 0),Ar(n,this.plus(i),r({},t,{numeric:"always",units:a,unit:o}))},t.toRelativeCalendar=function(t){return void 0===t&&(t={}),this.isValid?Ar(t.base||e.fromObject({},{zone:this.zone}),this,r({},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 y("min requires all arguments be DateTimes");return J(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 y("max requires all arguments be DateTimes");return J(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 Mn(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?Gn(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?Gn(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?Gn(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",{locObj:this.loc})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?hn.months("long",{locObj:this.loc})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?hn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?hn.weekdays("long",{locObj:this.loc})[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.isUniversal: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 S}},{key:"DATE_MED",get:function(){return T}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return I}},{key:"DATE_FULL",get:function(){return k}},{key:"DATE_HUGE",get:function(){return F}},{key:"TIME_SIMPLE",get:function(){return E}},{key:"TIME_WITH_SECONDS",get:function(){return D}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return M}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return B}},{key:"TIME_24_SIMPLE",get:function(){return L}},{key:"TIME_24_WITH_SECONDS",get:function(){return N}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return O}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return j}},{key:"DATETIME_SHORT",get:function(){return R}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return V}},{key:"DATETIME_MED",get:function(){return H}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return P}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return W}},{key:"DATETIME_FULL",get:function(){return q}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return Q}},{key:"DATETIME_HUGE",get:function(){return _}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return U}}]),e}();function fr(e){if(hr.isDateTime(e))return e;if(e&&e.valueOf&&G(e.valueOf()))return hr.fromJSDate(e);if(e&&"object"==typeof e)return hr.fromObject(e);throw new y("Unknown datetime argument: "+e+", of type "+typeof e)}return e.DateTime=hr,e.Duration=ln,e.FixedOffsetZone=qe,e.IANAZone=Pe,e.Info=hn,e.Interval=dn,e.InvalidZone=Qe,e.Settings=Xe,e.SystemZone=je,e.VERSION="2.3.1",e.Zone=Ne,Object.defineProperty(e,"__esModule",{value:!0}),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 A(e){return new Date((e+.5-l)*u)}function d(e){return function(e){return e.valueOf()/u-.5+l}(e)-c}var h=23.4397*s;function f(e,i){return a(t(e)*n(h)-r(i)*t(h),n(e))}function p(e,r){return i(t(r)*n(h)+n(r)*t(h)*t(e))}function g(e,i,o){return a(t(e),n(e)*t(i)-r(o)*n(i))}function m(e,r,a){return i(t(r)*t(a)+n(r)*n(a)*n(e))}function v(e,t){return s*(280.16+360.9856235*e)-t}function y(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(y(e));return{dec:p(t,0),ra:f(t,0)}}var b={getPosition:function(e,t,n){var r=s*-n,i=s*t,a=d(e),o=x(a),u=v(a,r)-o.ra;return{azimuth:g(u,i,o.dec),altitude:m(u,i,o.dec)}}},C=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){C.push([e,t,n])};var S=9e-4;function T(t,n,r){return S+(t+n)/(2*e)+r}function I(e,n,r){return c+e+.0053*t(n)-.0069*t(2*r)}function k(e,r,i,a,s,u,l){var c=function(e,r,i){return o((t(e)-t(r)*t(i))/(n(r)*n(i)))}(e,i,a);return I(T(c,r,s),u,l)}function F(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:f(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,i){var a,o,u,l,c,h=s*-r,f=s*n,g=function(e){return-2.076*Math.sqrt(e)/60}(i=i||0),m=function(t,n){return Math.round(t-S-n/(2*e))}(d(t),h),v=T(0,h,m),x=y(v),b=w(x),F=p(b,0),E=I(v,x,b),D={solarNoon:A(E),nadir:A(E-.5)};for(a=0,o=C.length;a<o;a+=1)c=E-((l=k(((u=C[a])[0]+g)*s,h,f,F,m,x,b))-E),D[u[1]]=A(c),D[u[2]]=A(l);return D},b.getMoonPosition=function(e,i,o){var u=s*-o,l=s*i,c=d(e),A=F(c),h=v(c,u)-A.ra,f=m(h,l,A.dec),p=a(t(h),r(l)*n(A.dec)-t(A.dec)*n(h));return f+=function(e){return e<0&&(e=0),2967e-7/Math.tan(e+.00312536/(e+.08901179))}(f),{azimuth:g(h,l,A.dec),altitude:f,distance:A.dist,parallacticAngle:p}},b.getMoonIllumination=function(e){var r=d(e||new Date),i=x(r),s=F(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)),A=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*(A<0?-1:1)/Math.PI,angle:A}},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,A,d,h,f,p,g,m,v,y=.133*s,w=b.getMoonPosition(i,t,n).altitude-y,x=1;x<=24&&(a=b.getMoonPosition(E(i,x),t,n).altitude-y,h=((c=(w+(o=b.getMoonPosition(E(i,x+1),t,n).altitude-y))/2-a)*(d=-(A=(o-w)/2)/(2*c))+A)*d+a,p=0,(f=A*A-4*c*a)>=0&&(g=d-(v=Math.sqrt(f)/(2*Math.abs(c))),m=d+v,Math.abs(g)<=1&&p++,Math.abs(m)<=1&&p++,g<-1&&(g=m)),1===p?w<0?u=x+g:l=x+g:2===p&&(u=x+(h<0?m:g),l=x+(h<0?g:m)),!u||!l);x+=2)w=o;var C={};return u&&(C.rise=E(i,u)),l&&(C.set=E(i,l)),u||l||(C[h>0?"alwaysUp":"alwaysDown"]=!0),C},"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.getDataCallbacks=[],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)}getDataCallback(){this.getDataCallbacks.forEach((e=>e(this.data))),this.getDataCallbacks=[]}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,t=!0,n=!0,r=!0,i=!0;"almanac"===this.elemId&&(n=!1),"travelForecast"===this.elemId&&(n=!1),"hourly"===this.elemId&&(n=!1),"regionalForecast"===this.elemId&&(n=!1),"progress"===this.elemId&&(t=!1,n=!1),"radar"===this.elemId&&(t=!1,r=!1,n=!1),"hazards"===this.elemId&&(n=!1,e=!0,i=!1),r&&(this.drawCurrentDateTime(e),this.dateTimeInterval||setInterval((()=>this.drawCurrentDateTime(e)),100)),i&&this.drawLogoImage(),n&&this.drawNoaaImage(),t?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){return e===navigation.msg.command.firstFrame&&this.navNext(e),e===navigation.msg.command.lastFrame&&this.navPrev(e),"block"===this.canvas.style.display||(this.canvas.style.display="block"),!1}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+=1,this.baseCountChange&&this.baseCountChange(this.navBaseCount),this.updateScreenFromBaseCount())}async updateScreenFromBaseCount(){const 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+=1)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+=1)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:(e,t)=>{const n=e=>`images/${e}`,r=t??e.indexOf("/night/")>=0;let i=e.toLowerCase().match(/[^/]+$/)[0].match(/(.*?)[,?&.]/)[1];const a=+(e.match(/,(\d{2,3})/)??[0,100])[1];if("dualimage"===i){const t=e.match(/&j=(.*)&/);[,i]=t}switch(i+(r?"-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":case"fog-n":return n("CC_Fog.gif");case"rain_sleet":return n("Sleet.gif");case"rain_showers":case"rain_showers_high":case"rain_showers-n":case"rain_showers_high-n":return n("CC_Showers.gif");case"rain":case"rain-n":return n("CC_Rain.gif");case"snow":case"snow-n":return n(a>50?"CC_Snow.gif":"CC_SnowShowers.gif");case"rain_snow":return n("CC_RainSnow.gif");case"snow_fzra":case"snow_fzra-n":case"fzra":case"fzra-n":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":case"tsra_hi":case"tsra_hi-n":case"hurricane":case"tropical_storm":return n("CC_TStorm.gif");case"wind_few":case"wind_sct":case"wind_bkn":case"wind_ovc":case"wind_skc":case"wind_skc-n":case"wind_sct-n":return n("CC_Windy.gif");case"blizzard":return n("Blowing-Snow.gif");default:return console.log(`Unable to locate icon for ${i} ${e} ${r}`),!1}},getWeatherRegionalIconFromIconLink:(e,t)=>{const n=t??e.indexOf("/night/")>=0,r=e=>`images/r/${e}`;let i=e.toLowerCase().match(/[^/]+$/)[0].match(/(.*?)[,?&.]/)[1];const a=+(e.match(/,(\d{2,3})/)??[0,100])[1];if("dualimage"===i){const t=e.match(/&j=(.*)&/);[,i]=t}switch(i+(n?"-n":"")){case"skc":case"hot":case"haze":return r("Sunny.gif");case"skc-n":case"nskc":case"nskc-n":return r("Clear-1992.gif");case"bkn":return r("Mostly-Cloudy-1994-2.gif");case"bkn-n":case"few-n":case"nfew-n":case"nfew":return r("Partly-Clear-1994-2.gif");case"sct":case"few":return r("Partly-Cloudy.gif");case"sct-n":case"nsct":case"nsct-n":return r("Mostly-Clear.gif");case"ovc":case"ovc-n":return r("Cloudy.gif");case"fog":case"fog-n":return r("Fog.gif");case"rain_sleet":case"sleet":case"sleet-n":return r("Sleet.gif");case"rain_showers":case"rain_showers_high":return r("Scattered-Showers-1994-2.gif");case"rain_showers-n":case"rain_showers_high-n":return r("Scattered-Showers-Night-1994-2.gif");case"rain":case"rain-n":return r("Rain-1992.gif");case"snow":case"snow-n":return r(a>50?"Heavy-Snow-1994-2.gif":"Light-Snow.gif");case"rain_snow":return r("Rain-Snow-1992.gif");case"snow_fzra":case"snow_fzra-n":return r("Freezing-Rain-Snow-1992.gif");case"fzra":case"fzra-n":return r("Freezing-Rain-1992.gif");case"snow_sleet":case"snow_sleet-n":return r("Snow and Sleet.gif");case"tsra_sct":case"tsra":return r("Scattered-Tstorms-1994-2.gif");case"tsra_sct-n":case"tsra-n":return r("Scattered-Tstorms-Night-1994-2.gif");case"tsra_hi":case"tsra_hi-n":case"hurricane":case"tropical_storm":return r("Thunderstorm.gif");case"wind_few":case"wind_sct":case"wind_bkn":case"wind_ovc":return r("Wind.gif");case"wind_skc":return r("Sunny-Wind-1994.gif");case"wind_skc-n":case"wind_sct-n":return r("Clear-Wind-1994.gif");case"blizzard":return r("Blowing Snow.gif");default:return console.log(`Unable to locate regional icon for ${i} ${e} ${n}`),!1}},getHourlyIcon:(e,t,n,r,i,a,o=!1)=>{const s=e=>`images/r/${e}`;let u=!1,l=!1,c=!1,A=!1,d=!1;return t.forEach((e=>{e.weather&&(e.weather.toLowerCase().includes("thunder")&&(u=!0),e.weather.toLowerCase().includes("snow")&&(l=!0),e.weather.toLowerCase().includes("ice")&&(c=!0),e.weather.toLowerCase().includes("fog")&&(A=!0),e.weather.toLowerCase().includes("wind")&&(d=!0))})),s(n>0||c?"Freezing-Rain-1992.gif":i>10?a>30||d?"Blowing Snow.gif":"Heavy-Snow-1994.gif":(i>0||l)&&u?"ThunderSnow.gif":i>0||l?"Light-Snow.gif":u?"Thunderstorm.gif":r>70?"Rain-1992.gif":r>50?"Shower.gif":r>30?o?"Scattered-Showers-Night.gif":"Scattered-Showers-1994.gif":A?"Fog.gif":e>70?"Cloudy.gif":e>50?o?"Partly-Clear-1994.gif":"Mostly-Cloudy-1994.gif":e>30?o?"Mostly-Clear.gif":"Partly-Cloudy.gif":o?"Clear-1992.gif":"Sunny.gif")}},utils=(()=>{const e=[];Math.round2=(e,t)=>Number(`${Math.round(`${e}e${t}`)}e-${t}`);const t=e=>{let t=e;return t=t.replace("https://api.weather.gov/",window.location.href),t=t.replace("https://www.cpc.ncep.noaa.gov/",window.location.href),t},n=(e,t)=>r(e,"json",t),r=async(e,n,r={})=>{const i={method:"GET",mode:"cors",type:"GET",...r};let a=e;!0===i.cors&&(a=t(e));const o=new URL(a);o.protocol=window.location.protocol,i.data&&Object.keys(i.data).forEach((e=>{const t=i.data[e];o.searchParams.append(e,t)}));const s=await fetch(o,i);if(!s.ok)throw new Error(`Fetch error ${s.status} ${s.statusText} while fetching ${s.url}`);switch(n){case"json":return s.json();case"text":return s.text();case"blob":return s.blob();default:return s}};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 n(`https://api.weather.gov/points/${e},${t}`)}catch(n){return console.log(`Unable to get point ${e}, ${t}`),console.error(n),!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*r**.16+.4275*n*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)**2+(r-t)**2),wrap:(e,t)=>(e%t+t)%t},string:{wordWrap:(e,...t)=>{const n=t[0]??75,r=t[1]??"\n",i=t[2]??!1;let a,o,s,u=e;if(u+="",n<1)return u;const l=/^\S*/,c=/\S*(\s)?$/,A=u.split(/\r\n|\n|\r/),d=A.length;let h;for(a=0;a<d;A[a++]+=s)for(s=A[a],A[a]="";s.length>n;){const e=s.slice(0,n+1);let t=0,u=0;if(h=e.match(c),h[1])o=n,t=1;else if(o=e.length-h[0].length,o&&(u=1),!o&&i&&n&&(o=n),!o){const t=(s.slice(n).match(l)||[""])[0];o=e.length+t.length}A[a]+=s.slice(0,o-u),s=s.slice(o+t),A[a]+=s.length?r:""}return A.join("\n")}},cors:{rewriteUrl:t},fetch:{json:n,text:(e,t)=>r(e,"text",t),raw:(e,t)=>r(e,"",t),blob:(e,t)=>r(e,"blob",t)}}})();class CurrentWeather extends WeatherDisplay{constructor(e,t){super(e,t,"Current Conditions"),this.backgroundImage=utils.image.load("images/BackGround1_1.png")}async getData(e){super.getData(e);const t=e??this.weatherParameters;let n,r,i=0;for(;!n&&i<t.stations.length;){r=t.stations[i],i+=1;try{if(n=await utils.fetch.json(`${r.id}/observations`,{cors:!0,data:{limit:2}}),null===n.features[0].properties.temperature.value||null===n.features[0].properties.windSpeed.value||null===n.features[0].properties.textDescription)throw n=void 0,new Error(`Unable to get observations: ${r.properties.stationIdentifier}, trying next station`)}catch(e){console.error(e)}}if(!n)return console.error("All current weather stations exhausted"),void this.setStatus(STATUS.failed);utils.image.preload(icons.getWeatherIconFromIconLink(n.features[0].properties.icon)),this.data={...n,station:r},this.setStatus(STATUS.loaded),this.getDataCallback()}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,e.station=this.data.station;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()}async getCurrentWeather(){return new Promise((e=>{this.data&&e(this.parseData()),this.getDataCallbacks.push((()=>e(this.parseData())))}))}static shortConditions(e){let t=e;return t=t.replace(/Light/g,"L"),t=t.replace(/Heavy/g,"H"),t=t.replace(/Partly/g,"P"),t=t.replace(/Mostly/g,"M"),t=t.replace(/Few/g,"F"),t=t.replace(/Thunderstorm/g,"T'storm"),t=t.replace(/ in /g,""),t=t.replace(/Vicinity/g,""),t=t.replace(/ and /g," "),t=t.replace(/Freezing Rain/g,"Frz Rn"),t=t.replace(/Freezing/g,"Frz"),t=t.replace(/Unknown Precip/g,""),t=t.replace(/L Snow Fog/g,"L Snw/Fog"),t=t.replace(/ with /g,"/"),t}}const currentWeatherScroll=(()=>{const e=String.fromCharCode(176);let t,n,r,i=0;const a=()=>{n&&t.putImageData(n,0,405),n=void 0,t=void 0},o=()=>{i=(i+1)%u.length,s()},s=async()=>{const e=await navigation.getCurrentWeather();e&&(t.putImageData(n,0,405),l(u[i](e)))},u=[e=>`Conditions at ${e.station.properties.name.substr(0,20)}`,t=>{let n=`Temp: ${t.Temperature}${e} ${t.TemperatureUnit}`;return t.observations.heatIndex.value?n+=` Heat Index: ${t.HeatIndex}${e} ${t.TemperatureUnit}`:t.observations.windChill.value&&(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}`}`],l=e=>{draw.text(t,"Star4000","24pt","#ffffff",70,430,e,2)};return{start:e=>{e&&(e!==t&&(a(),n=e.getImageData(0,405,640,75)),t=e,r||(r=setInterval(o,4e3)),s())},stop:e=>{a(),r&&(r=clearInterval(r)),e&&(i=0)}}})();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);const t=e??this.weatherParameters,n=Object.keys(StationInfo).map((e=>{const n=StationInfo[e],r=utils.calc.distance(n.lat,n.lon,t.latitude,t.longitude);return{...n,distance:r}})).sort(((e,t)=>e.distance-t.distance)).slice(0,30),r=(await Promise.all(n.map((async e=>{try{const t=await utils.fetch.json(`https://api.weather.gov/stations/${e.id}/observations/latest`);return null!==t.properties.temperature.value&&""!==t.properties.textDescription&&null!==t.properties.windSpeed.value&&{...t.properties,StationId:e.id,city:e.city}}catch(t){return console.log(`Unable to get latest observations for ${e.id}`),!1}})))).filter((e=>e));this.data=r.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:1));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,LatestObservations.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()}static shortenCurrentConditions(e){let t=e;return t=t.replace(/Light/,"L"),t=t.replace(/Heavy/,"H"),t=t.replace(/Partly/,"P"),t=t.replace(/Mostly/,"M"),t=t.replace(/Few/,"F"),t=t.replace(/Thunderstorm/,"T'storm"),t=t.replace(/ in /,""),t=t.replace(/Vicinity/,""),t=t.replace(/ and /," "),t=t.replace(/Freezing Rain/,"Frz Rn"),t=t.replace(/Freezing/,"Frz"),t=t.replace(/Unknown Precip/,""),t=t.replace(/L Snow Fog/,"L Snw/Fog"),t=t.replace(/ with /,"/"),t}}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+=1)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 utils.fetch.json(t.properties.forecast),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=[]),this.longCanvasGifs.forEach((e=>e.pause())),this.longCanvasGifs.length=0;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+=1){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 ${TravelForecast.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)}static 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);const t=e??this.weatherParameters;let n="images/Basemap2.png";"HI"===t.state?n="images/HawaiiRadarMap4.png":"AK"===t.state&&(n="images/AlaskaRadarMap6.png"),this.baseMap=utils.image.load(n);const r={x:240,y:117},i=this.getXYFromLatitudeLongitude(t.latitude,t.longitude,r.x,r.y,t.state),a=this.getMinMaxLatitudeLongitude(i.x,i.y,r.x,r.y,t.state);let o=2.5;"HI"===t.state&&(o=1);const s=Object.values(StationInfo).map((e=>({...e,targetDistance:o}))),u=[...RegionalCities,...s],l=[];u.forEach((e=>{if(e.lat>a.minLat&&e.lat<a.maxLat&&e.lon>a.minLon&&e.lon<a.maxLon-1){const t=e.targetDistance||1;l.reduce(((n,r)=>{const i=utils.calc.distance(e.lon,e.lat,r.lon,r.lat);return n&&i>=t}),!0)&&l.push(e)}}));const c=l.map((async e=>{try{const n=await utils.weather.getPoint(e.lat,e.lon),r=RegionalForecast.getRegionalObservation(n,e),i=await utils.fetch.json(n.properties.forecast),o=this.getXYForCity(e,a.maxLat,a.minLon,t.state),s=await r,u={daytime:!!s.icon.match(/\/day\//),temperature:utils.units.celsiusToFahrenheit(s.temperature.value),name:RegionalForecast.formatCity(e.city),icon:s.icon,x:o.x,y:o.y};return utils.image.preload(icons.getWeatherRegionalIconFromIconLink(u.icon,!u.daytime)),[u,RegionalForecast.buildForecast(i.properties.periods[1],e,o),RegionalForecast.buildForecast(i.properties.periods[2],e,o)]}catch(t){return console.log(`No regional forecast data for '${e.name}'`),console.log(t),!1}})),A=(await Promise.all(c)).filter((e=>e));0!==A.length?(this.data={regionalData:A,offsetXY:r,sourceXY:i},this.setStatus(STATUS.loaded)):this.setStatus(STATUS.noData)}static buildForecast(e,t,n){return{daytime:e.isDaytime,temperature:e.temperature||0,name:RegionalForecast.formatCity(t.city),icon:e.icon,x:n.x,y:n.y,time:e.startTime}}static async getRegionalObservation(e,t){try{const t=(await utils.fetch.json(e.properties.observationStations)).features[0].id,n=await utils.fetch.json(`${t}/observations/latest`);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(e,t,n,r);if("HI"===i)return this.getXYFromLatitudeLongitudeHI(e,t,n,r);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}}static 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}}static 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(e,t,n,r);if("HI"===i)return this.getMinMaxLatitudeLongitudeHI(e,t,n,r);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)}}static 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)}}static 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(e,t,n),"HI"===r&&this.getXYForCityHI(e,t,n);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}}static 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}}static 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}}static 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{temperature:r}=t;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);const t=e??this.weatherParameters,n=await this.getRawData(t);if(!n)return void this.setStatus(STATUS.failed);const r=LocalForecast.parse(n);this.screenTexts=[],r.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+=1)""!==r[e]&&(o>6&&(this.screenTexts.push(a),a="",o=0),a+=`${r[e]}\n`,o+=1);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 utils.fetch.json(e.forecast,{data:{units:t}})}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()}static parse(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);const t=e??this.weatherParameters;let n,r="us";navigation.units()===UNITS.metric&&(r="si");try{n=await utils.fetch.json(t.forecast,{data:{units:r}})}catch(e){return console.error("Unable to get extended forecast"),console.error(e.status,e.responseJSON),void this.setStatus(STATUS.failed)}this.data=ExtendedForecast.parse(n.properties.periods),this.screenIndex=0,this.setStatus(STATUS.loaded)}static parse(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=ExtendedForecast.shortenExtendedForecastText(e.shortForecast),i.dayName=t[n],utils.image.preload(i.icon),e.isDaytime?(i.high=e.temperature,n+=1):i.low=e.temperature})),r}static 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{low:r}=e;void 0!==r&&(navigation.units()===UNITS.metric&&(r=utils.units.fahrenheitToCelsius(r)),draw.text(this.context,"Star4000 Large","24pt","#FFFFFF",85+n,385,r,2,"center"));let{high:i}=e;navigation.units()===UNITS.metric&&(i=utils.units.fahrenheitToCelsius(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);const t=e??this.weatherParameters,n=[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:r,moon:i}=this.calcSunMoonData(t),[a,o]=await Promise.all(n),s=Almanac.parseOutlooks(t.latitude,t.longitude,a,o);this.data={sun:r,moon:i,outlook:s},this.setStatus(STATUS.loaded),this.getDataCallback()}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}),{phase:a}=SunCalc.getMoonIllumination(i.toJSDate()),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+=1}while(o<=30&&r.length<4);return{sun:n,moon:r}}getMoonTransition(e,t,n,r=0){let i=n,{phase:a}=SunCalc.getMoonIllumination(i.toJSDate()),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=(t,n)=>t<e&&n>=e;r%2==0&&(u=(t,n)=>t>e&&n<=e);do{const n=a;if(i=i.plus(s),a=SunCalc.getMoonIllumination(i.toJSDate()).phase,a>.9&&(a-=1),u(n,a)){if(r>=3)break;return this.getMoonTransition(e,t,i,r+1)}o+=1}while(o<1e3);return{phase:t,date:i}}static 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=Almanac.getOutlookColor(e,t,u),A=Almanac.getOutlookColor(e,t,l);return{thisMonth:o,nextMonth:s,temperature:Almanac.getOutlookTemperatureIndicator(c),precipitation:Almanac.getOutlookPrecipitationIndicator(A)}}static 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+=1)for(let t=i-8;t<=i+8;t+=1){const r=Almanac.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}static getPixelColor(e,t,n){const r=e.getImageData(t,n,1,1).data;return{r:r[0],g:r[1],b:r[2]}}static getOutlookTemperatureIndicator(e){return e.b>e.r?"Below Normal":e.r>e.b?"Above Normal":"Normal"}static 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 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");const t=`MID-${e.outlook.thisMonth.toUpperCase()} TO MID-${e.outlook.nextMonth.toUpperCase()}`;draw.text(this.context,"Star4000","24pt","#FFFFFF",320,220,t,2,"center");const n=e.outlook.temperature;draw.text(this.context,"Star4000","24pt","#FFFFFF",70,300,`Temperatures: ${n}`,2);const r=e.outlook.precipitation;draw.text(this.context,"Star4000","24pt","#FFFFFF",70,380,`Precipitation: ${r}`,2);break}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;default:return s}})();this.context.drawImage(r,75+130*t,270)}))}this.finishDraw()}async getSun(){return new Promise((e=>{this.data&&e(this.data),this.getDataCallbacks.push(e)}))}}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){super.getData(e);const t=e??this.weatherParameters;if("AK"===t.state||"HI"===t.state)return void this.setStatus(STATUS.noData);const{DateTime:n}=luxon;let r="images/4000RadarMap2.jpg";"HI"===t.State&&(r="images/HawaiiRadarMap2.png"),this.baseMap=await utils.image.load(r);const i=[];let a=n.utc().minus({days:1}).startOf("day");for(;a<=n.utc().startOf("day");)i.push(`https://mesonet.agron.iastate.edu/archive/data/${a.toFormat("yyyy/LL/dd")}/GIS/uscomp/`),a=a.plus({days:1});const o=(await Promise.all(i.map((async e=>{try{return await utils.fetch.text(e,{cors:!0})}catch(e){return console.log("Unable to get list of radars"),console.error(e),this.setStatus(STATUS.failed),!1}})))).filter((e=>e)).map(((e,t)=>{const n=(new DOMParser).parseFromString(e,"text/html"),r=n.createElement("base");r.href=i[t],n.head.append(r);const a=n.getElementsByTagName("a"),o=[];return Array.from(a).forEach((e=>{e.innerHTML?.includes(".png")&&e.innerHTML?.includes("n0r_")&&o.push(e.href)})),o})).flat(),s=o.sort(((e,t)=>Date(e)<Date(t)?-1:1)).slice(-this.dopplerRadarImageMax);let u=120,l=69;const c=2550;u*=2,l*=2;const A=Radar.getXYFromLatitudeLongitudeMap(t,240,138),d=document.createElement("canvas");d.width=c,d.height=1600;const h=d.getContext("2d");h.imageSmoothingEnabled=!1;const f=Radar.getXYFromLatitudeLongitudeDoppler(t,240,138),p=f.x/2,g=f.y/2,m=await Promise.all(s.map((async e=>{const t=document.createElement("canvas");t.width=640,t.height=367;const r=t.getContext("2d");r.imageSmoothingEnabled=!1;const i=await fetch(utils.cors.rewriteUrl(e));if(!i.ok)throw new Error(`Unable to fetch radar error ${i.status} ${i.statusText} from ${i.url}`);const a=await i.blob(),o=e.match(/_(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)\./);let s;if(o){const[,e,t,r,i,a]=o;s=n.fromObject({year:e,month:t,day:r,hour:i,minute:a},{zone:"UTC"}).setZone()}else s=n.fromHTTP(i.headers.get("last-modified")).setZone();const u=await utils.image.load(a);h.clearRect(0,0,c,1600),h.drawImage(u,0,0,c,1600),r.drawImage(await this.baseMap,A.x,A.y,480,276,0,0,640,367);const l=document.createElement("canvas");l.width=640,l.height=367;const f=l.getContext("2d");return f.imageSmoothingEnabled=!1,f.drawImage(d,p,g,240,163.1,0,0,640,367),Radar.removeDopplerRadarImageNoise(f),Radar.mergeDopplerRadarImage(r,f),{canvas:t,time:s}})));this.timing.totalScreens=m.length,this.data=m.map((e=>e.canvas)),this.times=m.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()}static getXYFromLatitudeLongitudeMap(e,t,n){let r=0,i=0;return r=55.2*(51.75-e.latitude),r-=n,r>3200-2*n?r=3200-2*n:r<0&&(r=0),i=41.775*(-130.37-e.longitude)*-1,i-=t,i>5100-2*t?i=5100-2*t:i<0&&(i=0),{x:2*i,y:2*r}}static getXYFromLatitudeLongitudeDoppler(e,t,n){let r=0,i=0;return r=61.4481*(51-e.latitude),r-=n,r>6e3-2*n?r=6e3-2*n:r<0&&(r=0),i=42.1768*(-129.138-e.longitude)*-1,i-=t,i>2800-2*t?i=2800-2*t:i<0&&(i=0),{x:2*i,y:2*r}}static 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=t.data[e],r=t.data[e+1],i=t.data[e+2],a=t.data[e+3];0===n&&0===r&&0===i||0===n&&236===r&&236===i||1===n&&160===r&&246===i||0===n&&0===r&&246===i?(n=0,r=0,i=0,a=0):0===n&&255===r&&0===i?(n=49,r=210,i=22,a=255):0===n&&200===r&&0===i?(n=0,r=142,i=0,a=255):0===n&&144===r&&0===i?(n=20,r=90,i=15,a=255):255===n&&255===r&&0===i?(n=10,r=40,i=10,a=255):231===n&&192===r&&0===i?(n=196,r=179,i=70,a=255):255===n&&144===r&&0===i?(n=190,r=72,i=19,a=255):214===n&&0===r&&0===i||255===n&&0===r&&0===i?(n=171,r=14,i=14,a=255):(192===n&&0===r&&0===i||255===n&&0===r&&255===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)}static mergeDopplerRadarImage(e,t){const n=e.getImageData(0,0,e.canvas.width,e.canvas.height),r=t.getImageData(0,0,t.canvas.width,t.canvas.height);for(let e=0;e<r.data.length;e+=4)n.data[e]<116&&n.data[e+1]<116&&n.data[e+2]<116&&(r.data[e]=0,r.data[e+1]=0,r.data[e+2]=0,r.data[e+3]=0);t.putImageData(r,0,0),e.drawImage(t.canvas,0,0)}}class Hourly extends WeatherDisplay{constructor(e,t,n){super(e,t,"Hourly Forecast",n),this.backgroundImage=utils.image.load("images/BackGround6_1.png"),this.hourHeight=72,this.timing.baseDelay=20;const r=4*this.hourHeight;this.timing.delay=[150+r];for(let e=0;e<4;e+=1)this.timing.delay.push(r);this.timing.delay.push(150)}async getData(e){if(!super.getData(e))return;let t;try{t=await utils.fetch.json(e.forecastGridData)}catch(e){console.error("Get hourly forecast failed"),console.error(e.status,e.responseJSON),this.setStatus(STATUS.failed)}this.data=await Hourly.parseForecast(t.properties),this.setStatus(STATUS.loaded),this.drawLongCanvas()}static async parseForecast(e){const t=Hourly.expand(e.temperature.values),n=Hourly.expand(e.apparentTemperature.values),r=Hourly.expand(e.windSpeed.values),i=Hourly.expand(e.windDirection.values),a=Hourly.expand(e.skyCover.values),o=Hourly.expand(e.weather.values),s=Hourly.expand(e.iceAccumulation.values),u=Hourly.expand(e.probabilityOfPrecipitation.values),l=Hourly.expand(e.snowfallAmount.values),c=await Hourly.determineIcon(a,o,s,u,l,r);return t.map(((e,a)=>navigation.units===UNITS.metric?{temperature:t[a],apparentTemperature:n[a],windSpeed:r[a],windDirection:utils.calc.directionToNSEW(i[a]),icon:c[a]}:{temperature:utils.units.celsiusToFahrenheit(t[a]),apparentTemperature:utils.units.celsiusToFahrenheit(n[a]),windSpeed:utils.units.kilometersToMiles(r[a]),windDirection:utils.calc.directionToNSEW(i[a]),icon:c[a]}))}static async determineIcon(e,t,n,r,i,a){const o=luxon.DateTime.local().startOf("hour"),s=(await navigation.getSun()).sun,u=luxon.Interval.fromDateTimes(luxon.DateTime.fromJSDate(s[0].sunset),luxon.DateTime.fromJSDate(s[1].sunrise)),l=luxon.DateTime.fromJSDate(s[1].sunset);return e.map(((s,c)=>{const A=o.plus({hours:c}),d=u.contains(A)||A>l;return icons.getHourlyIcon(e[c],t[c],n[c],r[c],i[c],a[c],d)}))}static expand(e){const t=luxon.DateTime.utc().startOf("hour").toMillis(),n=[];return e.forEach((e=>{let r=Date.parse(e.validTime.substr(0,e.validTime.indexOf("/")));const i=r+luxon.Duration.fromISO(e.validTime.substr(e.validTime.indexOf("/")+1)).shiftTo("milliseconds").values.milliseconds;do{r>=t&&n.length<24&&n.push(e.value),r+=36e5}while(r<i&&n.length<24)})),n}async drawLongCanvas(){this.longCanvas||(this.longCanvas=document.createElement("canvas"),this.longCanvas.width=640,this.longCanvas.height=24*this.hourHeight,this.longContext=this.longCanvas.getContext("2d"),this.longCanvasGifs=[]),this.longCanvasGifs.forEach((e=>e.pause())),this.longCanvasGifs.length=0,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,24*this.hourHeight);for(let e=0;e<=4;e+=1){const t=346*e;draw.horizontalGradient(this.longContext,0,t,640,t+346,"#102080","#001040")}const e=luxon.DateTime.local();await Promise.all(this.data.map((async(t,n)=>{const r=50+this.hourHeight*n,i=e.plus({hours:n}).toLocaleString({weekday:"short",hour:"numeric"});draw.text(this.longContext,"Star4000 Large Compressed","24pt","#FFFF00",80,r,i,2);const a=Math.round(t.temperature).toString().padStart(3),o=Math.round(t.apparentTemperature).toString().padStart(3);draw.text(this.longContext,"Star4000 Large","24pt","#FFFF00",390,r,a,2,"center"),a!==o&&draw.text(this.longContext,"Star4000 Large","24pt","#FFFF00",470,r,o,2,"center");let s="Calm";if(t.windSpeed>0){const e=Math.round(t.windSpeed).toString();s=t.windDirection+Array(6-t.windDirection.length-e.length).join(" ")+e}draw.text(this.longContext,"Star4000 Large","24pt","#FFFF00",580,r,s,2,"center"),this.longCanvasGifs.push(await utils.image.superGifAsync({src:t.icon,auto_play:!0,canvas:this.longCanvas,x:290,y:r-35,max_width:47}))})))}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.titleText(this.context,"Hourly Forecast"),draw.text(this.context,"Star4000 Small","24pt","#FFFF00",390,105,"TEMP",2,"center"),draw.text(this.context,"Star4000 Small","24pt","#FFFF00",470,105,"LIKE",2,"center"),draw.text(this.context,"Star4000 Small","24pt","#FFFF00",580,105,"WIND",2,"center"),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)}static 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 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");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=UNITS.english,r=!1;const i={};let a,o;const s=(e,t={})=>{index.message({type:e,message:t})},u=async n=>{const r=await utils.weather.getPoint(n.lat,n.lon),u=await utils.fetch.json(r.properties.observationStations),l=u.features[0].properties.stationIdentifier;let{city:A}=r.properties.relativeLocation.properties;l in StationInfo&&(A=StationInfo[l].city,[A]=A.split("/")),i.latitude=n.lat,i.longitude=n.lon,i.zoneId=r.properties.forecastZone.substr(-6),i.radarId=r.properties.radarStation.substr(-3),i.stationId=l,i.weatherOffice=r.properties.cwa,i.city=A,i.state=r.properties.relativeLocation.properties.state,i.timeZone=r.properties.relativeLocation.properties.timeZone,i.forecast=r.properties.forecast,i.forecastGridData=r.properties.forecastGridData,i.stations=u.features,s("weatherParameters",i),c(),document.getElementById("loading").style.display="none",e=new Progress(-1,"progress"),await e.drawCanvas(),e.showCanvas(),0===t.length&&(a=new CurrentWeather(0,"currentWeather"),o=new Almanac(7,"almanac"),t=[a,new LatestObservations(1,"latestObservations"),new Hourly(2,"hourly"),new TravelForecast(3,"travelForecast",!1),new RegionalForecast(4,"regionalForecast"),new LocalForecast(5,"localForecast"),new ExtendedForecast(6,"extendedForecast"),o,new Radar(8,"radar")]),t.forEach((e=>e.getData(i)))},l=()=>t.reduce(((e,t)=>t.status!==STATUS.loading?e+1:e),0),c=()=>{t.forEach((e=>e.hideCanvas()))},A=e=>{const t=e.toLowerCase();n="english"===t?UNITS.english:UNITS.metric},d=()=>r,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=n=>{const r=m();e.hideCanvas(),r?(n===h.command.nextFrame&&m().navNext(),n===h.command.previousFrame&&m().navPrev()):t[0].navNext(h.command.firstFrame)},p=e=>{const n=t.length,r=g();let i;for(let a=0;a<n&&(i=utils.calc.wrap(r+(a+1)*e,n),t[i].status!==STATUS.loaded);a+=1);const a=t[i];c(),e<0&&a.showCanvas(h.command.lastFrame),e>0&&a.showCanvas(h.command.firstFrame)},g=()=>t.findIndex((e=>e.isActive())),m=()=>t[g()],v=t=>{r=t,s("isPlaying",r),e&&r&&!m()&&f(h.command.firstFrame)},y=t=>{switch(t){case"play":v(!0);break;case"playToggle":v(!r);break;case"stop":v(!1);break;case"next":v(!1),f(h.command.nextFrame);break;case"previous":v(!1),f(h.command.previousFrame);break;case"menu":v(!1),e.showCanvas(),c();break;default:console.error(`Unknown navButton ${t}`)}};return{init:async()=>{},message:e=>{if(e.type)switch(e.type){case"latLon":u(e.message);break;case"units":A(e.message);break;case"navButton":y(e.message);break;default:console.error(`Unknown event ${e.type}`)}},updateStatus:n=>{n.id<0||(e.drawCanvas(t,l()),d()&&0===n.id&&n.status===STATUS.loaded&&f(h.command.firstFrame),l()<t.length||s("loaded"))},units:()=>n,isPlaying:d,displayNavMessage:e=>{e.type===h.response.previous&&p(-1),e.type===h.response.next&&p(1)},msg:h,getDisplay:e=>t[e],getCurrentWeather:()=>!!a&&a.getCurrentWeather(),getSun:()=>!!o&&o.getSun()}})(); |