ws4kp/dist/resources/ws.min.js
2020-09-08 10:05:46 -05:00

2 lines
217 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,(function(e,t){"use strict";var n=[],r=Object.getPrototypeOf,i=n.slice,a=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},o=n.push,s=n.indexOf,u={},l=u.toString,c=u.hasOwnProperty,d=c.toString,f=d.call(Object),h={},p=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},m=function(e){return null!=e&&e===e.window},g=e.document,y={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 y)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&a.setAttribute(r,i);n.head.appendChild(a).parentNode.removeChild(a)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?u[l.call(e)]||"object":typeof e}var x="3.5.1",b=function(e,t){return new b.fn.init(e,t)};function S(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!p(e)&&!m(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}b.fn=b.prototype={jquery:x,constructor:b,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=b.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return b.each(this,e)},map:function(e){return this.pushStack(b.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(b.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(b.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:o,sort:n.sort,splice:n.splice},b.extend=b.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||p(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&&(b.isPlainObject(r)||(i=Array.isArray(r)))?(n=o[t],a=i&&!Array.isArray(n)?[]:i||b.isPlainObject(n)?n:{},i=!1,o[t]=b.extend(l,a,r)):void 0!==r&&(o[t]=r));return o},b.extend({expando:"jQuery"+(x+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==l.call(e)||(t=r(e))&&("function"!=typeof(n=c.call(t,"constructor")&&t.constructor)||d.call(n)!==f))},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(S(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(S(Object(e))?b.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(S(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&&(b.fn[Symbol.iterator]=n[Symbol.iterator]),b.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){u["[object "+t+"]"]=t.toLowerCase()}));var T=function(e){var t,n,r,i,a,o,s,u,l,c,d,f,h,p,m,g,y,v,w,x="sizzle"+1*new Date,b=e.document,S=0,T=0,F=ue(),C=ue(),k=ue(),D=ue(),I=function(e,t){return e===t&&(d=!0),0},N={}.hasOwnProperty,E=[],L=E.pop,M=E.push,O=E.push,A=E.slice,j=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},_="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",H="[\\x20\\t\\r\\n\\f]",P="(?:\\\\[\\da-fA-F]{1,6}"+H+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",R="\\["+H+"*("+P+")(?:"+H+"*([*^$|!~]?=)"+H+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+P+"))|)"+H+"*\\]",q=":("+P+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+R+")*)|.*)\\)|)",z=new RegExp(H+"+","g"),V=new RegExp("^"+H+"+|((?:^|[^\\\\])(?:\\\\.)*)"+H+"+$","g"),W=new RegExp("^"+H+"*,"+H+"*"),U=new RegExp("^"+H+"*([>+~]|"+H+")"+H+"*"),B=new RegExp(H+"|>"),Z=new RegExp(q),G=new RegExp("^"+P+"$"),$={ID:new RegExp("^#("+P+")"),CLASS:new RegExp("^\\.("+P+")"),TAG:new RegExp("^("+P+"|[*])"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+H+"*(even|odd|(([+-]|)(\\d*)n|)"+H+"*(?:([+-]|)"+H+"*(\\d+)|))"+H+"*\\)|)","i"),bool:new RegExp("^(?:"+_+")$","i"),needsContext:new RegExp("^"+H+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+H+"*((?:-\\d)?\\d*)"+H+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,J=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+H+"?|\\\\([^\\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(){f()},oe=xe((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{O.apply(E=A.call(b.childNodes),b.childNodes),E[b.childNodes.length].nodeType}catch(t){O={apply:E.length?function(e,t){M.apply(e,A.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,i){var a,s,l,c,d,p,y,v=t&&t.ownerDocument,b=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==b&&9!==b&&11!==b)return r;if(!i&&(f(t),t=t||h,m)){if(11!==b&&(d=K.exec(e)))if(a=d[1]){if(9===b){if(!(l=t.getElementById(a)))return r;if(l.id===a)return r.push(l),r}else if(v&&(l=v.getElementById(a))&&w(t,l)&&l.id===a)return r.push(l),r}else{if(d[2])return O.apply(r,t.getElementsByTagName(e)),r;if((a=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return O.apply(r,t.getElementsByClassName(a)),r}if(n.qsa&&!D[e+" "]&&(!g||!g.test(e))&&(1!==b||"object"!==t.nodeName.toLowerCase())){if(y=e,v=t,1===b&&(B.test(e)||U.test(e))){for((v=ee.test(e)&&ye(t.parentNode)||t)===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(re,ie):t.setAttribute("id",c=x)),s=(p=o(e)).length;s--;)p[s]=(c?"#"+c:":scope")+" "+we(p[s]);y=p.join(",")}try{return O.apply(r,v.querySelectorAll(y)),r}catch(t){D(e,!0)}finally{c===x&&t.removeAttribute("id")}}}return u(e.replace(V,"$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[x]=!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 de(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function fe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function he(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function me(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 ye(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},a=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},f=se.setDocument=function(e){var t,i,o=e?e.ownerDocument||e:b;return o!=h&&9===o.nodeType&&o.documentElement&&(p=(h=o).documentElement,m=!a(h),b!=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 p.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=Q.test(h.getElementsByClassName),n.getById=ce((function(e){return p.appendChild(e).id=x,!h.getElementsByName||!h.getElementsByName(x).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&m){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&&m){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&&m)return t.getElementsByClassName(e)},y=[],g=[],(n.qsa=Q.test(h.querySelectorAll))&&(ce((function(e){var t;p.appendChild(e).innerHTML="<a id='"+x+"'></a><select id='"+x+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+H+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+H+"*(?:value|"+_+")"),e.querySelectorAll("[id~="+x+"-]").length||g.push("~="),(t=h.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||g.push("\\["+H+"*name"+H+"*="+H+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+x+"+*").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"+H+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=Q.test(v=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ce((function(e){n.disconnectedMatch=v.call(e,"*"),v.call(e,"[s!='']:x"),y.push("!=",q)})),g=g.length&&new RegExp(g.join("|")),y=y.length&&new RegExp(y.join("|")),t=Q.test(p.compareDocumentPosition),w=t||Q.test(p.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},I=t?function(e,t){if(e===t)return d=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==h||e.ownerDocument==b&&w(b,e)?-1:t==h||t.ownerDocument==b&&w(b,t)?1:c?j(c,e)-j(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,r=0,i=e.parentNode,a=t.parentNode,o=[e],s=[t];if(!i||!a)return e==h?-1:t==h?1:i?-1:a?1:c?j(c,e)-j(c,t):0;if(i===a)return fe(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?fe(o[r],s[r]):o[r]==b?-1:s[r]==b?1:0}),h},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(f(e),n.matchesSelector&&m&&!D[t+" "]&&(!y||!y.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){D(t,!0)}return 0<se(t,h,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=h&&f(e),w(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=h&&f(e);var i=r.attrHandle[t.toLowerCase()],a=i&&N.call(r.attrHandle,t.toLowerCase())?i(e,t,!m):void 0;return void 0!==a?a:n.attributes||!m?e.getAttribute(t):(a=e.getAttributeNode(t))&&a.specified?a.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],i=0,a=0;if(d=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(I),d){for(;t=e[a++];)t===e[a]&&(i=r.push(a));for(;i--;)e.splice(r[i],1)}return c=null,e},i=se.getText=function(e){var t,n="",r=0,a=e.nodeType;if(a){if(1===a||9===a||11===a){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===a||4===a)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=se.selectors={cacheLength:50,createPseudo:le,match:$,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 $.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=F[e+" "];return t||(t=new RegExp("(^|"+H+")"+e+"("+H+"|$)"))&&F(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&&-1<i.indexOf(n):"$="===t?n&&i.slice(-n.length)===n:"~="===t?-1<(" "+i.replace(z," ")+" ").indexOf(n):"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var a="nth"!==e.slice(0,3),o="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,d,f,h,p,m=a!==o?"nextSibling":"previousSibling",g=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s,w=!1;if(g){if(a){for(;m;){for(f=t;f=f[m];)if(s?f.nodeName.toLowerCase()===y:1===f.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[o?g.firstChild:g.lastChild],o&&v){for(w=(h=(l=(c=(d=(f=g)[x]||(f[x]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===S&&l[1])&&l[2],f=h&&g.childNodes[h];f=++h&&f&&f[m]||(w=h=0)||p.pop();)if(1===f.nodeType&&++w&&f===t){c[e]=[S,h,w];break}}else if(v&&(w=h=(l=(c=(d=(f=t)[x]||(f[x]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===S&&l[1]),!1===w)for(;(f=++h&&f&&f[m]||(w=h=0)||p.pop())&&((s?f.nodeName.toLowerCase()!==y:1!==f.nodeType)||!++w||(v&&((c=(d=f[x]||(f[x]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]=[S,w]),f!==t)););return(w-=i)===r||w%r==0&&0<=w/r}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return i[x]?i(t):1<i.length?(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=j(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(V,"$1"));return r[x]?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 0<se(e,t).length}})),contains:le((function(e){return e=e.replace(te,ne),function(t){return-1<(t.textContent||i(t)).indexOf(e)}})),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=m?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===p},focus:function(e){return e===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:me(!1),disabled:me(!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:t<n?t:n;0<=--r;)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}))}}).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]=pe(t);function ve(){}function we(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function xe(e,t,n){var r=t.dir,i=t.next,a=i||r,o=n&&"parentNode"===a,s=T++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||o)return e(t,n,i);return!1}:function(t,n,u){var l,c,d,f=[S,s];if(u){for(;t=t[r];)if((1===t.nodeType||o)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||o)if(c=(d=t[x]||(t[x]={}))[t.uniqueID]||(d[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[a])&&l[0]===S&&l[1]===s)return f[2]=l[2];if((c[a]=f)[2]=e(t,n,u))return!0}return!1}}function be(e){return 1<e.length?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function Se(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 Te(e,t,n,r,i,a){return r&&!r[x]&&(r=Te(r)),i&&!i[x]&&(i=Te(i,a)),le((function(a,o,s,u){var l,c,d,f=[],h=[],p=o.length,m=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?m:Se(m,f,e,s,u),y=n?i||(a?e:p||r)?[]:o:g;if(n&&n(g,y,s,u),r)for(l=Se(y,h),r(l,[],s,u),c=l.length;c--;)(d=l[c])&&(y[h[c]]=!(g[h[c]]=d));if(a){if(i||e){if(i){for(l=[],c=y.length;c--;)(d=y[c])&&l.push(g[c]=d);i(null,y=[],l,u)}for(c=y.length;c--;)(d=y[c])&&-1<(l=i?j(a,d):f[c])&&(a[l]=!(o[l]=d))}}else y=Se(y===o?y.splice(p,y.length):y),i?i(null,o,y,u):O.apply(o,y)}))}function Fe(e){for(var t,n,i,a=e.length,o=r.relative[e[0].type],s=o||r.relative[" "],u=o?1:0,c=xe((function(e){return e===t}),s,!0),d=xe((function(e){return-1<j(t,e)}),s,!0),f=[function(e,n,r){var i=!o&&(r||n!==l)||((t=n).nodeType?c(e,n,r):d(e,n,r));return t=null,i}];u<a;u++)if(n=r.relative[e[u].type])f=[xe(be(f),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[x]){for(i=++u;i<a&&!r.relative[e[i].type];i++);return Te(1<u&&be(f),1<u&&we(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(V,"$1"),n,u<i&&Fe(e.slice(u,i)),i<a&&Fe(e=e.slice(i)),i<a&&we(e))}f.push(n)}return be(f)}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=C[e+" "];if(c)return t?0:c.slice(0);for(s=e,u=[],l=r.preFilter;s;){for(o in n&&!(i=W.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(a=[])),n=!1,(i=U.exec(s))&&(n=i.shift(),a.push({value:n,type:i[0].replace(V," ")}),s=s.slice(n.length)),r.filter)!(i=$[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):C(e,u).slice(0)},s=se.compile=function(e,t){var n,i,a,s,u,c,d=[],p=[],g=k[e+" "];if(!g){for(t||(t=o(e)),n=t.length;n--;)(g=Fe(t[n]))[x]?d.push(g):p.push(g);(g=k(e,(i=p,s=0<(a=d).length,u=0<i.length,c=function(e,t,n,o,c){var d,p,g,y=0,v="0",w=e&&[],x=[],b=l,T=e||u&&r.find.TAG("*",c),F=S+=null==b?1:Math.random()||.1,C=T.length;for(c&&(l=t==h||t||c);v!==C&&null!=(d=T[v]);v++){if(u&&d){for(p=0,t||d.ownerDocument==h||(f(d),n=!m);g=i[p++];)if(g(d,t||h,n)){o.push(d);break}c&&(S=F)}s&&((d=!g&&d)&&y--,e&&w.push(d))}if(y+=v,s&&v!==y){for(p=0;g=a[p++];)g(w,x,t,n);if(e){if(0<y)for(;v--;)w[v]||x[v]||(x[v]=L.call(o));x=Se(x)}O.apply(o,x),c&&!e&&0<x.length&&1<y+a.length&&se.uniqueSort(o)}return c&&(S=F,l=b),w},s?le(c):c))).selector=e}return g},u=se.select=function(e,t,n,i){var a,u,l,c,d,f="function"==typeof e&&e,h=!i&&o(e=f.selector||e);if(n=n||[],1===h.length){if(2<(u=h[0]=h[0].slice(0)).length&&"ID"===(l=u[0]).type&&9===t.nodeType&&m&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(te,ne),t)||[])[0]))return n;f&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(a=$.needsContext.test(e)?0:u.length;a--&&(l=u[a],!r.relative[c=l.type]);)if((d=r.find[c])&&(i=d(l.matches[0].replace(te,ne),ee.test(u[0].type)&&ye(t.parentNode)||t))){if(u.splice(a,1),!(e=i.length&&we(u)))return O.apply(n,i),n;break}}return(f||s(e,h))(i,t,!m,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},n.sortStable=x.split("").sort(I).join("")===x,n.detectDuplicates=!!d,f(),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")}))||de("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ce((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||de("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ce((function(e){return null==e.getAttribute("disabled")}))||de(_,(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);b.find=T,b.expr=T.selectors,b.expr[":"]=b.expr.pseudos,b.uniqueSort=b.unique=T.uniqueSort,b.text=T.getText,b.isXMLDoc=T.isXML,b.contains=T.contains,b.escapeSelector=T.escape;var F=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&b(e).is(n))break;r.push(e)}return r},C=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=b.expr.match.needsContext;function D(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var I=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function N(e,t,n){return p(t)?b.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?b.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?b.grep(e,(function(e){return-1<s.call(t,e)!==n})):b.filter(t,e,n)}b.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?b.find.matchesSelector(r,e)?[r]:[]:b.find.matches(e,b.grep(t,(function(e){return 1===e.nodeType})))},b.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(b(e).filter((function(){for(t=0;t<r;t++)if(b.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)b.find(e,i[t],n);return 1<r?b.uniqueSort(n):n},filter:function(e){return this.pushStack(N(this,e||[],!1))},not:function(e){return this.pushStack(N(this,e||[],!0))},is:function(e){return!!N(this,"string"==typeof e&&k.test(e)?b(e):e||[],!1).length}});var E,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(b.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||E,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.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 b?t[0]:t,b.merge(this,b.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:g,!0)),I.test(r[1])&&b.isPlainObject(t))for(r in t)p(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):p(e)?void 0!==n.ready?n.ready(e):e(b):b.makeArray(e,this)}).prototype=b.fn,E=b(g);var M=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}b.fn.extend({has:function(e){var t=b(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(b.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,i=this.length,a=[],o="string"!=typeof e&&b(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(o?-1<o.index(n):1===n.nodeType&&b.find.matchesSelector(n,e))){a.push(n);break}return this.pushStack(1<a.length?b.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?s.call(b(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(b.uniqueSort(b.merge(this.get(),b(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return F(e,"parentNode")},parentsUntil:function(e,t,n){return F(e,"parentNode",n)},next:function(e){return A(e,"nextSibling")},prev:function(e){return A(e,"previousSibling")},nextAll:function(e){return F(e,"nextSibling")},prevAll:function(e){return F(e,"previousSibling")},nextUntil:function(e,t,n){return F(e,"nextSibling",n)},prevUntil:function(e,t,n){return F(e,"previousSibling",n)},siblings:function(e){return C((e.parentNode||{}).firstChild,e)},children:function(e){return C(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(D(e,"template")&&(e=e.content||e),b.merge([],e.childNodes))}},(function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),1<this.length&&(O[e]||b.uniqueSort(i),M.test(e)&&i.reverse()),this.pushStack(i)}}));var j=/[^\x20\t\r\n\f]+/g;function _(e){return e}function H(e){throw e}function P(e,t,n,r){var i;try{e&&p(i=e.promise)?i.call(e).done(t).fail(n):e&&p(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}b.Callbacks=function(e){var t,n;e="string"==typeof e?(t=e,n={},b.each(t.match(j)||[],(function(e,t){n[t]=!0})),n):b.extend({},e);var r,i,a,o,s=[],u=[],l=-1,c=function(){for(o=o||e.once,a=r=!0;u.length;l=-1)for(i=u.shift();++l<s.length;)!1===s[l].apply(i[0],i[1])&&e.stopOnFalse&&(l=s.length,i=!1);e.memory||(i=!1),r=!1,o&&(s=i?[]:"")},d={add:function(){return s&&(i&&!r&&(l=s.length-1,u.push(i)),function t(n){b.each(n,(function(n,r){p(r)?e.unique&&d.has(r)||s.push(r):r&&r.length&&"string"!==w(r)&&t(r)}))}(arguments),i&&!r&&c()),this},remove:function(){return b.each(arguments,(function(e,t){for(var n;-1<(n=b.inArray(t,s,n));)s.splice(n,1),n<=l&&l--})),this},has:function(e){return e?-1<b.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return o=u=[],s=i="",this},disabled:function(){return!s},lock:function(){return o=u=[],i||r||(s=i=""),this},locked:function(){return!!o},fireWith:function(e,t){return o||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),r||c()),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!a}};return d},b.extend({Deferred:function(t){var n=[["notify","progress",b.Callbacks("memory"),b.Callbacks("memory"),2],["resolve","done",b.Callbacks("once memory"),b.Callbacks("once memory"),0,"resolved"],["reject","fail",b.Callbacks("once memory"),b.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 b.Deferred((function(t){b.each(n,(function(n,r){var i=p(e[r[4]])&&e[r[4]];a[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&p(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,p(l)?i?l.call(e,o(a,n,_,i),o(a,n,H,i)):(a++,l.call(e,o(a,n,_,i),o(a,n,H,i),o(a,n,_,n.notifyWith))):(r!==_&&(s=void 0,u=[e]),(i||n.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(e){b.Deferred.exceptionHook&&b.Deferred.exceptionHook(e,c.stackTrace),a<=t+1&&(r!==H&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(b.Deferred.getStackHook&&(c.stackTrace=b.Deferred.getStackHook()),e.setTimeout(c))}}return b.Deferred((function(e){n[0][3].add(o(0,e,p(i)?i:_,e.notifyWith)),n[1][3].add(o(0,e,p(t)?t:_)),n[2][3].add(o(0,e,p(r)?r:H))})).promise()},promise:function(e){return null!=e?b.extend(e,i):i}},a={};return b.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=b.Deferred(),s=function(e){return function(n){r[e]=this,a[e]=1<arguments.length?i.call(arguments):n,--t||o.resolveWith(r,a)}};if(t<=1&&(P(e,o.done(s(n)).resolve,o.reject,!t),"pending"===o.state()||p(a[n]&&a[n].then)))return o.then();for(;n--;)P(a[n],s(n),o.reject);return o.promise()}});var R=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;b.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&R.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},b.readyException=function(t){e.setTimeout((function(){throw t}))};var q=b.Deferred();function z(){g.removeEventListener("DOMContentLoaded",z),e.removeEventListener("load",z),b.ready()}b.fn.ready=function(e){return q.then(e).catch((function(e){b.readyException(e)})),this},b.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--b.readyWait:b.isReady)||(b.isReady=!0)!==e&&0<--b.readyWait||q.resolveWith(g,[b])}}),b.ready.then=q.then,"complete"===g.readyState||"loading"!==g.readyState&&!g.documentElement.doScroll?e.setTimeout(b.ready):(g.addEventListener("DOMContentLoaded",z),e.addEventListener("load",z));var V=function(e,t,n,r,i,a,o){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)V(e,t,s,n[s],!0,a,o);else if(void 0!==r&&(i=!0,p(r)||(o=!0),l&&(o?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(b(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},W=/^-ms-/,U=/-([a-z])/g;function B(e,t){return t.toUpperCase()}function Z(e){return e.replace(W,"ms-").replace(U,B)}var G=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function $(){this.expando=b.expando+$.uid++}$.uid=1,$.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(j)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||b.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&&!b.isEmptyObject(t)}};var Y=new $,J=new $,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function K(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Q,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:X.test(i)?JSON.parse(i):i)}catch(e){}J.set(e,t,n)}else n=void 0;return n}b.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)}}),b.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)})):V(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,1<arguments.length,null,!0)},removeData:function(e){return this.each((function(){J.remove(this,e)}))}}),b.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,b.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),a=b._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete a.stop,i.call(e,(function(){b.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:b.Callbacks("once memory").add((function(){Y.remove(e,[t+"queue",n])}))})}}),b.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?b.queue(this[0],e):void 0===t?this:this.each((function(){var n=b.queue(this,e,t);b._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&b.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){b.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=b.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 b.contains(e.ownerDocument,e)},ae={composed:!0};re.getRootNode&&(ie=function(e){return b.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"===b.css(e,"display")};function se(e,t,n,r){var i,a,o=20,s=r?function(){return r.cur()}:function(){return b.css(e,t,"")},u=s(),l=n&&n[3]||(b.cssNumber[t]?"":"px"),c=e.nodeType&&(b.cssNumber[t]||"px"!==l&&+u)&&te.exec(b.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;o--;)b.style(e,t,c+l),(1-a)*(1-(a=s()/u||.5))<=0&&(o=0),c/=a;c*=2,b.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,t){for(var n,r,i,a,o,s,u,l=[],c=0,d=e.length;c<d;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&oe(r)&&(l[c]=(u=o=a=void 0,o=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(a=o.body.appendChild(o.createElement(s)),u=b.css(a,"display"),a.parentNode.removeChild(a),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<d;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}b.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){oe(this)?b(this).show():b(this).hide()}))}});var ce,de,fe=/^(?:checkbox|radio)$/i,he=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,pe=/^$|^module$|\/(?:java|ecma)script/i;ce=g.createDocumentFragment().appendChild(g.createElement("div")),(de=g.createElement("input")).setAttribute("type","radio"),de.setAttribute("checked","checked"),de.setAttribute("name","t"),ce.appendChild(de),h.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",h.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",h.option=!!ce.lastChild;var me={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ge(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&D(e,t)?b.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}me.tbody=me.tfoot=me.colgroup=me.caption=me.thead,me.th=me.td,h.option||(me.optgroup=me.option=[1,"<select multiple='multiple'>","</select>"]);var ve=/<|&#?\w+;/;function we(e,t,n,r,i){for(var a,o,s,u,l,c,d=t.createDocumentFragment(),f=[],h=0,p=e.length;h<p;h++)if((a=e[h])||0===a)if("object"===w(a))b.merge(f,a.nodeType?[a]:a);else if(ve.test(a)){for(o=o||d.appendChild(t.createElement("div")),s=(he.exec(a)||["",""])[1].toLowerCase(),u=me[s]||me._default,o.innerHTML=u[1]+b.htmlPrefilter(a)+u[2],c=u[0];c--;)o=o.lastChild;b.merge(f,o.childNodes),(o=d.firstChild).textContent=""}else f.push(t.createTextNode(a));for(d.textContent="",h=0;a=f[h++];)if(r&&-1<b.inArray(a,r))i&&i.push(a);else if(l=ie(a),o=ge(d.appendChild(a),"script"),l&&ye(o),n)for(c=0;a=o[c++];)pe.test(a.type||"")&&n.push(a);return d}var xe=/^key/,be=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Se=/^([^.]*)(?:\.(.+)|)/;function Te(){return!0}function Fe(){return!1}function Ce(e,t){return e===function(){try{return g.activeElement}catch(e){}}()==("focus"===t)}function ke(e,t,n,r,i,a){var o,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)ke(e,s,n,r,t[s],a);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Fe;else if(!i)return e;return 1===a&&(o=i,(i=function(e){return b().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=b.guid++)),e.each((function(){b.event.add(this,t,i,r,n)}))}function De(e,t,n){n?(Y.set(e,t,!1),b.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)(b.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.value}else o.length&&(Y.set(this,t,{value:b.event.trigger(b.extend(o[0],b.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,t)&&b.event.add(e,t,Te)}b.event={global:{},add:function(e,t,n,r,i){var a,o,s,u,l,c,d,f,h,p,m,g=Y.get(e);if(G(e))for(n.handler&&(n=(a=n).handler,i=a.selector),i&&b.find.matchesSelector(re,i),n.guid||(n.guid=b.guid++),(u=g.events)||(u=g.events=Object.create(null)),(o=g.handle)||(o=g.handle=function(t){return void 0!==b&&b.event.triggered!==t.type?b.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(j)||[""]).length;l--;)h=m=(s=Se.exec(t[l])||[])[1],p=(s[2]||"").split(".").sort(),h&&(d=b.event.special[h]||{},h=(i?d.delegateType:d.bindType)||h,d=b.event.special[h]||{},c=b.extend({type:h,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&b.expr.match.needsContext.test(i),namespace:p.join(".")},a),(f=u[h])||((f=u[h]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,p,o)||e.addEventListener&&e.addEventListener(h,o)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,c):f.push(c),b.event.global[h]=!0)},remove:function(e,t,n,r,i){var a,o,s,u,l,c,d,f,h,p,m,g=Y.hasData(e)&&Y.get(e);if(g&&(u=g.events)){for(l=(t=(t||"").match(j)||[""]).length;l--;)if(h=m=(s=Se.exec(t[l])||[])[1],p=(s[2]||"").split(".").sort(),h){for(d=b.event.special[h]||{},f=u[h=(r?d.delegateType:d.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=f.length;a--;)c=f[a],!i&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(a,1),c.selector&&f.delegateCount--,d.remove&&d.remove.call(e,c));o&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,p,g.handle)||b.removeEvent(e,h,g.handle),delete u[h])}else for(h in u)b.event.remove(e,h+t[l],n,r,!0);b.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,a,o,s=new Array(arguments.length),u=b.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=b.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=b.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=((b.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&&1<=e.button))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?-1<b(i,this).index(l):b.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(b.Event.prototype,e,{enumerable:!0,configurable:!0,get:p(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[b.expando]?e:new b.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return fe.test(t.type)&&t.click&&D(t,"input")&&De(t,"click",Te),!1},trigger:function(e){var t=this||e;return fe.test(t.type)&&t.click&&D(t,"input")&&De(t,"click"),!0},_default:function(e){var t=e.target;return fe.test(t.type)&&t.click&&D(t,"input")&&Y.get(t,"click")||D(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},b.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},b.Event=function(e,t){if(!(this instanceof b.Event))return new b.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Te:Fe,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&&b.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[b.expando]=!0},b.Event.prototype={constructor:b.Event,isDefaultPrevented:Fe,isPropagationStopped:Fe,isImmediatePropagationStopped:Fe,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Te,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Te,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Te,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},b.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&xe.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&be.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},b.event.addProp),b.each({focus:"focusin",blur:"focusout"},(function(e,t){b.event.special[e]={setup:function(){return De(this,e,Ce),!1},trigger:function(){return De(this,e),!0},delegateType:t}})),b.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,i=e.handleObj;return r&&(r===this||b.contains(this,r))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}})),b.fn.extend({on:function(e,t,n,r){return ke(this,e,t,n,r)},one:function(e,t,n,r){return ke(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,b(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=Fe),this.each((function(){b.event.remove(this,e,n,t)}))}});var Ie=/<script|<style|<link/i,Ne=/checked\s*(?:[^=]|=\s*.checked.)/i,Ee=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Le(e,t){return D(e,"table")&&D(11!==t.nodeType?t:t.firstChild,"tr")&&b(e).children("tbody")[0]||e}function Me(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ae(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++)b.event.add(t,i,s[i][n]);J.hasData(e)&&(a=J.access(e),o=b.extend({},a),J.set(t,o))}}function je(e,t,n,r){t=a(t);var i,o,s,u,l,c,d=0,f=e.length,m=f-1,g=t[0],y=p(g);if(y||1<f&&"string"==typeof g&&!h.checkClone&&Ne.test(g))return e.each((function(i){var a=e.eq(i);y&&(t[0]=g.call(this,i,a.html())),je(a,t,n,r)}));if(f&&(o=(i=we(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=b.map(ge(i,"script"),Me)).length;d<f;d++)l=i,d!==m&&(l=b.clone(l,!0,!0),u&&b.merge(s,ge(l,"script"))),n.call(e[d],l,d);if(u)for(c=s[s.length-1].ownerDocument,b.map(s,Oe),d=0;d<u;d++)l=s[d],pe.test(l.type||"")&&!Y.access(l,"globalEval")&&b.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?b._evalUrl&&!l.noModule&&b._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},c):v(l.textContent.replace(Ee,""),l,c))}return e}function _e(e,t,n){for(var r,i=t?b.filter(t,e):e,a=0;null!=(r=i[a]);a++)n||1!==r.nodeType||b.cleanData(ge(r)),r.parentNode&&(n&&ie(r)&&ye(ge(r,"script")),r.parentNode.removeChild(r));return e}b.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,a,o,s,u,l,c=e.cloneNode(!0),d=ie(e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(o=ge(c),r=0,i=(a=ge(e)).length;r<i;r++)s=a[r],"input"===(l=(u=o[r]).nodeName.toLowerCase())&&fe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(a=a||ge(e),o=o||ge(c),r=0,i=a.length;r<i;r++)Ae(a[r],o[r]);else Ae(e,c);return 0<(o=ge(c,"script")).length&&ye(o,!d&&ge(e,"script")),c},cleanData:function(e){for(var t,n,r,i=b.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]?b.event.remove(n,r):b.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),b.fn.extend({detach:function(e){return _e(this,e,!0)},remove:function(e){return _e(this,e)},text:function(e){return V(this,(function(e){return void 0===e?b.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 je(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)}))},prepend:function(){return je(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return je(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return je(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&&(b.cleanData(ge(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return b.clone(this,e,t)}))},html:function(e){return V(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&&!Ie.test(e)&&!me[(he.exec(e)||["",""])[1].toLowerCase()]){e=b.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(b.cleanData(ge(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return je(this,arguments,(function(t){var n=this.parentNode;b.inArray(this,e)<0&&(b.cleanData(ge(this)),n&&n.replaceChild(t,this))}),e)}}),b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){b.fn[e]=function(e){for(var n,r=[],i=b(e),a=i.length-1,s=0;s<=a;s++)n=s===a?this:this.clone(!0),b(i[s])[t](n),o.apply(r,n.get());return this.pushStack(r)}}));var He=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Pe=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Re=function(e,t,n){var r,i,a={};for(i in t)a[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=a[i];return r},qe=new RegExp(ne.join("|"),"i");function ze(e,t,n){var r,i,a,o,s=e.style;return(n=n||Pe(e))&&(""!==(o=n.getPropertyValue(t)||n[t])||ie(e)||(o=b.style(e,t)),!h.pixelBoxStyles()&&He.test(o)&&qe.test(t)&&(r=s.width,i=s.minWidth,a=s.maxWidth,s.minWidth=s.maxWidth=s.width=o,o=n.width,s.width=r,s.minWidth=i,s.maxWidth=a)),void 0!==o?o+"":o}function Ve(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,b.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",n.style.height="1px",r.style.height="9px",re.appendChild(t).appendChild(n).appendChild(r),i=e.getComputedStyle(n),s=3<parseInt(i.height),re.removeChild(t)),s}}))}();var We=["Webkit","Moz","ms"],Ue=g.createElement("div").style,Be={};function Ze(e){return b.cssProps[e]||Be[e]||(e in Ue?e:Be[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=We.length;n--;)if((e=We[n]+t)in Ue)return e}(e)||e)}var Ge=/^(none|table(?!-c[ea]).+)/,$e=/^--/,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 Qe(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+=b.css(e,n+ne[o],!0,i)),r?("content"===n&&(u-=b.css(e,"padding"+ne[o],!0,i)),"margin"!==n&&(u-=b.css(e,"border"+ne[o]+"Width",!0,i))):(u+=b.css(e,"padding"+ne[o],!0,i),"padding"!==n?u+=b.css(e,"border"+ne[o]+"Width",!0,i):s+=b.css(e,"border"+ne[o]+"Width",!0,i));return!r&&0<=a&&(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=Pe(e),i=(!h.boxSizingReliable()||n)&&"border-box"===b.css(e,"boxSizing",!1,r),a=i,o=ze(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(He.test(o)){if(!n)return o;o="auto"}return(!h.boxSizingReliable()&&i||!h.reliableTrDimensions()&&D(e,"tr")||"auto"===o||!parseFloat(o)&&"inline"===b.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===b.css(e,"boxSizing",!1,r),(a=s in e)&&(o=e[s])),(o=parseFloat(o)||0)+Qe(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)}b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=ze(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=$e.test(t),l=e.style;if(u||(t=Ze(s)),o=b.cssHooks[t]||b.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]||(b.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 $e.test(t)||(t=Ze(s)),(o=b.cssHooks[t]||b.cssHooks[s])&&"get"in o&&(i=o.get(e,!0,n)),void 0===i&&(i=ze(e,t,r)),"normal"===i&&t in Je&&(i=Je[t]),""===n||n?(a=parseFloat(i),!0===n||isFinite(a)?a||0:i):i}}),b.each(["height","width"],(function(e,t){b.cssHooks[t]={get:function(e,n,r){if(n)return!Ge.test(b.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ke(e,t,r):Re(e,Ye,(function(){return Ke(e,t,r)}))},set:function(e,n,r){var i,a=Pe(e),o=!h.scrollboxSize()&&"absolute"===a.position,s=(o||r)&&"border-box"===b.css(e,"boxSizing",!1,a),u=r?Qe(e,t,r,s,a):0;return s&&o&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(a[t])-Qe(e,t,"border",!1,a)-.5)),u&&(i=te.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=b.css(e,t)),Xe(0,n,u)}}})),b.cssHooks.marginLeft=Ve(h.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(ze(e,"marginLeft"))||e.getBoundingClientRect().left-Re(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),b.each({margin:"",padding:"",border:"Width"},(function(e,t){b.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&&(b.cssHooks[e+t].set=Xe)})),b.fn.extend({css:function(e,t){return V(this,(function(e,t,n){var r,i,a={},o=0;if(Array.isArray(t)){for(r=Pe(e),i=t.length;o<i;o++)a[t[o]]=b.css(e,t[o],!1,r);return a}return void 0!==n?b.style(e,t,n):b.css(e,t)}),e,t,1<arguments.length)}}),((b.Tween=et).prototype={constructor:et,init:function(e,t,n,r,i,a){this.elem=e,this.prop=n,this.easing=i||b.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=a||(b.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=b.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}}).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=b.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):1!==e.elem.nodeType||!b.cssHooks[e.prop]&&null==e.elem.style[Ze(e.prop)]?e.elem[e.prop]=e.now:b.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},b.fx=et.prototype.init,b.fx.step={};var tt,nt,rt,it,at=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function st(){nt&&(!1===g.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(st):e.setTimeout(st,b.fx.interval),b.fx.tick())}function ut(){return e.setTimeout((function(){tt=void 0})),tt=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var r,i=(dt.tweeners[t]||[]).concat(dt.tweeners["*"]),a=0,o=i.length;a<o;a++)if(r=i[a].call(n,t,e))return r}function dt(e,t,n){var r,i,a=0,o=dt.prefilters.length,s=b.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var t=tt||ut(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),a=0,o=l.tweens.length;a<o;a++)l.tweens[a].run(r);return s.notifyWith(e,[l,r,n]),r<1&&o?n:(o||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{},easing:b.easing._default},n),originalProperties:t,originalOptions:n,startTime:tt||ut(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.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=b.cssHooks[r])&&"expand"in o)for(n in a=o.expand(a),delete e[r],a)n in e||(e[n]=a[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);a<o;a++)if(r=dt.prefilters[a].call(l,e,c,l.opts))return p(r.stop)&&(b._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return b.map(c,ct,l),p(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),b.fx.timer(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}b.Animation=b.extend(dt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){p(e)?(t=e,e=["*"]):e=e.match(j);for(var n,r=0,i=e.length;r<i;r++)n=e[r],dt.tweeners[n]=dt.tweeners[n]||[],dt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,a,o,s,u,l,c,d="width"in t||"height"in t,f=this,h={},p=e.style,m=e.nodeType&&oe(e),g=Y.get(e,"fxshow");for(r in n.queue||(null==(o=b._queueHooks(e,"fx")).unqueued&&(o.unqueued=0,s=o.empty.fire,o.empty.fire=function(){o.unqueued||s()}),o.unqueued++,f.always((function(){f.always((function(){o.unqueued--,b.queue(e,"fx").length||o.empty.fire()}))}))),t)if(i=t[r],at.test(i)){if(delete t[r],a=a||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!g||void 0===g[r])continue;m=!0}h[r]=g&&g[r]||b.style(e,r)}if((u=!b.isEmptyObject(t))||!b.isEmptyObject(h))for(r in d&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(l=g&&g.display)&&(l=Y.get(e,"display")),"none"===(c=b.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=b.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===b.css(e,"float")&&(u||(f.done((function(){p.display=l})),null==l&&(c=p.display,l="none"===c?"":c)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",f.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),u=!1,h)u||(g?"hidden"in g&&(m=g.hidden):g=Y.access(e,"fxshow",{display:l}),a&&(g.hidden=!m),m&&le([e],!0),f.done((function(){for(r in m||le([e]),Y.remove(e,"fxshow"),h)b.style(e,r,h[r])}))),u=ct(m?g[r]:0,r,f),r in g||(g[r]=u.start,m&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?dt.prefilters.unshift(e):dt.prefilters.push(e)}}),b.speed=function(e,t,n){var r=e&&"object"==typeof e?b.extend({},e):{complete:n||!n&&t||p(e)&&e,duration:e,easing:n&&t||t&&!p(t)&&t};return b.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in b.fx.speeds?r.duration=b.fx.speeds[r.duration]:r.duration=b.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){p(r.old)&&r.old.call(this),r.queue&&b.dequeue(this,r.queue)},r},b.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=b.isEmptyObject(e),a=b.speed(t,n,r),o=function(){var t=dt(this,b.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=b.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&&ot.test(i)&&r(o[i]);for(i=a.length;i--;)a[i].elem!==this||null!=e&&a[i].queue!==e||(a[i].anim.stop(n),t=!1,a.splice(i,1));!t&&n||b.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=b.timers,o=r?r.length:0;for(n.finish=!0,b.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}))}}),b.each(["toggle","show","hide"],(function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(lt(t,!0),e,r,i)}})),b.each({slideDown:lt("show"),slideUp:lt("hide"),slideToggle:lt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),b.timers=[],b.fx.tick=function(){var e,t=0,n=b.timers;for(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||b.fx.stop(),tt=void 0},b.fx.timer=function(e){b.timers.push(e),b.fx.start()},b.fx.interval=13,b.fx.start=function(){nt||(nt=!0,st())},b.fx.stop=function(){nt=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fn.delay=function(t,n){return t=b.fx&&b.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)}}))},rt=g.createElement("input"),it=g.createElement("select").appendChild(g.createElement("option")),rt.type="checkbox",h.checkOn=""!==rt.value,h.optSelected=it.selected,(rt=g.createElement("input")).value="t",rt.type="radio",h.radioValue="t"===rt.value;var ft,ht=b.expr.attrHandle;b.fn.extend({attr:function(e,t){return V(this,b.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each((function(){b.removeAttr(this,e)}))}}),b.extend({attr:function(e,t,n){var r,i,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===e.getAttribute?b.prop(e,t,n):(1===a&&b.isXMLDoc(e)||(i=b.attrHooks[t.toLowerCase()]||(b.expr.match.bool.test(t)?ft:void 0)),void 0!==n?null===n?void b.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=b.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&D(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(j);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),ft={set:function(e,t,n){return!1===t?b.removeAttr(e,n):e.setAttribute(n,n),n}},b.each(b.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=ht[t]||b.find.attr;ht[t]=function(e,t,r){var i,a,o=t.toLowerCase();return r||(a=ht[o],ht[o]=i,i=null!=n(e,t,r)?o:null,ht[o]=a),i}}));var pt=/^(?:input|select|textarea|button)$/i,mt=/^(?:a|area)$/i;function gt(e){return(e.match(j)||[]).join(" ")}function yt(e){return e.getAttribute&&e.getAttribute("class")||""}function vt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(j)||[]}b.fn.extend({prop:function(e,t){return V(this,b.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each((function(){delete this[b.propFix[e]||e]}))}}),b.extend({prop:function(e,t,n){var r,i,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&b.isXMLDoc(e)||(t=b.propFix[t]||t,i=b.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=b.find.attr(e,"tabindex");return t?parseInt(t,10):pt.test(e.nodeName)||mt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),h.optSelected||(b.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)}}),b.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){b.propFix[this.toLowerCase()]=this})),b.fn.extend({addClass:function(e){var t,n,r,i,a,o,s,u=0;if(p(e))return this.each((function(t){b(this).addClass(e.call(this,t,yt(this)))}));if((t=vt(e)).length)for(;n=this[u++];)if(i=yt(n),r=1===n.nodeType&&" "+gt(i)+" "){for(o=0;a=t[o++];)r.indexOf(" "+a+" ")<0&&(r+=a+" ");i!==(s=gt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,a,o,s,u=0;if(p(e))return this.each((function(t){b(this).removeClass(e.call(this,t,yt(this)))}));if(!arguments.length)return this.attr("class","");if((t=vt(e)).length)for(;n=this[u++];)if(i=yt(n),r=1===n.nodeType&&" "+gt(i)+" "){for(o=0;a=t[o++];)for(;-1<r.indexOf(" "+a+" ");)r=r.replace(" "+a+" "," ");i!==(s=gt(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):p(e)?this.each((function(n){b(this).toggleClass(e.call(this,n,yt(this),t),t)})):this.each((function(){var t,i,a,o;if(r)for(i=0,a=b(this),o=vt(e);t=o[i++];)a.hasClass(t)?a.removeClass(t):a.addClass(t);else void 0!==e&&"boolean"!==n||((t=yt(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&&-1<(" "+gt(yt(n))+" ").indexOf(t))return!0;return!1}});var wt=/\r/g;b.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=p(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,b(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=b.map(i,(function(e){return null==e?"":e+""}))),(t=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=b.valHooks[i.type]||b.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(wt,""):null==n?"":n:void 0}}),b.extend({valHooks:{option:{get:function(e){var t=b.find.attr(e,"value");return null!=t?t:gt(b.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||!D(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,a=b.makeArray(t),o=i.length;o--;)((r=i[o]).selected=-1<b.inArray(b.valHooks.option.get(r),a))&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),b.each(["radio","checkbox"],(function(){b.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<b.inArray(b(e).val(),t)}},h.checkOn||(b.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),h.focusin="onfocusin"in e;var xt=/^(?:focusinfocus|focusoutblur)$/,bt=function(e){e.stopPropagation()};b.extend(b.event,{trigger:function(t,n,r,i){var a,o,s,u,l,d,f,h,y=[r||g],v=c.call(t,"type")?t.type:t,w=c.call(t,"namespace")?t.namespace.split("."):[];if(o=h=s=r=r||g,3!==r.nodeType&&8!==r.nodeType&&!xt.test(v+b.event.triggered)&&(-1<v.indexOf(".")&&(v=(w=v.split(".")).shift(),w.sort()),l=v.indexOf(":")<0&&"on"+v,(t=t[b.expando]?t:new b.Event(v,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=w.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+w.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:b.makeArray(n,[t]),f=b.event.special[v]||{},i||!f.trigger||!1!==f.trigger.apply(r,n))){if(!i&&!f.noBubble&&!m(r)){for(u=f.delegateType||v,xt.test(u+v)||(o=o.parentNode);o;o=o.parentNode)y.push(o),s=o;s===(r.ownerDocument||g)&&y.push(s.defaultView||s.parentWindow||e)}for(a=0;(o=y[a++])&&!t.isPropagationStopped();)h=o,t.type=1<a?u:f.bindType||v,(d=(Y.get(o,"events")||Object.create(null))[t.type]&&Y.get(o,"handle"))&&d.apply(o,n),(d=l&&o[l])&&d.apply&&G(o)&&(t.result=d.apply(o,n),!1===t.result&&t.preventDefault());return t.type=v,i||t.isDefaultPrevented()||f._default&&!1!==f._default.apply(y.pop(),n)||!G(r)||l&&p(r[v])&&!m(r)&&((s=r[l])&&(r[l]=null),b.event.triggered=v,t.isPropagationStopped()&&h.addEventListener(v,bt),r[v](),t.isPropagationStopped()&&h.removeEventListener(v,bt),b.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(e,t,n){var r=b.extend(new b.Event,n,{type:e,isSimulated:!0});b.event.trigger(r,null,t)}}),b.fn.extend({trigger:function(e,t){return this.each((function(){b.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return b.event.trigger(e,t,n,!0)}}),h.focusin||b.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){b.event.simulate(t,e.target,b.event.fix(e))};b.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 St=e.location,Tt={guid:Date.now()},Ft=/\?/;b.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(t){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+t),n};var Ct=/\[\]$/,kt=/\r?\n/g,Dt=/^(?:submit|button|image|reset|file)$/i,It=/^(?:input|select|textarea|keygen)/i;function Nt(e,t,n,r){var i;if(Array.isArray(t))b.each(t,(function(t,i){n||Ct.test(e)?r(e,i):Nt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==w(t))r(e,t);else for(i in t)Nt(e+"["+i+"]",t[i],n,r)}b.param=function(e,t){var n,r=[],i=function(e,t){var n=p(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,(function(){i(this.name,this.value)}));else for(n in e)Nt(n,e[n],t,i);return r.join("&")},b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&It.test(this.nodeName)&&!Dt.test(e)&&(this.checked||!fe.test(e))})).map((function(e,t){var n=b(this).val();return null==n?null:Array.isArray(n)?b.map(n,(function(e){return{name:t.name,value:e.replace(kt,"\r\n")}})):{name:t.name,value:n.replace(kt,"\r\n")}})).get()}});var Et=/%20/g,Lt=/#.*$/,Mt=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,At=/^(?:GET|HEAD)$/,jt=/^\/\//,_t={},Ht={},Pt="*/".concat("*"),Rt=g.createElement("a");function qt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,a=t.toLowerCase().match(j)||[];if(p(n))for(;r=a[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function zt(e,t,n,r){var i={},a=e===Ht;function o(s){var u;return i[s]=!0,b.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 Vt(e,t){var n,r,i=b.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&b.extend(!0,e,r),e}Rt.href=St.href,b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:St.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(St.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Pt,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":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Vt(Vt(e,b.ajaxSettings),t):Vt(b.ajaxSettings,e)},ajaxPrefilter:qt(_t),ajaxTransport:qt(Ht),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var r,i,a,o,s,u,l,c,d,f,h=b.ajaxSetup({},n),p=h.context||h,m=h.context&&(p.nodeType||p.jquery)?b(p):b.event,y=b.Deferred(),v=b.Callbacks("once memory"),w=h.statusCode||{},x={},S={},T="canceled",F={readyState:0,getResponseHeader:function(e){var t;if(l){if(!o)for(o={};t=Ot.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=S[e.toLowerCase()]=S[e.toLowerCase()]||e,x[e]=t),this},overrideMimeType:function(e){return null==l&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)F.always(e[F.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||T;return r&&r.abort(t),C(0,t),this}};if(y.promise(F),h.url=((t||h.url||St.href)+"").replace(jt,St.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(j)||[""],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(t){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=b.param(h.data,h.traditional)),zt(_t,h,n,F),l)return F;for(d in(c=b.event&&h.global)&&0==b.active++&&b.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!At.test(h.type),i=h.url.replace(Lt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Et,"+")):(f=h.url.slice(i.length),h.data&&(h.processData||"string"==typeof h.data)&&(i+=(Ft.test(i)?"&":"?")+h.data,delete h.data),!1===h.cache&&(i=i.replace(Mt,"$1"),f=(Ft.test(i)?"&":"?")+"_="+Tt.guid+++f),h.url=i+f),h.ifModified&&(b.lastModified[i]&&F.setRequestHeader("If-Modified-Since",b.lastModified[i]),b.etag[i]&&F.setRequestHeader("If-None-Match",b.etag[i])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&F.setRequestHeader("Content-Type",h.contentType),F.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Pt+"; q=0.01":""):h.accepts["*"]),h.headers)F.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(!1===h.beforeSend.call(p,F,h)||l))return F.abort();if(T="abort",v.add(h.complete),F.done(h.success),F.fail(h.error),r=zt(Ht,h,n,F)){if(F.readyState=1,c&&m.trigger("ajaxSend",[F,h]),l)return F;h.async&&0<h.timeout&&(s=e.setTimeout((function(){F.abort("timeout")}),h.timeout));try{l=!1,r.send(x,C)}catch(t){if(l)throw t;C(-1,t)}}else C(-1,"No Transport");function C(t,n,o,u){var d,f,g,x,S,T=n;l||(l=!0,s&&e.clearTimeout(s),r=void 0,a=u||"",F.readyState=0<t?4:0,d=200<=t&&t<300||304===t,o&&(x=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,F,o)),!d&&-1<b.inArray("script",h.dataTypes)&&(h.converters["text script"]=function(){}),x=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,x,F,d),d?(h.ifModified&&((S=F.getResponseHeader("Last-Modified"))&&(b.lastModified[i]=S),(S=F.getResponseHeader("etag"))&&(b.etag[i]=S)),204===t||"HEAD"===h.type?T="nocontent":304===t?T="notmodified":(T=x.state,f=x.data,d=!(g=x.error))):(g=T,!t&&T||(T="error",t<0&&(t=0))),F.status=t,F.statusText=(n||T)+"",d?y.resolveWith(p,[f,T,F]):y.rejectWith(p,[F,T,g]),F.statusCode(w),w=void 0,c&&m.trigger(d?"ajaxSuccess":"ajaxError",[F,h,d?f:g]),v.fireWith(p,[F,T]),c&&(m.trigger("ajaxComplete",[F,h]),--b.active||b.event.trigger("ajaxStop")))}return F},getJSON:function(e,t,n){return b.get(e,t,n,"json")},getScript:function(e,t){return b.get(e,void 0,t,"script")}}),b.each(["get","post"],(function(e,t){b[t]=function(e,n,r,i){return p(n)&&(i=i||r,r=n,n=void 0),b.ajax(b.extend({url:e,type:t,dataType:i,data:n,success:r},b.isPlainObject(e)&&e))}})),b.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),b._evalUrl=function(e,t,n){return b.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){b.globalEval(e,t,n)}})},b.fn.extend({wrapAll:function(e){var t;return this[0]&&(p(e)&&(e=e.call(this[0])),t=b(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 p(e)?this.each((function(t){b(this).wrapInner(e.call(this,t))})):this.each((function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=p(e);return this.each((function(n){b(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){b(this).replaceWith(this.childNodes)})),this}}),b.expr.pseudos.hidden=function(e){return!b.expr.pseudos.visible(e)},b.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},b.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Wt={0:200,1223:204},Ut=b.ajaxSettings.xhr();h.cors=!!Ut&&"withCredentials"in Ut,h.ajax=Ut=!!Ut,b.ajaxTransport((function(t){var n,r;if(h.cors||Ut&&!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(i){if(n)throw i}},abort:function(){n&&n()}}})),b.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),b.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 b.globalEval(e),e}}}),b.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),b.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=b("<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 Bt,Zt=[],Gt=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Zt.pop()||b.expando+"_"+Tt.guid++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",(function(t,n,r){var i,a,o,s=!1!==t.jsonp&&(Gt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=p(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Gt,"$1"+i):!1!==t.jsonp&&(t.url+=(Ft.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return o||b.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?b(e).removeProp(i):e[i]=a,t[i]&&(t.jsonpCallback=n.jsonpCallback,Zt.push(i)),o&&p(a)&&a(o[0]),o=a=void 0})),"script"})),h.createHTMLDocument=((Bt=g.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Bt.childNodes.length),b.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=I.exec(e))?[t.createElement(i[1])]:(i=we([e],t,a),a&&a.length&&b(a).remove(),b.merge([],i.childNodes)));var r,i,a},b.fn.load=function(e,t,n){var r,i,a,o=this,s=e.indexOf(" ");return-1<s&&(r=gt(e.slice(s)),e=e.slice(0,s)),p(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<o.length&&b.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){a=arguments,o.html(r?b("<div>").append(b.parseHTML(e)).find(r):e)})).always(n&&function(e,t){o.each((function(){n.apply(this,a||[e.responseText,t,e])}))}),this},b.expr.pseudos.animated=function(e){return b.grep(b.timers,(function(t){return e===t.elem})).length},b.offset={setOffset:function(e,t,n){var r,i,a,o,s,u,l=b.css(e,"position"),c=b(e),d={};"static"===l&&(e.style.position="relative"),s=c.offset(),a=b.css(e,"top"),u=b.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(a+u).indexOf("auto")?(o=(r=c.position()).top,i=r.left):(o=parseFloat(a)||0,i=parseFloat(u)||0),p(t)&&(t=t.call(e,n,b.extend({},s))),null!=t.top&&(d.top=t.top-s.top+o),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):("number"==typeof d.top&&(d.top+="px"),"number"==typeof d.left&&(d.left+="px"),c.css(d))}},b.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){b.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"===b.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"===b.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=b(e).offset()).top+=b.css(e,"borderTopWidth",!0),i.left+=b.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-b.css(r,"marginTop",!0),left:t.left-i.left-b.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===b.css(e,"position");)e=e.offsetParent;return e||re}))}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;b.fn[e]=function(r){return V(this,(function(e,r,i){var a;if(m(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)}})),b.each(["top","left"],(function(e,t){b.cssHooks[t]=Ve(h.pixelPosition,(function(e,n){if(n)return n=ze(e,t),He.test(n)?b(e).position()[t]+"px":n}))})),b.each({Height:"height",Width:"width"},(function(e,t){b.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){b.fn[r]=function(i,a){var o=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===a?"margin":"border");return V(this,(function(t,n,i){var a;return m(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?b.css(t,n,s):b.style(t,n,i,s)}),t,o?i:void 0,o)}}))})),b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){b.fn[t]=function(e){return this.on(t,e)}})),b.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)}}),b.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){b.fn[t]=function(e,n){return 0<arguments.length?this.on(t,null,e,n):this.trigger(t)}}));var $t=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;b.proxy=function(e,t){var n,r,a;if("string"==typeof t&&(n=e[t],t=e,e=n),p(e))return r=i.call(arguments,2),(a=function(){return e.apply(t||this,r.concat(i.call(arguments)))}).guid=e.guid=e.guid||b.guid++,a},b.holdReady=function(e){e?b.readyWait++:b.ready(!0)},b.isArray=Array.isArray,b.parseJSON=JSON.parse,b.nodeName=D,b.isFunction=p,b.isWindow=m,b.camelCase=Z,b.type=w,b.now=Date.now,b.isNumeric=function(e){var t=b.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},b.trim=function(e){return null==e?"":(e+"").replace($t,"")},"function"==typeof define&&define.amd&&define("jquery",[],(function(){return b}));var Yt=e.jQuery,Jt=e.$;return b.noConflict=function(t){return e.$===b&&(e.$=Jt),t&&e.jQuery===b&&(e.jQuery=Yt),b},void 0===t&&(e.jQuery=e.$=b),b})),function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.SuperGif=t()}(this,(function(){var e=function(e){return e.reduce((function(e,t){return 2*e+t}),0)},t=function(e){for(var t=[],n=7;n>=0;n--)t.push(!!(e&1<<n));return t},n=function(e){this.data=e,this.len=this.data.length,this.pos=0,this.readByte=function(){if(this.pos>=this.data.length)throw new Error("Attempted to read past end of stream.");return e instanceof Uint8Array?e[this.pos++]:255&e.charCodeAt(this.pos++)},this.readBytes=function(e){for(var t=[],n=0;n<e;n++)t.push(this.readByte());return t},this.read=function(e){for(var t="",n=0;n<e;n++)t+=String.fromCharCode(this.readByte());return t},this.readUnsigned=function(){var e=this.readBytes(2);return(e[1]<<8)+e[0]}},r=function(n,r){r||(r={});var i=function(e){for(var t=[],r=0;r<e;r++)t.push(n.readBytes(3));return t},a=function(){var e,t;t="";do{e=n.readByte(),t+=n.read(e)}while(0!==e);return t},o=function(o){o.leftPos=n.readUnsigned(),o.topPos=n.readUnsigned(),o.width=n.readUnsigned(),o.height=n.readUnsigned();var s=t(n.readByte());o.lctFlag=s.shift(),o.interlaced=s.shift(),o.sorted=s.shift(),o.reserved=s.splice(0,2),o.lctSize=e(s.splice(0,3)),o.lctFlag&&(o.lct=i(1<<o.lctSize+1)),o.lzwMinCodeSize=n.readByte();var u=a();o.pixels=function(e,t){for(var n,r,i=0,a=function(e){for(var n=0,r=0;r<e;r++)t.charCodeAt(i>>3)&1<<(7&i)&&(n|=1<<r),i++;return n},o=[],s=1<<e,u=s+1,l=e+1,c=[],d=function(){c=[],l=e+1;for(var t=0;t<s;t++)c[t]=[t];c[s]=[],c[u]=null};;)if(r=n,(n=a(l))!==s){if(n===u)break;if(n<c.length)r!==s&&c.push(c[r].concat(c[n][0]));else{if(n!==c.length)throw new Error("Invalid LZW code.");c.push(c[r].concat(c[r][0]))}o.push.apply(o,c[n]),c.length===1<<l&&l<12&&l++}else d();return o}(o.lzwMinCodeSize,u),o.interlaced&&(o.pixels=function(e,t){for(var n=new Array(e.length),r=e.length/t,i=function(r,i){var a=e.slice(i*t,(i+1)*t);n.splice.apply(n,[r*t,t].concat(a))},a=[0,4,2,1],o=[8,8,4,2],s=0,u=0;u<4;u++)for(var l=a[u];l<r;l+=o[u])i(l,s),s++;return n}(o.pixels,o.width)),r.img&&r.img(o)},s=function(){var i={};switch(i.sentinel=n.readByte(),String.fromCharCode(i.sentinel)){case"!":i.type="ext",function(i){switch(i.label=n.readByte(),i.label){case 249:i.extType="gce",function(i){n.readByte();var a=t(n.readByte());i.reserved=a.splice(0,3),i.disposalMethod=e(a.splice(0,3)),i.userInput=a.shift(),i.transparencyGiven=a.shift(),i.delayTime=n.readUnsigned(),i.transparencyIndex=n.readByte(),i.terminator=n.readByte(),r.gce&&r.gce(i)}(i);break;case 254:i.extType="com",function(e){e.comment=a(),r.com&&r.com(e)}(i);break;case 1:i.extType="pte",function(e){n.readByte(),e.ptHeader=n.readBytes(12),e.ptData=a(),r.pte&&r.pte(e)}(i);break;case 255:i.extType="app",function(e){switch(n.readByte(),e.identifier=n.read(8),e.authCode=n.read(3),e.identifier){case"NETSCAPE":!function(e){n.readByte(),e.unknown=n.readByte(),e.iterations=n.readUnsigned(),e.terminator=n.readByte(),r.app&&r.app.NETSCAPE&&r.app.NETSCAPE(e)}(e);break;default:!function(e){e.appData=a(),r.app&&r.app[e.identifier]&&r.app[e.identifier](e)}(e)}}(i);break;default:i.extType="unknown",function(e){e.data=a(),r.unknown&&r.unknown(e)}(i)}}(i);break;case",":i.type="img",o(i);break;case";":i.type="eof",r.eof&&r.eof(i);break;default:throw new Error("Unknown block: 0x"+i.sentinel.toString(16))}"eof"!==i.type&&setTimeout(s,0)};!function(){var a={};if(a.sig=n.read(3),a.ver=n.read(3),"GIF"!==a.sig)throw new Error("Not a GIF file.");a.width=n.readUnsigned(),a.height=n.readUnsigned();var o=t(n.readByte());a.gctFlag=o.shift(),a.colorRes=e(o.splice(0,3)),a.sorted=o.shift(),a.gctSize=e(o.splice(0,3)),a.bgColor=n.readByte(),a.pixelAspectRatio=n.readByte(),a.gctFlag&&(a.gct=i(1<<a.gctSize+1)),r.hdr&&r.hdr(a)}(),setTimeout(s,0)};return function(e){var t,i,a={vp_l:0,vp_t:0,vp_w:null,vp_h:null,c_w:null,c_h:null};for(var o in e)a[o]=e[o];a.vp_w&&a.vp_h&&(a.is_vp=!0);var s=null,u=!1,l=null,c=null,d=null,f=null,h=null,p=null,m=null,g=!0,y=!1,v=[],w=[],x=a.src;a.gif||(a.gif=document.createElement("img"),a.gif.setAttribute("rel:animated_src",x),a.gif.src="");var b=a.gif;void 0===a.auto_play&&(a.auto_play=!b.getAttribute("rel:auto_play")||"1"==b.getAttribute("rel:auto_play"));var S,T,F,C,k=a.hasOwnProperty("on_end")?a.on_end:null,D=a.hasOwnProperty("loop_delay")?a.loop_delay:0,I=a.hasOwnProperty("loop_mode")?a.loop_mode:"auto",N=!a.hasOwnProperty("draw_while_loading")||a.draw_while_loading,E=!!N&&(!a.hasOwnProperty("show_progress_bar")||a.show_progress_bar),L=a.hasOwnProperty("progressbar_height")?a.progressbar_height:25,M=a.hasOwnProperty("progressbar_background_color")?a.progressbar_background_color:"rgba(255,255,255,0.4)",O=a.hasOwnProperty("progressbar_foreground_color")?a.progressbar_foreground_color:"rgba(255,0,22,.8)",A=function(){l=null,c=null,h=d,d=null,p=null},j=function(){try{r(t,U)}catch(e){P("parse")}},_=function(e,t){S.width=e*Z(),S.height=t*Z(),F.style.minWidth=e*Z()+"px",C.width=e,C.height=t,C.style.width=e+"px",C.style.height=t+"px",C.getContext("2d").setTransform(1,0,0,1,0,0)},H=function(e,t,n){if(n&&E){var r,i,o,s=L;if(a.is_vp)y?(i=(a.vp_t+a.vp_h-s)/Z(),s/=Z(),r=a.vp_l/Z()+e/t*(a.vp_w/Z()),o=S.width/Z()):(i=a.vp_t+a.vp_h-s,s=s,r=a.vp_l+e/t*a.vp_w,o=S.width);else i=(S.height-s)/(y?Z():1),r=e/t*S.width/(y?Z():1),o=S.width/(y?Z():1),s/=y?Z():1;T.fillStyle=M,T.fillRect(r,i,o-r,s),T.fillStyle=O,T.fillRect(0,i,r,s)}},P=function(e){s=e,i={width:b.width,height:b.height},v=[],T.fillStyle="black",T.fillRect(0,0,a.c_w?a.c_w:i.width,a.c_h?a.c_h:i.height),T.strokeStyle="red",T.lineWidth=3,T.moveTo(0,0),T.lineTo(a.c_w?a.c_w:i.width,a.c_h?a.c_h:i.height),T.moveTo(0,a.c_h?a.c_h:i.height),T.lineTo(a.c_w?a.c_w:i.width,0),T.stroke()},R=function(){p&&(v.push({data:p.getImageData(0,0,i.width,i.height),delay:c}),w.push({x:0,y:0}))},q=function(){var e,t,n,r=-1,i=0,o=function(e){r+=e,l()},u=(e=!1,t=function(){null!==k&&k(b),i++,!1!==I||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+=D,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=w[r],C.getContext("2d").putImageData(v[r].data,e.x,e.y),T.globalCompositeOperation="copy",T.drawImage(C,0,0),a.canvas.getContext("2d").drawImage(S,a.x,a.y)};return{init:function(){s||(a.c_w&&a.c_h||T.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()}}}(),z=function(e){H(t.pos,t.data.length,e)},V=function(){},W=function(e,t){return function(n){e(n),z(t)}},U={hdr:W((function(e){_((i=e).width,i.height)})),gce:W((function(e){R(),A(),l=e.transparencyGiven?e.transparencyIndex:null,c=e.delayTime,d=e.disposalMethod})),com:W(V),app:{NETSCAPE:W(V)},img:W((function(e){p||(p=C.getContext("2d"));var t=v.length,n=e.lctFlag?e.lct:i.gct;t>0&&(3===h?null!==f?p.putImageData(v[f].data,0,0):p.clearRect(m.leftPos,m.topPos,m.width,m.height):f=t-1,2===h&&p.clearRect(m.leftPos,m.topPos,m.width,m.height));var r=p.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)})),p.putImageData(r,e.leftPos,e.topPos),y||(T.scale(Z(),Z()),y=!0),N&&(T.drawImage(C,0,0),N=a.auto_play),m=e}),!0),eof:function(e){R(),z(!1),a.c_w&&a.c_h||(S.width=i.width*Z(),S.height=i.height*Z()),q.init(),u=!1,$&&$(b)}},B=function(){var e=b.parentNode,t=document.createElement("div");S=document.createElement("canvas"),T=S.getContext("2d"),F=document.createElement("div"),C=document.createElement("canvas"),t.width=S.width=b.width,t.height=S.height=b.height,F.style.minWidth=b.width+"px",t.className="jsgif",F.className="jsgif_toolbar",t.style.display="none",t.appendChild(S),t.appendChild(F),e&&(e.insertBefore(t,b),e.removeChild(b)),a.c_w&&a.c_h&&_(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,$=!1,Y=function(e){return!u&&($=e||!1,u=!0,v=[],A(),f=null,h=null,p=null,m=null,!0)};return{play:q.play,pause:q.pause,move_relative:q.move_relative,move_to:q.move_to,get_playing:function(){return g},get_canvas:function(){return S},get_canvas_scale:function(){return Z()},get_loading:function(){return u},get_auto_play:function(){return a.auto_play},get_length:function(){return q.length()},get_current_frame:function(){return q.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||B()},i.onload=function(e){200!=this.status&&P("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(j,0)},i.onprogress=function(e){e.lengthComputable&&H(e.loaded,e.total,!0)},i.onerror=function(){P("xhr")},i.send()}},load:function(e){this.load_url(b.getAttribute("rel:animated_src")||b.src,e)},load_raw:function(e,r){Y(r)&&(G||B(),t=new n(e),setTimeout(j,0))},set_frame_offset:function(e,t){w[e]?(void 0!==t.x&&(w[e].x=t.x),void 0!==t.y&&(w[e].y=t.y)):w[e]=t},getX:function(){return a.x},setX:function(e){a.x=e},getY:function(){return a.y},setY:function(e){a.y=e},setFirstTime:function(){!0}}}}));var luxon=function(e){"use strict";function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function n(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}function r(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t,n){return(o=function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),1}catch(e){return}}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&a(i,n.prototype),i}).apply(null,arguments)}function s(e){var t="function"==typeof Map?new Map:void 0;return(s=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 o(e,arguments,i(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a(r,e)})(e)}function u(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 l(e){var t=0;if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator])return(t=e[Symbol.iterator]()).next.bind(t);if(Array.isArray(e)||(e=function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t}(s(Error)),d=function(e){function t(t){return e.call(this,"Invalid DateTime: "+t.toMessage())||this}return r(t,e),t}(c),f=function(e){function t(t){return e.call(this,"Invalid Interval: "+t.toMessage())||this}return r(t,e),t}(c),h=function(e){function t(t){return e.call(this,"Invalid Duration: "+t.toMessage())||this}return r(t,e),t}(c),p=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t}(c),m=function(e){function t(t){return e.call(this,"Invalid unit "+t)||this}return r(t,e),t}(c),g=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t}(c),y=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return r(t,e),t}(c),v="numeric",w="short",x="long",b={year:v,month:v,day:v},S={year:v,month:w,day:v},T={year:v,month:x,day:v},F={year:v,month:x,day:v,weekday:x},C={hour:v,minute:v},k={hour:v,minute:v,second:v},D={hour:v,minute:v,second:v,timeZoneName:w},I={hour:v,minute:v,second:v,timeZoneName:x},N={hour:v,minute:v,hour12:!1},E={hour:v,minute:v,second:v,hour12:!1},L={hour:v,minute:v,second:v,hour12:!1,timeZoneName:w},M={hour:v,minute:v,second:v,hour12:!1,timeZoneName:x},O={year:v,month:v,day:v,hour:v,minute:v},A={year:v,month:v,day:v,hour:v,minute:v,second:v},j={year:v,month:w,day:v,hour:v,minute:v},_={year:v,month:w,day:v,hour:v,minute:v,second:v},H={year:v,month:w,day:v,weekday:w,hour:v,minute:v},P={year:v,month:x,day:v,hour:v,minute:v,timeZoneName:w},R={year:v,month:x,day:v,hour:v,minute:v,second:v,timeZoneName:w},q={year:v,month:x,day:v,weekday:x,hour:v,minute:v,timeZoneName:x},z={year:v,month:x,day:v,weekday:x,hour:v,minute:v,second:v,timeZoneName:x};function V(e){return void 0===e}function W(e){return"number"==typeof e}function U(e){return"number"==typeof e&&e%1==0}function B(){try{return"undefined"!=typeof Intl&&Intl.DateTimeFormat}catch(e){return!1}}function Z(){return!V(Intl.DateTimeFormat.prototype.formatToParts)}function G(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function $(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 Y(e,t){return t.reduce((function(t,n){return t[n]=e[n],t}),{})}function J(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function X(e,t,n){return U(e)&&t<=e&&e<=n}function Q(e,t){return void 0===t&&(t=2),e.toString().length<t?("0".repeat(t)+e).slice(-t):e.toString()}function K(e){return V(e)||null===e||""===e?void 0:parseInt(e,10)}function ee(e){if(!V(e)&&null!==e&&""!==e){var t=1e3*parseFloat("0."+e);return Math.floor(t)}}function te(e,t,n){void 0===n&&(n=!1);var r=Math.pow(10,t);return(n?Math.trunc:Math.round)(e*r)/r}function ne(e){return e%4==0&&(e%100!=0||e%400==0)}function re(e){return ne(e)?366:365}function ie(e,t){var n,r=(n=t-1)-12*Math.floor(n/12)+1;return 2==r?ne(e+(t-r)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function ae(e){var t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&0<=e.year&&(t=new Date(t)).setUTCFullYear(t.getUTCFullYear()-1900),+t}function oe(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 se(e){return 99<e?e:60<e?1900+e:2e3+e}function ue(e,t,n,r){void 0===r&&(r=null);var i=new Date(e),a={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(a.timeZone=r);var o=Object.assign({timeZoneName:t},a),s=B();if(s&&Z()){var u=new Intl.DateTimeFormat(n,o).formatToParts(i).find((function(e){return"timezonename"===e.type.toLowerCase()}));return u?u.value:null}if(s){var l=new Intl.DateTimeFormat(n,a).format(i);return new Intl.DateTimeFormat(n,o).format(i).substring(l.length).replace(/^[, \u200e]+/,"")}return null}function le(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 ce(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new g("Invalid unit value "+e);return t}function de(e,t,n){var r={};for(var i in e)if(J(e,i)){if(0<=n.indexOf(i))continue;var a=e[i];if(null==a)continue;r[t(i)]=ce(a)}return r}function fe(e,t){var n=Math.trunc(e/60),r=Math.abs(e%60),i=0<=n&&!Object.is(n,-0)?"+":"-",a=i+Math.abs(n);switch(t){case"short":return i+Q(Math.abs(n),2)+":"+Q(r,2);case"narrow":return 0<r?a+":"+r:a;case"techie":return i+Q(Math.abs(n),2)+Q(r,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function he(e){return Y(e,["hour","minute","second","millisecond"])}var pe=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function me(e){return JSON.stringify(e,Object.keys(e).sort())}var ge=["January","February","March","April","May","June","July","August","September","October","November","December"],ye=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ve=["J","F","M","A","M","J","J","A","S","O","N","D"];function we(e){switch(e){case"narrow":return ve;case"short":return ye;case"long":return ge;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"],Se=["M","T","W","T","F","S","S"];function Te(e){switch(e){case"narrow":return Se;case"short":return be;case"long":return xe;case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Fe=["AM","PM"],Ce=["Before Christ","Anno Domini"],ke=["BC","AD"],De=["B","A"];function Ie(e){switch(e){case"narrow":return De;case"short":return ke;case"long":return Ce;default:return null}}function Ne(e,t){for(var n,r="",i=l(e);!(n=i()).done;){var a=n.value;a.literal?r+=a.val:r+=t(a.val)}return r}var Ee={D:b,DD:S,DDD:T,DDDD:F,t:C,tt:k,ttt:D,tttt:I,T:N,TT:E,TTT:L,TTTT:M,f:O,ff:j,fff:P,ffff:q,F:A,FF:_,FFF:R,FFFF:z},Le=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?(0<n.length&&i.push({literal:r,val:n}),t=null,n="",r=!r):r||o===t?n+=o:(0<n.length&&i.push({literal:!1,val:n}),t=n=o)}return 0<n.length&&i.push({literal:r,val:n}),i},e.macroTokenToFormatOpts=function(e){return Ee[e]};var t=e.prototype;return t.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,Object.assign({},this.opts,t)).format()},t.formatDateTime=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).format()},t.formatDateTimeParts=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).formatToParts()},t.resolvedOptions=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).resolvedOptions()},t.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return Q(e,t);var n=Object.assign({},this.opts);return 0<t&&(n.padTo=t),this.loc.numberFormatter(n).format(e)},t.formatDateTimeFromString=function(t,n){function r(e,n){return u.loc.extract(t,e,n)}function i(e){return t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):""}function a(e,n){return l?(i=t,we(e)[i.month-1]):r(n?{month:e}:{month:e,day:"numeric"},"month");var i}function o(e,n){return l?(i=t,Te(e)[i.weekday-1]):r(n?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday");var i}function s(e){return l?(n=t,Ie(e)[n.year<0?0:1]):r({era:e},"era");var n}var u=this,l="en"===this.loc.listingMode(),c=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&Z();return Ne(e.parseFormat(n),(function(n){switch(n){case"S":return u.num(t.millisecond);case"u":case"SSS":return u.num(t.millisecond,3);case"s":return u.num(t.second);case"ss":return u.num(t.second,2);case"m":return u.num(t.minute);case"mm":return u.num(t.minute,2);case"h":return u.num(t.hour%12==0?12:t.hour%12);case"hh":return u.num(t.hour%12==0?12:t.hour%12,2);case"H":return u.num(t.hour);case"HH":return u.num(t.hour,2);case"Z":return i({format:"narrow",allowZ:u.opts.allowZ});case"ZZ":return i({format:"short",allowZ:u.opts.allowZ});case"ZZZ":return i({format:"techie",allowZ:u.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:u.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:u.loc.locale});case"z":return t.zoneName;case"a":return l?Fe[t.hour<12?0:1]:r({hour:"numeric",hour12:!0},"dayperiod");case"d":return c?r({day:"numeric"},"day"):u.num(t.day);case"dd":return c?r({day:"2-digit"},"day"):u.num(t.day,2);case"c":return u.num(t.weekday);case"ccc":return o("short",!0);case"cccc":return o("long",!0);case"ccccc":return o("narrow",!0);case"E":return u.num(t.weekday);case"EEE":return o("short",!1);case"EEEE":return o("long",!1);case"EEEEE":return o("narrow",!1);case"L":return c?r({month:"numeric",day:"numeric"},"month"):u.num(t.month);case"LL":return c?r({month:"2-digit",day:"numeric"},"month"):u.num(t.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return c?r({month:"numeric"},"month"):u.num(t.month);case"MM":return c?r({month:"2-digit"},"month"):u.num(t.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return c?r({year:"numeric"},"year"):u.num(t.year);case"yy":return c?r({year:"2-digit"},"year"):u.num(t.year.toString().slice(-2),2);case"yyyy":return c?r({year:"numeric"},"year"):u.num(t.year,4);case"yyyyyy":return c?r({year:"numeric"},"year"):u.num(t.year,6);case"G":return s("short");case"GG":return s("long");case"GGGGG":return s("narrow");case"kk":return u.num(t.weekYear.toString().slice(-2),2);case"kkkk":return u.num(t.weekYear,4);case"W":return u.num(t.weekNumber);case"WW":return u.num(t.weekNumber,2);case"o":return u.num(t.ordinal);case"ooo":return u.num(t.ordinal,3);case"q":return u.num(t.quarter);case"qq":return u.num(t.quarter,2);case"X":return u.num(Math.floor(t.ts/1e3));case"x":return u.num(t.ts);default:return(f=e.macroTokenToFormatOpts(d=n))?u.formatWithSystemDefault(t,f):d}var d,f}))},t.formatDurationFromString=function(t,n){function r(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}}var i,a=this,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(r).filter((function(e){return e})));return Ne(o,(i=u,function(e){var t=r(e);return t?a.num(i.get(t),e.length):e}))},e}(),Me=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}(),Oe=function(){function e(){}var t=e.prototype;return t.offsetName=function(){throw new y},t.formatOffset=function(){throw new y},t.offset=function(){throw new y},t.equals=function(){throw new y},n(e,[{key:"type",get:function(){throw new y}},{key:"name",get:function(){throw new y}},{key:"universal",get:function(){throw new y}},{key:"isValid",get:function(){throw new y}}]),e}(),Ae=null,je=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var i=t.prototype;return i.offsetName=function(e,t){return ue(e,t.format,t.locale)},i.formatOffset=function(e,t){return fe(this.offset(e),t)},i.offset=function(e){return-new Date(e).getTimezoneOffset()},i.equals=function(e){return"local"===e.type},n(t,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return B()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return null===Ae&&(Ae=new t),Ae}}]),t}(Oe),_e=RegExp("^"+pe.source+"$"),He={},Pe={year:0,month:1,day:2,hour:3,minute:4,second:5},Re={},qe=function(e){function t(n){var r;return(r=e.call(this)||this).zoneName=n,r.valid=t.isValidZone(n),r}r(t,e),t.create=function(e){return Re[e]||(Re[e]=new t(e)),Re[e]},t.resetCache=function(){Re={},He={}},t.isValidSpecifier=function(e){return!(!e||!e.match(_e))},t.isValidZone=function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}},t.parseGMTOffset=function(e){if(e){var t=e.match(/^Etc\/GMT([+-]\d{1,2})$/i);if(t)return-60*parseInt(t[1])}return null};var i=t.prototype;return i.offsetName=function(e,t){return ue(e,t.format,t.locale,this.name)},i.formatOffset=function(e,t){return fe(this.offset(e),t)},i.offset=function(e){var t,n,r,i,a,o,s=new Date(e),u=(o=this.name,He[o]||(He[o]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:o,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),He[o]),l=u.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=Pe[o];V(u)||(r[u]=parseInt(s,10))}return r}(u,s):(t=s,n=u.format(t).replace(/\u200E/g,""),i=(r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n))[1],a=r[2],[r[3],i,a,r[4],r[5],r[6]]),c=l[0],d=l[1],f=l[2],h=l[3],p=+s,m=p%1e3;return(ae({year:c,month:d,day:f,hour:24===h?0:h,minute:l[4],second:l[5],millisecond:0})-(p-=0<=m?m:1e3+m))/6e4},i.equals=function(e){return"iana"===e.type&&e.name===this.name},n(t,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),t}(Oe),ze=null,Ve=function(e){function t(t){var n;return(n=e.call(this)||this).fixed=t,n}r(t,e),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){var n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new t(le(n[1],n[2]))}return null},n(t,null,[{key:"utcInstance",get:function(){return null===ze&&(ze=new t(0)),ze}}]);var i=t.prototype;return i.offsetName=function(){return this.name},i.formatOffset=function(e,t){return fe(this.fixed,t)},i.offset=function(){return this.fixed},i.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},n(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+fe(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),t}(Oe),We=function(e){function t(t){var n;return(n=e.call(this)||this).zoneName=t,n}r(t,e);var i=t.prototype;return i.offsetName=function(){return null},i.formatOffset=function(){return""},i.offset=function(){return NaN},i.equals=function(){return!1},n(t,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),t}(Oe);function Ue(e,t){var n;if(V(e)||null===e)return t;if(e instanceof Oe)return e;if("string"!=typeof e)return W(e)?Ve.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new We(e);var r=e.toLowerCase();return"local"===r?t:"utc"===r||"gmt"===r?Ve.utcInstance:null!=(n=qe.parseGMTOffset(e))?Ve.instance(n):qe.isValidSpecifier(r)?qe.create(e):Ve.parseSpecifier(r)||new We(e)}var Be=function(){return Date.now()},Ze=null,Ge=null,$e=null,Ye=null,Je=!1,Xe=function(){function e(){}return e.resetCaches=function(){st.resetCache(),qe.resetCache()},n(e,null,[{key:"now",get:function(){return Be},set:function(e){Be=e}},{key:"defaultZoneName",get:function(){return e.defaultZone.name},set:function(e){Ze=e?Ue(e):null}},{key:"defaultZone",get:function(){return Ze||je.instance}},{key:"defaultLocale",get:function(){return Ge},set:function(e){Ge=e}},{key:"defaultNumberingSystem",get:function(){return $e},set:function(e){$e=e}},{key:"defaultOutputCalendar",get:function(){return Ye},set:function(e){Ye=e}},{key:"throwOnInvalid",get:function(){return Je},set:function(e){Je=e}}]),e}(),Qe={};function Ke(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=Qe[n];return r||(r=new Intl.DateTimeFormat(e,t),Qe[n]=r),r}var et={},tt={};var nt=null;function rt(e,t,n,r,i){var a=e.listingMode(n);return"error"===a?null:("en"===a?r:i)(t)}var it=function(){function e(e,t,n){if(this.padTo=n.padTo||0,this.floor=n.floor||!1,!t&&B()){var r={useGrouping:!1};0<n.padTo&&(r.minimumIntegerDigits=n.padTo),this.inf=function(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=et[n];return r||(r=new Intl.NumberFormat(e,t),et[n]=r),r}(e,r)}}return e.prototype.format=function(e){if(this.inf){var t=this.floor?Math.floor(e):e;return this.inf.format(t)}return Q(this.floor?Math.floor(e):te(e,3),this.padTo)},e}(),at=function(){function e(e,t,n){var r;if(this.opts=n,this.hasIntl=B(),e.zone.universal&&this.hasIntl?(r="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:nr.fromMillis(e.ts+60*e.offset*1e3)):"local"===e.zone.type?this.dt=e:r=(this.dt=e).zone.name,this.hasIntl){var i=Object.assign({},this.opts);r&&(i.timeZone=r),this.dtf=Ke(t,i)}}var t=e.prototype;return t.format=function(){if(this.hasIntl)return this.dtf.format(this.dt.toJSDate());var e=function(e){var t="EEEE, LLLL d, yyyy, h:mm a";switch(me(Y(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]))){case me(b):return"M/d/yyyy";case me(S):return"LLL d, yyyy";case me(T):return"LLLL d, yyyy";case me(F):return"EEEE, LLLL d, yyyy";case me(C):return"h:mm a";case me(k):return"h:mm:ss a";case me(D):case me(I):return"h:mm a";case me(N):return"HH:mm";case me(E):return"HH:mm:ss";case me(L):case me(M):return"HH:mm";case me(O):return"M/d/yyyy, h:mm a";case me(j):return"LLL d, yyyy, h:mm a";case me(P):return"LLLL d, yyyy, h:mm a";case me(q):return t;case me(A):return"M/d/yyyy, h:mm:ss a";case me(_):return"LLL d, yyyy, h:mm:ss a";case me(H):return"EEE, d LLL yyyy, h:mm a";case me(R):return"LLLL d, yyyy, h:mm:ss a";case me(z):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return t}}(this.opts),t=st.create("en-US");return Le.create(t).formatDateTimeFromString(this.dt,e)},t.formatToParts=function(){return this.hasIntl&&Z()?this.dtf.formatToParts(this.dt.toJSDate()):[]},t.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},e}(),ot=function(){function e(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&G()&&(this.rtf=function(e,t){void 0===t&&(t={}),t.base;var n=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],0<=t.indexOf(n)||(i[n]=e[n]);return i}(t,["base"]),r=JSON.stringify([e,n]),i=tt[r];return i||(i=new Intl.RelativeTimeFormat(e,t),tt[r]=i),i}(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n,r){void 0===n&&(n="always"),void 0===r&&(r=!1);var i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},a=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&a){var o="days"===e;switch(t){case 1:return o?"tomorrow":"next "+i[e][0];case-1:return o?"yesterday":"last "+i[e][0];case 0:return o?"today":"this "+i[e][0]}}var s=Object.is(t,-0)||t<0,u=Math.abs(t),l=1===u,c=i[e],d=r?!l&&c[2]||c[1]:l?i[e][0]:e;return s?u+" "+d+" ago":"in "+u+" "+d}(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),st=function(){function e(e,t,n,r){var i,a,o,s=function(e){var t=e.indexOf("-u-");if(-1===t)return[e];var n,r=e.substring(0,t);try{n=Ke(e).resolvedOptions()}catch(e){n=Ke(r).resolvedOptions()}return[r,n.numberingSystem,n.calendar]}(e),u=s[0],l=s[1],c=s[2];this.locale=u,this.numberingSystem=t||l||null,this.outputCalendar=n||c||null,this.intl=(i=this.locale,a=this.numberingSystem,o=this.outputCalendar,B()?((o||a)&&(i+="-u",o&&(i+="-ca-"+o),a&&(i+="-nu-"+a)),i):[]),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":function(){if(nt)return nt;if(B()){var e=(new Intl.DateTimeFormat).resolvedOptions().locale;return nt=e&&"und"!==e?e:"en-US"}return nt="en-US"}()),n||Xe.defaultNumberingSystem,r||Xe.defaultOutputCalendar,a)},e.resetCache=function(){nt=null,Qe={},et={},tt={}},e.fromObject=function(t){var n=void 0===t?{}:t,r=n.locale,i=n.numberingSystem,a=n.outputCalendar;return e.create(r,i,a)};var t=e.prototype;return t.listingMode=function(e){void 0===e&&(e=!0);var t=B()&&Z(),n=this.isEnglish(),r=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t||n&&r||e?!t||n&&r?"en":"intl":"error"},t.clone=function(t){return t&&0!==Object.getOwnPropertyNames(t).length?e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1):this},t.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!0}))},t.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!1}))},t.months=function(e,t,n){var r=this;return void 0===t&&(t=!1),void 0===n&&(n=!0),rt(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=nr.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),rt(this,e,n,Te,(function(){var n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=t?"format":"standalone";return r.weekdaysCache[i][e]||(r.weekdaysCache[i][e]=function(e){for(var t=[],n=1;n<=7;n++){var r=nr.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),rt(this,void 0,e,(function(){return Fe}),(function(){if(!t.meridiemCache){var e={hour:"numeric",hour12:!0};t.meridiemCache=[nr.utc(2016,11,13,9),nr.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),rt(this,e,t,Ie,(function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[nr.utc(-40,1,1),nr.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 it(this.intl,e.forceSimple||this.fastNumbers,e)},t.dtFormatter=function(e,t){return void 0===t&&(t={}),new at(e,this.intl,t)},t.relFormatter=function(e){return void 0===e&&(e={}),new ot(this.intl,this.isEnglish(),e)},t.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||B()&&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")||B()&&"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}}]),e}();function ut(){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 lt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduce((function(t,n){var r=t[0],i=t[1],a=t[2],o=n(e,a),s=o[0],u=o[1],l=o[2];return[Object.assign(r,s),i||u,l]}),[{},null,1]).slice(0,2)}}function ct(e){if(null==e)return[null,null];for(var t=arguments.length,n=new Array(1<t?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 dt(){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]]=K(e[n+r]);return[i,null,n+r]}}var ft=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,ht=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,9}))?)?)?/,pt=RegExp(""+ht.source+ft.source+"?"),mt=RegExp("(?:T"+pt.source+")?"),gt=dt("weekYear","weekNumber","weekDay"),yt=dt("year","ordinal"),vt=RegExp(ht.source+" ?(?:"+ft.source+"|("+pe.source+"))?"),wt=RegExp("(?: "+vt.source+")?");function xt(e,t,n){var r=e[t];return V(r)?n:K(r)}function bt(e,t){return[{year:xt(e,t),month:xt(e,t+1,1),day:xt(e,t+2,1)},null,t+3]}function St(e,t){return[{hour:xt(e,t,0),minute:xt(e,t+1,0),second:xt(e,t+2,0),millisecond:ee(e[t+3])},null,t+4]}function Tt(e,t){var n=!e[t]&&!e[t+1],r=le(e[t+1],e[t+2]);return[{},n?null:Ve.instance(r),t+3]}function Ft(e,t){return[{},e[t]?qe.create(e[t]):null,t+1]}var Ct=/^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})(?:[.,](-?\d{1,9}))?S)?)?)$/;function kt(e){function t(e){return e&&d?-e:e}var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],l=e[7],c=e[8],d="-"===n[0];return[{years:t(K(r)),months:t(K(i)),weeks:t(K(a)),days:t(K(o)),hours:t(K(s)),minutes:t(K(u)),seconds:t(K(l)),milliseconds:t(ee(c))}]}var Dt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function It(e,t,n,r,i,a,o){var s={year:2===t.length?se(K(t)):K(t),month:ye.indexOf(n)+1,day:K(r),hour:K(i),minute:K(a)};return o&&(s.second=K(o)),e&&(s.weekday=3<e.length?xe.indexOf(e)+1:be.indexOf(e)+1),s}var Nt=/^(?:(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 Et(e){var t,n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],u=e[7],l=e[8],c=e[9],d=e[10],f=e[11],h=It(n,a,i,r,o,s,u);return t=l?Dt[l]:c?0:le(d,f),[h,new Ve(t)]}var Lt=/^(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$/,Mt=/^(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$/,Ot=/^(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 At(e){var t=e[1],n=e[2],r=e[3];return[It(t,e[4],r,n,e[5],e[6],e[7]),Ve.utcInstance]}function jt(e){var t=e[1],n=e[2],r=e[3],i=e[4],a=e[5],o=e[6];return[It(t,e[7],n,r,i,a,o),Ve.utcInstance]}var _t=ut(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,mt),Ht=ut(/(\d{4})-?W(\d\d)(?:-?(\d))?/,mt),Pt=ut(/(\d{4})-?(\d{3})/,mt),Rt=ut(pt),qt=lt(bt,St,Tt),zt=lt(gt,St,Tt),Vt=lt(yt,St),Wt=lt(St,Tt),Ut=ut(/(\d{4})-(\d\d)-(\d\d)/,wt),Bt=ut(vt),Zt=lt(bt,St,Tt,Ft),Gt=lt(St,Tt,Ft),$t={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}},Yt=Object.assign({years:{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,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},$t),Jt=365.2425,Xt=30.436875,Qt=Object.assign({years:{months:12,weeks:Jt/7,days:Jt,hours:24*Jt,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:Jt/28,days:Jt/4,hours:24*Jt/4,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:Xt/7,days:Xt,hours:24*Xt,minutes:43829.1,seconds:2629746,milliseconds:2629746e3}},$t),Kt=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],en=Kt.slice(0).reverse();function tn(e,t,n){void 0===n&&(n=!1);var r={values:n?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new an(r)}function nn(e,t,n,r,i){var a,o=e[i][n],s=t[n]/o,u=Math.sign(s)!==Math.sign(r[i])&&0!==r[i]&&Math.abs(s)<=1?(a=s)<0?Math.floor(a):Math.ceil(a):Math.trunc(s);r[i]+=u,t[n]-=u*o}function rn(e,t){en.reduce((function(n,r){return V(t[r])?n:(n&&nn(e,t,n,t,r),r)}),null)}var an=function(){function e(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||st.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?Qt:Yt,this.isLuxonDuration=!0}e.fromMillis=function(t,n){return e.fromObject(Object.assign({milliseconds:t},n))},e.fromObject=function(t){if(null==t||"object"!=typeof t)throw new g("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new e({values:de(t,e.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:st.fromObject(t),conversionAccuracy:t.conversionAccuracy})},e.fromISO=function(t,n){var r=ct(t,[Ct,kt])[0];if(r){var i=Object.assign(r,n);return e.fromObject(i)}return e.invalid("unparsable",'the input "'+t+"\" can't be parsed as ISO 8601")},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new g("need to specify a reason the Duration is invalid");var r=t instanceof Me?t:new Me(t,n);if(Xe.throwOnInvalid)throw new h(r);return new e({invalid:r})},e.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new m(e);return t},e.isDuration=function(e){return e&&e.isLuxonDuration||!1};var t=e.prototype;return t.toFormat=function(e,t){void 0===t&&(t={});var n=Object.assign({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Le.create(this.loc,n).formatDurationFromString(this,e):"Invalid Duration"},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.values);return e.includeConfig&&(t.conversionAccuracy=this.conversionAccuracy,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toISO=function(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=te(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},t.toJSON=function(){return this.toISO()},t.toString=function(){return this.toISO()},t.valueOf=function(){return this.as("milliseconds")},t.plus=function(e){if(!this.isValid)return this;for(var t,n=on(e),r={},i=l(Kt);!(t=i()).done;){var a=t.value;(J(n.values,a)||J(this.values,a))&&(r[a]=n.get(a)+this.get(a))}return tn(this,{values:r},!0)},t.minus=function(e){if(!this.isValid)return this;var t=on(e);return this.plus(t.negate())},t.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,r=Object.keys(this.values);n<r.length;n++){var i=r[n];t[i]=ce(e(this.values[i],i))}return tn(this,{values:t},!0)},t.get=function(t){return this[e.normalizeUnit(t)]},t.set=function(t){return this.isValid?tn(this,{values:Object.assign(this.values,de(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),tn(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 rn(this.matrix,e),tn(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)}));var i,a={},o={},s=this.toObject();rn(this.matrix,s);for(var u,c=l(Kt);!(u=c()).done;){var d=u.value;if(0<=n.indexOf(d)){i=d;var f=0;for(var h in o)f+=this.matrix[h][d]*o[h],o[h]=0;W(s[d])&&(f+=s[d]);var p=Math.trunc(f);for(var m in a[d]=p,o[d]=f-p,s)Kt.indexOf(m)>Kt.indexOf(d)&&nn(this.matrix,s,m,a,d)}else W(s[d])&&(o[d]=s[d])}for(var g in o)0!==o[g]&&(a[i]+=g===i?o[g]:o[g]/this.matrix[i][g]);return tn(this,{values:a},!0).normalize()},t.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);t<n.length;t++){var r=n[t];e[r]=-this.values[r]}return tn(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=l(Kt);!(t=n()).done;){var r=t.value;if(this.values[r]!==e.values[r])return!1}return!0},n(e,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),e}();function on(e){if(W(e))return an.fromMillis(e);if(an.isDuration(e))return e;if("object"==typeof e)return an.fromObject(e);throw new g("Unknown duration argument "+e+" of type "+typeof e)}var sn="Invalid Interval",un=function(){function e(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new g("need to specify a reason the Interval is invalid");var r=t instanceof Me?t:new Me(t,n);if(Xe.throwOnInvalid)throw new f(r);return new e({invalid:r})},e.fromDateTimes=function(t,n){var r,i,a=rr(t),o=rr(n),s=(i=o,(r=a)&&r.isValid?i&&i.isValid?i<r?un.invalid("end before start","The end of an interval must be after its start, but you had start="+r.toISO()+" and end="+i.toISO()):null:un.invalid("missing or invalid end"):un.invalid("missing or invalid start"));return null==s?new e({start:a,end:o}):s},e.after=function(t,n){var r=on(n),i=rr(t);return e.fromDateTimes(i,i.plus(r))},e.before=function(t,n){var r=on(n),i=rr(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=nr.fromISO(i,n),s=nr.fromISO(a,n);if(o.isValid&&s.isValid)return e.fromDateTimes(o,s);if(o.isValid){var u=an.fromISO(a,n);if(u.isValid)return e.after(o,u)}else if(s.isValid){var l=an.fromISO(i,n);if(l.isValid)return e.before(s,l)}}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.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(rr).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=on(t);if(!this.isValid||!n.isValid||0===n.as("milliseconds"))return[];for(var r,i,a=this.s,o=[];a<this.e;)i=+(r=a.plus(n))>+this.e?this.e:r,o.push(e.fromDateTimes(a,i)),a=i;return o},t.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},t.overlaps=function(e){return this.e>e.s&&this.s<e.e},t.abutsStart=function(e){return!!this.isValid&&+this.e==+e.s},t.abutsEnd=function(e){return!!this.isValid&&+e.e==+this.s},t.engulfs=function(e){return!!this.isValid&&this.s<=e.s&&this.e>=e.e},t.equals=function(e){return!(!this.isValid||!e.isValid)&&this.s.equals(e.s)&&this.e.equals(e.e)},t.intersection=function(t){if(!this.isValid)return this;var n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return r<n?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=l((n=Array.prototype).concat.apply(n,s).sort((function(e,t){return e.time-t.time})));!(r=u()).done;){var c=r.value;i=1===(a+="s"===c.type?1:-1)?c.time:(i&&+i!=+c.time&&o.push(e.fromDateTimes(i,c.time)),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()+")":sn},t.toISO=function(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):sn},t.toISODate=function(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():sn},t.toISOTime=function(e){return this.isValid?this.s.toISOTime(e)+"/"+this.e.toISOTime(e):sn},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):sn},t.toDuration=function(e,t){return this.isValid?this.e.diff(this.s,e,t):an.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}(),ln=function(){function e(){}return e.hasDST=function(e){void 0===e&&(e=Xe.defaultZone);var t=nr.local().setZone(e).set({month:12});return!e.universal&&t.offset!==t.set({month:6}).offset},e.isValidIANAZone=function(e){return qe.isValidSpecifier(e)&&qe.isValidZone(e)},e.normalizeZone=function(e){return Ue(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.outputCalendar,u=void 0===s?"gregory":s;return st.create(i,o,u).months(e)},e.monthsFormat=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,r=n.locale,i=void 0===r?null:r,a=n.numberingSystem,o=void 0===a?null:a,s=n.outputCalendar,u=void 0===s?"gregory":s;return st.create(i,o,u).months(e,!0)},e.weekdays=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,r=n.locale,i=void 0===r?null:r,a=n.numberingSystem,o=void 0===a?null:a;return st.create(i,o,null).weekdays(e)},e.weekdaysFormat=function(e,t){void 0===e&&(e="long");var n=void 0===t?{}:t,r=n.locale,i=void 0===r?null:r,a=n.numberingSystem,o=void 0===a?null:a;return st.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 st.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 st.create(r,null,"gregory").eras(e)},e.features=function(){var e=!1,t=!1,n=!1,r=!1;if(B()){e=!0,t=Z(),r=G();try{n="America/New_York"===new Intl.DateTimeFormat("en",{timeZone:"America/New_York"}).resolvedOptions().timeZone}catch(e){n=!1}}return{intl:e,intlTokens:t,zones:n,relative:r}},e}();function cn(e,t){function n(e){return e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()}var r=n(t)-n(e);return Math.floor(an.fromMillis(r).as("days"))}var dn={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[-৯]",deva:"[-९]",fullwide:"[-]",gujr:"[-૯]",hanidec:"[|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[-೯]",laoo:"[-໙]",limb:"[᥆-᥏]",mlym:"[-൯]",mong:"[᠐-᠙]",mymr:"[-၉]",orya:"[-୯]",tamldec:"[-௯]",telu:"[-౯]",thai:"[-๙]",tibt:"[༠-༩]",latn:"\\d"},fn={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]},hn=dn.hanidec.replace(/[\[|\]]/g,"").split("");function pn(e,t){var n=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+dn[n||"latn"]+t)}function mn(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(dn.hanidec))t+=hn.indexOf(e[n]);else for(var i in fn){var a=fn[i],o=a[0],s=a[1];o<=r&&r<=s&&(t+=r-o)}}return parseInt(t,10)}return t}(n))}}}function gn(e){return e.replace(/\./,"\\.?")}function yn(e){return e.replace(/\./,"").toLowerCase()}function vn(e,t){return null===e?null:{regex:RegExp(e.map(gn).join("|")),deser:function(n){var r=n[0];return e.findIndex((function(e){return yn(r)===yn(e)}))+t}}}function wn(e,t){return{regex:e,deser:function(e){return le(e[1],e[2])},groups:t}}function xn(e){return{regex:e,deser:function(e){return e[0]}}}var bn={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"}},Sn=null;function Tn(e,t,n){var r,i,a,o=(r=Le.parseFormat(n),i=e,(a=Array.prototype).concat.apply(a,r.map((function(e){return function(e,t){if(e.literal)return e;var n=Le.macroTokenToFormatOpts(e.val);if(!n)return e;var r=Le.create(t,n).formatDateTimeParts(Sn=Sn||nr.fromMillis(1555555555555)).map((function(e){return function(e,t){var n=e.type,r=e.value;if("literal"===n)return{literal:!0,val:r};var i=t[n],a=bn[n];return"object"==typeof a&&(a=a[i]),a?{literal:!1,val:a}:void 0}(e,n)}));return r.includes(void 0)?e:r}(e,i)})))),s=o.map((function(t){return function(e,t){function n(e){return{regex:RegExp(e.val.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")),deser:function(e){return e[0]},literal:!0}}var r=pn(t),i=pn(t,"{2}"),a=pn(t,"{3}"),o=pn(t,"{4}"),s=pn(t,"{6}"),u=pn(t,"{1,2}"),l=pn(t,"{1,3}"),c=pn(t,"{1,6}"),d=pn(t,"{1,9}"),f=pn(t,"{2,4}"),h=pn(t,"{4,6}"),p=function(p){if(e.literal)return n(p);switch(p.val){case"G":return vn(t.eras("short",!1),0);case"GG":return vn(t.eras("long",!1),0);case"y":return mn(c);case"yy":return mn(f,se);case"yyyy":return mn(o);case"yyyyy":return mn(h);case"yyyyyy":return mn(s);case"M":return mn(u);case"MM":return mn(i);case"MMM":return vn(t.months("short",!0,!1),1);case"MMMM":return vn(t.months("long",!0,!1),1);case"L":return mn(u);case"LL":return mn(i);case"LLL":return vn(t.months("short",!1,!1),1);case"LLLL":return vn(t.months("long",!1,!1),1);case"d":return mn(u);case"dd":return mn(i);case"o":return mn(l);case"ooo":return mn(a);case"HH":return mn(i);case"H":return mn(u);case"hh":return mn(i);case"h":return mn(u);case"mm":return mn(i);case"m":case"q":return mn(u);case"qq":return mn(i);case"s":return mn(u);case"ss":return mn(i);case"S":return mn(l);case"SSS":return mn(a);case"u":return xn(d);case"a":return vn(t.meridiems(),0);case"kkkk":return mn(o);case"kk":return mn(f,se);case"W":return mn(u);case"WW":return mn(i);case"E":case"c":return mn(r);case"EEE":return vn(t.weekdays("short",!1,!1),1);case"EEEE":return vn(t.weekdays("long",!1,!1),1);case"ccc":return vn(t.weekdays("short",!0,!1),1);case"cccc":return vn(t.weekdays("long",!0,!1),1);case"Z":case"ZZ":return wn(new RegExp("([+-]"+u.source+")(?::("+i.source+"))?"),2);case"ZZZ":return wn(new RegExp("([+-]"+u.source+")("+i.source+")?"),2);case"z":return xn(/[a-z_+-/]{1,256}?/i);default:return n(p)}}(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return p.token=e,p}(t,e)})),u=s.find((function(e){return e.invalidReason}));if(u)return{input:t,tokens:o,invalidReason:u.invalidReason};var l,c,d,f=["^"+(d=s).map((function(e){return e.regex})).reduce((function(e,t){return e+"("+t.source+")"}),"")+"$",d],h=f[1],m=RegExp(f[0],"i"),g=function(e,t,n){var r=e.match(t);if(r){var i={},a=1;for(var o in n)if(J(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,m,h),y=g[0],v=g[1],w=v?(c=V((l=v).Z)?V(l.z)?null:qe.create(l.z):new Ve(l.Z),V(l.q)||(l.M=3*(l.q-1)+1),V(l.h)||(l.h<12&&1===l.a?l.h+=12:12===l.h&&0===l.a&&(l.h=0)),0===l.G&&l.y&&(l.y=-l.y),V(l.u)||(l.S=ee(l.u)),[Object.keys(l).reduce((function(e,t){var n=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}}(t);return n&&(e[n]=l[t]),e}),{}),c]):[null,null],x=w[0],b=w[1];if(J(v,"a")&&J(v,"H"))throw new p("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:o,regex:m,rawMatches:y,matches:v,result:x,zone:b}}var Fn=[0,31,59,90,120,151,181,212,243,273,304,334],Cn=[0,31,60,91,121,152,182,213,244,274,305,335];function kn(e,t){return new Me("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function Dn(e,t,n){var r=new Date(Date.UTC(e,t-1,n)).getUTCDay();return 0===r?7:r}function In(e,t,n){return n+(ne(e)?Cn:Fn)[t-1]}function Nn(e,t){var n=ne(e)?Cn:Fn,r=n.findIndex((function(e){return e<t}));return{month:r+1,day:t-n[r]}}function En(e){var t,n=e.year,r=e.month,i=e.day,a=In(n,r,i),o=Dn(n,r,i),s=Math.floor((a-o+10)/7);return s<1?s=oe(t=n-1):s>oe(n)?(t=n+1,s=1):t=n,Object.assign({weekYear:t,weekNumber:s,weekday:o},he(e))}function Ln(e){var t,n=e.weekYear,r=e.weekNumber,i=e.weekday,a=Dn(n,1,4),o=re(n),s=7*r+i-a-3;s<1?s+=re(t=n-1):o<s?(t=n+1,s-=re(n)):t=n;var u=Nn(t,s),l=u.month,c=u.day;return Object.assign({year:t,month:l,day:c},he(e))}function Mn(e){var t=e.year,n=In(t,e.month,e.day);return Object.assign({year:t,ordinal:n},he(e))}function On(e){var t=e.year,n=Nn(t,e.ordinal),r=n.month,i=n.day;return Object.assign({year:t,month:r,day:i},he(e))}function An(e){var t=U(e.year),n=X(e.month,1,12),r=X(e.day,1,ie(e.year,e.month));return t?n?!r&&kn("day",e.day):kn("month",e.month):kn("year",e.year)}function jn(e){var t=e.hour,n=e.minute,r=e.second,i=e.millisecond,a=X(t,0,23)||24===t&&0===n&&0===r&&0===i,o=X(n,0,59),s=X(r,0,59),u=X(i,0,999);return a?o?s?!u&&kn("millisecond",i):kn("second",r):kn("minute",n):kn("hour",t)}var _n="Invalid DateTime";function Hn(e){return new Me("unsupported zone",'the zone "'+e.name+'" is not supported')}function Pn(e){return null===e.weekData&&(e.weekData=En(e.c)),e.weekData}function Rn(e,t){var n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new nr(Object.assign({},n,t,{old:n}))}function qn(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 zn(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 Vn(e,t,n){return qn(ae(e),t,n)}function Wn(e,t){var n=Object.keys(t.values);-1===n.indexOf("milliseconds")&&n.push("milliseconds"),t=t.shiftTo.apply(t,n);var r=e.o,i=e.c.year+t.years,a=e.c.month+t.months+3*t.quarters,o=Object.assign({},e.c,{year:i,month:a,day:Math.min(e.c.day,ie(i,a))+t.days+7*t.weeks}),s=an.fromObject({hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),u=qn(ae(o),r,e.zone),l=u[0],c=u[1];return 0!==s&&(l+=s,c=e.zone.offset(l)),{ts:l,o:c}}function Un(e,t,n,r,i){var a=n.setZone,o=n.zone;if(e&&0!==Object.keys(e).length){var s=t||o,u=nr.fromObject(Object.assign(e,n,{zone:s,setZone:void 0}));return a?u:u.setZone(o)}return nr.invalid(new Me("unparsable",'the input "'+i+"\" can't be parsed as "+r))}function Bn(e,t,n){return void 0===n&&(n=!0),e.isValid?Le.create(st.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Zn(e,t){var n=t.suppressSeconds,r=void 0!==n&&n,i=t.suppressMilliseconds,a=void 0!==i&&i,o=t.includeOffset,s=t.includeZone,u=void 0!==s&&s,l=t.spaceZone,c=void 0!==l&&l,d=t.format,f=void 0===d?"extended":d,h="basic"===f?"HHmm":"HH:mm";return r&&0===e.second&&0===e.millisecond||(h+="basic"===f?"ss":":ss",a&&0===e.millisecond||(h+=".SSS")),(u||o)&&c&&(h+=" "),u?h+="z":o&&(h+="basic"===f?"ZZZ":"ZZ"),Bn(e,h)}var Gn={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},$n={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Yn={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Jn=["year","month","day","hour","minute","second","millisecond"],Xn=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Qn=["year","ordinal","hour","minute","second","millisecond"];function Kn(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new m(e);return t}function er(e,t){for(var n,r=l(Jn);!(n=r()).done;){var i=n.value;V(e[i])&&(e[i]=Gn[i])}var a=An(e)||jn(e);if(a)return nr.invalid(a);var o=Xe.now(),s=Vn(e,t.offset(o),t),u=s[0],c=s[1];return new nr({ts:u,zone:t,o:c})}function tr(e,t,n){function r(e,r){return e=te(e,a||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(e,r)}function i(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)}var a=!!V(n.round)||n.round;if(n.unit)return r(i(n.unit),n.unit);for(var o,s=l(n.units);!(o=s()).done;){var u=o.value,c=i(u);if(1<=Math.abs(c))return r(c,u)}return r(0,n.units[n.units.length-1])}var nr=function(){function e(e){var t=e.zone||Xe.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new Me("invalid input"):null)||(t.isValid?null:Hn(t));this.ts=V(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=zn(this.ts,o),r=(n=Number.isNaN(r.year)?new Me("invalid input"):null)?null:r,i=n?null:o}this._zone=t,this.loc=e.loc||st.create(),this.invalid=n,this.weekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}e.local=function(t,n,r,i,a,o,s){return V(t)?new e({ts:Xe.now()}):er({year:t,month:n,day:r,hour:i,minute:a,second:o,millisecond:s},Xe.defaultZone)},e.utc=function(t,n,r,i,a,o,s){return V(t)?new e({ts:Xe.now(),zone:Ve.utcInstance}):er({year:t,month:n,day:r,hour:i,minute:a,second:o,millisecond:s},Ve.utcInstance)},e.fromJSDate=function(t,n){void 0===n&&(n={});var r,i=(r=t,"[object Date]"===Object.prototype.toString.call(r)?t.valueOf():NaN);if(Number.isNaN(i))return e.invalid("invalid input");var a=Ue(n.zone,Xe.defaultZone);return a.isValid?new e({ts:i,zone:a,loc:st.fromObject(n)}):e.invalid(Hn(a))},e.fromMillis=function(t,n){if(void 0===n&&(n={}),W(t))return t<-864e13||864e13<t?e.invalid("Timestamp out of range"):new e({ts:t,zone:Ue(n.zone,Xe.defaultZone),loc:st.fromObject(n)});throw new g("fromMillis requires a numerical input, but received a "+typeof t+" with value "+t)},e.fromSeconds=function(t,n){if(void 0===n&&(n={}),W(t))return new e({ts:1e3*t,zone:Ue(n.zone,Xe.defaultZone),loc:st.fromObject(n)});throw new g("fromSeconds requires a numerical input")},e.fromObject=function(t){var n=Ue(t.zone,Xe.defaultZone);if(!n.isValid)return e.invalid(Hn(n));var r=Xe.now(),i=n.offset(r),a=de(t,Kn,["zone","locale","outputCalendar","numberingSystem"]),o=!V(a.ordinal),s=!V(a.year),u=!V(a.month)||!V(a.day),c=s||u,d=a.weekYear||a.weekNumber,f=st.fromObject(t);if((c||o)&&d)throw new p("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&o)throw new p("Can't mix ordinal dates with month/day");var h,m,g=d||a.weekday&&!c,y=zn(r,i);g?(h=Xn,m=$n,y=En(y)):o?(h=Qn,m=Yn,y=Mn(y)):(h=Jn,m=Gn);for(var v,w=!1,x=l(h);!(v=x()).done;){var b=v.value;V(a[b])?a[b]=w?m[b]:y[b]:w=!0}var S,T,F,C,k,D,I,N=(g?(k=U((C=a).weekYear),D=X(C.weekNumber,1,oe(C.weekYear)),I=X(C.weekday,1,7),k?D?!I&&kn("weekday",C.weekday):kn("week",C.week):kn("weekYear",C.weekYear)):o?(T=U((S=a).year),F=X(S.ordinal,1,re(S.year)),T?!F&&kn("ordinal",S.ordinal):kn("year",S.year)):An(a))||jn(a);if(N)return e.invalid(N);var E=Vn(g?Ln(a):o?On(a):a,i,n),L=new e({ts:E[0],zone:n,o:E[1],loc:f});return a.weekday&&c&&t.weekday!==L.weekday?e.invalid("mismatched weekday","you can't specify both a weekday of "+a.weekday+" and a date of "+L.toISO()):L},e.fromISO=function(e,t){void 0===t&&(t={});var n=ct(e,[_t,qt],[Ht,zt],[Pt,Vt],[Rt,Wt]);return Un(n[0],n[1],t,"ISO 8601",e)},e.fromRFC2822=function(e,t){void 0===t&&(t={});var n=ct(e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim(),[Nt,Et]);return Un(n[0],n[1],t,"RFC 2822",e)},e.fromHTTP=function(e,t){void 0===t&&(t={});var n=ct(e,[Lt,At],[Mt,At],[Ot,jt]);return Un(n[0],n[1],t,"HTTP",t)},e.fromFormat=function(t,n,r){if(void 0===r&&(r={}),V(t)||V(n))throw new g("fromFormat requires an input string and a format");var i,a=r.locale,o=void 0===a?null:a,s=r.numberingSystem,u=void 0===s?null:s,l=[(i=Tn(st.fromOpts({locale:o,numberingSystem:u,defaultToEN:!0}),t,n)).result,i.zone,i.invalidReason],c=l[0],d=l[1],f=l[2];return f?e.invalid(f):Un(c,d,r,"format "+n,t)},e.fromString=function(t,n,r){return void 0===r&&(r={}),e.fromFormat(t,n,r)},e.fromSQL=function(e,t){void 0===t&&(t={});var n=ct(e,[Ut,Zt],[Bt,Gt]);return Un(n[0],n[1],t,"SQL",e)},e.invalid=function(t,n){if(void 0===n&&(n=null),!t)throw new g("need to specify a reason the DateTime is invalid");var r=t instanceof Me?t:new Me(t,n);if(Xe.throwOnInvalid)throw new d(r);return new e({invalid:r})},e.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var t=e.prototype;return t.get=function(e){return this[e]},t.resolvedLocaleOpts=function(e){void 0===e&&(e={});var t=Le.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(Ve.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=Ue(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=Vn(this.toObject(),l,t)[0]}return Rn(this,{ts:u,zone:t})}return e.invalid(Hn(t))},t.reconfigure=function(e){var t=void 0===e?{}:e,n=t.locale,r=t.numberingSystem,i=t.outputCalendar;return Rn(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=de(e,Kn,[]);V(n.weekYear)&&V(n.weekNumber)&&V(n.weekday)?V(n.ordinal)?(t=Object.assign(this.toObject(),n),V(n.day)&&(t.day=Math.min(ie(t.year,t.month),t.day))):t=On(Object.assign(Mn(this.c),n)):t=Ln(Object.assign(En(this.c),n));var r=Vn(t,this.o,this.zone);return Rn(this,{ts:r[0],o:r[1]})},t.plus=function(e){return this.isValid?Rn(this,Wn(this,on(e))):this},t.minus=function(e){return this.isValid?Rn(this,Wn(this,on(e).negate())):this},t.startOf=function(e){if(!this.isValid)return this;var t={},n=an.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={})[e]=1,t)).startOf(e).minus(1):this},t.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?Le.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):_n},t.toLocaleString=function(e){return void 0===e&&(e=b),this.isValid?Le.create(this.loc.clone(e),e).formatDateTime(this):_n},t.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?Le.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},t.toISO=function(e){return void 0===e&&(e={}),this.isValid?this.toISODate(e)+"T"+this.toISOTime(e):null},t.toISODate=function(e){var t=(void 0===e?{}:e).format,n="basic"===(void 0===t?"extended":t)?"yyyyMMdd":"yyyy-MM-dd";return 9999<this.year&&(n="+"+n),Bn(this,n)},t.toISOWeekDate=function(){return Bn(this,"kkkk-'W'WW-c")},t.toISOTime=function(e){var t=void 0===e?{}:e,n=t.suppressMilliseconds,r=void 0!==n&&n,i=t.suppressSeconds,a=void 0!==i&&i,o=t.includeOffset,s=void 0===o||o,u=t.format;return Zn(this,{suppressSeconds:a,suppressMilliseconds:r,includeOffset:s,format:void 0===u?"extended":u})},t.toRFC2822=function(){return Bn(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},t.toHTTP=function(){return Bn(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},t.toSQLDate=function(){return Bn(this,"yyyy-MM-dd")},t.toSQLTime=function(e){var t=void 0===e?{}:e,n=t.includeOffset,r=void 0===n||n,i=t.includeZone;return Zn(this,{includeOffset:r,includeZone:void 0!==i&&i,spaceZone:!0})},t.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},t.toString=function(){return this.isValid?this.toISO():_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.toJSON=function(){return this.toISO()},t.toBSON=function(){return this.toJSDate()},t.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},t.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},t.diff=function(e,t,n){if(void 0===t&&(t="milliseconds"),void 0===n&&(n={}),!this.isValid||!e.isValid)return an.invalid(this.invalid||e.invalid,"created by diffing an invalid DateTime");var r,i=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),a=(r=t,(Array.isArray(r)?r:[r]).map(an.normalizeUnit)),o=e.valueOf()>this.valueOf(),s=function(e,t,n,r){var i,a=function(e,t,n){for(var r,i,a={},o=0,s=[["years",function(e,t){return t.year-e.year}],["months",function(e,t){return t.month-e.month+12*(t.year-e.year)}],["weeks",function(e,t){var n=cn(e,t);return(n-n%7)/7}],["days",cn]];o<s.length;o++){var u=s[o],l=u[0],c=u[1];if(0<=n.indexOf(l)){var d;r=l;var f,h=c(e,t);t<(i=e.plus(((d={})[l]=h,d)))?(e=e.plus(((f={})[l]=h-1,f)),--h):e=i,a[l]=h}}return[e,a,i,r]}(e,t,n),o=a[0],s=a[1],u=a[2],l=a[3],c=t-o,d=n.filter((function(e){return 0<=["hours","minutes","seconds","milliseconds"].indexOf(e)}));0===d.length&&(u<t&&(u=o.plus(((i={})[l]=1,i))),u!==o&&(s[l]=(s[l]||0)+c/(u-o)));var f,h=an.fromObject(Object.assign(s,r));return 0<d.length?(f=an.fromMillis(c,r)).shiftTo.apply(f,d).plus(h):h}(o?this:e,o?e:this,a,i);return o?s.negate():s},t.diffNow=function(t,n){return void 0===t&&(t="milliseconds"),void 0===n&&(n={}),this.diff(e.local(),t,n)},t.until=function(e){return this.isValid?un.fromDateTimes(this,e):this},t.hasSame=function(e,t){if(!this.isValid)return!1;if("millisecond"===t)return this.valueOf()===e.valueOf();var n=e.valueOf();return this.startOf(t)<=n&&n<=this.endOf(t)},t.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},t.toRelative=function(t){if(void 0===t&&(t={}),!this.isValid)return null;var n=t.base||e.fromObject({zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0;return tr(n,this.plus(r),Object.assign(t,{numeric:"always",units:["years","months","days","hours","minutes","seconds"]}))},t.toRelativeCalendar=function(t){return void 0===t&&(t={}),this.isValid?tr(t.base||e.fromObject({zone:this.zone}),this,Object.assign(t,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},e.min=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.every(e.isDateTime))throw new g("min requires all arguments be DateTimes");return $(n,(function(e){return e.valueOf()}),Math.min)},e.max=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.every(e.isDateTime))throw new g("max requires all arguments be DateTimes");return $(n,(function(e){return e.valueOf()}),Math.max)},e.fromFormatExplain=function(e,t,n){void 0===n&&(n={});var r=n.locale,i=void 0===r?null:r,a=n.numberingSystem,o=void 0===a?null:a;return Tn(st.fromOpts({locale:i,numberingSystem:o,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?Pn(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?Pn(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?Pn(this).weekday:NaN}},{key:"ordinal",get:function(){return this.isValid?Mn(this.c).ordinal:NaN}},{key:"monthShort",get:function(){return this.isValid?ln.months("short",{locale:this.locale})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?ln.months("long",{locale:this.locale})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?ln.weekdays("short",{locale:this.locale})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?ln.weekdays("long",{locale:this.locale})[this.weekday-1]:null}},{key:"offset",get:function(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function(){return this.isValid?this.zone.universal:null}},{key:"isInDST",get:function(){return!this.isOffsetFixed&&(this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return ne(this.year)}},{key:"daysInMonth",get:function(){return ie(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?re(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?oe(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return b}},{key:"DATE_MED",get:function(){return S}},{key:"DATE_FULL",get:function(){return T}},{key:"DATE_HUGE",get:function(){return F}},{key:"TIME_SIMPLE",get:function(){return C}},{key:"TIME_WITH_SECONDS",get:function(){return k}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return D}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return I}},{key:"TIME_24_SIMPLE",get:function(){return N}},{key:"TIME_24_WITH_SECONDS",get:function(){return E}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return L}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return M}},{key:"DATETIME_SHORT",get:function(){return O}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return A}},{key:"DATETIME_MED",get:function(){return j}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return _}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return H}},{key:"DATETIME_FULL",get:function(){return P}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return R}},{key:"DATETIME_HUGE",get:function(){return q}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return z}}]),e}();function rr(e){if(nr.isDateTime(e))return e;if(e&&e.valueOf&&W(e.valueOf()))return nr.fromJSDate(e);if(e&&"object"==typeof e)return nr.fromObject(e);throw new g("Unknown datetime argument: "+e+", of type "+typeof e)}return e.DateTime=nr,e.Duration=an,e.FixedOffsetZone=Ve,e.IANAZone=qe,e.Info=ln,e.Interval=un,e.InvalidZone=We,e.LocalZone=je,e.Settings=Xe,e.Zone=Oe,e}({});!function(){"use strict";var e=Math.PI,t=Math.sin,n=Math.cos,r=Math.tan,i=Math.asin,a=Math.atan2,o=Math.acos,s=e/180,u=864e5,l=2440588,c=2451545;function d(e){return new Date((e+.5-l)*u)}function f(e){return function(e){return e.valueOf()/u-.5+l}(e)-c}var h=23.4397*s;function p(e,i){return a(t(e)*n(h)-r(i)*t(h),n(e))}function m(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 y(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 w(e){return s*(357.5291+.98560028*e)}function x(n){return n+s*(1.9148*t(n)+.02*t(2*n)+3e-4*t(3*n))+102.9372*s+e}function b(e){var t=x(w(e));return{dec:m(t,0),ra:p(t,0)}}var S={getPosition:function(e,t,n){var r=s*-n,i=s*t,a=f(e),o=b(a),u=v(a,r)-o.ra;return{azimuth:g(u,i,o.dec),altitude:y(u,i,o.dec)}}},T=S.times=[[-.833,"sunrise","sunset"],[-.3,"sunriseEnd","sunsetStart"],[-6,"dawn","dusk"],[-12,"nauticalDawn","nauticalDusk"],[-18,"nightEnd","night"],[6,"goldenHourEnd","goldenHour"]];S.addTime=function(e,t,n){T.push([e,t,n])};var F=9e-4;function C(t,n,r){return F+(t+n)/(2*e)+r}function k(e,n,r){return c+e+.0053*t(n)-.0069*t(2*r)}function D(e,r,i,a,s,u,l){return k(C(function(e,r,i){return o((t(e)-t(r)*t(i))/(n(r)*n(i)))}(e,i,a),r,s),u,l)}function I(e){var r=s*(134.963+13.064993*e),i=s*(93.272+13.22935*e),a=s*(218.316+13.176396*e)+6.289*s*t(r),o=5.128*s*t(i),u=385001-20905*n(r);return{ra:p(a,o),dec:m(a,o),dist:u}}function N(e,t){return new Date(e.valueOf()+t*u/24)}S.getTimes=function(t,n,r,i){var a,o,u,l,c,h=s*-r,p=s*n,g=function(e){return-2.076*Math.sqrt(e)/60}(i=i||0),y=function(t,n){return Math.round(t-F-n/(2*e))}(f(t),h),v=C(0,h,y),b=w(v),S=x(b),I=m(S,0),N=k(v,b,S),E={solarNoon:d(N),nadir:d(N-.5)};for(a=0,o=T.length;a<o;a+=1)c=N-((l=D(((u=T[a])[0]+g)*s,h,p,I,y,b,S))-N),E[u[1]]=d(c),E[u[2]]=d(l);return E},S.getMoonPosition=function(e,i,o){var u=s*-o,l=s*i,c=f(e),d=I(c),h=v(c,u)-d.ra,p=y(h,l,d.dec),m=a(t(h),r(l)*n(d.dec)-t(d.dec)*n(h));return p+=function(e){return e<0&&(e=0),2967e-7/Math.tan(e+.00312536/(e+.08901179))}(p),{azimuth:g(h,l,d.dec),altitude:p,distance:d.dist,parallacticAngle:m}},S.getMoonIllumination=function(e){var r=f(e||new Date),i=b(r),s=I(r),u=149598e3,l=o(t(i.dec)*t(s.dec)+n(i.dec)*n(s.dec)*n(i.ra-s.ra)),c=a(u*t(l),s.dist-u*n(l)),d=a(n(i.dec)*t(i.ra-s.ra),t(i.dec)*n(s.dec)-n(i.dec)*t(s.dec)*n(i.ra-s.ra));return{fraction:(1+n(c))/2,phase:.5+.5*c*(d<0?-1:1)/Math.PI,angle:d}},S.getMoonTimes=function(e,t,n,r){var i=new Date(e);r?i.setUTCHours(0,0,0,0):i.setHours(0,0,0,0);for(var a,o,u,l,c,d,f,h,p,m,g,y,v,w=.133*s,x=S.getMoonPosition(i,t,n).altitude-w,b=1;b<=24&&(a=S.getMoonPosition(N(i,b),t,n).altitude-w,h=((c=(x+(o=S.getMoonPosition(N(i,b+1),t,n).altitude-w))/2-a)*(f=-(d=(o-x)/2)/(2*c))+d)*f+a,m=0,(p=d*d-4*c*a)>=0&&(g=f-(v=Math.sqrt(p)/(2*Math.abs(c))),y=f+v,Math.abs(g)<=1&&m++,Math.abs(y)<=1&&m++,g<-1&&(g=y)),1===m?x<0?u=b+g:l=b+g:2===m&&(u=b+(h<0?y:g),l=b+(h<0?g:y)),!u||!l);b+=2)x=o;var T={};return u&&(T.rise=N(i,u)),l&&(T.set=N(i,l)),u||l||(T[h>0?"alwaysUp":"alwaysDown"]=!0),T},"object"==typeof exports&&"undefined"!=typeof module?module.exports=S:"function"==typeof define&&define.amd?define(S):window.SunCalc=S}();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")};class WeatherDisplay{constructor(e,t,n){this.navId=e,this.elemId=void 0,this.gifs=[],this.data=void 0,this.loadingStatus=STATUS.loading,this.name=n||t,this.timing={totalScreens:1,baseDelay:5e3,delay:1},this.navBaseCount=0,this.screenIndex=0,this.setStatus(STATUS.loading),this.createCanvas(t)}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;document.getElementById("container").innerHTML+=`<canvas id='${e+"Canvas"}' width='${t}' height='${n}'/ style='display: none;'>`}getData(){if(this.data=void 0,this.setStatus(STATUS.loading),Array.isArray(this.timing.delay)&&"number"==typeof this.timing.delay[0]&&!this.timing.fullDelay){let e=0;this.timing.fullDelay=this.timing.delay.map(t=>{const n=e+t;return e+=t,n})}Array.isArray(this.timing.delay)&&(this.timing.totalScreens=this.timing.delay.length)}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.context.clearRect(0,0,this.canvas.width,this.canvas.height)}finishDraw(){let e=!0,t=!0,n=!0,r=!0,i=void 0;"almanac"===this.elemId&&(t=!1),"travelForecast"===this.elemId&&(t=!1),"regionalForecast0"===this.elemId&&(t=!1),"regionalForecast1"===this.elemId&&(t=!1),"regionalForecast2"===this.elemId&&(t=!1),"radar"===this.elemId&&(e=!1,n=!1,t=!1),"hazards"===this.elemId&&(t=!1,i=!0,r=!1),n&&(this.drawCurrentDateTime(i),this.dateTimeInterval||setInterval(()=>this.drawCurrentDateTime(i),100)),r&&this.drawLogoImage(),t&&this.drawNoaaImage()}drawCurrentDateTime(e){if(!this.isActive())return;const{DateTime:t}=luxon,n="Star4000 Small",r="24pt",i="#ffffff";if(!this.dateTimeBackground){const e=this.context.getImageData(410,30,175,60);if(0===e.data[0])return;this.dateTimeBackground=e}e?draw.box(this.context,"rgb(25, 50, 112)",0,389,640,16):this.context.putImageData(this.dateTimeBackground,410,30);const a=t.local(),o=a.toLocaleString(t.TIME_WITH_SECONDS).padStart(11," ");let s,u;e?(s=400,u=402):(s=410,u=65),navigation.units()===UNITS.metric&&(s+=45),draw.text(this.context,n,r,i,s,u,o.toUpperCase(),2);const l=a.toFormat(" ccc LLL ")+a.day.toString().padStart(2," ");e?(s=55,u=402):(s=410,u=85),draw.text(this.context,n,r,i,s,u,l.toUpperCase(),2)}async drawNoaaImage(){this.drawNoaaImage.image||(this.drawNoaaImage.image=utils.image.load("images/noaa5.gif"));const e=await this.drawNoaaImage.image;this.context.drawImage(e,356,39)}async drawLogoImage(){this.drawLogoImage.image||(this.drawLogoImage.image=utils.image.load("images/Logo3.png"));const e=await this.drawLogoImage.image;this.context.drawImage(e,50,30,85,67)}showCanvas(e){if(e===navigation.msg.command.firstFrame&&this.navNext(e),e===navigation.msg.command.lastFrame&&this.navPrev(e),"block"===this.canvas.style.display)return!1;this.canvas.style.display="block",this.startNavCount(navigation.isPlaying()),e||e&&this.drawCanvas()}hideCanvas(){this.stopNavBaseCount(!0),this.canvas&&(this.canvas.style.display="none")}isActive(){return null!==document.getElementById(this.elemId+"Canvas").offsetParent}navBaseTime(){if(navigation.isPlaying()&&this.isActive())if(this.navBaseCount++,this.baseCountChange&&this.baseCountChange(this.navBaseCount),"number"!=typeof this.timing.delay){if(Array.isArray(this.timing.delay)&&"number"==typeof this.timing.delay[0]){if(this.timing.fullDelay.indexOf(this.navBaseCount)<0&&this.navBaseCount<=this.timing.fullDelay[this.timing.totalScreens-1])return;this.navNext()}}else this.navNext()}navNext(e){if(e===navigation.msg.command.firstFrame?this.resetNavBaseCount():this.screenIndex++,this.screenIndex>=this.timing.totalScreens)return this.screenIndex=this.timing.totalScreens-1,this.sendNavDisplayMessage(navigation.msg.response.next),void this.stopNavBaseCount();this.baseCountFromScreenIndex(),this.screenIndexChange?this.screenIndexChange(this.screenIndex):this.drawCanvas()}navPrev(e){if(e===navigation.msg.command.lastFrame?this.screenIndex=this.timing.totalScreens-1:this.screenIndex--,this.screenIndex<0)return this.screenIndex=0,void this.sendNavDisplayMessage(navigation.msg.response.previous);this.baseCountFromScreenIndex(),this.screenIndexChange?this.screenIndexChange(this.screenIndex):this.drawCanvas()}baseCountFromScreenIndex(){Array.isArray(this.timing.delay)&&(0!==this.screenIndex?this.navBaseCount=this.timing.fullDelay[this.screenIndex]:this.navBaseCount=0)}startNavCount(e){e&&this.resetNavBaseCount(),this.navInterval||(this.navInterval=setInterval(()=>this.navBaseTime(),this.timing.baseDelay))}stopNavBaseCount(e){clearInterval(this.navInterval),this.navInterval=void 0,e&&this.resetNavBaseCount()}resetNavBaseCount(){this.navBaseCount=0,this.screenIndex=0}sendNavDisplayMessage(e){navigation.displayNavMessage({id:this.navId,type:e})}}const icons=(()=>{const e=e=>"images/r/"+e;return{getWeatherIconFromIconLink:function(t,n=!0){let r=t.toLowerCase().match(/[^/]+$/)[0].match(/(.*?)[,?&.]/)[1];if("dualimage"===r){r=t.match(/&j=(.*)&/)[1]}switch(r+(n?"":"-n")){case"skc":return e("Sunny.gif");case"skc-n":return e("Clear.gif");case"cc_mostlycloudy1.gif":return e("Mostly-Cloudy.gif");case"cc_mostlycloudy0.gif":return e("Partly-Clear.gif");case"cc_partlycloudy1.gif":return e("Partly-Cloudy.gif");case"cc_partlycloudy0.gif":return e("Mostly-Clear.gif");case"cc_cloudy.gif":return e("Cloudy.gif");case"cc_fog.gif":return e("Fog.gif");case"sleet.gif":return e("Sleet.gif");case"ef_scatshowers.gif":return e("Scattered-Showers.gif");case"cc_showers.gif":return e("Shower.gif");case"cc_rain.gif":return e("Rain.gif");case"light-snow.gif":return e("Light-Snow.gif");case"cc_snowshowers.gif":return e("Heavy-Snow.gif");case"cc_snow.gif":case"heavy-snow.gif":return e("Heavy-Snow.gif");case"cc_rainsnow.gif":return e("Rain-Snow.gif");case"cc_freezingrain.gif":return e("Freezing-Rain.gif");case"cc_mix.gif":return e("Wintry-Mix.gif");case"freezing-rain-sleet.gif":return e("Freezing-Rain-Sleet.gif");case"snow-sleet.gif":return e("Snow-Sleet.gif");case"ef_scattstorms.gif":return e("Scattered-Tstorms.gif");case"ef_scatsnowshowers.gif":return e("Scattered-Snow-Showers.gif");case"cc_tstorm.gif":case"ef_isolatedtstorms.gif":return e("Thunderstorm.gif");case"cc_windy.gif":case"cc_windy2.gif":return e("Windy.gif");case"blowing-snow.gif":return e("Blowing-Snow.gif");default:return console.error("Unable to locate icon for '"+t+"'"),!1}},getWeatherRegionalIconFromIconLink:(t,n)=>{void 0===n&&(n=t.indexOf("/night/")>=0);let r=t.toLowerCase().match(/[^/]+$/)[0].match(/(.*?)[,?&.]/)[1];if("dualimage"===r){r=t.match(/&j=(.*)&/)[1]}switch(r+(n?"-n":"")){case"skc":case"hot":case"haze":return e("Sunny.gif");case"skc-n":case"nskc":case"nskc-n":return e("Clear-1992.gif");case"bkn":return e("Mostly-Cloudy-1994-2.gif");case"bkn-n":case"few-n":case"nfew-n":case"nfew":return e("Partly-Clear-1994-2.gif");case"sct":case"few":return e("Partly-Cloudy.gif");case"sct-n":case"nsct":case"nsct-n":return e("Mostly-Clear.gif");case"ovc":return e("Cloudy.gif");case"fog":return e("Fog.gif");case"rain_sleet":return e("Sleet.gif");case"rain_showers":case"rain_showers_high":return e("Scattered-Showers-1994-2.gif");case"rain_showers-n":case"rain_showers_high-n":return e("Scattered-Showers-Night-1994-2.gif");case"rain":return e("Rain-1992.gif");case"snow":return e("Heavy-Snow-1994-2.gif");case"rain_snow":return e("Rain-Snow-1992.gif");case"snow_fzra":return e("Freezing-Rain-Snow-1992.gif");case"fzra":return e("Freezing-Rain-1992.gif");case"snow_sleet":return e("Wintry-Mix-1992.gif");case"tsra_sct":case"tsra":return e("Scattered-Tstorms-1994-2.gif");case"tsra_sct-n":case"tsra-n":return e("Scattered-Tstorms-Night-1994-2.gif");case"tsra_hi":case"tsra_hi-n":case"hurricane":return e("Thunderstorm.gif");case"wind_few":case"wind_sct":case"wind_bkn":case"wind_ovc":return e("Wind.gif");case"wind_skc":return e("Sunny-Wind-1994.gif");case"wind_skc-n":return e("Clear-Wind-1994.gif");case"blizzard":return e("Blowing Snow.gif");default:return console.log(`Unable to locate regional icon for ${t} ${n}`),!1}}}})(),utils=(()=>{Math.round2=(e,t)=>Number(Math.round(e+"e"+t)+"e-"+t);const e=e=>{switch(e){case"EST":return-5;case"EDT":return-4;case"CST":return-6;case"CDT":return-5;case"MST":return-7;case"MDT":return-6;case"PST":return-8;case"PDT":return-7;case"AST":case"AKST":return-9;case"ADT":case"AKDT":return-8;case"HST":return-10;case"HDT":return-9;default:return null}};Date.prototype.getTimeZone=function(){const e=this.toLocaleTimeString("en-us",{timeZoneName:"short"}).split(" ")[2];if(null===e)switch(this.toTimeString().split(" ")[2]){case"(Eastern":return"EST";case"(Central":return"CST";case"(Mountain":return"MST";case"(Pacific":return"PST";case"(Alaskan":return"AST";case"(Hawaiian":return"HST"}else if(4===e.length)return e.substr(1);return e},Date.prototype.addHours=function(e){var t=new Date(this.valueOf());return t.setHours(t.getHours()+e),t},Date.prototype.getDayShortName=function(){return["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][this.getDay()]},Date.prototype.getMonthShortName=function(){return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][this.getMonth()]};Date.prototype.getFormattedTime=function(){let e,t,n;switch(_Units){case Units.English:return e=0===this.getHours()?"12":this.getHours()>12?this.getHours()-12:this.getHours(),t=(this.getMinutes()<10?"0":"")+this.getMinutes(),n=this.getHours()<12?"am":"pm",e+":"+t+" "+n;default:return e=(this.getHours()<10?" ":"")+this.getHours(),t=(this.getMinutes()<10?"0":"")+this.getMinutes(),e+":"+t}},Date.prototype.toTimeAMPM=function(){let e=this.getHours(),t=this.getMinutes(),n=e>=12?"pm":"am";return e%=12,e=e||12,t=t<10?"0"+t:t,e+":"+t+" "+n};return String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var n=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>n.length)&&(t=n.length),t-=e.length;var r=n.lastIndexOf(e,t);return-1!==r&&r===t}),String.prototype.wordWrap=function(){let e,t,n,r,i,a=this,o=arguments.length>=1?arguments[0]:75,s=arguments.length>=2?arguments[1]:"\n",u=arguments.length>=3&&arguments[2];if(a+="",o<1)return a;for(e=-1,n=(i=a.split(/\r\n|\n|\r/)).length;++e<n;i[e]+=r)for(r=i[e],i[e]="";r.length>o;i[e]+=r.slice(0,t)+((r=r.slice(t)).length?s:""))t=2===u||(t=r.slice(0,o+1).match(/\S*(\s)?$/))[1]?o:t.input.length-t[0].length||!0===u&&o||t.input.length+(t=r.slice(o).match(/^\S*/))[0].length;return i.join("\n").replace(/\n /g,"\n")},{image:{load:e=>new Promise(t=>{const n=new Image;n.onload=e=>{t(e.target)},e instanceof Blob?n.src=window.URL.createObjectURL(e):n.src=e}),superGifAsync:e=>new Promise(t=>{const n=new SuperGif(e);n.load(()=>t(n))})},weather:{getPoint:async(e,t)=>{try{return await $.ajax({type:"GET",url:`https://api.weather.gov/points/${e},${t}`,dataType:"json",crossDomain:!0})}catch(n){return console.error("Unable to get point"),console.error(e,t),console.error(n),!1}}},units:{mphToKph:e=>Math.round(1.60934*e),kphToMph:e=>Math.round(e/1.60934),celsiusToFahrenheit:e=>Math.round(9*e/5+32),fahrenheitToCelsius:e=>Math.round2(5*(e-32)/9,1),milesToKilometers:e=>Math.round(1.60934*e),kilometersToMiles:e=>Math.round(e/1.60934),feetToMeters:e=>Math.round(.3048*e),metersToFeet:e=>Math.round(e/.3048),inchesToCentimeters:e=>Math.round2(2.54*e,2),pascalToInHg:e=>Math.round2(2953e-7*e,2)},calc:{relativeHumidity:(e,t)=>{const n=e,r=t;return Math.round(Math.exp(17.625*r/(243.04+r))/Math.exp(17.625*n/(243.04+n))*100)},heatIndex:(e,t)=>{const n=e,r=t;let i,a=.5*(n+61+1.2*(n-68)+.094*r);return n>=80&&(a=2.04901523*n-42.379+10.14333127*r-.22475541*n*r-.00683783*n*n-.05481717*r*r+.00122874*n*n*r+85282e-8*n*r*r-199e-8*n*n*r*r,r<13&&n>80&&n<112?(i=(13-r)/4*Math.sqrt((17-Math.abs(n-95))/17),a-=i):r>85&&n>80&&n<87&&(i=(r-85)/10*((87-n)/5),a+=i)),a<e&&(a=e),Math.round(a)},windChill:(e,t)=>{if("0"===t||"Calm"===t||"NA"===t)return"";const n=e,r=t;return Math.round(35.74+.6215*n-35.75*Math.pow(r,.16)+.4275*n*Math.pow(r,.16))},directionToNSEW:e=>["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"][Math.floor(e/22.5+.5)%16],distance:(e,t,n,r)=>Math.sqrt((n-=e)*n+(r-=t)*r),wrap:(e,t)=>(e%t+t)%t},dateTime:{getDateFromUTC:(e,t)=>{const n=t.split(":");return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),n[0],n[1],0))},getTimeZoneOffsetFromUTC:e,dateToTimeZone:(t,n)=>{const r=e(t.getTimeZone()),i=e(n);let a=new Date(t);return a=a.addHours(-1*r),a=a.addHours(i),a},getDateFromTime:(t,n,r)=>{const i=n.split(":");if(r){const n=-1*e(r);return new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),i[0],i[1],0)).addHours(n)}return new Date(t.getFullYear(),t.getMonth(),t.getDate(),i[0],i[1],0)},xmlDateToJsDate:e=>{let t=e.split(/[-T:+]/g);void 0===t[5]&&console.log("bit[5] is undefined"),t[5]=t[5].replace("Z","");const n=new Date(t[0],t[1]-1,t[2]);n.setHours(t[3],t[4],t[5]),t.length<8&&(t.push("00"),t.push("00"));const r=("-"===(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1:1)*(60*t[6]+Number(t[7]));return n.setMinutes(n.getMinutes()-r-n.getTimezoneOffset())},timeTo24Hour:e=>{const t=e.substr(e.length-2),n=e.split(":")[1].substr(0,2);let r=e.split(":")[0];switch(t.toLowerCase()){case"am":"12"===r&&(r="0");break;case"pm":"12"!==r&&(r=(parseInt(r)+12).toString())}return r+":"+n}},object:{shallowEqual:(e,t)=>{if("object"!=typeof e)return!1;if("object"!=typeof t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const r of n)if("object"!=typeof e[r]&&e[r]!==t[r])return!1;return!0}}}})();$.ajaxCORS=function(e){return e.url=e.url.replace("https://api.weather.gov/",""),$.ajax(e)};class CurrentWeather extends WeatherDisplay{constructor(e,t,n){super(e,t,"Current Conditions"),this.backgroundImage=utils.image.load("images/BackGround1_1.png"),this.getData(n)}async getData(e){let t,n;super.getData();try{const r=$.ajaxCORS({type:"GET",url:`https://api.weather.gov/stations/${e.stationId}/observations`,data:{limit:2},dataType:"json",crossDomain:!0}),i=$.ajax({type:"GET",url:"https://api.weather.gov/stations/"+e.stationId,dataType:"json",crossDomain:!0});[t,n]=await Promise.all([r,i])}catch(e){return console.error("Unable to get current observations"),console.error(e),void this.setStatus(STATUS.error)}this.data=Object.assign({},t,{station:n}),this.drawCanvas()}async drawCanvas(){super.drawCanvas();const e=this.data.features[0].properties;let t=Math.round(e.temperature.value),n=Math.round(e.dewpoint.value),r=Math.round(e.cloudLayers[0].base.value),i="m.",a=Math.round(e.visibility.value/1e3),o=" km.",s=Math.round(e.windSpeed.value);const u=utils.calc.directionToNSEW(e.windDirection.value);let l=Math.round(e.barometricPressure.value),c=Math.round(e.heatIndex.value),d=Math.round(e.windChill.value),f=Math.round(e.windGust.value),h=Math.round(e.relativeHumidity.value);const p=icons.getWeatherRegionalIconFromIconLink(e.icon);let m="";const g=e.textDescription,y=e.barometricPressure.value-this.data.features[1].properties.barometricPressure.value;y>150&&(m="R"),y<-150&&(m="F"),navigation.units()===UNITS.english&&(t=utils.units.celsiusToFahrenheit(t),n=utils.units.celsiusToFahrenheit(n),r=100*Math.round(utils.units.metersToFeet(r)/100),i="ft.",a=utils.units.kilometersToMiles(e.visibility.value/1e3),o=" mi.",s=utils.units.kphToMph(s),l=utils.units.pascalToInHg(l),c=utils.units.celsiusToFahrenheit(c),d=utils.units.celsiusToFahrenheit(d),f=utils.units.kphToMph(f)),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,t+String.fromCharCode(176),2);let v=e.textDescription;switch(g.length>15&&(v=this.shortConditions(v)),draw.text(this.context,"Star4000 Extended","24pt","#FFFFFF",195,170,v,2,"center"),draw.text(this.context,"Star4000 Extended","24pt","#FFFFFF",80,330,"Wind:",2),draw.text(this.context,"Star4000 Extended","24pt","#FFFFFF",300,330,u+" "+s,2,"right"),f&&draw.text(this.context,"Star4000 Extended","24pt","#FFFFFF",80,375,"Gusts to "+f,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,h+"%",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,n+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,""===r?"Unlimited":r+i,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,a+o,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,l,2,"right"),m){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.heatIndex.value&&c!==t?(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,c+String.fromCharCode(176),2,"right")):e.windChill.value&&""!==d&&d<t&&(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,d+String.fromCharCode(176),2,"right")),this.gifs.push(await utils.image.superGifAsync({src:p,loop_delay:100,auto_play:!0,canvas:this.canvas,x:140,y:175,max_width:126})),this.finishDraw(),this.setStatus(STATUS.loaded)}shortConditions(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/Light/g,"L")).replace(/Heavy/g,"H")).replace(/Partly/g,"P")).replace(/Mostly/g,"M")).replace(/Few/g,"F")).replace(/Thunderstorm/g,"T'storm")).replace(/ in /g,"")).replace(/Vicinity/g,"")).replace(/ and /g," ")).replace(/Freezing Rain/g,"Frz Rn")).replace(/Freezing/g,"Frz")).replace(/Unknown Precip/g,"")).replace(/L Snow Fog/g,"L Snw/Fog")).replace(/ with /g,"/")}}class LatestObservations extends WeatherDisplay{constructor(e,t,n){super(e,t,"Latest Observations"),this.backgroundImage=utils.image.load("images/BackGround1_1.png"),this.MaximumRegionalStations=7,this.getData(n)}async getData(e){super.getData();const t=Object.keys(_StationInfo).map(t=>{const n=_StationInfo[t],r=utils.calc.distance(n.Latitude,n.Longitude,e.latitude,e.longitude);return Object.assign({},n,{distance:r})}).sort((e,t)=>e.distance-t.distance).slice(0,30),n=(await Promise.all(t.map(async e=>{try{const t=await $.ajax({type:"GET",url:`https://api.weather.gov/stations/${e.StationId}/observations/latest`,dataType:"json",crossDomain:!0});return Object.assign({},t.properties,{StationId:e.StationId,City:e.City})}catch(t){return void console.log("Unable to get latest observations for "+e.StationId)}}))).filter(e=>e);this.data=n.slice(0,this.MaximumRegionalStations),this.drawCanvas()}async drawCanvas(){super.drawCanvas();const e=this.data.sort((e,t)=>e.Name<t.Name?-1:e.Name>t.Name?1:0);this.context.drawImage(await this.backgroundImage,0,0),draw.horizontalGradientSingle(this.context,0,30,500,90,draw.topColor1,draw.topColor2),draw.triangle(this.context,"rgb(28, 10, 87)",500,30,450,90,500,90),draw.horizontalGradientSingle(this.context,0,90,52,399,draw.sideColor1,draw.sideColor2),draw.horizontalGradientSingle(this.context,584,90,640,399,draw.sideColor1,draw.sideColor2),draw.titleText(this.context,"Latest","Observations"),navigation.units()===UNITS.english?draw.text(this.context,"Star4000 Small","24pt","#FFFFFF",295,105,String.fromCharCode(176)+"F",2):draw.text(this.context,"Star4000 Small","24pt","#FFFFFF",295,105,String.fromCharCode(176)+"C",2),draw.text(this.context,"Star4000 Small","24pt","#FFFFFF",345,105,"WEATHER",2),draw.text(this.context,"Star4000 Small","24pt","#FFFFFF",495,105,"WIND",2);let t=140;e.forEach(e=>{let n=e.temperature.value,r=e.windSpeed.value;const i=utils.calc.directionToNSEW(e.windDirection.value);navigation.units()===UNITS.english&&(n=utils.units.celsiusToFahrenheit(n),r=utils.units.kphToMph(r)),draw.text(this.context,"Star4000","24pt","#FFFFFF",65,t,e.City.substr(0,14),2),draw.text(this.context,"Star4000","24pt","#FFFFFF",345,t,this.shortenCurrentConditions(e.textDescription).substr(0,9),2),r>0?draw.text(this.context,"Star4000","24pt","#FFFFFF",495,t,i+Array(6-i.length-r.toString().length).join(" ")+r.toString(),2):"NA"===r?draw.text(this.context,"Star4000","24pt","#FFFFFF",495,t,"NA",2):draw.text(this.context,"Star4000","24pt","#FFFFFF",495,t,"Calm",2);const a=325-15*n.toString().length;draw.text(this.context,"Star4000","24pt","#FFFFFF",a,t,n,2),t+=40}),this.finishDraw(),this.setStatus(STATUS.loaded)}shortenCurrentConditions(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/Light/,"L")).replace(/Heavy/,"H")).replace(/Partly/,"P")).replace(/Mostly/,"M")).replace(/Few/,"F")).replace(/Thunderstorm/,"T'storm")).replace(/ in /,"")).replace(/Vicinity/,"")).replace(/ and /," ")).replace(/Freezing Rain/,"Frz Rn")).replace(/Freezing/,"Frz")).replace(/Unknown Precip/,"")).replace(/L Snow Fog/,"L Snw/Fog")).replace(/ with /,"/")}}class TravelForecast extends WeatherDisplay{constructor(e,t,n){super(e,t,"Travel Forecast"),this.backgroundImage=utils.image.load("images/BackGround6_1.png"),this.cityHeight=72,this.timing.baseDelay=20;const r=_TravelCities.length/4,i=Math.floor(r)-2,a=i%1,o=4*this.cityHeight;this.timing.delay=[150+o];for(let e=0;e<i;e++)this.timing.delay.push(o);0!==a&&this.timing.delay.push(Math.round(this.extra*this.cityHeight)),this.timing.delay.push(150),this.getData(n)}async getData(){super.getData();const e=_TravelCities.map(async e=>{try{const t=await utils.weather.getPoint(e.Latitude,e.Longitude),n=await $.ajax({url:t.properties.forecast,dataType:"json",crossDomain:!0}),r=n.properties.periods[0].isDaytime?0:1;return{today:0===r,high:n.properties.periods[r].temperature,low:n.properties.periods[r+1].temperature,name:e.Name,icon:icons.getWeatherRegionalIconFromIconLink(n.properties.periods[r].icon)}}catch(t){return console.error(`GetTravelWeather for ${e.Name} failed`),console.error(t),{name:e.Name}}}),t=await Promise.all(e);this.data=t,this.drawCanvas(!0)}async drawCanvas(e){super.drawCanvas(),this.longCanvas||(this.longCanvas=document.createElement("canvas"),this.longCanvas.width=640,this.longCanvas.height=1728,this.longContext=this.longCanvas.getContext("2d"));const t=this.data;if(e){this.longContext.clearRect(0,0,this.longCanvas.width,this.longCanvas.height),draw.box(this.longContext,"rgb(35, 50, 112)",0,0,640,_TravelCities.length*this.cityHeight);for(let e=0;e<=4;e++){const t=346*e;draw.horizontalGradient(this.longContext,0,t,640,t+346,"#102080","#001040")}await Promise.all(t.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.gifs.push(await utils.image.superGifAsync({src:e.icon,loop_delay:100,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)}))}this.context.drawImage(await this.backgroundImage,0,0),draw.horizontalGradientSingle(this.context,0,30,500,90,draw.topColor1,draw.topColor2),draw.triangle(this.context,"rgb(28, 10, 87)",500,30,450,90,500,90),draw.titleText(this.context,"Travel Forecast","For "+this.getTravelCitiesDayName(t)),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(),this.setStatus(STATUS.loaded)}screenIndexChange(){this.baseCountChange(this.navBaseCount)}baseCountChange(e){const t=this.getLongCanvas();let n=Math.min(t.height-289,e-150);n<0&&(n=0),this.context.drawImage(t,0,n,640,289,0,110,640,289)}getTravelCitiesDayName(e){const{DateTime:t}=luxon;return e.reduce((e,n)=>{if(n&&""===e){return t.local().plus({days:n.today?0:1}).toLocaleString({weekday:"long"})}return e},"")}getLongCanvas(){return this.longCanvas}}const RegionalForecastData=(()=>{let e,t;const n=async e=>{const t={x:240,y:117},n=a(e.latitude,e.longitude,t.x,t.y,e.state),o=u(n.x,n.y,t.x,t.y,e.state);let s=2.5;"HI"===e.State&&(s=1);const l=Object.keys(_StationInfo).map(e=>Object.assign({},_StationInfo[e],{Name:_StationInfo[e].City,targetDistance:s})),c=[..._RegionalCities,...l],f=[];c.forEach(e=>{if(e.Latitude>o.minLat&&e.Latitude<o.maxLat&&e.Longitude>o.minLon&&e.Longitude<o.maxLon-1){const t=e.targetDistance||1;f.reduce((n,r)=>{const i=utils.calc.distance(e.Longitude,e.Latitude,r.Longitude,r.Latitude);return n&&i>=t},!0)&&f.push(e)}});const h=f.map(async t=>{try{const n=await utils.weather.getPoint(t.Latitude,t.Longitude),a=i(n,t),s=await $.ajax({url:n.properties.forecast,dataType:"json",crossDomain:!0}),u=d(t,o.maxLat,o.minLon,e.state),l=await a;return[{daytime:!!l.icon.match(/\/day\//),temperature:utils.units.celsiusToFahrenheit(l.temperature.value),name:t.Name,icon:l.icon,x:u.x,y:u.y},r(s.properties.periods[1],t,u),r(s.properties.periods[2],t,u)]}catch(e){return console.log(`No regional forecast data for '${t.Name}'`),console.error(e),!1}});return{regionalData:(await Promise.all(h)).filter(e=>e),offsetXY:t,sourceXY:n}},r=(e,t,n)=>({daytime:e.isDaytime,temperature:e.temperature||0,name:t.Name,icon:e.icon,x:n.x,y:n.y}),i=async(e,t)=>{try{const t=(await $.ajax({type:"GET",url:e.properties.observationStations,dataType:"json",crossDomain:!0})).features[0].id;return(await $.ajax({type:"GET",url:t+"/observations/latest",dataType:"json",crossDomain:!0})).properties}catch(e){return console.log("Unable to get regional observations for "+t.Name),console.error(e),!1}},a=(e,t,n,r,i)=>{if("AK"===i)return o(...arguments);if("HI"===i)return s(...arguments);let a=0,u=0;return a=55.2*(50.5-e),a-=r,a>1600-2*r?a=1600-2*r:a<0&&(a=0),u=41.775*(-127.5-t)*-1,u-=n,u>2550-2*n?u=2550-2*n:u<0&&(u=0),{x:u,y:a}},o=(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}},s=(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}},u=function(e,t,n,r,i){if("AK"===i)return l(...arguments);if("HI"===i)return c(...arguments);const a=-1*(t/55.2-50.5),o=-1*((t+2*r)/55.2-50.5),s=-1*(-1*e/41.775+127.5),u=-1*(-1*(e+2*n)/41.775+127.5);return{minLat:o,maxLat:a,minLon:s,maxLon:u}},l=(e,t,n,r)=>({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)}),c=(e,t,n,r)=>({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)}),d=(e,t,n,r)=>{"AK"===r&&f(...arguments),"HI"===r&&h(...arguments);let i=57*(e.Longitude-n),a=70*(t-e.Latitude);return a<30&&(a=30),a>282&&(a=282),i<40&&(i=40),i>580&&(i=580),{x:i,y:a}},f=(e,t,n)=>{let r=37*(e.Longitude-n),i=70*(t-e.Latitude);return i<30&&(i=30),i>282&&(i=282),r<40&&(r=40),r>580&&(r=580),{x:r,y:i}},h=(e,t,n)=>{let r=57*(e.Longitude-n),i=70*(t-e.Latitude);return i<30&&(i=30),i>282&&(i=282),r<40&&(r=40),r>580&&(r=580),{x:r,y:i}};return{updateData:r=>(utils.object.shallowEqual(t,r)||(t=r,e=n(r)),e),getDataPromise:()=>e}})();class RegionalForecast extends WeatherDisplay{constructor(e,t,n,r){super(e,t,"Regional Forecast"),this.period=r,this.backgroundImage=utils.image.load("images/BackGround5_1.png"),this.getData(n)}async getData(e){super.getData();let t="images/Basemap2.png";"HI"===e.State?t="images/HawaiiRadarMap4.png":"AK"===e.State&&(t="images/AlaskaRadarMap6.png"),this.baseMap=utils.image.load(t),this.data=await RegionalForecastData.updateData(e),this.drawCanvas()}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.period)draw.titleText(this.context,"Regional","Observations");else{let t=r.local();const n=e[0][1].daytime;n&&1===this.period&&(t=t.plus({days:1})),n&&this.period,!n&&this.period,n||2!==this.period||(t=t.plus({days:1}));const i=t.toLocaleString({weekday:"long"});e[0][this.period].daytime?draw.titleText(this.context,"Forecast for",i):draw.titleText(this.context,"Forecast for",i+" 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.period],n=icons.getWeatherRegionalIconFromIconLink(t.icon,!t.daytime);n&&this.gifs.push(await utils.image.superGifAsync({src:n,max_width:42,loop_delay:100,auto_play:!0,canvas:this.canvas,x:t.x,y:t.y-15+90})),draw.text(this.context,"Star4000","20px","#ffffff",t.x-40,t.y-15+90,t.name,2);let r=t.temperature;navigation.units()===UNITS.metric&&(r=Math.round(utils.units.fahrenheitToCelsius(r))),draw.text(this.context,"Star4000 Large Compressed","28px","#ffff00",t.x-15*r.toString().length,t.y+20+90,r,2)})),this.finishDraw(),this.setStatus(STATUS.loaded)}}class LocalForecast extends WeatherDisplay{constructor(e,t,n){super(e,t,"Local Forecast"),this.timing.baseDelay=5e3,this.backgroundImage=utils.image.load("images/BackGround1_1.png"),this.getData(n)}async getData(e){super.getData();const t=await this.getRawData(e),n=this.parseLocalForecast(t);this.screenTexts=[],n.forEach(e=>{let t=e.DayName.toUpperCase()+"...",n=e.Text;navigation.units()===UNITS.metric&&(n=e.TextC),t+=n.toUpperCase().replace("..."," "),t=t.wordWrap(32,"\n");const r=t.split("\n"),i=r.length;let a="";let o=0;for(let e=0;e<=i-1;e++)""!==r[e]&&(o>6&&(this.screenTexts.push(a),a="",o=0),a+=r[e]+"\n",o++);this.screenTexts.push(a)}),this.currentScreen=0,this.timing.totalScreens=this.screenTexts.length,this.drawCanvas()}async getRawData(e){let t="us";navigation.units()===UNITS.metric&&(t="si");try{return await $.ajax({type:"GET",url:e.forecast,data:{units:t},dataType:"json",crossDomain:!0})}catch(t){return console.error("GetWeatherForecast failed: "+e.forecast),console.error(t),!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(),this.setStatus(STATUS.loaded)}parseLocalForecast(e){return e.properties.periods.slice(0,6).map(e=>({DayName:e.name.toUpperCase(),Text:e.detailedForecast}))}}class ExtendedForecast extends WeatherDisplay{constructor(e,t,n){super(e,t,"Extended Forecast"),this.timing.totalScreens=2,this.backgroundImage=utils.image.load("images/BackGround2_1.png"),this.getData(n)}async getData(e){super.getData();let t,n="us";navigation.units()===UNITS.metric&&(n="si");try{t=await $.ajax({type:"GET",url:e.forecast,data:{units:n},dataType:"json",crossDomain:!0})}catch(e){return console.error("Unable to get extended forecast"),console.error(e),void this.setStatus(STATUS.error)}this.data=this.parseExtendedForecast(t.properties.periods),this.screnIndex=0,this.drawCanvas()}parseExtendedForecast(e){const t=[0,1,2,3,4,5,6].map(e=>luxon.DateTime.local().startOf("day").plus({days:e}).toLocaleString({weekday:"short"}));let n=0;const r=[];return e.forEach(e=>{r[n]||r.push({dayName:"",low:void 0,high:void 0,text:void 0,icon:void 0});const i=r[n];i.icon=icons.getWeatherRegionalIconFromIconLink(e.icon),i.text=this.shortenExtendedForecastText(e.shortForecast),i.dayName=t[n],e.isDaytime?(i.high=e.temperature,n++):i.low=e.temperature}),r}shortenExtendedForecastText(e){let t=e;t=t.replace(/ and /g," "),t=t.replace(/Slight /g,""),t=t.replace(/Chance /g,""),t=t.replace(/Very /g,""),t=t.replace(/Patchy /g,""),t=t.replace(/Areas /g,""),t=t.replace(/Dense /g,"");let n=t.split(" ");-1!==t.indexOf("then")&&(n=t.split(" then "),n=n[1].split(" "));let r=n[0].substr(0,10),i="";return n[1]&&(r.endsWith(".")?r=r.replace(/\./,""):i=n[1].substr(0,10),"Blowing"===i&&(i="")),t=r,""!==i&&(t+=" "+i),[t,r,i]}async drawCanvas(){super.drawCanvas();const e=this.data.slice(0+3*this.screenIndex,3+3*this.screenIndex),t=await this.backgroundImage;this.context.drawImage(t,0,0),draw.horizontalGradientSingle(this.context,0,30,500,90,draw.topColor1,draw.topColor2),draw.triangle(this.context,"rgb(28, 10, 87)",500,30,450,90,500,90),draw.horizontalGradientSingle(this.context,0,90,640,399,draw.sideColor1,draw.sideColor2),this.context.drawImage(t,38,100,174,297,38,100,174,297),this.context.drawImage(t,232,100,174,297,232,100,174,297),this.context.drawImage(t,426,100,174,297,426,100,174,297),draw.titleText(this.context,"Extended","Forecast"),await Promise.all(e.map(async(e,t)=>{const n=195*t;draw.text(this.context,"Star4000","24pt","#FFFF00",100+n,135,e.dayName.toUpperCase(),2),draw.text(this.context,"Star4000","24pt","#8080FF",85+n,345,"Lo",2,"center"),draw.text(this.context,"Star4000","24pt","#FFFF00",165+n,345,"Hi",2,"center");let r=e.low;void 0!==r&&(navigation.units()===UNITS.metric&&(r=utils.units.rahrenheitToCelsius(r)),draw.text(this.context,"Star4000 Large","24pt","#FFFFFF",85+n,385,r,2,"center"));let i=e.high;navigation.units()===UNITS.metric&&(i=utils.units.rahrenheitToCelsius(i)),draw.text(this.context,"Star4000 Large","24pt","#FFFFFF",165+n,385,i,2,"center"),draw.text(this.context,"Star4000","24pt","#FFFFFF",120+n,270,e.text[1],2,"center"),draw.text(this.context,"Star4000","24pt","#FFFFFF",120+n,310,e.text[2],2,"center"),this.gifs.push(await utils.image.superGifAsync({src:e.icon,loop_delay:100,auto_play:!0,canvas:this.canvas,x:70+195*t,y:150,max_height:75}))})),this.finishDraw(),this.setStatus(STATUS.loaded)}}class Almanac extends WeatherDisplay{constructor(e,t,n){super(e,t,"Almanac"),this.backgroundImage=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.backgroundImage=utils.image.load("images/BackGround3_1.png"),this.getData(n)}getData(e){super.getData();const{DateTime:t}=luxon,n=[SunCalc.getTimes(new Date,e.latitude,e.longitude),SunCalc.getTimes(t.local().plus({days:1}).toJSDate(),e.latitude,e.longitude)],r=[];let i=t.local().minus({days:1}),a=SunCalc.getMoonIllumination(i.toJSDate()).phase,o=0;do{const e=a;i=i.plus({days:1}),a=SunCalc.getMoonIllumination(i.toJSDate()).phase,e<.25&&a>=.25&&r.push(this.getMoonTransition(.25,"First",i)),e<.5&&a>=.5&&r.push(this.getMoonTransition(.5,"Full",i)),e<.75&&a>=.75&&r.push(this.getMoonTransition(.75,"Last",i)),e>a&&r.push(this.getMoonTransition(0,"New",i)),o++}while(o<=30&&r.length<4);this.data={sun:n,moon:r},this.drawCanvas()}getMoonTransition(e,t,n,r=0){let i=n,a=SunCalc.getMoonIllumination(i.toJSDate()).phase,o=0;const s={hours:0===r?-1:0,minutes:1===r?1:0,seconds:2===r?-1:0,milliseconds:3===r?1:0};let u=(e,t,n)=>e<n&&t>=n;r%2==0&&(u=(e,t,n)=>e>n&&t<=n);do{const n=a;if(i=i.plus(s),a=SunCalc.getMoonIllumination(i.toJSDate()).phase,a>.9&&(a-=1),u(n,a,e)){if(r>=3)break;return this.getMoonTransition(e,t,i,r+1)}o++}while(o<1e3);return{phase:t,date:i}}async drawCanvas(){super.drawCanvas();const e=this.data,{DateTime:t}=luxon,[n,r,i,a]=await Promise.all(this.moonImages);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,640,190,draw.sideColor1,draw.sideColor2),draw.titleText(this.context,"Almanac","Astronomical");const o=t.local(),s=o.plus({days:1});draw.text(this.context,"Star4000","24pt","#FFFF00",320,120,o.toLocaleString({weekday:"long"}),2,"center"),draw.text(this.context,"Star4000","24pt","#FFFF00",500,120,s.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 o=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,o,2,"center");const s=(()=>{switch(e.phase){case"Full":return n;case"Last":return r;case"New":return i;case"First":default:return a}})();this.context.drawImage(s,75+130*t,270)}),this.finishDraw(),this.setStatus(STATUS.loaded)}}class Radar extends WeatherDisplay{constructor(e,t,n){super(e,t,"Local Radar"),this.dopplerRadarImageMax=6,this.timing.baseDelay=350,this.timing.delay=[4,1,1,1,1,1,12],this.backgroundImage=utils.image.load("images/BackGround4_1.png"),this.getData(n)}async getData(e){if(super.getData(),"AK"===e.state)return void this.setStatus(STATUS.noData);let t="images/4000RadarMap2.jpg";"HI"===e.State&&(t="images/HawaiiRadarMap2.png"),this.baseMap=await utils.image.load(t);const n="Conus/RadarImg/";let r;try{r=await $.ajax({type:"GET",url:n,dataType:"text",crossDomain:!0})}catch(e){return console.error("Unable to get list of radars"),console.error(e),void this.setStatus(STATUS.error)}const i=$(r).find("a[href]").map((e,t)=>t.innerHTML).get();let a=/^Conus_\d/;"HI"===e.State&&(a=/hawaii_\d/);const o=i.filter(e=>e.match(a)).slice(-this.dopplerRadarImageMax);let s,u,l,c=120,d=69;"HI"===e.State?(u=600,l=571,s=this.getXYFromLatitudeLongitudeHI(e.latitude,e.longitude,c,d)):(u=2550,l=1600,c*=2,d*=2,s=this.getXYFromLatitudeLongitudeDoppler(e.latitude,e.longitude,c,d));const f=document.createElement("canvas");f.width=u,f.height=l;const h=f.getContext("2d");h.imageSmoothingEnabled=!1;let p=117,m=60,g=this.getXYFromLatitudeLongitudeDoppler(e.latitude,e.longitude,c,d),y=g.x/2,v=g.y/2;"HI"===e.State&&(p=120,m=69,g=this.getXYFromLatitudeLongitudeHI(e.latitude,e.longitude,c,d),y=g.x,v=g.y);const w=await Promise.all(o.map(async t=>{const r=document.createElement("canvas");r.width=640,r.height=367;const i=r.getContext("2d");i.imageSmoothingEnabled=!1;const a=await $.ajaxCORS({type:"GET",url:n+t,xhrFields:{responseType:"blob"},crossDomain:!0}),o=await utils.image.load(a);"HI"===e.State?(h.clearRect(0,0,571,600),h.drawImage(o,0,0,571,600)):(h.clearRect(0,0,2550,1600),h.drawImage(o,0,0,2550,1600)),i.drawImage(await this.baseMap,s.x,s.y,2*c,2*d,0,0,640,367);const u=document.createElement("canvas");u.width=640,u.height=367;const l=u.getContext("2d");return l.imageSmoothingEnabled=!1,l.drawImage(f,y,v,2*p,2.33*m,0,0,640,367),this.removeDopplerRadarImageNoise(l),this.mergeDopplerRadarImage(i,l),r}));this.timing.totalScreens=w.length,this.data=w,this.drawCanvas()}async drawCanvas(){super.drawCanvas(),this.context.drawImage(await this.backgroundImage,0,0),draw.text(this.context,"Arial","bold 28pt","#ffffff",175,65,"Local",2),draw.text(this.context,"Arial","bold 28pt","#ffffff",175,100,"Radar",2),draw.text(this.context,"Arial","bold 18pt","#ffffff",390,49,"PRECIP",2),draw.text(this.context,"Arial","bold 18pt","#ffffff",298,73,"Light",2),draw.text(this.context,"Arial","bold 18pt","#ffffff",517,73,"Heavy",2);let e=362;const t=52;draw.box(this.context,"#000000",e-2,50,154,28),draw.box(this.context,"rgb(49, 210, 22)",e,t,17,24),e+=19,draw.box(this.context,"rgb(28, 138, 18)",e,t,17,24),e+=19,draw.box(this.context,"rgb(20, 90, 15)",e,t,17,24),e+=19,draw.box(this.context,"rgb(10, 40, 10)",e,t,17,24),e+=19,draw.box(this.context,"rgb(196, 179, 70)",e,t,17,24),e+=19,draw.box(this.context,"rgb(190, 72, 19)",e,t,17,24),e+=19,draw.box(this.context,"rgb(171, 14, 14)",e,t,17,24),e+=19,draw.box(this.context,"rgb(115, 31, 4)",e,t,17,24),e+=19,draw.box(this.context,"rgb(143, 73, 95)",318,83,32,24),draw.box(this.context,"rgb(250, 122, 232)",320,85,28,20),draw.text(this.context,"Arial","bold 18pt","#ffffff",355,105,"= Incomplete Data",2),this.context.drawImage(this.data[this.screenIndex],0,0,640,367,0,113,640,367),this.finishDraw(),this.setStatus(STATUS.loaded)}getXYFromLatitudeLongitude(e,t,n,r,i){if("HI"===i)return this.getXYFromLatitudeLongitudeHI(...arguments);let a=0,o=0;return a=55.2*(50.5-e),a-=r,a>1600-2*r?a=1600-2*r:a<0&&(a=0),o=41.775*(-127.5-t)*-1,o-=n,o>2550-2*n?o=2550-2*n:o<0&&(o=0),{x:o,y:a}}getXYFromLatitudeLongitudeHI(e,t,n,r){let i=0,a=0;return i=55.2*(25-e),i-=r,i>571-2*r?i=571-2*r:i<0&&(i=0),a=41.775*(-164.5-t)*-1,a-=n,a>600-2*n?a=600-2*n:a<0&&(a=0),{x:a,y:i}}getXYFromLatitudeLongitudeDoppler(e,t,n,r){let i=0,a=0;return i=55.2*(51.75-e),i-=r,i>3200-2*r?i=3200-2*r:i<0&&(i=0),a=41.775*(-130.37-t)*-1,a-=n,a>5100-2*n?a=5100-2*n:a<0&&(a=0),{x:2*a,y:2*i}}removeDopplerRadarImageNoise(e){const t=e.getImageData(0,0,e.canvas.width,e.canvas.height);for(let e=0;e<t.data.length;e+=4){let[n,r,i,a]=t.data.slice(e,e+4);1===n&&159===r&&244===i||n>=200&&r>=200&&i>=200||4===n&&233===r&&231===i||3===n&&0===r&&244===i?(n=0,r=0,i=0,a=0):2===n&&253===r&&2===i?(n=49,r=210,i=22,a=255):1===n&&197===r&&1===i?(n=0,r=142,i=0,a=255):0===n&&142===r&&0===i?(n=20,r=90,i=15,a=255):253===n&&248===r&&2===i?(n=10,r=40,i=10,a=255):229===n&&188===r&&0===i?(n=196,r=179,i=70,a=255):253===n&&139===r&&0===i?(n=190,r=72,i=19,a=255):212===n&&0===r&&0===i?(n=171,r=14,i=14,a=255):188===n&&0===r&&0===i&&(n=115,r=31,i=4,a=255),t.data[e]=n,t.data[e+1]=r,t.data[e+2]=i,t.data[e+3]=a}e.putImageData(t,0,0)}mergeDopplerRadarImage(e,t){for(var n=e.getImageData(0,0,e.canvas.width,e.canvas.height),r=t.getImageData(0,0,t.canvas.width,t.canvas.height),i=0;i<r.data.length;i+=4)n.data[i]<116&&n.data[i+1]<116&&n.data[i+2]<116&&(r.data[i]=0,r.data[i+1]=0,r.data[i+2]=0,r.data[i+3]=0);t.putImageData(r,0,0),e.drawImage(t.canvas,0,0)}}document.addEventListener("DOMContentLoaded",()=>{navigation.init()});const UNITS={english:Symbol("english"),metric:Symbol("metric")},navigation=(()=>{let e,t={},n=[],r=!1,i=UNITS.english,a=!1;const o=(e,t={})=>{window.parent.postMessage(JSON.stringify({type:e,message:t},window.location.origin))},s=async e=>{r=!1;const i=await utils.weather.getPoint(e.lat,e.lon),a=await $.ajax({type:"GET",url:i.properties.observationStations,dataType:"json",crossDomain:!0}),s=a.features[0].properties.stationIdentifier;let u=i.properties.relativeLocation.properties.city;s in _StationInfo&&(u=_StationInfo[s].City,u=u.split("/")[0]),t.latitude=e.lat,t.longitude=e.lon,t.zoneId=i.properties.forecastZone.substr(-6),t.radarId=i.properties.radarStation.substr(-3),t.stationId=s,t.weatherOffice=i.properties.cwa,t.city=u,t.state=i.properties.relativeLocation.properties.state,t.timeZone=i.properties.relativeLocation.properties.timeZone,t.forecast=i.properties.forecast,t.stations=a.features,o("weatherParameters",t),0===n.length?n=[new CurrentWeather(0,"currentWeather",t),new LatestObservations(1,"latestObservations",t),new TravelForecast(2,"travelForecast",t),new RegionalForecast(3,"regionalForecast0",t,0),new RegionalForecast(4,"regionalForecast1",t,1),new RegionalForecast(5,"regionalForecast2",t,2),new LocalForecast(6,"localForecast",t),new ExtendedForecast(7,"extendedForecast",t),new Almanac(8,"almanac",t),new Radar(8,"radar",t)]:n.forEach(e=>e.getData(t))},u=()=>n.reduce((e,t)=>t.status!==STATUS.loading?e+1:e,0),l=e=>{const t=e.toLowerCase();i="english"===t?UNITS.english:UNITS.metric},c={response:{previous:Symbol("previous"),inProgress:Symbol("inProgress"),next:Symbol("next")},command:{firstFrame:Symbol("firstFrame"),previousFrame:Symbol("previousFrame"),nextFrame:Symbol("nextFrame"),lastFrame:Symbol("lastFrame")}},d=e=>{e===c.command.nextFrame&&p().navNext(),e===c.command.previousFrame&&p().navPrev()},f=e=>{const t=n.length,r=h();let i;for(let a=0;a<t&&(i=utils.calc.wrap(r+(a+1)*e,t),n[i].status!==STATUS.loaded);a++);const a=n[i];n.forEach(e=>e.hideCanvas()),e<0&&a.showCanvas(c.command.lastFrame),e>0&&a.showCanvas(c.command.firstFrame)},h=()=>{let e=n.findIndex(e=>e.isActive());return-1===e&&(e=n.length-1),e},p=()=>n[h()],m=e=>{a=e,o("isPlaying",a)},g=e=>{switch(e){case"playToggle":m(!a);break;case"next":m(!1),d(c.command.nextFrame);break;case"previous":m(!1),d(c.command.previousFrame);break;default:console.error("Unknown navButton "+e)}},y=()=>{const t=document.getElementById("progressCanvas").getContext("2d");t.drawImage(e,0,100,640,300,0,100,640,300),draw.horizontalGradientSingle(t,0,90,52,399,draw.sideColor1,draw.sideColor2),draw.horizontalGradientSingle(t,584,90,640,399,draw.sideColor1,draw.sideColor2),n.forEach((n,r)=>{const i=120+29*r,a=Array(120-Math.floor(2.5*n.name.length)).join(".");let o,s;switch(draw.text(t,"Star4000 Extended","19pt","#ffffff",70,i,n.name+a,2),t.drawImage(e,475,i-20,165,30,475,i-20,165,30),draw.horizontalGradientSingle(t,584,90,640,399,draw.sideColor1,draw.sideColor2),n.status){case STATUS.loading:o="Loading",s="#ffff00";break;case STATUS.loaded:o="Press Here",s="#00ff00";break;case STATUS.failed:o="Failed",s="#ff0000";break;case STATUS.noData:o="No Data",s="#C0C0C0",draw.box(t,"rgb(33, 40, 90)",475,i-15,75,15)}draw.text(t,"Star4000 Extended","19pt",s,565,i,o,2,"end")})};return{init:async()=>{window.addEventListener("message",e=>{if(!e.isTrusted)return;const t=JSON.parse(e.data);if(t.type)switch(t.type){case"latLon":s(t.message);break;case"units":l(t.message);break;case"navButton":g(t.message);break;default:console.error("Unknown event "+t.type)}},!1),e=await utils.image.load("images/BackGround1_1.png"),y()},updateStatus:e=>{r||e.status===STATUS.loaded&&(y(),u<n.length||o("loaded"))},units:()=>i,isPlaying:()=>a,displayNavMessage:e=>{e.type===c.response.previous&&f(-1),e.type===c.response.next&&f(1)},msg:c}})();