371 lines
141 KiB
JavaScript
371 lines
141 KiB
JavaScript
function e(e,t,n,i){var r,s=arguments.length,a=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(s<3?r(a):s>3?r(t,n,a):r(t,n))||a);return s>3&&a&&Object.defineProperty(t,n,a),a}function t(e,t,n,i){return new(n||(n=Promise))((function(r,s){function a(e){try{l(i.next(e))}catch(e){s(e)}}function o(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}l((i=i.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;
|
||
/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/
|
||
const n=window,i=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,r=Symbol(),s=new WeakMap;let a=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==r)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(i&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=s.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&s.set(t,e))}return e}toString(){return this.cssText}};const o=(e,...t)=>{const n=1===e.length?e[0]:t.reduce(((t,n,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[i+1]),e[0]);return new a(n,e,r)},l=i?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return(e=>new a("string"==typeof e?e:e+"",void 0,r))(t)})(e):e
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/;var u;const c=window,h=c.trustedTypes,d=h?h.emptyScript:"",m=c.reactiveElementPolyfillSupport,f={toAttribute(e,t){switch(t){case Boolean:e=e?d:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},y=(e,t)=>t!==e&&(t==t||e==e),g={attribute:!0,type:String,converter:f,reflect:!1,hasChanged:y},p="finalized";let w=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),(null!==(t=this.h)&&void 0!==t?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach(((t,n)=>{const i=this._$Ep(n,t);void 0!==i&&(this._$Ev.set(i,n),e.push(i))})),e}static createProperty(e,t=g){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const n="symbol"==typeof e?Symbol():"__"+e,i=this.getPropertyDescriptor(e,n,t);void 0!==i&&Object.defineProperty(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(i){const r=this[e];this[t]=i,this.requestUpdate(e,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||g}static finalize(){if(this.hasOwnProperty(p))return!1;this[p]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),void 0!==e.h&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const n of t)this.createProperty(n,e[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(l(e))}else void 0!==e&&t.push(l(e));return t}static _$Ep(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(e=this.constructor.h)||void 0===e||e.forEach((e=>e(this)))}addController(e){var t,n;(null!==(t=this._$ES)&&void 0!==t?t:this._$ES=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(n=e.hostConnected)||void 0===n||n.call(e))}removeController(e){var t;null===(t=this._$ES)||void 0===t||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])}))}createRenderRoot(){var e;const t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{i?e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):t.forEach((t=>{const i=document.createElement("style"),r=n.litNonce;void 0!==r&&i.setAttribute("nonce",r),i.textContent=t.cssText,e.appendChild(i)}))})(t,this.constructor.elementStyles),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EO(e,t,n=g){var i;const r=this.constructor._$Ep(e,n);if(void 0!==r&&!0===n.reflect){const s=(void 0!==(null===(i=n.converter)||void 0===i?void 0:i.toAttribute)?n.converter:f).toAttribute(t,n.type);this._$El=e,null==s?this.removeAttribute(r):this.setAttribute(r,s),this._$El=null}}_$AK(e,t){var n;const i=this.constructor,r=i._$Ev.get(e);if(void 0!==r&&this._$El!==r){const e=i.getPropertyOptions(r),s="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==(null===(n=e.converter)||void 0===n?void 0:n.fromAttribute)?e.converter:f;this._$El=r,this[r]=s.fromAttribute(t,e.type),this._$El=null}}requestUpdate(e,t,n){let i=!0;void 0!==e&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||y)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===n.reflect&&this._$El!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,n))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((e,t)=>this[t]=e)),this._$Ei=void 0);let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),null===(e=this._$ES)||void 0===e||e.forEach((e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(n)):this._$Ek()}catch(e){throw t=!1,this._$Ek(),e}t&&this._$AE(n)}willUpdate(e){}_$AE(e){var t;null===(t=this._$ES)||void 0===t||t.forEach((e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){void 0!==this._$EC&&(this._$EC.forEach(((e,t)=>this._$EO(t,this[t],e))),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/
|
||
var v;w[p]=!0,w.elementProperties=new Map,w.elementStyles=[],w.shadowRootOptions={mode:"open"},null==m||m({ReactiveElement:w}),(null!==(u=c.reactiveElementVersions)&&void 0!==u?u:c.reactiveElementVersions=[]).push("1.6.3");const b=window,k=b.trustedTypes,_=k?k.createPolicy("lit-html",{createHTML:e=>e}):void 0,S="$lit$",$=`lit$${(Math.random()+"").slice(9)}$`,T="?"+$,O=`<${T}>`,N=document,x=()=>N.createComment(""),E=e=>null===e||"object"!=typeof e&&"function"!=typeof e,A=Array.isArray,C="[ \t\n\f\r]",M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,I=/>/g,F=RegExp(`>|${C}(?:([^\\s"'>=/]+)(${C}*=${C}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),V=/'/g,z=/"/g,L=/^(?:script|style|textarea|title)$/i,j=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),W=j(1),P=j(2),U=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),Z=new WeakMap,H=N.createTreeWalker(N,129,null,!1);function R(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==_?_.createHTML(t):t}const Y=(e,t)=>{const n=e.length-1,i=[];let r,s=2===t?"<svg>":"",a=M;for(let t=0;t<n;t++){const n=e[t];let o,l,u=-1,c=0;for(;c<n.length&&(a.lastIndex=c,l=a.exec(n),null!==l);)c=a.lastIndex,a===M?"!--"===l[1]?a=D:void 0!==l[1]?a=I:void 0!==l[2]?(L.test(l[2])&&(r=RegExp("</"+l[2],"g")),a=F):void 0!==l[3]&&(a=F):a===F?">"===l[0]?(a=null!=r?r:M,u=-1):void 0===l[1]?u=-2:(u=a.lastIndex-l[2].length,o=l[1],a=void 0===l[3]?F:'"'===l[3]?z:V):a===z||a===V?a=F:a===D||a===I?a=M:(a=F,r=void 0);const h=a===F&&e[t+1].startsWith("/>")?" ":"";s+=a===M?n+O:u>=0?(i.push(o),n.slice(0,u)+S+n.slice(u)+$+h):n+$+(-2===u?(i.push(void 0),t):h)}return[R(e,s+(e[n]||"<?>")+(2===t?"</svg>":"")),i]};class G{constructor({strings:e,_$litType$:t},n){let i;this.parts=[];let r=0,s=0;const a=e.length-1,o=this.parts,[l,u]=Y(e,t);if(this.el=G.createElement(l,n),H.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(i=H.nextNode())&&o.length<a;){if(1===i.nodeType){if(i.hasAttributes()){const e=[];for(const t of i.getAttributeNames())if(t.endsWith(S)||t.startsWith($)){const n=u[s++];if(e.push(t),void 0!==n){const e=i.getAttribute(n.toLowerCase()+S).split($),t=/([.?@])?(.*)/.exec(n);o.push({type:1,index:r,name:t[2],strings:e,ctor:"."===t[1]?X:"?"===t[1]?te:"@"===t[1]?ne:K})}else o.push({type:6,index:r})}for(const t of e)i.removeAttribute(t)}if(L.test(i.tagName)){const e=i.textContent.split($),t=e.length-1;if(t>0){i.textContent=k?k.emptyScript:"";for(let n=0;n<t;n++)i.append(e[n],x()),H.nextNode(),o.push({type:2,index:++r});i.append(e[t],x())}}}else if(8===i.nodeType)if(i.data===T)o.push({type:2,index:r});else{let e=-1;for(;-1!==(e=i.data.indexOf($,e+1));)o.push({type:7,index:r}),e+=$.length-1}r++}}static createElement(e,t){const n=N.createElement("template");return n.innerHTML=e,n}}function J(e,t,n=e,i){var r,s,a,o;if(t===U)return t;let l=void 0!==i?null===(r=n._$Co)||void 0===r?void 0:r[i]:n._$Cl;const u=E(t)?void 0:t._$litDirective$;return(null==l?void 0:l.constructor)!==u&&(null===(s=null==l?void 0:l._$AO)||void 0===s||s.call(l,!1),void 0===u?l=void 0:(l=new u(e),l._$AT(e,n,i)),void 0!==i?(null!==(a=(o=n)._$Co)&&void 0!==a?a:o._$Co=[])[i]=l:n._$Cl=l),void 0!==l&&(t=J(e,l._$AS(e,t.values),l,i)),t}class Q{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:n},parts:i}=this._$AD,r=(null!==(t=null==e?void 0:e.creationScope)&&void 0!==t?t:N).importNode(n,!0);H.currentNode=r;let s=H.nextNode(),a=0,o=0,l=i[0];for(;void 0!==l;){if(a===l.index){let t;2===l.type?t=new B(s,s.nextSibling,this,e):1===l.type?t=new l.ctor(s,l.name,l.strings,this,e):6===l.type&&(t=new ie(s,this,e)),this._$AV.push(t),l=i[++o]}a!==(null==l?void 0:l.index)&&(s=H.nextNode(),a++)}return H.currentNode=N,r}v(e){let t=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class B{constructor(e,t,n,i){var r;this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=i,this._$Cp=null===(r=null==i?void 0:i.isConnected)||void 0===r||r}get _$AU(){var e,t;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===(null==e?void 0:e.nodeType)&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=J(this,e,t),E(e)?e===q||null==e||""===e?(this._$AH!==q&&this._$AR(),this._$AH=q):e!==this._$AH&&e!==U&&this._(e):void 0!==e._$litType$?this.g(e):void 0!==e.nodeType?this.$(e):(e=>A(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]))(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==q&&E(this._$AH)?this._$AA.nextSibling.data=e:this.$(N.createTextNode(e)),this._$AH=e}g(e){var t;const{values:n,_$litType$:i}=e,r="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=G.createElement(R(i.h,i.h[0]),this.options)),i);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===r)this._$AH.v(n);else{const e=new Q(r,this),t=e.u(this.options);e.v(n),this.$(t),this._$AH=e}}_$AC(e){let t=Z.get(e.strings);return void 0===t&&Z.set(e.strings,t=new G(e)),t}T(e){A(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,i=0;for(const r of e)i===t.length?t.push(n=new B(this.k(x()),this.k(x()),this,this.options)):n=t[i],n._$AI(r),i++;i<t.length&&(this._$AR(n&&n._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var n;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){var t;void 0===this._$AM&&(this._$Cp=e,null===(t=this._$AP)||void 0===t||t.call(this,e))}}class K{constructor(e,t,n,i,r){this.type=1,this._$AH=q,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=r,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=q}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,n,i){const r=this.strings;let s=!1;if(void 0===r)e=J(this,e,t,0),s=!E(e)||e!==this._$AH&&e!==U,s&&(this._$AH=e);else{const i=e;let a,o;for(e=r[0],a=0;a<r.length-1;a++)o=J(this,i[n+a],t,a),o===U&&(o=this._$AH[a]),s||(s=!E(o)||o!==this._$AH[a]),o===q?e=q:e!==q&&(e+=(null!=o?o:"")+r[a+1]),this._$AH[a]=o}s&&!i&&this.j(e)}j(e){e===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}class X extends K{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===q?void 0:e}}const ee=k?k.emptyScript:"";class te extends K{constructor(){super(...arguments),this.type=4}j(e){e&&e!==q?this.element.setAttribute(this.name,ee):this.element.removeAttribute(this.name)}}class ne extends K{constructor(e,t,n,i,r){super(e,t,n,i,r),this.type=5}_$AI(e,t=this){var n;if((e=null!==(n=J(this,e,t,0))&&void 0!==n?n:q)===U)return;const i=this._$AH,r=e===q&&i!==q||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,s=e!==q&&(i===q||r);r&&this.element.removeEventListener(this.name,this,i),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(t=this.options)||void 0===t?void 0:t.host)&&void 0!==n?n:this.element,e):this._$AH.handleEvent(e)}}let ie=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){J(this,e)}};const re=b.litHtmlPolyfillSupport;null==re||re(G,B),(null!==(v=b.litHtmlVersions)&&void 0!==v?v:b.litHtmlVersions=[]).push("2.8.0");
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/
|
||
var se,ae;let oe=class extends w{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const n=super.createRenderRoot();return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=n.firstChild),n}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,n)=>{var i,r;const s=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:t;let a=s._$litPart$;if(void 0===a){const e=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:null;s._$litPart$=a=new B(t.insertBefore(x(),e),e,void 0,null!=n?n:{})}return a._$AI(e),a})(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!1)}render(){return U}};oe.finalized=!0,oe._$litElement$=!0,null===(se=globalThis.litElementHydrateSupport)||void 0===se||se.call(globalThis,{LitElement:oe});const le=globalThis.litElementPolyfillSupport;null==le||le({LitElement:oe}),(null!==(ae=globalThis.litElementVersions)&&void 0!==ae?ae:globalThis.litElementVersions=[]).push("3.3.3");
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/
|
||
const ue=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(n){n.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(n){n.createProperty(t.key,e)}};
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/function ce(e){return(t,n)=>void 0!==n?((e,t,n)=>{t.constructor.createProperty(n,e)})(e,t,n):ue(e,t)
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/}function he(e){return ce({...e,state:!0})}
|
||
/**
|
||
* @license
|
||
* Copyright 2021 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/var de,me,fe;null===(de=window.HTMLSlotElement)||void 0===de||de.prototype.assignedElements,function(e){e.language="language",e.system="system",e.comma_decimal="comma_decimal",e.decimal_comma="decimal_comma",e.space_comma="space_comma",e.none="none"}(me||(me={})),function(e){e.language="language",e.system="system",e.am_pm="12",e.twenty_four="24"}(fe||(fe={}));var ye=["closed","locked","off"],ge=function(e,t,n,i){i=i||{},n=null==n?{}:n;var r=new Event(t,{bubbles:void 0===i.bubbles||i.bubbles,cancelable:Boolean(i.cancelable),composed:void 0===i.composed||i.composed});return r.detail=n,e.dispatchEvent(r),r},pe=function(e){ge(window,"haptic",e)},we=function(e,t,n,i){if(i||(i={action:"more-info"}),!i.confirmation||i.confirmation.exemptions&&i.confirmation.exemptions.some((function(e){return e.user===t.user.id}))||(pe("warning"),confirm(i.confirmation.text||"Are you sure you want to "+i.action+"?")))switch(i.action){case"more-info":(n.entity||n.camera_image)&&ge(e,"hass-more-info",{entityId:n.entity?n.entity:n.camera_image});break;case"navigate":i.navigation_path&&function(e,t,n){void 0===n&&(n=!1),n?history.replaceState(null,"",t):history.pushState(null,"",t),ge(window,"location-changed",{replace:n})}(0,i.navigation_path);break;case"url":i.url_path&&window.open(i.url_path);break;case"toggle":n.entity&&(function(e,t){(function(e,t,n){void 0===n&&(n=!0);var i,r=function(e){return e.substr(0,e.indexOf("."))}(t),s="group"===r?"homeassistant":r;switch(r){case"lock":i=n?"unlock":"lock";break;case"cover":i=n?"open_cover":"close_cover";break;default:i=n?"turn_on":"turn_off"}e.callService(s,i,{entity_id:t})})(e,t,ye.includes(e.states[t].state))}(t,n.entity),pe("success"));break;case"call-service":if(!i.service)return void pe("failure");var r=i.service.split(".",2);t.callService(r[0],r[1],i.service_data,i.target),pe("success");break;case"fire-dom-event":ge(e,"ll-custom",i)}};function ve(e){return void 0!==e&&"none"!==e.action}class be{constructor(e,t,n){this.r=e,this.g=t,this.b=n}toRgbString(){return`rgb(${this.r}, ${this.g}, ${this.b})`}}var ke=[o`
|
||
.rain {
|
||
fill: var(--weather-icon-rain-color, #30b3ff);
|
||
}
|
||
.sun {
|
||
fill: var(--weather-icon-sun-color, #fdd93c);
|
||
}
|
||
.moon {
|
||
fill: var(--weather-icon-moon-color, #fcf497);
|
||
}
|
||
.cloud-back {
|
||
fill: var(--weather-icon-cloud-back-color, #d4d4d4);
|
||
}
|
||
.cloud-front {
|
||
fill: var(--weather-icon-cloud-front-color, #f9f9f9);
|
||
}
|
||
.snow {
|
||
fill: var(--weather-icon-snow-color, #f9f9f9);
|
||
stroke: var(--weather-icon-snow-stroke-color, #d4d4d4);
|
||
stroke-width: 1;
|
||
paint-order: stroke;
|
||
}
|
||
`,o`
|
||
ha-card {
|
||
--bar-height: 1.5rem;
|
||
height: 100%;
|
||
}
|
||
|
||
clock-weather-card-today {
|
||
display: flex;
|
||
}
|
||
|
||
clock-weather-card-today-left {
|
||
display: flex;
|
||
width: 35%;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
clock-weather-card-today-right {
|
||
display: flex;
|
||
width: 65%;
|
||
justify-content: space-around;
|
||
align-items: center;
|
||
}
|
||
|
||
clock-weather-card-today-right-wrap {
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
|
||
clock-weather-card-today-right-wrap-top {
|
||
width: 100%;
|
||
text-align: end;
|
||
display: block;
|
||
}
|
||
|
||
clock-weather-card-today-right-wrap-center {
|
||
display: flex;
|
||
height: 4rem;
|
||
font-size: 3.5rem;
|
||
white-space: nowrap;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
clock-weather-card-today-right-wrap-bottom {
|
||
display: flex;
|
||
justify-content: start;
|
||
}
|
||
|
||
clock-weather-card-forecast {
|
||
display: block;
|
||
}
|
||
|
||
clock-weather-card-forecast-row {
|
||
display: grid;
|
||
grid-template-columns: var(--col-one-size) 2rem 2.1rem auto 2.1rem;
|
||
align-items: center;
|
||
grid-gap: 0.5rem;
|
||
}
|
||
|
||
forecast-text {
|
||
text-align: var(--text-align);
|
||
white-space: nowrap;
|
||
text-overflow: clip;
|
||
}
|
||
|
||
forecast-icon {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
forecast-icon > svg {
|
||
width: 24px;
|
||
height: 24px;
|
||
margin: 2px;
|
||
}
|
||
|
||
forecast-temperature-bar {
|
||
position: relative;
|
||
width: 100%;
|
||
height: var(--bar-height);
|
||
border-radius: calc(var(--bar-height) / 2);
|
||
overflow: hidden;
|
||
}
|
||
|
||
forecast-temperature-bar-background {
|
||
left: 0%;
|
||
right: 100%;
|
||
width: 100%;
|
||
opacity: 0.25;
|
||
background: var(--light-primary-color);
|
||
}
|
||
|
||
forecast-temperature-bar-current-indicator-dot {
|
||
--border-width: 4px;
|
||
background-color: var(--primary-text-color);
|
||
border-radius: 50%;
|
||
width: var(--bar-height);
|
||
border: var(--border-width) solid var(--ha-card-background,var(--card-background-color,#fff));
|
||
margin-left: calc(var(--move-right) * -1 * var(--bar-height) - var(--border-width));
|
||
margin-top: calc(-1 * var(--border-width));
|
||
}
|
||
|
||
forecast-temperature-bar-range {
|
||
border-radius: calc(var(--bar-height) / 2);
|
||
left: var(--start-percent);
|
||
right: calc(100% - var(--end-percent));
|
||
background: linear-gradient(to right, var(--gradient));
|
||
overflow: visible;
|
||
min-width: var(--bar-height);
|
||
margin-left: calc(var(--move-right) * -1 * var(--bar-height));
|
||
}
|
||
|
||
forecast-temperature-bar-current-indicator {
|
||
opacity: 1;
|
||
left: var(--position);
|
||
}
|
||
|
||
forecast-temperature-bar-current-indicator,
|
||
forecast-temperature-bar-current-indicator-dot,
|
||
forecast-temperature-bar-background,
|
||
forecast-temperature-bar-range {
|
||
height: 100%;
|
||
position: absolute;
|
||
}
|
||
|
||
aqi {
|
||
padding: 2px;
|
||
border-radius: 5px;
|
||
}
|
||
`];
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/class _e{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const Se="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.maxTouchPoints>0;class $e extends HTMLElement{constructor(){super(),this.holdTime=500,this.held=!1,this.ripple=document.createElement("mwc-ripple")}connectedCallback(){Object.assign(this.style,{position:"absolute",width:Se?"100px":"50px",height:Se?"100px":"50px",transform:"translate(-50%, -50%)",pointerEvents:"none",zIndex:"999"}),this.appendChild(this.ripple),this.ripple.primary=!0,["touchcancel","mouseout","mouseup","touchmove","mousewheel","wheel","scroll"].forEach((e=>{document.addEventListener(e,(()=>{clearTimeout(this.timer),this.stopAnimation(),this.timer=void 0}),{passive:!0})}))}bind(e,t){if(e.actionHandler)return;e.actionHandler=!0,e.addEventListener("contextmenu",(e=>{const t=e||window.event;return t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0,t.returnValue=!1,!1}));const n=e=>{var t,n;this.held=!1;const i=null!==(t=e.pageX)&&void 0!==t?t:e.touches[0].pageX,r=null!==(n=e.pageY)&&void 0!==n?n:e.touches[0].pageY;this.timer=window.setTimeout((()=>{this.startAnimation(i,r),this.held=!0}),this.holdTime)},i=n=>{n.preventDefault(),["touchend","touchcancel"].includes(n.type)&&void 0===this.timer||(clearTimeout(this.timer),this.stopAnimation(),this.timer=void 0,this.held?ge(e,"action",{action:"hold"}):t.hasDoubleClick?"click"===n.type&&n.detail<2||!this.dblClickTimeout?this.dblClickTimeout=window.setTimeout((()=>{this.dblClickTimeout=void 0,ge(e,"action",{action:"tap"})}),250):(clearTimeout(this.dblClickTimeout),this.dblClickTimeout=void 0,ge(e,"action",{action:"double_tap"})):ge(e,"action",{action:"tap"}))};e.addEventListener("touchstart",n,{passive:!0}),e.addEventListener("touchend",i),e.addEventListener("touchcancel",i),e.addEventListener("mousedown",n,{passive:!0}),e.addEventListener("click",i),e.addEventListener("keyup",(e=>{13===e.keyCode&&i(e)}))}startAnimation(e,t){Object.assign(this.style,{left:`${e}px`,top:`${t}px`,display:null}),this.ripple.disabled=!1,this.ripple.active=!0,this.ripple.unbounded=!0}stopAnimation(){this.ripple.active=!1,this.ripple.disabled=!0,this.style.display="none"}}customElements.get("action-handler-clock-weather-card-hui-icons")||customElements.define("action-handler-clock-weather-card-hui-icons",$e);const Te=(e,t)=>{const n=(()=>{const e=document.body;if(e.querySelector("action-handler-clock-weather-card-hui-icons"))return e.querySelector("action-handler-clock-weather-card-hui-icons");const t=document.createElement("action-handler-clock-weather-card-hui-icons");return e.appendChild(t),t})();n&&n.bind(e,t)},Oe=(e=>(...t)=>({_$litDirective$:e,values:t}))(class extends _e{update(e,[t]){return Te(e.element,t),U}render(e){}});var Ne={"clear-night":"Ясно",cloudy:"Облачно",fog:"Мъгла",hail:"Градушка",lightning:"Гръмотевични бури","lightning-rainy":"Дъждовни гръмотевични бури",partlycloudy:"Частична облачност",pouring:"Пороен дъжд",rainy:"Дъждовно",snowy:"Сняг","snowy-rainy":"Суграшица",sunny:"Слънчево",windy:"Ветровито","windy-variant":"Силен вятър",exceptional:"Изключително"},xe={1:"Пн",2:"Вт",3:"Ср",4:"Чт",5:"Пт",6:"Сб",7:"Нд"},Ee={aqi:"AQI",humidity:"Влажност","feels-like":"Усеща се като"},Ae={weather:Ne,day:xe,misc:Ee},Ce=Object.freeze({__proto__:null,day:xe,default:Ae,misc:Ee,weather:Ne}),Me={"clear-night":"Klart",cloudy:"Overskyet",fog:"Tåge",hail:"Hagl",lightning:"Lyn","lightning-rainy":"Lyn ,regnvejr",partlycloudy:"Delvis overskyet",pouring:"Regnvejr",rainy:"Regnfuldt",snowy:"Sne","snowy-rainy":"Slud",sunny:"Solrig",windy:"Blæsende","windy-variant":"Stærk vind",exceptional:"Kaos"},De={1:"Man",2:"Tir",3:"Ons",4:"Tor",5:"Fre",6:"Lør",7:"Søn"},Ie={aqi:"AQI",humidity:"fugtighed","feels-like":"Feels like"},Fe={weather:Me,day:De,misc:Ie},Ve=Object.freeze({__proto__:null,day:De,default:Fe,misc:Ie,weather:Me}),ze={"clear-night":"Serè",cloudy:"Ennuvolat",fog:"Boira",hail:"Calamarsa",lightning:"Tempesta elèctrica","lightning-rainy":"Tempesta",partlycloudy:"Parcialment ennuvolat",pouring:"Aiguat",rainy:"Plujós",snowy:"Neu","snowy-rainy":"Aiguaneu",sunny:"Assolellat",windy:"Ventós","windy-variant":"Vent fort",exceptional:"Excepcional"},Le={1:"Dl.",2:"Dt.",3:"Dc.",4:"Dj.",5:"Dv.",6:"Ds.",7:"Dg."},je={aqi:"AQI",humidity:"humitat","feels-like":"Sensació tèrmica"},We={weather:ze,day:Le,misc:je},Pe=Object.freeze({__proto__:null,day:Le,default:We,misc:je,weather:ze}),Ue={"clear-night":"Jasno",cloudy:"Zataženo",fog:"Mlha",hail:"Kroupy",lightning:"Bouřky","lightning-rainy":"Bouřky s deštěm",partlycloudy:"Částečně zataženo",pouring:"Silný déšť",rainy:"Déšť",snowy:"Sníh","snowy-rainy":"Sníh s deštěm",sunny:"Slunečno",windy:"Vítr","windy-variant":"Prudký vítr",exceptional:"Chaos"},qe={1:"Po",2:"Út",3:"St",4:"Čt",5:"Pá",6:"So",7:"Ne"},Ze={aqi:"AQI",humidity:"vlhkost","feels-like":"pocitová teplota"},He={weather:Ue,day:qe,misc:Ze},Re={"clear-night":"klar",cloudy:"bewölkt",fog:"Nebel",hail:"Hagel",lightning:"Gewitter","lightning-rainy":"Gewitter",partlycloudy:"teils bewölkt",pouring:"starker Regen",rainy:"Regen",snowy:"Schneefall","snowy-rainy":"Schneeregen",sunny:"sonnig",windy:"windig","windy-variant":"starker Wind",exceptional:"Unwetter"},Ye={1:"Mo",2:"Di",3:"Mi",4:"Do",5:"Fr",6:"Sa",7:"So"},Ge={aqi:"AQI",humidity:"Luftfeuchtigkeit","feels-like":"Gefühlt"},Je={weather:Re,day:Ye,misc:Ge},Qe={"clear-night":"Καθαρός",cloudy:"Συννεφιασμένος",fog:"Ομίχλη",hail:"Χαλάζι",lightning:"Καταιγίδες","lightning-rainy":"Καταιγίδες με βροχή",partlycloudy:"Λίγα σύννεφα",pouring:"Έντονη βροχή",rainy:"Βροχερός",snowy:"Χιόνι","snowy-rainy":"Χιονόνερο",sunny:"Ηλιόλουστος",windy:"Θυελλώδης","windy-variant":"Έντονοι άνεμοι",exceptional:"Εξαιρετικός"},Be={1:"Δευ",2:"Τρί",3:"Τετ",4:"Πεμ",5:"Παρ",6:"Σαβ",7:"Κυρ"},Ke={aqi:"AQI",humidity:"υγρασία","feels-like":"Feels like"},Xe={weather:Qe,day:Be,misc:Ke},et={"clear-night":"Clear",cloudy:"Cloudy",fog:"Fog",hail:"Hail",lightning:"Thunderstorms","lightning-rainy":"Rainy thunderstorms",partlycloudy:"Partly cloudy",pouring:"Pouring",rainy:"Rainy",snowy:"Snowy","snowy-rainy":"Sleet",sunny:"Sunny",windy:"Windy","windy-variant":"Strong wind",exceptional:"Exceptional"},tt={1:"Mon",2:"Tue",3:"Wed",4:"Thu",5:"Fri",6:"Sat",7:"Sun"},nt={aqi:"AQI",humidity:"Humidity","feels-like":"Feels like"},it={weather:et,day:tt,misc:nt},rt={"clear-night":"Despejado",cloudy:"Nublado",fog:"Niebla",hail:"Granizo",lightning:"Tormenta eléctrica","lightning-rainy":"Tormenta",partlycloudy:"Parcialmente nublado",pouring:"Diluviando",rainy:"Lluvioso",snowy:"Nieve","snowy-rainy":"Aguanieve",sunny:"Soleado",windy:"Viento","windy-variant":"Fuerte viento",exceptional:"Caos"},st={1:"Lun",2:"Mar",3:"Mie",4:"Jue",5:"Vie",6:"Sab",7:"Dom"},at={aqi:"AQI",humidity:"humedad","feels-like":"Sensación térmica"},ot={weather:rt,day:st,misc:at},lt={"clear-night":"Selge",cloudy:"Pilvine",fog:"Udu",hail:"Rahe",lightning:"Äike","lightning-rainy":"Äiksevihm",partlycloudy:"Vahelduv pilvisus",pouring:"Paduvihm",rainy:"Vihm",snowy:"Lumi","snowy-rainy":"Lörts",sunny:"Päike",windy:"Tuuline","windy-variant":"Tuuline",exceptional:"Äärmuslik"},ut={1:"E",2:"T",3:"K",4:"N",5:"R",6:"L",7:"P"},ct={aqi:"AQI",humidity:"niiskus","feels-like":"Feels like"},ht={weather:lt,day:ut,misc:ct},dt={"clear-night":"Selkeää",cloudy:"Pilvistä",fog:"Sumua",hail:"Raekuuroja",lightning:"Ukkosta","lightning-rainy":"Ukkoskuuroja",partlycloudy:"Puolipilvistä",pouring:"Voimakasta vesisadetta",rainy:"Vesisadetta",snowy:"Lumisadetta","snowy-rainy":"Räntäsadetta",sunny:"Selkeää",windy:"Tuulista","windy-variant":"Voimakasta tuulta",exceptional:"Poikkeuksellista"},mt={1:"Ma",2:"Ti",3:"Ke",4:"To",5:"Pe",6:"La",7:"Su"},ft={aqi:"AQI",humidity:"kosteus","feels-like":"Feels like"},yt={weather:dt,day:mt,misc:ft},gt={"clear-night":"Dégagé",cloudy:"Nuageux",fog:"Brouillard",hail:"Grêle",lightning:"Orages","lightning-rainy":"Orages et pluie",partlycloudy:"Partiellement nuageux",pouring:"Pluie battante",rainy:"Pluie",snowy:"Neige","snowy-rainy":"Neige fondante",sunny:"Ensoleillé",windy:"Venteux","windy-variant":"Vent fort",exceptional:"Exceptionnelle"},pt={1:"Lun",2:"Mar",3:"Mer",4:"Jeu",5:"Ven",6:"Sam",7:"Dim"},wt={aqi:"AQI",humidity:"humidité","feels-like":"Ressentie"},vt={weather:gt,day:pt,misc:wt},bt={"clear-night":"בהיר",cloudy:"מעונן",fog:"ערפל",hail:"ברד",lightning:"סופות רעמים","lightning-rainy":"סופות רעמים גשומות",partlycloudy:"מעונן חלקית",pouring:"גשם זלעפות",rainy:"גשום",snowy:"מושלג","snowy-rainy":"ברד",sunny:"שמשי",windy:"סוער","windy-variant":"רוח חזקה",exceptional:"חריג"},kt={1:"שני",2:"שלישי",3:"רביעי",4:"חמישי",5:"שישי",6:"שבת",7:"ראשון"},_t={aqi:"AQI",humidity:"לחות","feels-like":"Feels like"},St={weather:bt,day:kt,misc:_t},$t={"clear-night":"Tiszta",cloudy:"Felhős",fog:"Ködös",hail:"Jégeső",lightning:"Villámlás","lightning-rainy":"Zivatar",partlycloudy:"Helyenként felhős",pouring:"Felhőszakadás",rainy:"Esős",snowy:"Havazás","snowy-rainy":"Havaseső, ónoseső",sunny:"Napos",windy:"Szeles","windy-variant":"Erős szél",exceptional:"Kivételes"},Tt={1:"H",2:"K",3:"Sze",4:"Cs",5:"P",6:"Szo",7:"V"},Ot={aqi:"AQI",humidity:"páratartalom","feels-like":"Feels like"},Nt={weather:$t,day:Tt,misc:Ot},xt={"clear-night":"Cerah",cloudy:"Berawan",fog:"Berkabut",hail:"Hujan es",lightning:"Petir","lightning-rainy":"Hujan petir",partlycloudy:"Cerah berawan",pouring:"Hujan deras",rainy:"Hujan",snowy:"Salju","snowy-rainy":"Hujan salju",sunny:"Cerah",windy:"Berangin","windy-variant":"Berangin kencang",exceptional:"Badai"},Et={1:"Sen",2:"Sel",3:"Rab",4:"Kam",5:"Jum",6:"Sab",7:"Min"},At={aqi:"AQI",humidity:"Kelembapan","feels-like":"Terasa seperti"},Ct={weather:xt,day:Et,misc:At},Mt={"clear-night":"Heiðskýrt",cloudy:"Skýjað",fog:"Þoka",hail:"Hagl",lightning:"Eldingar","lightning-rainy":"Þrumur",partlycloudy:"Skýjað að hluta",pouring:"mikil rigning",rainy:"Rigning",snowy:"Snjókoma","snowy-rainy":"Él",sunny:"Sólríkt",windy:"Hvasst","windy-variant":"Stórmur",exceptional:"Óveður"},Dt={1:"Mán",2:"Þri",3:"Mið",4:"Fim",5:"Fös",6:"Lau",7:"Sun"},It={aqi:"AQI",humidity:"raki","feels-like":"Feels like"},Ft={weather:Mt,day:Dt,misc:It},Vt={"clear-night":"Sereno",cloudy:"Nuvoloso",fog:"Nebbia",hail:"Grandine",lightning:"Temporali","lightning-rainy":"Temporali con pioggia",partlycloudy:"Parzialmente nuvoloso",pouring:"Rovesci",rainy:"Pioggia",snowy:"Neve","snowy-rainy":"Nevischio",sunny:"Soleggiato",windy:"Vento","windy-variant":"Vento forte",exceptional:"Tempesta"},zt={1:"Lun",2:"Mar",3:"Mer",4:"Gio",5:"Ven",6:"Sab",7:"Dom"},Lt={aqi:"AQI",humidity:"umidità","feels-like":"Percepita"},jt={weather:Vt,day:zt,misc:Lt},Wt={"clear-night":"맑음",cloudy:"구름많음",fog:"안개",hail:"우박",lightning:"번개","lightning-rainy":"번개, 뇌우",partlycloudy:"구름조금",pouring:"강한 비",rainy:"비",snowy:"눈","snowy-rainy":"진눈깨비",sunny:"맑음",windy:"바람","windy-variant":"매우 강한 바람",exceptional:"예외"},Pt={1:"월",2:"화",3:"수",4:"목",5:"금",6:"토",7:"일"},Ut={aqi:"대기환경지수",humidity:"습도","feels-like":"체감온도"},qt={weather:Wt,day:Pt,misc:Ut},Zt={"clear-night":"kloer",cloudy:"bedeckt",fog:"Niwwel",hail:"Knëppelsteng",lightning:"Donnerwieder","lightning-rainy":"Donnerwieder",partlycloudy:"deels bedeckt",pouring:"staarke Reen",rainy:"Reen",snowy:"Schnéi","snowy-rainy":"Schnéireen",sunny:"Sonn",windy:"lëfteg","windy-variant":"staarke Wand",exceptional:"Onwieder"},Ht={1:"Mé",2:"Dë",3:"Më",4:"Do",5:"Fr",6:"Sa",7:"So"},Rt={aqi:"AQI",humidity:"Loftfiichtegkeet","feels-like":"Gefillt"},Yt={weather:Zt,day:Ht,misc:Rt},Gt={"clear-night":"Giedra",cloudy:"Debesuota",fog:"Rūkas",hail:"Kruša",lightning:"Perkūnija","lightning-rainy":"Perkūnija su lietumi",partlycloudy:"Apsiniaukę",pouring:"Liūtis",rainy:"Lietus",snowy:"Sniegas","snowy-rainy":"Šlapdriba",sunny:"Saulėta",windy:"Vėjuota","windy-variant":"Stiprus vėjas",exceptional:"Audra"},Jt={1:"Pr",2:"An",3:"Tr",4:"Kt",5:"Pn",6:"Št",7:"Sk"},Qt={aqi:"AQI",humidity:"drėgmė","feels-like":"Feels like"},Bt={weather:Gt,day:Jt,misc:Qt},Kt={"clear-night":"Klart",cloudy:"Overskyet",fog:"Tåke",hail:"Hagl",lightning:"Lyn","lightning-rainy":"Lyn, regn",partlycloudy:"Delvis overskyet",pouring:"Pøsregn",rainy:"Regn",snowy:"Snø","snowy-rainy":"Sludd",sunny:"Sol",windy:"Vindfullt","windy-variant":"Sterk vind",exceptional:"Storm"},Xt={1:"Man",2:"Tir",3:"Ons",4:"Tor",5:"Fre",6:"Lør",7:"Søn"},en={aqi:"AQI",humidity:"fuktighet","feels-like":"Feels like"},tn={weather:Kt,day:Xt,misc:en},nn={"clear-night":"Helder",cloudy:"Bewolkt",fog:"Mistig",hail:"Hagel",lightning:"Onweersbuien","lightning-rainy":"Onweersbuien met regen",partlycloudy:"Half bewolkt",pouring:"Regen",rainy:"Regenachtig",snowy:"Sneeuw","snowy-rainy":"Natte sneeuw",sunny:"Zonnig",windy:"Winderig","windy-variant":"Storm",exceptional:"Uitzonderlijk"},rn={1:"Ma",2:"Di",3:"Wo",4:"Do",5:"Vr",6:"Za",7:"Zo"},sn={aqi:"AQI",humidity:"Vochtigheid","feels-like":"Gevoelstemperatuur"},an={weather:nn,day:rn,misc:sn},on={"clear-night":"pogodna noc",cloudy:"pochmurno",fog:"mgła",hail:"grad",lightning:"błyskawice","lightning-rainy":"burza",partlycloudy:"częściowe zachmurzenie",pouring:"ulewa",rainy:"deszczowo",snowy:"opady śniegu","snowy-rainy":"deszcz ze śniegiem",sunny:"słonecznie",windy:"wietrznie","windy-variant":"wietrznie",exceptional:"warunki nadzwyczajne"},ln={1:"pon.",2:"wt.",3:"śr.",4:"czw.",5:"pt.",6:"sob.",7:"niedz."},un={aqi:"AQI",humidity:"wilgotność","feels-like":"Odczuwalne"},cn={weather:on,day:ln,misc:un},hn={"clear-night":"Céu limpo, sem nuvens",cloudy:"Nublado",fog:"Nevoeiro",hail:"Granizo",lightning:"Raios","lightning-rainy":"Chuvoso com raios",partlycloudy:"Parcialmente nublado",pouring:"Torrencial",rainy:"Chuvoso",snowy:"Neve","snowy-rainy":"Chuvoso com neve",sunny:"Ensolarado",windy:"Ventania","windy-variant":"Ventania forte",exceptional:"Excepcional"},dn={1:"Seg",2:"Ter",3:"Qua",4:"Qui",5:"Sex",6:"Sáb",7:"Dom"},mn={aqi:"AQI",humidity:"umidade","feels-like":"Feels like"},fn={weather:hn,day:dn,misc:mn},yn={"clear-night":"Céu limpo, sem nuvens",cloudy:"Nublado",fog:"Nevoeiro",hail:"Granizo",lightning:"Raios","lightning-rainy":"Chuvoso com raios",partlycloudy:"Parcialmente nublado",pouring:"Torrencial",rainy:"Chuvoso",snowy:"Neve","snowy-rainy":"Chuvoso com neve",sunny:"Ensolarado",windy:"Ventania","windy-variant":"Ventania forte",exceptional:"Excepcional"},gn={1:"Seg",2:"Ter",3:"Qua",4:"Qui",5:"Sex",6:"Sáb",7:"Dom"},pn={aqi:"AQI",humidity:"humidade","feels-like":"Sensação térmica"},wn={weather:yn,day:gn,misc:pn},vn={"clear-night":"Senin",cloudy:"Innorat",fog:"Ceata",hail:"Grindina",lightning:"Fulgere","lightning-rainy":"Furtuni cu ploaie",partlycloudy:"Partial innorat",pouring:"Averse",rainy:"Ploaie",snowy:"Ninsoare","snowy-rainy":"Lapovita",sunny:"Insorit",windy:"Vant","windy-variant":"Vant puternic",exceptional:"Furtuna"},bn={1:"Lun",2:"Mar",3:"Mie",4:"Joi",5:"Vin",6:"Sam",7:"Dum"},kn={aqi:"AQI",humidity:"umiditate","feels-like":"Feels like"},_n={weather:vn,day:bn,misc:kn},Sn={"clear-night":"Ясно",cloudy:"Облачно",fog:"Туман",hail:"Град",lightning:"Гроза","lightning-rainy":"Дождь с грозой",partlycloudy:"Переменная облачность",pouring:"Проливной дождь",rainy:"Дождь",snowy:"Снег","snowy-rainy":"Мокрый снег",sunny:"Солнечно",windy:"Ветер","windy-variant":"Сильный ветер",exceptional:"Буря"},$n={1:"Пн",2:"Вт",3:"Ср",4:"Чт",5:"Пт",6:"Сб",7:"Вс"},Tn={aqi:"AQI",humidity:"влажность","feels-like":"Ощущается как"},On={weather:Sn,day:$n,misc:Tn},Nn={"clear-night":"Jasná noc",cloudy:"Zamračené",fog:"Hmla",hail:"Krupobitie",lightning:"Búrky","lightning-rainy":"Búrky s dažďom",partlycloudy:"Polooblačno",pouring:"Silný dážď",rainy:"Daždivo",snowy:"Sneženie","snowy-rainy":"Dážď so snehom",sunny:"Slnečno",windy:"Veterno","windy-variant":"Prudký vietor",exceptional:"Neobyčajné počasie (Chaos)"},xn={1:"Pon",2:"Uto",3:"Str",4:"Štv",5:"Pia",6:"Sob",7:"Ned"},En={aqi:"AQI",humidity:"vlhkosť","feels-like":"pocitová teplota"},An={weather:Nn,day:xn,misc:En},Cn={"clear-night":"Jasno",cloudy:"Oblačno",fog:"Megla",hail:"Toča",lightning:"Nevihte","lightning-rainy":"Nevihte z dežjem",partlycloudy:"Delno oblačno",pouring:"Lije",rainy:"Deževno",snowy:"Sneženo","snowy-rainy":"Žled",sunny:"Sončno",windy:"Vetrovno","windy-variant":"Močan veter",exceptional:"Izjemno vreme"},Mn={1:"Pon",2:"Tor",3:"Sre",4:"Čet",5:"Pet",6:"Sob",7:"Ned"},Dn={aqi:"AQI",humidity:"vlažnost","feels-like":"Feels like"},In={weather:Cn,day:Mn,misc:Dn},Fn={"clear-night":"Ведро",cloudy:"Облачно",fog:"Магла",hail:"Град",lightning:"Грмљавина","lightning-rainy":"Киша уз грмљавину",partlycloudy:"Делимично облачно",pouring:"Пљусак",rainy:"Киша",snowy:"Снег","snowy-rainy":"Суснежица",sunny:"Сунчано",windy:"Ветар","windy-variant":"Јак ветар",exceptional:"Изузетно"},Vn={1:"Пон",2:"Уто",3:"Сре",4:"Чет",5:"Пет",6:"Суб",7:"Нед"},zn={aqi:"AQI",humidity:"Влажност","feels-like":"Feels like"},Ln={weather:Fn,day:Vn,misc:zn},jn={"clear-night":"Vedro",cloudy:"Oblačno",fog:"Magla",hail:"Grad",lightning:"Grmljavina","lightning-rainy":"Kiša uz grmljavinu",partlycloudy:"Delimično oblačno",pouring:"Pljusak",rainy:"Kiša",snowy:"Sneg","snowy-rainy":"Susnežica",sunny:"Sunčano",windy:"Vetar","windy-variant":"Jak vetar",exceptional:"Izuzetno"},Wn={1:"Pon",2:"Uto",3:"Sre",4:"Čet",5:"Pet",6:"Sub",7:"Ned"},Pn={aqi:"AQI",humidity:"Vlažnost","feels-like":"Feels like"},Un={weather:jn,day:Wn,misc:Pn},qn={"clear-night":"Klart, natt",cloudy:"Molnigt",fog:"Dimma",hail:"Hagel",lightning:"Åska","lightning-rainy":"Åska, regnigt",partlycloudy:"Delvis molnigt",pouring:"Ösregn",rainy:"Regnigt",snowy:"Snöigt","snowy-rainy":"Snöblandat regn",sunny:"Soligt",windy:"Blåsigt","windy-variant":"Stark blåst",exceptional:"Exceptionellt"},Zn={1:"Mån",2:"Tis",3:"Ons",4:"Tor",5:"Fre",6:"Lör",7:"Sön"},Hn={aqi:"AQI",humidity:"fuktighet","feels-like":"Känns som"},Rn={weather:qn,day:Zn,misc:Hn},Yn={"clear-night":"ท้องฟ้าแจ่มใส",cloudy:"มีเมฆเป็นส่วนมาก",fog:"หมอก",hail:"ลูกเห็บ",lightning:"พายุฝนฟ้าคะนอง","lightning-rainy":"ฝนฟ้าคะนอง",partlycloudy:"มีเมฆบางส่วน",pouring:"ฝนตกหนัก",rainy:"ฝนตก",snowy:"หิมะตก","snowy-rainy":"ฝนตกเป็นลูกเห็บ",sunny:"แดดจัด",windy:"มีลมจัด","windy-variant":"ลมแรง",exceptional:"Exceptional"},Gn={1:"จ.",2:"อ.",3:"พ.",4:"พฤ.",5:"ศ.",6:"ส.",7:"อา."},Jn={aqi:"AQI",humidity:"ความชื้น","feels-like":"Feels like"},Qn={weather:Yn,day:Gn,misc:Jn},Bn={"clear-night":"Açık",cloudy:"Bulutlu",fog:"Sis",hail:"Dolu",lightning:"Gökgürültülü","lightning-rainy":"Gökgürültülü Yağmurlu",partlycloudy:"Parçalı Bulutlu",pouring:"Sağanak",rainy:"Yağmurlu",snowy:"Karlı","snowy-rainy":"Sulu Kar",sunny:"Güneşli",windy:"Rüzgarlı","windy-variant":"Güçlü Rüzgar",exceptional:"Mükemmel"},Kn={1:"Pzt",2:"Sal",3:"Çrş",4:"Prş",5:"Cum",6:"Cts",7:"Pzr"},Xn={aqi:"AQI",humidity:"nem","feels-like":"Feels like"},ei={weather:Bn,day:Kn,misc:Xn},ti={"clear-night":"Ясно",cloudy:"Хмарно",fog:"Туман",hail:"Грім",lightning:"Грози","lightning-rainy":"Дощові грози",partlycloudy:"Мінлива хмарність",pouring:"Злива",rainy:"Дощ",snowy:"Сніг","snowy-rainy":"Мокрий сніг",sunny:"Сонячно",windy:"Вітряно","windy-variant":"Дуже вітряно",exceptional:"Буря"},ni={1:"Пн",2:"Вт",3:"Ср",4:"Чт",5:"Пт",6:"Сб",7:"Нд"},ii={aqi:"AQI",humidity:"вологість","feels-like":"Feels like"},ri={weather:ti,day:ni,misc:ii},si={"clear-night":"صاف",cloudy:"ابر آلود",fog:"دھند",hail:"اولے",lightning:"گرج چمک","lightning-rainy":"گرج چمک کے ساتھ بارش",partlycloudy:"جزوی طور پر ابر آلود",pouring:"موسلا دھار بارش",rainy:"بارش",snowy:"برفانی","snowy-rainy":"ژالہ باری",sunny:"دھوپ",windy:"آندھی","windy-variant":"تیز آندھی",exceptional:"غیر معمولی"},ai={1:"پیر",2:"منگل",3:"بدھ",4:"جمعرات",5:"جمعہ",6:"ہفتہ",7:"اتوار"},oi={aqi:"AQI",humidity:"نمی","feels-like":"Feels like"},li={weather:si,day:ai,misc:oi},ui={"clear-night":"Trời trong",cloudy:"Trời mây",fog:"Sương mù",hail:"Mưa đá",lightning:"Dông bão","lightning-rainy":"Mưa Dông",partlycloudy:"Mây nhẹ",pouring:"Mưa Lớn",rainy:"Mưa",snowy:"Tuyết","snowy-rainy":"Mưa Tuyết",sunny:"Nắng",windy:"Gió","windy-variant":"Gió mạnh",exceptional:"Khắc Nghiệt"},ci={1:"T2",2:"T3",3:"T4",4:"T5",5:"T6",6:"T7",7:"CN"},hi={aqi:"AQI",humidity:"độ ẩm","feels-like":"Feels like"},di={weather:ui,day:ci,misc:hi},mi={"clear-night":"夜间晴朗",cloudy:"阴",fog:"雾",hail:"冰雹",lightning:"雷","lightning-rainy":"雷阵雨",partlycloudy:"多云",pouring:"大雨",rainy:"雨",snowy:"雪","snowy-rainy":"雨夹雪",sunny:"晴",windy:"有风","windy-variant":"强风",exceptional:"特殊"},fi={1:"周一",2:"周二",3:"周三",4:"周四",5:"周五",6:"周六",7:"周日"},yi={aqi:"AQI",humidity:"湿度","feels-like":"Feels like"},gi={weather:mi,day:fi,misc:yi},pi={"clear-night":"晴朗夜晚",cloudy:"多雲",fog:"有霧",hail:"冰雹",lightning:"閃電","lightning-rainy":"雷雨",partlycloudy:"局部多雲",pouring:"大雨",rainy:"下雨",snowy:"下雪","snowy-rainy":"雪雨",sunny:"晴天",windy:"有風","windy-variant":"強風",exceptional:"極端天氣"},wi={1:"週一",2:"週二",3:"週三",4:"週四",5:"週五",6:"週六",7:"週日"},vi={aqi:"空氣品質",humidity:"濕度","feels-like":"體感溫度"},bi={weather:pi,day:wi,misc:vi};const ki={bg:Ce,cs:Object.freeze({__proto__:null,day:qe,default:He,misc:Ze,weather:Ue}),ca:Pe,da:Ve,de:Object.freeze({__proto__:null,day:Ye,default:Je,misc:Ge,weather:Re}),el:Object.freeze({__proto__:null,day:Be,default:Xe,misc:Ke,weather:Qe}),en:Object.freeze({__proto__:null,day:tt,default:it,misc:nt,weather:et}),es:Object.freeze({__proto__:null,day:st,default:ot,misc:at,weather:rt}),et:Object.freeze({__proto__:null,day:ut,default:ht,misc:ct,weather:lt}),fi:Object.freeze({__proto__:null,day:mt,default:yt,misc:ft,weather:dt}),fr:Object.freeze({__proto__:null,day:pt,default:vt,misc:wt,weather:gt}),he:Object.freeze({__proto__:null,day:kt,default:St,misc:_t,weather:bt}),hu:Object.freeze({__proto__:null,day:Tt,default:Nt,misc:Ot,weather:$t}),id:Object.freeze({__proto__:null,day:Et,default:Ct,misc:At,weather:xt}),is:Object.freeze({__proto__:null,day:Dt,default:Ft,misc:It,weather:Mt}),it:Object.freeze({__proto__:null,day:zt,default:jt,misc:Lt,weather:Vt}),ko:Object.freeze({__proto__:null,day:Pt,default:qt,misc:Ut,weather:Wt}),lb:Object.freeze({__proto__:null,day:Ht,default:Yt,misc:Rt,weather:Zt}),lt:Object.freeze({__proto__:null,day:Jt,default:Bt,misc:Qt,weather:Gt}),nb:Object.freeze({__proto__:null,day:Xt,default:tn,misc:en,weather:Kt}),nl:Object.freeze({__proto__:null,day:rn,default:an,misc:sn,weather:nn}),pl:Object.freeze({__proto__:null,day:ln,default:cn,misc:un,weather:on}),ptbr:Object.freeze({__proto__:null,day:dn,default:fn,misc:mn,weather:hn}),pt:Object.freeze({__proto__:null,day:gn,default:wn,misc:pn,weather:yn}),ro:Object.freeze({__proto__:null,day:bn,default:_n,misc:kn,weather:vn}),ru:Object.freeze({__proto__:null,day:$n,default:On,misc:Tn,weather:Sn}),sk:Object.freeze({__proto__:null,day:xn,default:An,misc:En,weather:Nn}),sl:Object.freeze({__proto__:null,day:Mn,default:In,misc:Dn,weather:Cn}),sr:Object.freeze({__proto__:null,day:Vn,default:Ln,misc:zn,weather:Fn}),srlatn:Object.freeze({__proto__:null,day:Wn,default:Un,misc:Pn,weather:jn}),sv:Object.freeze({__proto__:null,day:Zn,default:Rn,misc:Hn,weather:qn}),th:Object.freeze({__proto__:null,day:Gn,default:Qn,misc:Jn,weather:Yn}),tr:Object.freeze({__proto__:null,day:Kn,default:ei,misc:Xn,weather:Bn}),uk:Object.freeze({__proto__:null,day:ni,default:ri,misc:ii,weather:ti}),ur:Object.freeze({__proto__:null,day:ai,default:li,misc:oi,weather:si}),vi:Object.freeze({__proto__:null,day:ci,default:di,misc:hi,weather:ui}),zhcn:Object.freeze({__proto__:null,day:fi,default:gi,misc:yi,weather:mi}),zhtw:Object.freeze({__proto__:null,day:wi,default:bi,misc:vi,weather:pi})};function _i(e){return Math.max(...e)}function Si(e){return Math.min(...e)}function $i(e,t=0){return t<=0?Math.round(e):Math.ceil((e-t/2)/t)*t}function Ti(e,t=0){return t<=0?Math.ceil(e):Math.ceil(e/t)*t}function Oi(e){return null===e?null:Math.round(e)}function Ni(e){try{return e()}catch(e){return console.error("clock-weather-card-hui-icons - Error while rendering clock-weather-card component:",e),W``}}class xi extends Error{}class Ei extends xi{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class Ai extends xi{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class Ci extends xi{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Mi extends xi{}class Di extends xi{constructor(e){super(`Invalid unit ${e}`)}}class Ii extends xi{}class Fi extends xi{constructor(){super("Zone is an abstract class")}}const Vi="numeric",zi="short",Li="long",ji={year:Vi,month:Vi,day:Vi},Wi={year:Vi,month:zi,day:Vi},Pi={year:Vi,month:zi,day:Vi,weekday:zi},Ui={year:Vi,month:Li,day:Vi},qi={year:Vi,month:Li,day:Vi,weekday:Li},Zi={hour:Vi,minute:Vi},Hi={hour:Vi,minute:Vi,second:Vi},Ri={hour:Vi,minute:Vi,second:Vi,timeZoneName:zi},Yi={hour:Vi,minute:Vi,second:Vi,timeZoneName:Li},Gi={hour:Vi,minute:Vi,hourCycle:"h23"},Ji={hour:Vi,minute:Vi,second:Vi,hourCycle:"h23"},Qi={hour:Vi,minute:Vi,second:Vi,hourCycle:"h23",timeZoneName:zi},Bi={hour:Vi,minute:Vi,second:Vi,hourCycle:"h23",timeZoneName:Li},Ki={year:Vi,month:Vi,day:Vi,hour:Vi,minute:Vi},Xi={year:Vi,month:Vi,day:Vi,hour:Vi,minute:Vi,second:Vi},er={year:Vi,month:zi,day:Vi,hour:Vi,minute:Vi},tr={year:Vi,month:zi,day:Vi,hour:Vi,minute:Vi,second:Vi},nr={year:Vi,month:zi,day:Vi,weekday:zi,hour:Vi,minute:Vi},ir={year:Vi,month:Li,day:Vi,hour:Vi,minute:Vi,timeZoneName:zi},rr={year:Vi,month:Li,day:Vi,hour:Vi,minute:Vi,second:Vi,timeZoneName:zi},sr={year:Vi,month:Li,day:Vi,weekday:Li,hour:Vi,minute:Vi,timeZoneName:Li},ar={year:Vi,month:Li,day:Vi,weekday:Li,hour:Vi,minute:Vi,second:Vi,timeZoneName:Li};class or{get type(){throw new Fi}get name(){throw new Fi}get ianaName(){return this.name}get isUniversal(){throw new Fi}offsetName(e,t){throw new Fi}formatOffset(e,t){throw new Fi}offset(e){throw new Fi}equals(e){throw new Fi}get isValid(){throw new Fi}}let lr=null;class ur extends or{static get instance(){return null===lr&&(lr=new ur),lr}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return Ns(e,t,n)}formatOffset(e,t){return Cs(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}let cr={};const hr={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let dr={};class mr extends or{static create(e){return dr[e]||(dr[e]=new mr(e)),dr[e]}static resetCache(){dr={},cr={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=mr.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return Ns(e,t,n,this.name)}formatOffset(e,t){return Cs(this.offset(e),t)}offset(e){const t=new Date(e);if(isNaN(t))return NaN;const n=(i=this.name,cr[i]||(cr[i]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:i,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),cr[i]);var i;let[r,s,a,o,l,u,c]=n.formatToParts?function(e,t){const n=e.formatToParts(t),i=[];for(let e=0;e<n.length;e++){const{type:t,value:r}=n[e],s=hr[t];"era"===t?i[s]=r:as(s)||(i[s]=parseInt(r,10))}return i}(n,t):function(e,t){const n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,r,s,a,o,l,u,c]=i;return[a,r,s,o,l,u,c]}(n,t);"BC"===o&&(r=1-Math.abs(r));let h=+t;const d=h%1e3;return h-=d>=0?d:1e3+d,(Ss({year:r,month:s,day:a,hour:24===l?0:l,minute:u,second:c,millisecond:0})-h)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let fr={};let yr={};function gr(e,t={}){const n=JSON.stringify([e,t]);let i=yr[n];return i||(i=new Intl.DateTimeFormat(e,t),yr[n]=i),i}let pr={};let wr={};let vr=null;let br={};function kr(e,t,n,i){const r=e.listingMode();return"error"===r?null:"en"===r?n(t):i(t)}class _r{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:i,floor:r,...s}=n;if(!t||Object.keys(s).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e,t={}){const n=JSON.stringify([e,t]);let i=pr[n];return i||(i=new Intl.NumberFormat(e,t),pr[n]=i),i}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return ys(this.floor?Math.floor(e):vs(e,3),this.padTo)}}class Sr{constructor(e,t,n){let i;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&mr.create(n).valid?(i=n,this.dt=e):(i="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const r={...this.opts};r.timeZone=r.timeZone||i,this.dtf=gr(t,r)}format(){return this.originalZone?this.formatToParts().map((({value:e})=>e)).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map((e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e})):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class $r{constructor(e,t,n){this.opts={style:"long",...n},!t&&us()&&(this.rtf=function(e,t={}){const{base:n,...i}=t,r=JSON.stringify([e,i]);let s=wr[r];return s||(s=new Intl.RelativeTimeFormat(e,t),wr[r]=s),s}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n="always",i=!1){const r={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."]},s=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&s){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${r[e][0]}`;case-1:return n?"yesterday":`last ${r[e][0]}`;case 0:return n?"today":`this ${r[e][0]}`}}const a=Object.is(t,-0)||t<0,o=Math.abs(t),l=1===o,u=r[e],c=i?l?u[1]:u[2]||u[1]:l?r[e][0]:e;return a?`${o} ${c} ago`:`in ${o} ${c}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const Tr={firstDay:1,minimalDays:4,weekend:[6,7]};class Or{static fromOpts(e){return Or.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,i,r=!1){const s=e||Zr.defaultLocale,a=s||(r?"en-US":vr||(vr=(new Intl.DateTimeFormat).resolvedOptions().locale,vr)),o=t||Zr.defaultNumberingSystem,l=n||Zr.defaultOutputCalendar,u=ms(i)||Zr.defaultWeekSettings;return new Or(a,o,l,u,s)}static resetCache(){vr=null,yr={},pr={},wr={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:i}={}){return Or.create(e,t,n,i)}constructor(e,t,n,i,r){const[s,a,o]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,i;try{t=gr(e).resolvedOptions(),i=e}catch(r){const s=e.substring(0,n);t=gr(s).resolvedOptions(),i=s}const{numberingSystem:r,calendar:s}=t;return[i,r,s]}}(e);this.locale=s,this.numberingSystem=t||a||null,this.outputCalendar=n||o||null,this.weekSettings=i,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?Or.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,ms(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return kr(this,e,Vs,(()=>{const n=t?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";return this.monthsCache[i][e]||(this.monthsCache[i][e]=function(e){const t=[];for(let n=1;n<=12;n++){const i=Wo.utc(2009,n,1);t.push(e(i))}return t}((e=>this.extract(e,n,"month")))),this.monthsCache[i][e]}))}weekdays(e,t=!1){return kr(this,e,Ws,(()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=t?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=function(e){const t=[];for(let n=1;n<=7;n++){const i=Wo.utc(2016,11,13+n);t.push(e(i))}return t}((e=>this.extract(e,n,"weekday")))),this.weekdaysCache[i][e]}))}meridiems(){return kr(this,void 0,(()=>Ps),(()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Wo.utc(2016,11,13,9),Wo.utc(2016,11,13,19)].map((t=>this.extract(t,e,"dayperiod")))}return this.meridiemCache}))}eras(e){return kr(this,e,Hs,(()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[Wo.utc(-40,1,1),Wo.utc(2017,1,1)].map((e=>this.extract(e,t,"era")))),this.eraCache[e]}))}extract(e,t,n){const i=this.dtFormatter(e,t).formatToParts().find((e=>e.type.toLowerCase()===n));return i?i.value:null}numberFormatter(e={}){return new _r(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Sr(e,this.intl,t)}relFormatter(e={}){return new $r(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const n=JSON.stringify([e,t]);let i=fr[n];return i||(i=new Intl.ListFormat(e,t),fr[n]=i),i}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:cs()?function(e){let t=br[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,br[e]=t}return t}(this.locale):Tr}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Nr=null;class xr extends or{static get utcInstance(){return null===Nr&&(Nr=new xr(0)),Nr}static instance(e){return 0===e?xr.utcInstance:new xr(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new xr(xs(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${Cs(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${Cs(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return Cs(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class Er extends or{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Ar(e,t){if(as(e)||null===e)return t;if(e instanceof or)return e;if(function(e){return"string"==typeof e}(e)){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?ur.instance:"utc"===n||"gmt"===n?xr.utcInstance:xr.parseSpecifier(n)||mr.create(e)}return os(e)?xr.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new Er(e)}const Cr={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Mr={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]},Dr=Cr.hanidec.replace(/[\[|\]]/g,"").split("");let Ir={};function Fr({numberingSystem:e},t=""){const n=e||"latn";return Ir[n]||(Ir[n]={}),Ir[n][t]||(Ir[n][t]=new RegExp(`${Cr[n]}${t}`)),Ir[n][t]}let Vr,zr=()=>Date.now(),Lr="system",jr=null,Wr=null,Pr=null,Ur=60,qr=null;class Zr{static get now(){return zr}static set now(e){zr=e}static set defaultZone(e){Lr=e}static get defaultZone(){return Ar(Lr,ur.instance)}static get defaultLocale(){return jr}static set defaultLocale(e){jr=e}static get defaultNumberingSystem(){return Wr}static set defaultNumberingSystem(e){Wr=e}static get defaultOutputCalendar(){return Pr}static set defaultOutputCalendar(e){Pr=e}static get defaultWeekSettings(){return qr}static set defaultWeekSettings(e){qr=ms(e)}static get twoDigitCutoffYear(){return Ur}static set twoDigitCutoffYear(e){Ur=e%100}static get throwOnInvalid(){return Vr}static set throwOnInvalid(e){Vr=e}static resetCaches(){Or.resetCache(),mr.resetCache(),Wo.resetCache(),Ir={}}}class Hr{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Rr=[0,31,59,90,120,151,181,212,243,273,304,334],Yr=[0,31,60,91,121,152,182,213,244,274,305,335];function Gr(e,t){return new Hr("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Jr(e,t,n){const i=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const r=i.getUTCDay();return 0===r?7:r}function Qr(e,t,n){return n+(bs(e)?Yr:Rr)[t-1]}function Br(e,t){const n=bs(e)?Yr:Rr,i=n.findIndex((e=>e<t));return{month:i+1,day:t-n[i]}}function Kr(e,t){return(e-t+7)%7+1}function Xr(e,t=4,n=1){const{year:i,month:r,day:s}=e,a=Qr(i,r,s),o=Kr(Jr(i,r,s),n);let l,u=Math.floor((a-o+14-t)/7);return u<1?(l=i-1,u=Ts(l,t,n)):u>Ts(i,t,n)?(l=i+1,u=1):l=i,{weekYear:l,weekNumber:u,weekday:o,...Ms(e)}}function es(e,t=4,n=1){const{weekYear:i,weekNumber:r,weekday:s}=e,a=Kr(Jr(i,1,t),n),o=ks(i);let l,u=7*r+s-a-7+t;u<1?(l=i-1,u+=ks(l)):u>o?(l=i+1,u-=ks(i)):l=i;const{month:c,day:h}=Br(l,u);return{year:l,month:c,day:h,...Ms(e)}}function ts(e){const{year:t,month:n,day:i}=e;return{year:t,ordinal:Qr(t,n,i),...Ms(e)}}function ns(e){const{year:t,ordinal:n}=e,{month:i,day:r}=Br(t,n);return{year:t,month:i,day:r,...Ms(e)}}function is(e,t){if(!as(e.localWeekday)||!as(e.localWeekNumber)||!as(e.localWeekYear)){if(!as(e.weekday)||!as(e.weekNumber)||!as(e.weekYear))throw new Mi("Cannot mix locale-based week fields with ISO-based week fields");return as(e.localWeekday)||(e.weekday=e.localWeekday),as(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),as(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function rs(e){const t=ls(e.year),n=fs(e.month,1,12),i=fs(e.day,1,_s(e.year,e.month));return t?n?!i&&Gr("day",e.day):Gr("month",e.month):Gr("year",e.year)}function ss(e){const{hour:t,minute:n,second:i,millisecond:r}=e,s=fs(t,0,23)||24===t&&0===n&&0===i&&0===r,a=fs(n,0,59),o=fs(i,0,59),l=fs(r,0,999);return s?a?o?!l&&Gr("millisecond",r):Gr("second",i):Gr("minute",n):Gr("hour",t)}function as(e){return void 0===e}function os(e){return"number"==typeof e}function ls(e){return"number"==typeof e&&e%1==0}function us(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function cs(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function hs(e,t,n){if(0!==e.length)return e.reduce(((e,i)=>{const r=[t(i),i];return e&&n(e[0],r[0])===e[0]?e:r}),null)[1]}function ds(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ms(e){if(null==e)return null;if("object"!=typeof e)throw new Ii("Week settings must be an object");if(!fs(e.firstDay,1,7)||!fs(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some((e=>!fs(e,1,7))))throw new Ii("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function fs(e,t,n){return ls(e)&&e>=t&&e<=n}function ys(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function gs(e){return as(e)||null===e||""===e?void 0:parseInt(e,10)}function ps(e){return as(e)||null===e||""===e?void 0:parseFloat(e)}function ws(e){if(!as(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function vs(e,t,n=!1){const i=10**t;return(n?Math.trunc:Math.round)(e*i)/i}function bs(e){return e%4==0&&(e%100!=0||e%400==0)}function ks(e){return bs(e)?366:365}function _s(e,t){const n=function(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===n?bs(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Ss(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function $s(e,t,n){return-Kr(Jr(e,1,t),n)+t-1}function Ts(e,t=4,n=1){const i=$s(e,t,n),r=$s(e+1,t,n);return(ks(e)-i+r)/7}function Os(e){return e>99?e:e>Zr.twoDigitCutoffYear?1900+e:2e3+e}function Ns(e,t,n,i=null){const r=new Date(e),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(s.timeZone=i);const a={timeZoneName:t,...s},o=new Intl.DateTimeFormat(n,a).formatToParts(r).find((e=>"timezonename"===e.type.toLowerCase()));return o?o.value:null}function xs(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const i=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-i:i)}function Es(e){const t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new Ii(`Invalid unit value ${e}`);return t}function As(e,t){const n={};for(const i in e)if(ds(e,i)){const r=e[i];if(null==r)continue;n[t(i)]=Es(r)}return n}function Cs(e,t){const n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),r=e>=0?"+":"-";switch(t){case"short":return`${r}${ys(n,2)}:${ys(i,2)}`;case"narrow":return`${r}${n}${i>0?`:${i}`:""}`;case"techie":return`${r}${ys(n,2)}${ys(i,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Ms(e){return function(e,t){return t.reduce(((t,n)=>(t[n]=e[n],t)),{})}(e,["hour","minute","second","millisecond"])}const Ds=["January","February","March","April","May","June","July","August","September","October","November","December"],Is=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Fs=["J","F","M","A","M","J","J","A","S","O","N","D"];function Vs(e){switch(e){case"narrow":return[...Fs];case"short":return[...Is];case"long":return[...Ds];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}}const zs=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ls=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],js=["M","T","W","T","F","S","S"];function Ws(e){switch(e){case"narrow":return[...js];case"short":return[...Ls];case"long":return[...zs];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Ps=["AM","PM"],Us=["Before Christ","Anno Domini"],qs=["BC","AD"],Zs=["B","A"];function Hs(e){switch(e){case"narrow":return[...Zs];case"short":return[...qs];case"long":return[...Us];default:return null}}function Rs(e,t){let n="";for(const i of e)i.literal?n+=i.val:n+=t(i.val);return n}const Ys={D:ji,DD:Wi,DDD:Ui,DDDD:qi,t:Zi,tt:Hi,ttt:Ri,tttt:Yi,T:Gi,TT:Ji,TTT:Qi,TTTT:Bi,f:Ki,ff:er,fff:ir,ffff:sr,F:Xi,FF:tr,FFF:rr,FFFF:ar};class Gs{static create(e,t={}){return new Gs(e,t)}static parseFormat(e){let t=null,n="",i=!1;const r=[];for(let s=0;s<e.length;s++){const a=e.charAt(s);"'"===a?(n.length>0&&r.push({literal:i||/^\s+$/.test(n),val:n}),t=null,n="",i=!i):i||a===t?n+=a:(n.length>0&&r.push({literal:/^\s+$/.test(n),val:n}),n=a,t=a)}return n.length>0&&r.push({literal:i||/^\s+$/.test(n),val:n}),r}static macroTokenToFormatOpts(e){return Ys[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return ys(e,t);const n={...this.opts};return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),i=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,r=(t,n)=>this.loc.extract(e,t,n),s=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",a=()=>n?function(e){return Ps[e.hour<12?0:1]}(e):r({hour:"numeric",hourCycle:"h12"},"dayperiod"),o=(t,i)=>n?function(e,t){return Vs(t)[e.month-1]}(e,t):r(i?{month:t}:{month:t,day:"numeric"},"month"),l=(t,i)=>n?function(e,t){return Ws(t)[e.weekday-1]}(e,t):r(i?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),u=t=>{const n=Gs.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},c=t=>n?function(e,t){return Hs(t)[e.year<0?0:1]}(e,t):r({era:t},"era");return Rs(Gs.parseFormat(t),(t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return s({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return s({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return i?r({day:"numeric"},"day"):this.num(e.day);case"dd":return i?r({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return i?r({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?r({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return o("short",!0);case"LLLL":return o("long",!0);case"LLLLL":return o("narrow",!0);case"M":return i?r({month:"numeric"},"month"):this.num(e.month);case"MM":return i?r({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return o("short",!1);case"MMMM":return o("long",!1);case"MMMMM":return o("narrow",!1);case"y":return i?r({year:"numeric"},"year"):this.num(e.year);case"yy":return i?r({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?r({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?r({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return u(t)}}))}formatDurationFromString(e,t){const n=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"w":return"week";case"M":return"month";case"y":return"year";default:return null}},i=Gs.parseFormat(t),r=i.reduce(((e,{literal:t,val:n})=>t?e:e.concat(n)),[]),s=e.shiftTo(...r.map(n).filter((e=>e)));return Rs(i,(e=>t=>{const i=n(t);return i?this.num(e.get(i),t.length):t})(s))}}const Js=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Qs(...e){const t=e.reduce(((e,t)=>e+t.source),"");return RegExp(`^${t}$`)}function Bs(...e){return t=>e.reduce((([e,n,i],r)=>{const[s,a,o]=r(t,i);return[{...e,...s},a||n,o]}),[{},null,1]).slice(0,2)}function Ks(e,...t){if(null==e)return[null,null];for(const[n,i]of t){const t=n.exec(e);if(t)return i(t)}return[null,null]}function Xs(...e){return(t,n)=>{const i={};let r;for(r=0;r<e.length;r++)i[e[r]]=gs(t[n+r]);return[i,null,n+r]}}const ea=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,ta=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,na=RegExp(`${ta.source}${`(?:${ea.source}?(?:\\[(${Js.source})\\])?)?`}`),ia=RegExp(`(?:T${na.source})?`),ra=Xs("weekYear","weekNumber","weekDay"),sa=Xs("year","ordinal"),aa=RegExp(`${ta.source} ?(?:${ea.source}|(${Js.source}))?`),oa=RegExp(`(?: ${aa.source})?`);function la(e,t,n){const i=e[t];return as(i)?n:gs(i)}function ua(e,t){return[{hours:la(e,t,0),minutes:la(e,t+1,0),seconds:la(e,t+2,0),milliseconds:ws(e[t+3])},null,t+4]}function ca(e,t){const n=!e[t]&&!e[t+1],i=xs(e[t+1],e[t+2]);return[{},n?null:xr.instance(i),t+3]}function ha(e,t){return[{},e[t]?mr.create(e[t]):null,t+1]}const da=RegExp(`^T?${ta.source}$`),ma=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function fa(e){const[t,n,i,r,s,a,o,l,u]=e,c="-"===t[0],h=l&&"-"===l[0],d=(e,t=!1)=>void 0!==e&&(t||e&&c)?-e:e;return[{years:d(ps(n)),months:d(ps(i)),weeks:d(ps(r)),days:d(ps(s)),hours:d(ps(a)),minutes:d(ps(o)),seconds:d(ps(l),"-0"===l),milliseconds:d(ws(u),h)}]}const ya={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ga(e,t,n,i,r,s,a){const o={year:2===t.length?Os(gs(t)):gs(t),month:Is.indexOf(n)+1,day:gs(i),hour:gs(r),minute:gs(s)};return a&&(o.second=gs(a)),e&&(o.weekday=e.length>3?zs.indexOf(e)+1:Ls.indexOf(e)+1),o}const pa=/^(?:(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 wa(e){const[,t,n,i,r,s,a,o,l,u,c,h]=e,d=ga(t,r,i,n,s,a,o);let m;return m=l?ya[l]:u?0:xs(c,h),[d,new xr(m)]}const va=/^(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$/,ba=/^(Monday|Tuesday|Wednesday|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$/,ka=/^(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 _a(e){const[,t,n,i,r,s,a,o]=e;return[ga(t,r,i,n,s,a,o),xr.utcInstance]}function Sa(e){const[,t,n,i,r,s,a,o]=e;return[ga(t,o,n,i,r,s,a),xr.utcInstance]}const $a=Qs(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ia),Ta=Qs(/(\d{4})-?W(\d\d)(?:-?(\d))?/,ia),Oa=Qs(/(\d{4})-?(\d{3})/,ia),Na=Qs(na),xa=Bs((function(e,t){return[{year:la(e,t),month:la(e,t+1,1),day:la(e,t+2,1)},null,t+3]}),ua,ca,ha),Ea=Bs(ra,ua,ca,ha),Aa=Bs(sa,ua,ca,ha),Ca=Bs(ua,ca,ha);const Ma=Bs(ua);const Da=Qs(/(\d{4})-(\d\d)-(\d\d)/,oa),Ia=Qs(aa),Fa=Bs(ua,ca,ha);const Va="Invalid Duration",za={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}},La={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...za},ja=365.2425,Wa=30.436875,Pa={years:{quarters:4,months:12,weeks:52.1775,days:ja,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:Wa,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...za},Ua=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],qa=Ua.slice(0).reverse();function Za(e,t,n=!1){const i={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Ya(i)}function Ha(e,t){let n=t.milliseconds??0;for(const i of qa.slice(1))t[i]&&(n+=t[i]*e[i].milliseconds);return n}function Ra(e,t){const n=Ha(e,t)<0?-1:1;Ua.reduceRight(((i,r)=>{if(as(t[r]))return i;if(i){const s=t[i]*n,a=e[r][i],o=Math.floor(s/a);t[r]+=o*n,t[i]-=o*a*n}return r}),null),Ua.reduce(((n,i)=>{if(as(t[i]))return n;if(n){const r=t[n]%1;t[n]-=r,t[i]+=r*e[n][i]}return i}),null)}class Ya{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?Pa:La;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||Or.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return Ya.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new Ii("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new Ya({values:As(e,Ya.normalizeUnit),loc:Or.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(os(e))return Ya.fromMillis(e);if(Ya.isDuration(e))return e;if("object"==typeof e)return Ya.fromObject(e);throw new Ii(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return Ks(e,[ma,fa])}(e);return n?Ya.fromObject(n,t):Ya.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return Ks(e,[da,Ma])}(e);return n?Ya.fromObject(n,t):Ya.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Ii("need to specify a reason the Duration is invalid");const n=e instanceof Hr?e:new Hr(e,t);if(Zr.throwOnInvalid)throw new Ci(n);return new Ya({invalid:n})}static normalizeUnit(e){const 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 Di(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?Gs.create(this.loc,n).formatDurationFromString(this,e):Va}toHuman(e={}){if(!this.isValid)return Va;const t=Ua.map((t=>{const n=this.values[t];return as(n)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:t.slice(0,-1)}).format(n)})).filter((e=>e));return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let 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+=vs(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1};return Wo.fromMillis(t,{zone:"UTC"}).toISOTime(e)}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Ha(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=Ya.fromDurationLike(e),n={};for(const e of Ua)(ds(t.values,e)||ds(this.values,e))&&(n[e]=t.get(e)+this.get(e));return Za(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=Ya.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=Es(e(this.values[n],n));return Za(this,{values:t},!0)}get(e){return this[Ya.normalizeUnit(e)]}set(e){if(!this.isValid)return this;return Za(this,{values:{...this.values,...As(e,Ya.normalizeUnit)}})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:i}={}){return Za(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:i,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Ra(this.matrix,e),Za(this,{values:e},!0)}rescale(){if(!this.isValid)return this;return Za(this,{values:function(e){const t={};for(const[n,i]of Object.entries(e))0!==i&&(t[n]=i);return t}(this.normalize().shiftToAll().toObject())},!0)}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map((e=>Ya.normalizeUnit(e)));const t={},n={},i=this.toObject();let r;for(const s of Ua)if(e.indexOf(s)>=0){r=s;let e=0;for(const t in n)e+=this.matrix[t][s]*n[t],n[t]=0;os(i[s])&&(e+=i[s]);const a=Math.trunc(e);t[s]=a,n[s]=(1e3*e-1e3*a)/1e3}else os(i[s])&&(n[s]=i[s]);for(const e in n)0!==n[e]&&(t[r]+=e===r?n[e]:n[e]/this.matrix[r][e]);return Ra(this.matrix,t),Za(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return Za(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(const i of Ua)if(t=this.values[i],n=e.values[i],!(void 0===t||0===t?void 0===n||0===n:t===n))return!1;var t,n;return!0}}const Ga="Invalid Interval";class Ja{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new Ii("need to specify a reason the Interval is invalid");const n=e instanceof Hr?e:new Hr(e,t);if(Zr.throwOnInvalid)throw new Ai(n);return new Ja({invalid:n})}static fromDateTimes(e,t){const n=Po(e),i=Po(t),r=function(e,t){return e&&e.isValid?t&&t.isValid?t<e?Ja.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null:Ja.invalid("missing or invalid end"):Ja.invalid("missing or invalid start")}(n,i);return null==r?new Ja({start:n,end:i}):r}static after(e,t){const n=Ya.fromDurationLike(t),i=Po(e);return Ja.fromDateTimes(i,i.plus(n))}static before(e,t){const n=Ya.fromDurationLike(t),i=Po(e);return Ja.fromDateTimes(i.minus(n),i)}static fromISO(e,t){const[n,i]=(e||"").split("/",2);if(n&&i){let e,r,s,a;try{e=Wo.fromISO(n,t),r=e.isValid}catch(i){r=!1}try{s=Wo.fromISO(i,t),a=s.isValid}catch(i){a=!1}if(r&&a)return Ja.fromDateTimes(e,s);if(r){const n=Ya.fromISO(i,t);if(n.isValid)return Ja.after(e,n)}else if(a){const e=Ya.fromISO(n,t);if(e.isValid)return Ja.before(s,e)}}return Ja.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const n=this.start.startOf(e,t);let i;return i=t?.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,i=i.startOf(e,t),Math.floor(i.diff(n,e).get(e))+(i.valueOf()!==this.end.valueOf())}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&(this.s<=e&&this.e>e)}set({start:e,end:t}={}){return this.isValid?Ja.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Po).filter((e=>this.contains(e))).sort(((e,t)=>e.toMillis()-t.toMillis())),n=[];let{s:i}=this,r=0;for(;i<this.e;){const e=t[r]||this.e,s=+e>+this.e?this.e:e;n.push(Ja.fromDateTimes(i,s)),i=s,r+=1}return n}splitBy(e){const t=Ya.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:i}=this,r=1;const s=[];for(;i<this.e;){const e=this.start.plus(t.mapUnits((e=>e*r)));n=+e>+this.e?this.e:e,s.push(Ja.fromDateTimes(i,n)),i=n,r+=1}return s}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return!!this.isValid&&+this.e==+e.s}abutsEnd(e){return!!this.isValid&&+e.e==+this.s}engulfs(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)}equals(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:Ja.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return Ja.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort(((e,t)=>e.s-t.s)).reduce((([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n]),[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const i=[],r=e.map((e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}])),s=Array.prototype.concat(...r).sort(((e,t)=>e.time-t.time));for(const e of s)n+="s"===e.type?1:-1,1===n?t=e.time:(t&&+t!=+e.time&&i.push(Ja.fromDateTimes(t,e.time)),t=null);return Ja.merge(i)}difference(...e){return Ja.xor([this].concat(e)).map((e=>this.intersection(e))).filter((e=>e&&!e.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Ga}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=ji,t={}){return this.isValid?Gs.create(this.s.loc.clone(t),e).formatInterval(this):Ga}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Ga}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Ga}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Ga}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Ga}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Ya.invalid(this.invalidReason)}mapEndpoints(e){return Ja.fromDateTimes(e(this.s),e(this.e))}}class Qa{static hasDST(e=Zr.defaultZone){const t=Wo.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return mr.isValidZone(e)}static normalizeZone(e){return Ar(e,Zr.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||Or.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||Or.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||Or.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null,outputCalendar:r="gregory"}={}){return(i||Or.create(t,n,r)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null,outputCalendar:r="gregory"}={}){return(i||Or.create(t,n,r)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null}={}){return(i||Or.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null}={}){return(i||Or.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Or.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Or.create(t,null,"gregory").eras(e)}static features(){return{relative:us(),localeWeek:cs()}}}function Ba(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(t)-n(e);return Math.floor(Ya.fromMillis(i).as("days"))}function Ka(e,t,n,i){let[r,s,a,o]=function(e,t,n){const i=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=Ba(e,t);return(n-n%7)/7}],["days",Ba]],r={},s=e;let a,o;for(const[l,u]of i)n.indexOf(l)>=0&&(a=l,r[l]=u(e,t),o=s.plus(r),o>t?(r[l]--,(e=s.plus(r))>t&&(o=e,r[l]--,e=s.plus(r))):e=o);return[e,r,o,a]}(e,t,n);const l=t-r,u=n.filter((e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0));0===u.length&&(a<t&&(a=r.plus({[o]:1})),a!==r&&(s[o]=(s[o]||0)+l/(a-r)));const c=Ya.fromObject(s,i);return u.length>0?Ya.fromMillis(l,i).shiftTo(...u).plus(c):c}function Xa(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);if(-1!==e[n].search(Cr.hanidec))t+=Dr.indexOf(e[n]);else for(const e in Mr){const[n,r]=Mr[e];i>=n&&i<=r&&(t+=i-n)}}return parseInt(t,10)}return t}(e))}}const eo=`[ ${String.fromCharCode(160)}]`,to=new RegExp(eo,"g");function no(e){return e.replace(/\./g,"\\.?").replace(to,eo)}function io(e){return e.replace(/\./g,"").replace(to," ").toLowerCase()}function ro(e,t){return null===e?null:{regex:RegExp(e.map(no).join("|")),deser:([n])=>e.findIndex((e=>io(n)===io(e)))+t}}function so(e,t){return{regex:e,deser:([,e,t])=>xs(e,t),groups:t}}function ao(e){return{regex:e,deser:([e])=>e}}const oo={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",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let lo=null;function uo(e,t){return Array.prototype.concat(...e.map((e=>function(e,t){if(e.literal)return e;const n=mo(Gs.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t))))}class co{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=uo(Gs.parseFormat(t),e),this.units=this.tokens.map((t=>function(e,t){const n=Fr(t),i=Fr(t,"{2}"),r=Fr(t,"{3}"),s=Fr(t,"{4}"),a=Fr(t,"{6}"),o=Fr(t,"{1,2}"),l=Fr(t,"{1,3}"),u=Fr(t,"{1,6}"),c=Fr(t,"{1,9}"),h=Fr(t,"{2,4}"),d=Fr(t,"{4,6}"),m=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},f=(f=>{if(e.literal)return m(f);switch(f.val){case"G":return ro(t.eras("short"),0);case"GG":return ro(t.eras("long"),0);case"y":return Xa(u);case"yy":case"kk":return Xa(h,Os);case"yyyy":case"kkkk":return Xa(s);case"yyyyy":return Xa(d);case"yyyyyy":return Xa(a);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Xa(o);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Xa(i);case"MMM":return ro(t.months("short",!0),1);case"MMMM":return ro(t.months("long",!0),1);case"LLL":return ro(t.months("short",!1),1);case"LLLL":return ro(t.months("long",!1),1);case"o":case"S":return Xa(l);case"ooo":case"SSS":return Xa(r);case"u":return ao(c);case"uu":return ao(o);case"uuu":case"E":case"c":return Xa(n);case"a":return ro(t.meridiems(),0);case"EEE":return ro(t.weekdays("short",!1),1);case"EEEE":return ro(t.weekdays("long",!1),1);case"ccc":return ro(t.weekdays("short",!0),1);case"cccc":return ro(t.weekdays("long",!0),1);case"Z":case"ZZ":return so(new RegExp(`([+-]${o.source})(?::(${i.source}))?`),2);case"ZZZ":return so(new RegExp(`([+-]${o.source})(${i.source})?`),2);case"z":return ao(/[a-z_+-/]{1,256}?/i);case" ":return ao(/[^\S\n\r]/);default:return m(f)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return f.token=e,f}(t,e))),this.disqualifyingUnit=this.units.find((e=>e.invalidReason)),!this.disqualifyingUnit){const[e,t]=function(e){const t=e.map((e=>e.regex)).reduce(((e,t)=>`${e}(${t.source})`),"");return[`^${t}$`,e]}(this.units);this.regex=RegExp(e,"i"),this.handlers=t}}explainFromTokens(e){if(this.isValid){const[t,n]=function(e,t,n){const i=e.match(t);if(i){const e={};let t=1;for(const r in n)if(ds(n,r)){const s=n[r],a=s.groups?s.groups+1:1;!s.literal&&s.token&&(e[s.token.val[0]]=s.deser(i.slice(t,t+a))),t+=a}return[i,e]}return[i,{}]}(e,this.regex,this.handlers),[i,r,s]=n?function(e){let t,n=null;as(e.z)||(n=mr.create(e.z)),as(e.Z)||(n||(n=new xr(e.Z)),t=e.Z),as(e.q)||(e.M=3*(e.q-1)+1),as(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),as(e.u)||(e.S=ws(e.u));const i=Object.keys(e).reduce(((t,n)=>{const i=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return i&&(t[i]=e[n]),t}),{});return[i,n,t]}(n):[null,null,void 0];if(ds(n,"a")&&ds(n,"H"))throw new Mi("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:i,zone:r,specificOffset:s}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function ho(e,t,n){return new co(e,n).explainFromTokens(t)}function mo(e,t){if(!e)return null;const n=Gs.create(t,e).dtFormatter((lo||(lo=Wo.fromMillis(1555555555555)),lo)),i=n.formatToParts(),r=n.resolvedOptions();return i.map((t=>function(e,t,n){const{type:i,value:r}=e;if("literal"===i){const e=/^\s+$/.test(r);return{literal:!e,val:e?" ":r}}const s=t[i];let a=i;"hour"===i&&(a=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let o=oo[a];if("object"==typeof o&&(o=o[s]),o)return{literal:!1,val:o}}(t,e,r)))}const fo="Invalid DateTime",yo=864e13;function go(e){return new Hr("unsupported zone",`the zone "${e.name}" is not supported`)}function po(e){return null===e.weekData&&(e.weekData=Xr(e.c)),e.weekData}function wo(e){return null===e.localWeekData&&(e.localWeekData=Xr(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function vo(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Wo({...n,...t,old:n})}function bo(e,t,n){let i=e-60*t*1e3;const r=n.offset(i);if(t===r)return[i,t];i-=60*(r-t)*1e3;const s=n.offset(i);return r===s?[i,r]:[e-60*Math.min(r,s)*1e3,Math.max(r,s)]}function ko(e,t){const 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 _o(e,t,n){return bo(Ss(e),t,n)}function So(e,t){const n=e.o,i=e.c.year+Math.trunc(t.years),r=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),s={...e.c,year:i,month:r,day:Math.min(e.c.day,_s(i,r))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},a=Ya.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),o=Ss(s);let[l,u]=bo(o,n,e.zone);return 0!==a&&(l+=a,u=e.zone.offset(l)),{ts:l,o:u}}function $o(e,t,n,i,r,s){const{setZone:a,zone:o}=n;if(e&&0!==Object.keys(e).length||t){const i=t||o,r=Wo.fromObject(e,{...n,zone:i,specificOffset:s});return a?r:r.setZone(o)}return Wo.invalid(new Hr("unparsable",`the input "${r}" can't be parsed as ${i}`))}function To(e,t,n=!0){return e.isValid?Gs.create(Or.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Oo(e,t){const n=e.c.year>9999||e.c.year<0;let i="";return n&&e.c.year>=0&&(i+="+"),i+=ys(e.c.year,n?6:4),t?(i+="-",i+=ys(e.c.month),i+="-",i+=ys(e.c.day)):(i+=ys(e.c.month),i+=ys(e.c.day)),i}function No(e,t,n,i,r,s){let a=ys(e.c.hour);return t?(a+=":",a+=ys(e.c.minute),0===e.c.millisecond&&0===e.c.second&&n||(a+=":")):a+=ys(e.c.minute),0===e.c.millisecond&&0===e.c.second&&n||(a+=ys(e.c.second),0===e.c.millisecond&&i||(a+=".",a+=ys(e.c.millisecond,3))),r&&(e.isOffsetFixed&&0===e.offset&&!s?a+="Z":e.o<0?(a+="-",a+=ys(Math.trunc(-e.o/60)),a+=":",a+=ys(Math.trunc(-e.o%60))):(a+="+",a+=ys(Math.trunc(e.o/60)),a+=":",a+=ys(Math.trunc(e.o%60)))),s&&(a+="["+e.zone.ianaName+"]"),a}const xo={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Eo={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Ao={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Co=["year","month","day","hour","minute","second","millisecond"],Mo=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Do=["year","ordinal","hour","minute","second","millisecond"];function Io(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return function(e){const 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 Di(e);return t}(e)}}function Fo(e,t){const n=Ar(t.zone,Zr.defaultZone);if(!n.isValid)return Wo.invalid(go(n));const i=Or.fromObject(t);let r,s;if(as(e.year))r=Zr.now();else{for(const t of Co)as(e[t])&&(e[t]=xo[t]);const t=rs(e)||ss(e);if(t)return Wo.invalid(t);const i=function(e){return jo[e]||(void 0===Lo&&(Lo=Zr.now()),jo[e]=e.offset(Lo)),jo[e]}(n);[r,s]=_o(e,i,n)}return new Wo({ts:r,zone:n,loc:i,o:s})}function Vo(e,t,n){const i=!!as(n.round)||n.round,r=(e,r)=>{e=vs(e,i||n.calendary?0:2,!0);return t.loc.clone(n).relFormatter(n).format(e,r)},s=i=>n.calendary?t.hasSame(e,i)?0:t.startOf(i).diff(e.startOf(i),i).get(i):t.diff(e,i).get(i);if(n.unit)return r(s(n.unit),n.unit);for(const e of n.units){const t=s(e);if(Math.abs(t)>=1)return r(t,e)}return r(e>t?-0:0,n.units[n.units.length-1])}function zo(e){let t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}let Lo,jo={};class Wo{constructor(e){const t=e.zone||Zr.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new Hr("invalid input"):null)||(t.isValid?null:go(t));this.ts=as(e.ts)?Zr.now():e.ts;let i=null,r=null;if(!n){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[i,r]=[e.old.c,e.old.o];else{const s=os(e.o)&&!e.old?e.o:t.offset(this.ts);i=ko(this.ts,s),n=Number.isNaN(i.year)?new Hr("invalid input"):null,i=n?null:i,r=n?null:s}}this._zone=t,this.loc=e.loc||Or.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=i,this.o=r,this.isLuxonDateTime=!0}static now(){return new Wo({})}static local(){const[e,t]=zo(arguments),[n,i,r,s,a,o,l]=t;return Fo({year:n,month:i,day:r,hour:s,minute:a,second:o,millisecond:l},e)}static utc(){const[e,t]=zo(arguments),[n,i,r,s,a,o,l]=t;return e.zone=xr.utcInstance,Fo({year:n,month:i,day:r,hour:s,minute:a,second:o,millisecond:l},e)}static fromJSDate(e,t={}){const n=function(e){return"[object Date]"===Object.prototype.toString.call(e)}(e)?e.valueOf():NaN;if(Number.isNaN(n))return Wo.invalid("invalid input");const i=Ar(t.zone,Zr.defaultZone);return i.isValid?new Wo({ts:n,zone:i,loc:Or.fromObject(t)}):Wo.invalid(go(i))}static fromMillis(e,t={}){if(os(e))return e<-yo||e>yo?Wo.invalid("Timestamp out of range"):new Wo({ts:e,zone:Ar(t.zone,Zr.defaultZone),loc:Or.fromObject(t)});throw new Ii(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(os(e))return new Wo({ts:1e3*e,zone:Ar(t.zone,Zr.defaultZone),loc:Or.fromObject(t)});throw new Ii("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=Ar(t.zone,Zr.defaultZone);if(!n.isValid)return Wo.invalid(go(n));const i=Or.fromObject(t),r=As(e,Io),{minDaysInFirstWeek:s,startOfWeek:a}=is(r,i),o=Zr.now(),l=as(t.specificOffset)?n.offset(o):t.specificOffset,u=!as(r.ordinal),c=!as(r.year),h=!as(r.month)||!as(r.day),d=c||h,m=r.weekYear||r.weekNumber;if((d||u)&&m)throw new Mi("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&u)throw new Mi("Can't mix ordinal dates with month/day");const f=m||r.weekday&&!d;let y,g,p=ko(o,l);f?(y=Mo,g=Eo,p=Xr(p,s,a)):u?(y=Do,g=Ao,p=ts(p)):(y=Co,g=xo);let w=!1;for(const e of y){as(r[e])?r[e]=w?g[e]:p[e]:w=!0}const v=f?function(e,t=4,n=1){const i=ls(e.weekYear),r=fs(e.weekNumber,1,Ts(e.weekYear,t,n)),s=fs(e.weekday,1,7);return i?r?!s&&Gr("weekday",e.weekday):Gr("week",e.weekNumber):Gr("weekYear",e.weekYear)}(r,s,a):u?function(e){const t=ls(e.year),n=fs(e.ordinal,1,ks(e.year));return t?!n&&Gr("ordinal",e.ordinal):Gr("year",e.year)}(r):rs(r),b=v||ss(r);if(b)return Wo.invalid(b);const k=f?es(r,s,a):u?ns(r):r,[_,S]=_o(k,l,n),$=new Wo({ts:_,zone:n,o:S,loc:i});return r.weekday&&d&&e.weekday!==$.weekday?Wo.invalid("mismatched weekday",`you can't specify both a weekday of ${r.weekday} and a date of ${$.toISO()}`):$.isValid?$:Wo.invalid($.invalid)}static fromISO(e,t={}){const[n,i]=function(e){return Ks(e,[$a,xa],[Ta,Ea],[Oa,Aa],[Na,Ca])}(e);return $o(n,i,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,i]=function(e){return Ks(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[pa,wa])}(e);return $o(n,i,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,i]=function(e){return Ks(e,[va,_a],[ba,_a],[ka,Sa])}(e);return $o(n,i,t,"HTTP",t)}static fromFormat(e,t,n={}){if(as(e)||as(t))throw new Ii("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:r=null}=n,s=Or.fromOpts({locale:i,numberingSystem:r,defaultToEN:!0}),[a,o,l,u]=function(e,t,n){const{result:i,zone:r,specificOffset:s,invalidReason:a}=ho(e,t,n);return[i,r,s,a]}(s,e,t);return u?Wo.invalid(u):$o(a,o,n,`format ${t}`,e,l)}static fromString(e,t,n={}){return Wo.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,i]=function(e){return Ks(e,[Da,xa],[Ia,Fa])}(e);return $o(n,i,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new Ii("need to specify a reason the DateTime is invalid");const n=e instanceof Hr?e:new Hr(e,t);if(Zr.throwOnInvalid)throw new Ei(n);return new Wo({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=mo(e,Or.fromObject(t));return n?n.map((e=>e?e.val:null)).join(""):null}static expandFormat(e,t={}){return uo(Gs.parseFormat(e),Or.fromObject(t)).map((e=>e.val)).join("")}static resetCache(){Lo=void 0,jo={}}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?po(this).weekYear:NaN}get weekNumber(){return this.isValid?po(this).weekNumber:NaN}get weekday(){return this.isValid?po(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?wo(this).weekday:NaN}get localWeekNumber(){return this.isValid?wo(this).weekNumber:NaN}get localWeekYear(){return this.isValid?wo(this).weekYear:NaN}get ordinal(){return this.isValid?ts(this.c).ordinal:NaN}get monthShort(){return this.isValid?Qa.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Qa.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Qa.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Qa.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,n=Ss(this.c),i=this.zone.offset(n-e),r=this.zone.offset(n+e),s=this.zone.offset(n-i*t),a=this.zone.offset(n-r*t);if(s===a)return[this];const o=n-s*t,l=n-a*t,u=ko(o,s),c=ko(l,a);return u.hour===c.hour&&u.minute===c.minute&&u.second===c.second&&u.millisecond===c.millisecond?[vo(this,{ts:o}),vo(this,{ts:l})]:[this]}get isInLeapYear(){return bs(this.year)}get daysInMonth(){return _s(this.year,this.month)}get daysInYear(){return this.isValid?ks(this.year):NaN}get weeksInWeekYear(){return this.isValid?Ts(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Ts(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:i}=Gs.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:i}}toUTC(e=0,t={}){return this.setZone(xr.instance(e),t)}toLocal(){return this.setZone(Zr.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=Ar(e,Zr.defaultZone)).equals(this.zone))return this;if(e.isValid){let i=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[i]=_o(n,t,e)}return vo(this,{ts:i,zone:e})}return Wo.invalid(go(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return vo(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=As(e,Io),{minDaysInFirstWeek:n,startOfWeek:i}=is(t,this.loc),r=!as(t.weekYear)||!as(t.weekNumber)||!as(t.weekday),s=!as(t.ordinal),a=!as(t.year),o=!as(t.month)||!as(t.day),l=a||o,u=t.weekYear||t.weekNumber;if((l||s)&&u)throw new Mi("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new Mi("Can't mix ordinal dates with month/day");let c;r?c=es({...Xr(this.c,n,i),...t},n,i):as(t.ordinal)?(c={...this.toObject(),...t},as(t.day)&&(c.day=Math.min(_s(c.year,c.month),c.day))):c=ns({...ts(this.c),...t});const[h,d]=_o(c,this.o,this.zone);return vo(this,{ts:h,o:d})}plus(e){if(!this.isValid)return this;return vo(this,So(this,Ya.fromDurationLike(e)))}minus(e){if(!this.isValid)return this;return vo(this,So(this,Ya.fromDurationLike(e).negate()))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},i=Ya.normalizeUnit(e);switch(i){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0}if("weeks"===i)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(n.weekNumber=this.weekNumber-1),n.weekday=e}else n.weekday=1;if("quarters"===i){const e=Math.ceil(this.month/3);n.month=3*(e-1)+1}return this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?Gs.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):fo}toLocaleString(e=ji,t={}){return this.isValid?Gs.create(this.loc.clone(t),e).formatDateTime(this):fo}toLocaleParts(e={}){return this.isValid?Gs.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:i=!0,extendedZone:r=!1}={}){if(!this.isValid)return null;const s="extended"===e;let a=Oo(this,s);return a+="T",a+=No(this,s,t,n,i,r),a}toISODate({format:e="extended"}={}){return this.isValid?Oo(this,"extended"===e):null}toISOWeekDate(){return To(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:i=!1,extendedZone:r=!1,format:s="extended"}={}){if(!this.isValid)return null;return(i?"T":"")+No(this,"extended"===s,t,e,n,r)}toRFC2822(){return To(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return To(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Oo(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let i="HH:mm:ss.SSS";return(t||e)&&(n&&(i+=" "),t?i+="z":e&&(i+="ZZ")),To(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():fo}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return Ya.invalid("created by diffing an invalid DateTime");const i={locale:this.locale,numberingSystem:this.numberingSystem,...n},r=(o=t,Array.isArray(o)?o:[o]).map(Ya.normalizeUnit),s=e.valueOf()>this.valueOf(),a=Ka(s?this:e,s?e:this,r,i);var o;return s?a.negate():a}diffNow(e="milliseconds",t={}){return this.diff(Wo.now(),e,t)}until(e){return this.isValid?Ja.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const i=e.valueOf(),r=this.setZone(e.zone,{keepLocalTime:!0});return r.startOf(t,n)<=i&&i<=r.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||Wo.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0;let i=["years","months","days","hours","minutes","seconds"],r=e.unit;return Array.isArray(e.unit)&&(i=e.unit,r=void 0),Vo(t,this.plus(n),{...e,numeric:"always",units:i,unit:r})}toRelativeCalendar(e={}){return this.isValid?Vo(e.base||Wo.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(Wo.isDateTime))throw new Ii("min requires all arguments be DateTimes");return hs(e,(e=>e.valueOf()),Math.min)}static max(...e){if(!e.every(Wo.isDateTime))throw new Ii("max requires all arguments be DateTimes");return hs(e,(e=>e.valueOf()),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:i=null,numberingSystem:r=null}=n;return ho(Or.fromOpts({locale:i,numberingSystem:r,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return Wo.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:i=null}=t,r=Or.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0});return new co(r,e)}static fromFormatParser(e,t,n={}){if(as(e)||as(t))throw new Ii("fromFormatParser requires an input string and a format parser");const{locale:i=null,numberingSystem:r=null}=n,s=Or.fromOpts({locale:i,numberingSystem:r,defaultToEN:!0});if(!s.equals(t.locale))throw new Ii(`fromFormatParser called with a locale of ${s}, but the format parser was created for ${t.locale}`);const{result:a,zone:o,specificOffset:l,invalidReason:u}=t.explainFromTokens(e);return u?Wo.invalid(u):$o(a,o,n,`format ${t.format}`,e,l)}static get DATE_SHORT(){return ji}static get DATE_MED(){return Wi}static get DATE_MED_WITH_WEEKDAY(){return Pi}static get DATE_FULL(){return Ui}static get DATE_HUGE(){return qi}static get TIME_SIMPLE(){return Zi}static get TIME_WITH_SECONDS(){return Hi}static get TIME_WITH_SHORT_OFFSET(){return Ri}static get TIME_WITH_LONG_OFFSET(){return Yi}static get TIME_24_SIMPLE(){return Gi}static get TIME_24_WITH_SECONDS(){return Ji}static get TIME_24_WITH_SHORT_OFFSET(){return Qi}static get TIME_24_WITH_LONG_OFFSET(){return Bi}static get DATETIME_SHORT(){return Ki}static get DATETIME_SHORT_WITH_SECONDS(){return Xi}static get DATETIME_MED(){return er}static get DATETIME_MED_WITH_SECONDS(){return tr}static get DATETIME_MED_WITH_WEEKDAY(){return nr}static get DATETIME_FULL(){return ir}static get DATETIME_FULL_WITH_SECONDS(){return rr}static get DATETIME_HUGE(){return sr}static get DATETIME_HUGE_WITH_SECONDS(){return ar}}function Po(e){if(Wo.isDateTime(e))return e;if(e&&e.valueOf&&os(e.valueOf()))return Wo.fromJSDate(e);if(e&&"object"==typeof e)return Wo.fromObject(e);throw new Ii(`Unknown datetime argument: ${e}, of type ${typeof e}`)}console.info("%c CLOCK-WEATHER-CARD-HUI-ICONS \n%c Version: 3.0.10","color: orange; font-weight: bold; background: black","color: yellow; font-weight: bold; background: dimgray"),window.customCards=window.customCards||[],window.customCards.push({type:"clock-weather-card-hui-icons",name:"Clock Weather Card HUI Icons",description:"Shows the current date/time in combination with the current weather and an iOS insipired weather forecast."});const Uo=(new Map).set(-20,new be(0,60,98)).set(-10,new be(120,162,204)).set(0,new be(164,195,210)).set(10,new be(121,210,179)).set(20,new be(252,245,112)).set(30,new be(255,150,79)).set(40,new be(255,192,159)),qo=new Set(["partlycloudy","cloudy","fog","windy","windy-variant","hail","rainy","snowy","snowy-rainy","pouring","lightning","lightning-rainy"]),Zo=new Set(["hail","rainy","pouring"]),Ho=new Set(["windy","windy-variant"]),Ro=new Set(["snowy","snowy-rainy"]),Yo=new Set(["lightning","lightning-rainy"]);let Go=class extends oe{constructor(){super(),this.forecastSubscriberLock=!1,this.currentDate=Wo.now();const e=1e3-this.currentDate.millisecond;setTimeout((()=>setInterval((()=>{this.currentDate=Wo.now()}),1e3)),e),setTimeout((()=>{this.currentDate=Wo.now()}),e)}static getStubConfig(e,t,n){const i=t.find((e=>{var t;return null!==(t=e.startsWith("weather."))&&void 0!==t?t:n.find((()=>!0))}));return i?{entity:i}:{}}getCardSize(){return 3+Ti(this.config.forecast_rows/2)}setConfig(e){if(!e)throw this.createError("Invalid configuration.");if(!e.entity)throw this.createError('Attribute "entity" must be present.');if(e.forecast_rows&&e.forecast_rows<1)throw this.createError('Attribute "forecast_rows" must be greater than 0.');if(e.time_format&&"24"!==e.time_format.toString()&&"12"!==e.time_format.toString())throw this.createError('Attribute "time_format" must either be "12" or "24".');if(e.hide_today_section&&e.hide_forecast_section)throw this.createError('Attributes "hide_today_section" and "hide_forecast_section" must not enabled at the same time.');this.config=this.mergeConfig(e)}shouldUpdate(e){if(!this.config)return!1;if(e.has("forecasts"))return!0;const t=e.get("hass");if(t){if(t.states[this.config.sun_entity]!==this.hass.states[this.config.sun_entity])return!0}return function(e,t,n){if(t.has("config")||n)return!0;if(e.config.entity){var i=t.get("hass");return!i||i.states[e.config.entity]!==e.hass.states[e.config.entity]}return!1}(this,e,!1)}updated(e){super.updated(e),e.has("config")&&this.subscribeForecastEvents()}render(){if(this.error)return this.error;const e=!this.config.hide_today_section,t=!this.config.hide_forecast_section;return W`
|
||
<ha-card
|
||
@action=${e=>{this.handleAction(e)}}
|
||
.actionHandler=${Oe({hasHold:ve(this.config.hold_action),hasDoubleClick:ve(this.config.double_tap_action)})}
|
||
tabindex="0"
|
||
.label=${`Clock Weather Card: ${this.config.entity||"No Entity Defined"}`}
|
||
>
|
||
${this.config.title?W`
|
||
<div class="card-header">
|
||
${this.config.title}
|
||
</div>`:""}
|
||
<div class="card-content">
|
||
${e?W`
|
||
<clock-weather-card-today>
|
||
${Ni((()=>this.renderToday()))}
|
||
</clock-weather-card-today>`:""}
|
||
${t?W`
|
||
<clock-weather-card-forecast>
|
||
${Ni((()=>this.renderForecast()))}
|
||
</clock-weather-card-forecast>`:""}
|
||
</div>
|
||
</ha-card>
|
||
`}connectedCallback(){super.connectedCallback(),this.hasUpdated&&this.subscribeForecastEvents()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeForecastEvents()}willUpdate(e){super.willUpdate(e),this.forecastSubscriber||this.subscribeForecastEvents()}renderToday(){const e=this.getWeather(),t=e.state,n=this.config.show_decimal?this.getCurrentTemperature():Oi(this.getCurrentTemperature()),i=e.attributes.temperature_unit,r=this.config.show_decimal?this.getApparentTemperature():Oi(this.getApparentTemperature()),s=this.getAqi(),a=this.getAqiColor(s),o=Oi(this.getCurrentHumidity()),l=this.toIcon(t,!1),u=this.localize(`weather.${t}`),c=null!==n?this.toConfiguredTempWithUnit(i,n):null,h=null!==o?`${o}% ${this.localize("misc.humidity")}`:null,d=null!==r?this.toConfiguredTempWithUnit(i,r):null,m=this.localize("misc.feels-like"),f=this.localize("misc.aqi");return W`
|
||
<clock-weather-card-today-left>
|
||
${l}
|
||
</clock-weather-card-today-left>
|
||
<clock-weather-card-today-right>
|
||
<clock-weather-card-today-right-wrap>
|
||
<clock-weather-card-today-right-wrap-top>
|
||
${this.config.hide_clock?u:c?`${u}, ${c}`:u}
|
||
${this.config.show_humidity&&h?W`<br>${h}`:""}
|
||
${this.config.apparent_sensor&&r?W`<br>${m}: ${d}`:""}
|
||
${this.config.aqi_sensor&&null!==s?W`<br><aqi style="background-color: ${a}">${s} ${f}</aqi>`:""}
|
||
</clock-weather-card-today-right-wrap-top>
|
||
<clock-weather-card-today-right-wrap-center>
|
||
${this.config.hide_clock?null!=c?c:"n/a":this.time()}
|
||
</clock-weather-card-today-right-wrap-center>
|
||
<clock-weather-card-today-right-wrap-bottom>
|
||
${this.config.hide_date?"":this.date()}
|
||
</clock-weather-card-today-right-wrap-bottom>
|
||
</clock-weather-card-today-right-wrap>
|
||
</clock-weather-card-today-right>`}renderForecast(){const e=this.getWeather(),t=Oi(this.getCurrentTemperature()),n=this.config.forecast_rows,i=this.config.hourly_forecast,r=e.attributes.temperature_unit,s=this.mergeForecasts(n,i),a=s.map((e=>e.templow)),o=s.map((e=>e.temperature));null!==t&&(a.push(t),o.push(t));const l=Math.round(Si(a)),u=Math.round(_i(o)),c=this.gradientRange(l,u,r),h=s.map((e=>e.datetime)).map((e=>i?this.time(e):this.localize(`day.${e.weekday}`))),d=h.length?_i(h.map((e=>e.length))):0;return s.map(((e,n)=>Ni((()=>this.renderForecastItem(e,c,l,u,t,i,h[n],d)))))}renderForecastItem(e,t,n,i,r,s,a,o){const l=e.condition,u=this.toIcon(l,!0),c=this.getWeather().attributes.temperature_unit,h=s?Wo.now().hour===e.datetime.hour:Wo.now().day===e.datetime.day,d=Math.round(h&&null!==r?Math.min(r,e.templow):e.templow),m=Math.round(h&&null!==r?Math.max(r,e.temperature):e.temperature);return W`
|
||
<clock-weather-card-forecast-row style="--col-one-size: ${.5*o}rem;">
|
||
${this.renderText(a)}
|
||
${this.renderIcon(u)}
|
||
${this.renderText(this.toConfiguredTempWithUnit(c,d),"right")}
|
||
${this.renderForecastTemperatureBar(t,n,i,d,m,h,r)}
|
||
${this.renderText(this.toConfiguredTempWithUnit(c,m))}
|
||
</clock-weather-card-forecast-row>
|
||
`}renderText(e,t="left"){return W`
|
||
<forecast-text style="--text-align: ${t};">
|
||
${e}
|
||
</forecast-text>
|
||
`}renderIcon(e){return W`
|
||
<forecast-icon>
|
||
${e}
|
||
</forecast-icon>
|
||
`}renderForecastTemperatureBar(e,t,n,i,r,s,a){const{startPercent:o,endPercent:l}=this.calculateBarRangePercents(t,n,i,r);return W`
|
||
<forecast-temperature-bar>
|
||
<forecast-temperature-bar-background> </forecast-temperature-bar-background>
|
||
<forecast-temperature-bar-range
|
||
style="--move-right: ${n===t?0:(i-t)/(n-t)}; --start-percent: ${o}%; --end-percent: ${l}%; --gradient: ${this.gradient(e,o,l)};"
|
||
>
|
||
${s?this.renderForecastCurrentTemp(i,r,a):""}
|
||
</forecast-temperature-bar-range>
|
||
</forecast-temperature-bar>
|
||
`}renderForecastCurrentTemp(e,t,n){if(null==n)return W``;return W`
|
||
<forecast-temperature-bar-current-indicator style="--position: ${e===t?0:100/(t-e)*(n-e)}%;">
|
||
<forecast-temperature-bar-current-indicator-dot style="--move-right: ${t===e?0:(n-e)/(t-e)}">
|
||
</forecast-temperature-bar-current-indicator-dot>
|
||
</forecast-temperature-bar-current-indicator>
|
||
`}static get styles(){return ke}gradientRange(e,t,n){const i=this.toCelsius(n,e),r=this.toCelsius(n,t),s=Math.max(function(e,t=0){return t<=0?Math.floor(e):Math.floor(e/t)*t}(i,10),Si([...Uo.keys()])),a=Math.min(Ti(r,10),_i([...Uo.keys()]));return Array.from(Uo.keys()).filter((e=>e>=s&&e<=a)).map((e=>Uo.get(e)))}gradient(e,t,n){var i;if(e.length<=1){const t=null!==(i=e[0])&&void 0!==i?i:new be(255,255,255);return[t,t].map((e=>e.toRgbString())).join(",")}const[r,s]=this.calculateRgb(e,t,"left"),[a,o]=this.calculateRgb(e,n,"right");return[r,...e.slice(s+1,o),a].map((e=>e.toRgbString())).join(",")}calculateRgb(e,t,n){function i(e,t,n){const i=Math.abs(e-t)/100*n;return $i(e>t?e-i:e+i)}const r=100/(e.length-1),s=t/r,a=Math.round(s),o=100/r*(t-a*r),l=0===o?a:o<0?a-1:a+1,u=function(e,t,n,r){const s=r[e],a=r[t],o=n<0?100+n:n,l=n<0?a:s,u=n<0?s:a,c=i(l.r,u.r,o),h=i(l.g,u.g,o),d=i(l.b,u.b,o);return new be(c,h,d)}(a,l,o,e);return[u,"left"===n?Math.min(a,l):Math.max(a,l)]}handleAction(e){this.hass&&this.config&&e.detail.action&&function(e,t,n,i){var r;"double_tap"===i&&n.double_tap_action?r=n.double_tap_action:"hold"===i&&n.hold_action?r=n.hold_action:"tap"===i&&n.tap_action&&(r=n.tap_action),we(e,t,n,r)}(this,this.hass,this.config,e.detail.action)}mergeConfig(e){var t,n,i,r,s,a,o,l,u,c,h,d,m,f,y,g,p,w;return Object.assign(Object.assign({},e),{sun_entity:null!==(t=e.sun_entity)&&void 0!==t?t:"sun.sun",temperature_sensor:e.temperature_sensor,humidity_sensor:e.humidity_sensor,weather_icon_type:null!==(n=e.weather_icon_type)&&void 0!==n?n:"line",forecast_rows:null!==(i=e.forecast_rows)&&void 0!==i?i:5,hourly_forecast:null!==(r=e.hourly_forecast)&&void 0!==r&&r,animated_icon:null===(s=e.animated_icon)||void 0===s||s,time_format:null===(a=e.time_format)||void 0===a?void 0:a.toString(),time_pattern:null!==(o=e.time_pattern)&&void 0!==o?o:void 0,show_humidity:null!==(l=e.show_humidity)&&void 0!==l&&l,hide_forecast_section:null!==(u=e.hide_forecast_section)&&void 0!==u&&u,hide_today_section:null!==(c=e.hide_today_section)&&void 0!==c&&c,hide_clock:null!==(h=e.hide_clock)&&void 0!==h&&h,hide_date:null!==(d=e.hide_date)&&void 0!==d&&d,date_pattern:null!==(m=e.date_pattern)&&void 0!==m?m:"D",use_browser_time:null!==(f=e.use_browser_time)&&void 0!==f&&f,time_zone:null!==(y=e.time_zone)&&void 0!==y?y:void 0,show_decimal:null!==(g=e.show_decimal)&&void 0!==g&&g,apparent_sensor:null!==(p=e.apparent_sensor)&&void 0!==p?p:void 0,aqi_sensor:null!==(w=e.aqi_sensor)&&void 0!==w?w:void 0})}toIcon(e,t){var n;const i=t?"day":"below_horizon"===(null===(n=this.getSun())||void 0===n?void 0:n.state)?"night":"day";return this.getWeatherStateSVG(e,!i)}getWeatherStateSVG(e,t){return P`
|
||
<svg
|
||
xmlns="http://www.w3.org/2000/svg"
|
||
viewBox="0 0 17 17"
|
||
>
|
||
${"sunny"===e?P`
|
||
<path
|
||
class="sun"
|
||
d="m 14.39303,8.4033507 c 0,3.3114723 -2.684145,5.9956173 -5.9956169,5.9956173 -3.3114716,0 -5.9956168,-2.684145 -5.9956168,-5.9956173 0,-3.311471 2.6841452,-5.995617 5.9956168,-5.995617 3.3114719,0 5.9956169,2.684146 5.9956169,5.995617"
|
||
/>
|
||
`:""}
|
||
${"clear-night"===e?P`
|
||
<path
|
||
class="moon"
|
||
d="m 13.502891,11.382935 c -1.011285,1.859223 -2.976664,3.121381 -5.2405751,3.121381 -3.289929,0 -5.953329,-2.663833 -5.953329,-5.9537625 0,-2.263911 1.261724,-4.228856 3.120948,-5.240575 -0.452782,0.842738 -0.712753,1.806363 -0.712753,2.832381 0,3.289928 2.663833,5.9533275 5.9533291,5.9533275 1.026017,0 1.989641,-0.259969 2.83238,-0.712752"
|
||
/>
|
||
`:""}
|
||
${"partlycloudy"===e&&t?P`
|
||
<path
|
||
class="moon"
|
||
d="m14.981 4.2112c0 1.9244-1.56 3.4844-3.484 3.4844-1.9244 0-3.4844-1.56-3.4844-3.4844s1.56-3.484 3.4844-3.484c1.924 0 3.484 1.5596 3.484 3.484"
|
||
/>
|
||
`:"partlycloudy"===e?P`
|
||
<path
|
||
class="sun"
|
||
d="m14.981 4.2112c0 1.9244-1.56 3.4844-3.484 3.4844-1.9244 0-3.4844-1.56-3.4844-3.4844s1.56-3.484 3.4844-3.484c1.924 0 3.484 1.5596 3.484 3.484"
|
||
/>
|
||
`:""}
|
||
${qo.has(e)?P`
|
||
<path
|
||
class="cloud-back"
|
||
d="m3.8863 5.035c-0.54892 0.16898-1.04 0.46637-1.4372 0.8636-0.63077 0.63041-1.0206 1.4933-1.0206 2.455 0 1.9251 1.5589 3.4682 3.4837 3.4682h6.9688c1.9251 0 3.484-1.5981 3.484-3.5232 0-1.9251-1.5589-3.5232-3.484-3.5232h-1.0834c-0.25294-1.6916-1.6986-2.9083-3.4463-2.9083-1.7995 0-3.2805 1.4153-3.465 3.1679"
|
||
/>
|
||
<path
|
||
class="cloud-front"
|
||
d="m4.1996 7.6995c-0.33902 0.10407-0.64276 0.28787-0.88794 0.5334-0.39017 0.38982-0.63147 0.92322-0.63147 1.5176 0 1.1896 0.96414 2.1431 2.1537 2.1431h4.3071c1.1896 0 2.153-0.98742 2.153-2.1777 0-1.1896-0.96344-2.1777-2.153-2.1777h-0.66992c-0.15593-1.0449-1.0499-1.7974-2.1297-1.7974-1.112 0-2.0274 0.87524-2.1417 1.9586"
|
||
/>
|
||
`:""}
|
||
${Zo.has(e)?P`
|
||
<path
|
||
class="rain"
|
||
d="m5.2852 14.734c-0.22401 0.24765-0.57115 0.2988-0.77505 0.11395-0.20391-0.1845-0.18732-0.53481 0.036689-0.78281 0.14817-0.16298 0.59126-0.32914 0.87559-0.42369 0.12453-0.04092 0.22684 0.05186 0.19791 0.17956-0.065617 0.2921-0.18732 0.74965-0.33514 0.91299"
|
||
/>
|
||
<path
|
||
class="rain"
|
||
d="m11.257 14.163c-0.22437 0.24765-0.57115 0.2988-0.77505 0.11395-0.2039-0.1845-0.18768-0.53481 0.03669-0.78281 0.14817-0.16298 0.59126-0.32914 0.8756-0.42369 0.12453-0.04092 0.22684 0.05186 0.19791 0.17956-0.06562 0.2921-0.18732 0.74965-0.33514 0.91299"
|
||
/>
|
||
<path
|
||
class="rain"
|
||
d="m8.432 15.878c-0.15452 0.17039-0.3937 0.20567-0.53446 0.07867-0.14041-0.12735-0.12876-0.36865 0.025753-0.53975 0.10195-0.11218 0.40711-0.22684 0.60325-0.29175 0.085725-0.02858 0.15628 0.03563 0.13652 0.12382-0.045508 0.20108-0.12912 0.51647-0.23107 0.629"
|
||
/>
|
||
<path
|
||
class="rain"
|
||
d="m7.9991 14.118c-0.19226 0.21237-0.49001 0.25612-0.66499 0.09737-0.17462-0.15804-0.16051-0.45861 0.03175-0.67098 0.12665-0.14005 0.50729-0.28293 0.75071-0.36336 0.10689-0.03563 0.19473 0.0441 0.17004 0.15346-0.056092 0.25082-0.16051 0.64347-0.28751 0.78352"
|
||
/>
|
||
`:""}
|
||
${"pouring"===e?P`
|
||
<path
|
||
class="rain"
|
||
d="m10.648 16.448c-0.19226 0.21449-0.49001 0.25894-0.66499 0.09878-0.17498-0.16016-0.16087-0.4639 0.03175-0.67874 0.12665-0.14146 0.50694-0.2854 0.75071-0.36724 0.10689-0.03563 0.19473 0.0448 0.17004 0.15558-0.05645 0.25365-0.16051 0.65017-0.28751 0.79163"
|
||
/>
|
||
<path
|
||
class="rain"
|
||
d="m5.9383 16.658c-0.22437 0.25012-0.5715 0.30162-0.77505 0.11501-0.20391-0.18627-0.18768-0.54046 0.036689-0.79093 0.14817-0.1651 0.59126-0.33267 0.87559-0.42827 0.12418-0.04127 0.22648 0.05221 0.19791 0.18168-0.065617 0.29528-0.18732 0.75741-0.33514 0.92251"
|
||
/>
|
||
`:""}
|
||
${Ho.has(e)?P`
|
||
<path
|
||
class="cloud-back"
|
||
d="m 13.59616,15.30968 c 0,0 -0.09137,-0.0071 -0.250472,-0.0187 -0.158045,-0.01235 -0.381353,-0.02893 -0.64382,-0.05715 -0.262466,-0.02716 -0.564444,-0.06385 -0.877358,-0.124531 -0.156986,-0.03034 -0.315383,-0.06844 -0.473781,-0.111478 -0.157691,-0.04551 -0.313266,-0.09842 -0.463902,-0.161219 l -0.267406,-0.0949 c -0.09984,-0.02646 -0.205669,-0.04904 -0.305153,-0.06738 -0.193322,-0.02716 -0.3838218,-0.03316 -0.5640912,-0.02011 -0.3626556,0.02611 -0.6847417,0.119239 -0.94615,0.226483 -0.2617611,0.108656 -0.4642556,0.230364 -0.600075,0.324203 -0.1358195,0.09419 -0.2049639,0.160514 -0.2049639,0.160514 0,0 0.089958,-0.01623 0.24765,-0.04445 0.1559278,-0.02575 0.3764139,-0.06174 0.6367639,-0.08714 0.2596444,-0.02646 0.5591527,-0.0441 0.8678333,-0.02328 0.076905,0.0035 0.1538111,0.01658 0.2321278,0.02293 0.077611,0.01058 0.1534581,0.02893 0.2314221,0.04022 0.07267,0.01834 0.1397,0.03986 0.213078,0.05644 l 0.238125,0.08925 c 0.09207,0.03281 0.183444,0.07055 0.275872,0.09878 0.09243,0.0261 0.185208,0.05327 0.277636,0.07161 0.184856,0.0388 0.367947,0.06174 0.543983,0.0702 0.353131,0.01905 0.678745,-0.01341 0.951442,-0.06456 0.27305,-0.05292 0.494595,-0.123119 0.646642,-0.181681 0.152047,-0.05785 0.234597,-0.104069 0.234597,-0.104069"
|
||
/>
|
||
<path
|
||
class="cloud-back"
|
||
d="m 4.7519154,13.905801 c 0,0 0.091369,-0.0032 0.2511778,-0.0092 0.1580444,-0.0064 0.3820583,-0.01446 0.6455833,-0.03281 0.2631722,-0.01729 0.5662083,-0.04269 0.8812389,-0.09137 0.1576916,-0.02434 0.3175,-0.05609 0.4776611,-0.09384 0.1591027,-0.03951 0.3167944,-0.08643 0.4699,-0.14358 l 0.2702277,-0.08467 c 0.1008945,-0.02222 0.2074334,-0.04127 0.3072695,-0.05574 0.1943805,-0.01976 0.3848805,-0.0187 0.5651499,0.0014 0.3608917,0.03951 0.67945,0.144639 0.936625,0.261761 0.2575278,0.118534 0.4554364,0.247297 0.5873754,0.346781 0.132291,0.09913 0.198966,0.168275 0.198966,0.168275 0,0 -0.08925,-0.01976 -0.245886,-0.05397 C 9.9423347,14.087088 9.7232597,14.042988 9.4639681,14.00736 9.2057347,13.97173 8.9072848,13.94245 8.5978986,13.95162 c -0.077258,7.06e-4 -0.1541638,0.01058 -0.2328333,0.01411 -0.077964,0.0078 -0.1545166,0.02328 -0.2331861,0.03175 -0.073025,0.01588 -0.1404055,0.03422 -0.2141361,0.04798 l -0.2420055,0.08008 c -0.093486,0.02963 -0.1859139,0.06421 -0.2794,0.0889 C 7.3028516,14.23666 7.2093653,14.2603 7.116232,14.27512 6.9303181,14.30722 6.7465209,14.3231 6.5697792,14.32486 6.2166487,14.33046 5.8924459,14.28605 5.6218654,14.224318 5.3505793,14.161565 5.1318571,14.082895 4.9822793,14.01869 4.8327015,13.95519 4.7519154,13.905801 4.7519154,13.905801"
|
||
/>
|
||
`:""}
|
||
${Ro.has(e)?P`
|
||
<path
|
||
class="snow"
|
||
d="m 8.4319893,15.348341 c 0,0.257881 -0.209197,0.467079 -0.467078,0.467079 -0.258586,0 -0.46743,-0.209198 -0.46743,-0.467079 0,-0.258233 0.208844,-0.467431 0.46743,-0.467431 0.257881,0 0.467078,0.209198 0.467078,0.467431"
|
||
/>
|
||
<path
|
||
class="snow"
|
||
d="m 11.263878,14.358553 c 0,0.364067 -0.295275,0.659694 -0.659695,0.659694 -0.364419,0 -0.6596937,-0.295627 -0.6596937,-0.659694 0,-0.364419 0.2952747,-0.659694 0.6596937,-0.659694 0.36442,0 0.659695,0.295275 0.659695,0.659694"
|
||
/>
|
||
<path
|
||
class="snow"
|
||
d="m 5.3252173,13.69847 c 0,0.364419 -0.295275,0.660047 -0.659695,0.660047 -0.364067,0 -0.659694,-0.295628 -0.659694,-0.660047 0,-0.364067 0.295627,-0.659694 0.659694,-0.659694 0.36442,0 0.659695,0.295627 0.659695,0.659694"
|
||
/>
|
||
`:""}
|
||
${Yo.has(e)?P`
|
||
<path
|
||
class="sun"
|
||
d="m 9.9252695,10.935875 -1.6483986,2.341014 1.1170184,0.05929 -1.2169864,2.02141 3.0450261,-2.616159 H 9.8864918 L 10.97937,11.294651 10.700323,10.79794 h -0.508706 l -0.2663475,0.137936"
|
||
/>
|
||
`:""}
|
||
</svg>`}getWeather(){const e=this.hass.states[this.config.entity];if(!e)throw this.createError(`Weather entity "${this.config.entity}" could not be found.`);return e}getCurrentTemperature(){var e,t;if(this.config.temperature_sensor){const t=this.hass.states[this.config.temperature_sensor],n=(null==t?void 0:t.state)?parseFloat(t.state):void 0,i=null!==(e=null==t?void 0:t.attributes.unit_of_measurement)&&void 0!==e?e:this.getConfiguredTemperatureUnit();if(void 0!==n&&!isNaN(n))return this.toConfiguredTempWithoutUnit(i,n)}return null!==(t=this.getWeather().attributes.temperature)&&void 0!==t?t:null}getCurrentHumidity(){var e;if(this.config.humidity_sensor){const e=this.hass.states[this.config.humidity_sensor],t=(null==e?void 0:e.state)?parseFloat(e.state):void 0;if(void 0!==t&&!isNaN(t))return t}return null!==(e=this.getWeather().attributes.humidity)&&void 0!==e?e:null}getApparentTemperature(){var e;if(this.config.apparent_sensor){const t=this.hass.states[this.config.apparent_sensor],n=(null==t?void 0:t.state)?parseFloat(t.state):void 0,i=null!==(e=null==t?void 0:t.attributes.unit_of_measurement)&&void 0!==e?e:this.getConfiguredTemperatureUnit();if(void 0!==n&&!isNaN(n))return this.toConfiguredTempWithoutUnit(i,n)}return null}getAqi(){if(this.config.aqi_sensor){const e=this.hass.states[this.config.aqi_sensor],t=(null==e?void 0:e.state)?parseInt(e.state):void 0;if(void 0!==t&&!isNaN(t))return t}return null}getAqiColor(e){return null==e?null:e<=50?"green":e<=100?"yellowgreen":e<=150?"orange":e<=200?"red":e<=300?"purple":"maroon"}getSun(){return this.hass.states[this.config.sun_entity]}getLocale(){var e,t;return null!==(t=null!==(e=this.config.locale)&&void 0!==e?e:this.hass.locale.language)&&void 0!==t?t:"en-GB"}date(){return this.toZonedDate(this.currentDate).toFormat(this.config.date_pattern)}time(e=this.currentDate){return this.config.time_pattern?this.toZonedDate(e).toFormat(this.config.time_pattern):this.config.time_format?this.toZonedDate(e).toFormat("24"===this.config.time_format?"HH:mm":"h:mm a"):this.hass.locale.time_format===fe.am_pm?this.toZonedDate(e).toFormat("h:mm a"):this.hass.locale.time_format===fe.twenty_four?this.toZonedDate(e).toFormat("HH:mm"):this.toZonedDate(e).toFormat("t")}getIconAnimationKind(){return this.config.animated_icon?"animated":"static"}toCelsius(e,t){return"°C"===e?t:Math.round(5/9*(t-32))}toFahrenheit(e,t){return"°F"===e?t:Math.round(9*t/5+32)}getConfiguredTemperatureUnit(){return this.hass.config.unit_system.temperature}toConfiguredTempWithUnit(e,t){return this.toConfiguredTempWithoutUnit(e,t)+"°"}toConfiguredTempWithoutUnit(e,t){return this.getConfiguredTemperatureUnit()===e?t:"°C"===e?this.toFahrenheit(e,t):this.toCelsius(e,t)}calculateBarRangePercents(e,t,n,i){if(t===e)return{startPercent:0,endPercent:100};const r=100/(t-e)*(n-e),s=100/(t-e)*(i-e);return{startPercent:Math.max(0,r),endPercent:Math.min(100,s)}}localize(e){return function(e,t){let n;const i=t.replace(/['"]+/g,"").replace("-","_").replace("_","").toLowerCase();try{n=e.split(".").reduce(((e,t)=>e[t]),ki[i])}catch(t){n=e.split(".").reduce(((e,t)=>e[t]),ki.en)}return void 0===n&&(n=e.split(".").reduce(((e,t)=>e[t]),ki.en)),n}(e,this.getLocale())}mergeForecasts(e,t){var n,i;const r=(this.isLegacyWeather()?null!==(n=this.getWeather().attributes.forecast)&&void 0!==n?n:[]:null!==(i=this.forecasts)&&void 0!==i?i:[]).reduce(((e,n)=>{const i=new Date(n.datetime),r=t?`${i.getMonth()}-${i.getDate()}-${+i.getHours()}`:i.getDate();return e[r]=e[r]||[],e[r].push(n),e}),{});return Object.values(r).reduce(((e,t)=>{if(0===t.length)return e;const n=this.calculateAverageForecast(t);return e.push(n),e}),[]).sort(((e,t)=>e.datetime.toMillis()-t.datetime.toMillis())).slice(0,e)}toZonedDate(e){var t,n,i;const r=e.setLocale(this.getLocale());if(this.config.use_browser_time)return r;const s=null!==(t=this.config.time_zone)&&void 0!==t?t:null===(i=null===(n=this.hass)||void 0===n?void 0:n.config)||void 0===i?void 0:i.time_zone,a=r.setZone(s);return a.isValid?a:(console.error(`clock-weather-card-hui-icons - Time Zone [${s}] not supported. Falling back to browser time.`),r)}calculateAverageForecast(e){const t=e.map((e=>{var t,n,i;return null!==(i=null!==(n=null!==(t=e.templow)&&void 0!==t?t:e.temperature)&&void 0!==n?n:this.getCurrentTemperature())&&void 0!==i?i:0})),n=Si(t),i=e.map((e=>{var t,n;return null!==(n=null!==(t=e.temperature)&&void 0!==t?t:this.getCurrentTemperature())&&void 0!==n?n:0})),r=_i(i),s=e.map((e=>{var t;return null!==(t=e.precipitation_probability)&&void 0!==t?t:0})),a=_i(s),o=e.map((e=>{var t;return null!==(t=e.precipitation)&&void 0!==t?t:0})),l=_i(o),u=e.map((e=>e.condition)),c=function(e){var t,n,i;const r=new Map;let s=e[0],a=1;for(let o=0;o<e.length;o++){const l=e[o];if(void 0===r.get(l))r.set(l,1);else{const e=null!==(t=r.get(l))&&void 0!==t?t:0;r.set(l,e+1),(null!==(n=r.get(l))&&void 0!==n?n:0)>a&&(s=l,a=null!==(i=r.get(l))&&void 0!==i?i:0)}}return s}(u);return{temperature:r,templow:n,datetime:this.parseDateTime(e[0].datetime),condition:c,precipitation_probability:a,precipitation:l}}subscribeForecastEvents(){return t(this,void 0,void 0,(function*(){if(this.forecastSubscriberLock)return;if(this.forecastSubscriberLock=!0,yield this.unsubscribeForecastEvents(),this.isLegacyWeather())return this.forecastSubscriber=()=>t(this,void 0,void 0,(function*(){})),void(this.forecastSubscriberLock=!1);if(!this.isConnected||!this.config||!this.hass)return void(this.forecastSubscriberLock=!1);const e=this.determineForecastType();if("hourly_not_supported"===e)throw this.forecastSubscriber=()=>t(this,void 0,void 0,(function*(){})),this.forecastSubscriberLock=!1,this.createError(`Weather entity [${this.config.entity}] does not support hourly forecast.`);try{const t=e=>{this.forecasts=e.forecast},n={resubscribe:!1},i={type:"weather/subscribe_forecast",forecast_type:e,entity_id:this.config.entity};this.forecastSubscriber=yield this.hass.connection.subscribeMessage(t,i,n)}catch(e){console.error("clock-weather-card-hui-icons - Error when subscribing to weather forecast",e)}finally{this.forecastSubscriberLock=!1}}))}unsubscribeForecastEvents(){return t(this,void 0,void 0,(function*(){if(this.forecastSubscriber)try{yield this.forecastSubscriber()}catch(e){}finally{this.forecastSubscriber=void 0}}))}isLegacyWeather(){return!this.supportsFeature(1)&&!this.supportsFeature(2)}supportsFeature(e){try{return!!(this.getWeather().attributes.supported_features&e)}catch(e){return!1}}createError(e){const t=new Error(e),n=document.createElement("hui-error-card");return n.setConfig({type:"error",error:t,origConfig:this.config}),this.error=W`${n}`,t}determineForecastType(){const e=this.supportsFeature(1),t=this.supportsFeature(2),n=this.config.hourly_forecast;return e&&t?n?"hourly":"daily":n&&t?"hourly":!n&&e?"daily":n&&!t?"hourly_not_supported":(console.warn(`clock-weather-card-hui-icons - Weather entity [${this.config.entity}] does not support daily forecast. Falling back to hourly forecast.`),"hourly")}parseDateTime(e){const t=Wo.fromISO(e);return t.isValid?t:Wo.fromJSDate(new Date(e))}};e([ce({attribute:!1})],Go.prototype,"hass",void 0),e([he()],Go.prototype,"config",void 0),e([he()],Go.prototype,"currentDate",void 0),e([he()],Go.prototype,"forecasts",void 0),e([he()],Go.prototype,"error",void 0),Go=e([(e=>t=>"function"==typeof t?((e,t)=>(customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:n,elements:i}=t;return{kind:n,elements:i,finisher(t){customElements.define(e,t)}}})(e,t))("clock-weather-card-hui-icons")],Go);export{Go as ClockWeatherCardHUIIcons};
|