@nyaruka/temba-components 0.43.5 → 0.43.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,8 +4,14 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ #### [v0.43.6](https://github.com/nyaruka/temba-components/compare/v0.43.5...v0.43.6)
8
+
9
+ - Add refresh globals option and icon [`#293`](https://github.com/nyaruka/temba-components/pull/293)
10
+
7
11
  #### [v0.43.5](https://github.com/nyaruka/temba-components/compare/v0.43.4...v0.43.5)
8
12
 
13
+ > 16 March 2023
14
+
9
15
  - Limit contact badges to one row [`#291`](https://github.com/nyaruka/temba-components/pull/291)
10
16
 
11
17
  #### [v0.43.4](https://github.com/nyaruka/temba-components/compare/v0.43.3...v0.43.4)
@@ -1,4 +1,4 @@
1
- function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r}const e=window,i=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,n=Symbol(),o=new WeakMap;class s{constructor(t,e,i){if(this._$cssResult$=!0,i!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=o.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&o.set(e,t))}return t}toString(){return this.cssText}}const r=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[n+1]),t[0]);return new s(i,t,n)},a=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new s("string"==typeof t?t:t+"",void 0,n))(e)})(t):t;var l;const h=window,c=h.trustedTypes,d=c?c.emptyScript:"",u=h.reactiveElementPolyfillSupport,p={toAttribute(t,e){switch(e){case Boolean:t=t?d:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},m=(t,e)=>e!==t&&(e==e||t==t),f={attribute:!0,type:String,converter:p,reflect:!1,hasChanged:m};class g extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const n=this._$Ep(i,e);void 0!==n&&(this._$Ev.set(n,i),t.push(n))})),t}static createProperty(t,e=f){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,i,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(n){const o=this[t];this[e]=n,this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||f}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const n=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,n)=>{i?t.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((i=>{const n=document.createElement("style"),o=e.litNonce;void 0!==o&&n.setAttribute("nonce",o),n.textContent=i.cssText,t.appendChild(n)}))})(n,this.constructor.elementStyles),n}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=f){var n;const o=this.constructor._$Ep(t,i);if(void 0!==o&&!0===i.reflect){const s=(void 0!==(null===(n=i.converter)||void 0===n?void 0:n.toAttribute)?i.converter:p).toAttribute(e,i.type);this._$El=t,null==s?this.removeAttribute(o):this.setAttribute(o,s),this._$El=null}}_$AK(t,e){var i;const n=this.constructor,o=n._$Ev.get(t);if(void 0!==o&&this._$El!==o){const t=n.getPropertyOptions(o),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:p;this._$El=o,this[o]=s.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let n=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||m)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}var v;g.finalized=!0,g.elementProperties=new Map,g.elementStyles=[],g.shadowRootOptions={mode:"open"},null==u||u({ReactiveElement:g}),(null!==(l=h.reactiveElementVersions)&&void 0!==l?l:h.reactiveElementVersions=[]).push("1.5.0");const y=window,b=y.trustedTypes,_=b?b.createPolicy("lit-html",{createHTML:t=>t}):void 0,x=`lit$${(Math.random()+"").slice(9)}$`,w="?"+x,k=`<${w}>`,S=document,C=(t="")=>S.createComment(t),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,T=Array.isArray,$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,A=/-->/g,M=/>/g,O=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),z=/'/g,P=/"/g,I=/^(?:script|style|textarea|title)$/i,D=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),N=Symbol.for("lit-noChange"),R=Symbol.for("lit-nothing"),B=new WeakMap,q=S.createTreeWalker(S,129,null,!1),Z=(t,e)=>{const i=t.length-1,n=[];let o,s=2===e?"<svg>":"",r=$;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,c=0;for(;c<i.length&&(r.lastIndex=c,l=r.exec(i),null!==l);)c=r.lastIndex,r===$?"!--"===l[1]?r=A:void 0!==l[1]?r=M:void 0!==l[2]?(I.test(l[2])&&(o=RegExp("</"+l[2],"g")),r=O):void 0!==l[3]&&(r=O):r===O?">"===l[0]?(r=null!=o?o:$,h=-1):void 0===l[1]?h=-2:(h=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?O:'"'===l[3]?P:z):r===P||r===z?r=O:r===A||r===M?r=$:(r=O,o=void 0);const d=r===O&&t[e+1].startsWith("/>")?" ":"";s+=r===$?i+k:h>=0?(n.push(a),i.slice(0,h)+"$lit$"+i.slice(h)+x+d):i+x+(-2===h?(n.push(void 0),e):d)}const a=s+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==_?_.createHTML(a):a,n]};class F{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let o=0,s=0;const r=t.length-1,a=this.parts,[l,h]=Z(t,e);if(this.el=F.createElement(l,i),q.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=q.nextNode())&&a.length<r;){if(1===n.nodeType){if(n.hasAttributes()){const t=[];for(const e of n.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(x)){const i=h[s++];if(t.push(e),void 0!==i){const t=n.getAttribute(i.toLowerCase()+"$lit$").split(x),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:o,name:e[2],strings:t,ctor:"."===e[1]?W:"?"===e[1]?K:"@"===e[1]?Y:H})}else a.push({type:6,index:o})}for(const e of t)n.removeAttribute(e)}if(I.test(n.tagName)){const t=n.textContent.split(x),e=t.length-1;if(e>0){n.textContent=b?b.emptyScript:"";for(let i=0;i<e;i++)n.append(t[i],C()),q.nextNode(),a.push({type:2,index:++o});n.append(t[e],C())}}}else if(8===n.nodeType)if(n.data===w)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=n.data.indexOf(x,t+1));)a.push({type:7,index:o}),t+=x.length-1}o++}}static createElement(t,e){const i=S.createElement("template");return i.innerHTML=t,i}}function V(t,e,i=t,n){var o,s,r,a;if(e===N)return e;let l=void 0!==n?null===(o=i._$Co)||void 0===o?void 0:o[n]:i._$Cl;const h=E(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(s=null==l?void 0:l._$AO)||void 0===s||s.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,i,n)),void 0!==n?(null!==(r=(a=i)._$Co)&&void 0!==r?r:a._$Co=[])[n]=l:i._$Cl=l),void 0!==l&&(e=V(t,l._$AS(t,e.values),l,n)),e}class U{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:n}=this._$AD,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:S).importNode(i,!0);q.currentNode=o;let s=q.nextNode(),r=0,a=0,l=n[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new j(s,s.nextSibling,this,t):1===l.type?e=new l.ctor(s,l.name,l.strings,this,t):6===l.type&&(e=new J(s,this,t)),this.u.push(e),l=n[++a]}r!==(null==l?void 0:l.index)&&(s=q.nextNode(),r++)}return o}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class j{constructor(t,e,i,n){var o;this.type=2,this._$AH=R,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=n,this._$Cm=null===(o=null==n?void 0:n.isConnected)||void 0===o||o}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=V(this,t,e),E(t)?t===R||null==t||""===t?(this._$AH!==R&&this._$AR(),this._$AH=R):t!==this._$AH&&t!==N&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>T(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==R&&E(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:n}=t,o="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=F.createElement(n.h,this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.p(i);else{const t=new U(o,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=B.get(t.strings);return void 0===e&&B.set(t.strings,e=new F(t)),e}k(t){T(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const o of t)n===e.length?e.push(i=new j(this.O(C()),this.O(C()),this,this.options)):i=e[n],i._$AI(o),n++;n<e.length&&(this._$AR(i&&i._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class H{constructor(t,e,i,n,o){this.type=1,this._$AH=R,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=R}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const o=this.strings;let s=!1;if(void 0===o)t=V(this,t,e,0),s=!E(t)||t!==this._$AH&&t!==N,s&&(this._$AH=t);else{const n=t;let r,a;for(t=o[0],r=0;r<o.length-1;r++)a=V(this,n[i+r],e,r),a===N&&(a=this._$AH[r]),s||(s=!E(a)||a!==this._$AH[r]),a===R?t=R:t!==R&&(t+=(null!=a?a:"")+o[r+1]),this._$AH[r]=a}s&&!n&&this.j(t)}j(t){t===R?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class W extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===R?void 0:t}}const G=b?b.emptyScript:"";class K extends H{constructor(){super(...arguments),this.type=4}j(t){t&&t!==R?this.element.setAttribute(this.name,G):this.element.removeAttribute(this.name)}}class Y extends H{constructor(t,e,i,n,o){super(t,e,i,n,o),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=V(this,t,e,0))&&void 0!==i?i:R)===N)return;const n=this._$AH,o=t===R&&n!==R||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,s=t!==R&&(n===R||o);o&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class J{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){V(this,t)}}const X=y.litHtmlPolyfillSupport;null==X||X(F,j),(null!==(v=y.litHtmlVersions)&&void 0!==v?v:y.litHtmlVersions=[]).push("2.5.0");var Q,tt;class et extends g{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var n,o;const s=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let r=s._$litPart$;if(void 0===r){const t=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:null;s._$litPart$=r=new j(e.insertBefore(C(),t),t,void 0,null!=i?i:{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return N}}et.finalized=!0,et._$litElement$=!0,null===(Q=globalThis.litElementHydrateSupport)||void 0===Q||Q.call(globalThis,{LitElement:et});const it=globalThis.litElementPolyfillSupport;null==it||it({LitElement:et}),(null!==(tt=globalThis.litElementVersions)&&void 0!==tt?tt:globalThis.litElementVersions=[]).push("3.2.2");class nt extends et{constructor(){super(...arguments),this.eles={}}getEventHandlers(){return[]}connectedCallback(){super.connectedCallback();for(const t of this.getEventHandlers())t.isDocument?document.addEventListener(t.event,t.method.bind(this)):this.addEventListener(t.event,t.method.bind(this))}disconnectedCallback(){for(const t of this.getEventHandlers())t.isDocument?document.removeEventListener(t.event,t.method):this.removeEventListener(t.event,t.method);super.disconnectedCallback()}fireEvent(t){return this.dispatchEvent(new Event(t,{bubbles:!0,composed:!0}))}fireCustomEvent(t,e={}){const i=new CustomEvent(t,{detail:e,bubbles:!0,composed:!0});return this.dispatchEvent(i)}dispatchEvent(t){super.dispatchEvent(t);const e=t.target;if(e){const i=e["-"+t.type];if(i)return i(t);return new Function("event",`\n with(document) {\n with(this) {\n let handler = ${e.getAttribute("-"+t.type)};\n if(typeof handler === 'function') { \n handler(event);\n }\n }\n }\n `).call(e,t)}}closestElement(t,e=this){return function e(i){if(!i||i===document||i===window)return null;i.assignedSlot&&(i=i.assignedSlot);const n=i.closest(t);return n||e(i.getRootNode().host)}(e)}getDiv(t){let e=this.eles[t];return e||(e=this.shadowRoot.querySelector(t),e&&(this.eles[t]=e),e)}}const ot=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function st(t){return(e,i)=>void 0!==i?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,i):ot(t,e)}var rt,at;null===(rt=window.HTMLSlotElement)||void 0===rt||rt.prototype.assignedElements;class lt extends nt{constructor(){super(...arguments),this.hiddenInputs=[],this.name="",this.values=[],this.value="",this.inputRoot=this,this.disabled=!1}setValue(t){t?this.setValues([t]):this.setValues([]),this.value=t}setValues(t){this.values=t,this.requestUpdate("values")}addValue(t){this.values.push(t),this.requestUpdate("values")}removeValue(t){this.values=this.values.filter((e=>e!==t)),this.requestUpdate("values")}popValue(){this.values.pop(),this.requestUpdate("values")}clear(){this.values=[],this.requestUpdate("values")}serializeValue(t){return JSON.stringify(t)}updateInputs(){for(let t=null;t=this.hiddenInputs.pop();)t.remove();for(const t of this.values){const e=this.getAttribute("name");if(e){const i=document.createElement("input");i.setAttribute("type","hidden"),i.setAttribute("name",e),i.setAttribute("value",this.serializeValue(t)),this.hiddenInputs.push(i),this.inputRoot.parentElement.appendChild(i)}}}updated(t){super.updated(t),t.has("values")&&this.updateInputs()}}t([st({type:String})],lt.prototype,"name",void 0),t([st({type:String,attribute:"help_text"})],lt.prototype,"helpText",void 0),t([st({type:Boolean,attribute:"help_always"})],lt.prototype,"helpAlways",void 0),t([st({type:Boolean,attribute:"widget_only"})],lt.prototype,"widgetOnly",void 0),t([st({type:Boolean,attribute:"hide_label"})],lt.prototype,"hideLabel",void 0),t([st({type:String})],lt.prototype,"label",void 0),t([st({type:Array})],lt.prototype,"errors",void 0),t([st({type:Array})],lt.prototype,"values",void 0),t([st({type:String})],lt.prototype,"value",void 0),t([st({attribute:!1})],lt.prototype,"inputRoot",void 0),t([st({type:Boolean})],lt.prototype,"disabled",void 0),function(t){t.analytics="bar-chart-01",t.account="user-01",t.active="play",t.add_note="file-02",t.airtime="bank-note-01",t.archive="archive",t.arrow_up="chevron-up",t.arrow_down="chevron-down",t.arrow_left="chevron-left",t.arrow_right="chevron-right",t.attachment="paperclip",t.broadcast="announcement-01",t.call="phone-call-01",t.call_missed="phone-call-02",t.campaign="clock-refresh",t.campaigns="clock-refresh",t.channel="zap",t.children="git-branch-01",t.check="check",t.checkbox="square",t.checkbox_checked="check-square",t.compose="send-01",t.contact="user-01",t.contact_archived="archive",t.contact_blocked="message-x-square",t.contact_stopped="slash-octagon",t.contact_updated="user-edit",t.contacts="user-01",t.copy="copy-04",t.dashboard="pie-chart-01",t.delete="trash-03",t.delete_small="x",t.down="chevron-down",t.download="download-01",t.email="mail-01",t.error="alert-circle",t.event="zap",t.fields="user-edit",t.flow="flow",t.flow_interrupted="x-close",t.flow_ivr="phone-call-01",t.flow_message="message-square-02",t.flow_user="hard-drive",t.flows="flow",t.group="users-01",t.group_smart="atom-01",t.help="help-circle",t.home="home-01",t.inbox="inbox-01",t.label="tag-01",t.language="globe-01",t.link="link-external-01",t.log="file-02",t.menu="menu-01",t.menu_collapse="chevron-left-double",t.message="message-square-02",t.messages="message-square-02",t.org_active="credit-card-02",t.org_anonymous="glasses-01",t.org_bulk="credit-card-plus",t.org_flagged="flag-01",t.org_new="stars-02",t.org_suspended="slash-circle-01",t.org_verified="check-verified-02",t.overview="pie-chart-01",t.featured="star-01",t.resthooks="share-07",t.restore="play",t.retry="refresh-cw-05",t.runs="rows-03",t.search="search-refraction",t.select_open="chevron-down",t.select_clear="x",t.service="magic-wand-01",t.settings="settings-02",t.sort="chevron-selector-vertical",t.staff="hard-drive",t.tickets="agent",t.tickets_all="archive",t.tickets_closed="check",t.tickets_mine="coffee",t.tickets_open="inbox-01",t.tickets_unassigned="inbox-01",t.two_factor_enabled="shield-02",t.two_factor_disabled="shield-01",t.trigger="signal-01",t.triggers="signal-01",t.updated="edit-02",t.up="chevron-up",t.upload="upload-cloud-01",t.usages="link-04",t.user="users-01",t.users="users-01",t.user_beta="shield-zap",t.webhook="link-external-01",t.workspace="folder",t.zendesk="zendesk",t.ext="lightning-01",t.fcm="lightning-01"}(at||(at={}));class ht extends lt{constructor(){super(...arguments),this.name="",this.disabled=!1,this.size=1.2,this.animateChange="pulse"}static get styles(){return r`
1
+ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(s<3?o(r):s>3?o(e,i,r):o(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r}const e=window,i=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,n=Symbol(),o=new WeakMap;class s{constructor(t,e,i){if(this._$cssResult$=!0,i!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=o.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&o.set(e,t))}return t}toString(){return this.cssText}}const r=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[n+1]),t[0]);return new s(i,t,n)},a=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new s("string"==typeof t?t:t+"",void 0,n))(e)})(t):t;var l;const h=window,c=h.trustedTypes,d=c?c.emptyScript:"",u=h.reactiveElementPolyfillSupport,p={toAttribute(t,e){switch(e){case Boolean:t=t?d:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},m=(t,e)=>e!==t&&(e==e||t==t),f={attribute:!0,type:String,converter:p,reflect:!1,hasChanged:m};class g extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const n=this._$Ep(i,e);void 0!==n&&(this._$Ev.set(n,i),t.push(n))})),t}static createProperty(t,e=f){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,i,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(n){const o=this[t];this[e]=n,this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||f}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const n=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,n)=>{i?t.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((i=>{const n=document.createElement("style"),o=e.litNonce;void 0!==o&&n.setAttribute("nonce",o),n.textContent=i.cssText,t.appendChild(n)}))})(n,this.constructor.elementStyles),n}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=f){var n;const o=this.constructor._$Ep(t,i);if(void 0!==o&&!0===i.reflect){const s=(void 0!==(null===(n=i.converter)||void 0===n?void 0:n.toAttribute)?i.converter:p).toAttribute(e,i.type);this._$El=t,null==s?this.removeAttribute(o):this.setAttribute(o,s),this._$El=null}}_$AK(t,e){var i;const n=this.constructor,o=n._$Ev.get(t);if(void 0!==o&&this._$El!==o){const t=n.getPropertyOptions(o),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:p;this._$El=o,this[o]=s.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let n=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||m)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}var v;g.finalized=!0,g.elementProperties=new Map,g.elementStyles=[],g.shadowRootOptions={mode:"open"},null==u||u({ReactiveElement:g}),(null!==(l=h.reactiveElementVersions)&&void 0!==l?l:h.reactiveElementVersions=[]).push("1.5.0");const y=window,b=y.trustedTypes,_=b?b.createPolicy("lit-html",{createHTML:t=>t}):void 0,x=`lit$${(Math.random()+"").slice(9)}$`,w="?"+x,k=`<${w}>`,S=document,C=(t="")=>S.createComment(t),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,T=Array.isArray,$=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,A=/-->/g,M=/>/g,O=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),z=/'/g,P=/"/g,I=/^(?:script|style|textarea|title)$/i,D=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),N=Symbol.for("lit-noChange"),R=Symbol.for("lit-nothing"),B=new WeakMap,q=S.createTreeWalker(S,129,null,!1),Z=(t,e)=>{const i=t.length-1,n=[];let o,s=2===e?"<svg>":"",r=$;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,c=0;for(;c<i.length&&(r.lastIndex=c,l=r.exec(i),null!==l);)c=r.lastIndex,r===$?"!--"===l[1]?r=A:void 0!==l[1]?r=M:void 0!==l[2]?(I.test(l[2])&&(o=RegExp("</"+l[2],"g")),r=O):void 0!==l[3]&&(r=O):r===O?">"===l[0]?(r=null!=o?o:$,h=-1):void 0===l[1]?h=-2:(h=r.lastIndex-l[2].length,a=l[1],r=void 0===l[3]?O:'"'===l[3]?P:z):r===P||r===z?r=O:r===A||r===M?r=$:(r=O,o=void 0);const d=r===O&&t[e+1].startsWith("/>")?" ":"";s+=r===$?i+k:h>=0?(n.push(a),i.slice(0,h)+"$lit$"+i.slice(h)+x+d):i+x+(-2===h?(n.push(void 0),e):d)}const a=s+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==_?_.createHTML(a):a,n]};class F{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let o=0,s=0;const r=t.length-1,a=this.parts,[l,h]=Z(t,e);if(this.el=F.createElement(l,i),q.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=q.nextNode())&&a.length<r;){if(1===n.nodeType){if(n.hasAttributes()){const t=[];for(const e of n.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(x)){const i=h[s++];if(t.push(e),void 0!==i){const t=n.getAttribute(i.toLowerCase()+"$lit$").split(x),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:o,name:e[2],strings:t,ctor:"."===e[1]?W:"?"===e[1]?K:"@"===e[1]?Y:H})}else a.push({type:6,index:o})}for(const e of t)n.removeAttribute(e)}if(I.test(n.tagName)){const t=n.textContent.split(x),e=t.length-1;if(e>0){n.textContent=b?b.emptyScript:"";for(let i=0;i<e;i++)n.append(t[i],C()),q.nextNode(),a.push({type:2,index:++o});n.append(t[e],C())}}}else if(8===n.nodeType)if(n.data===w)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=n.data.indexOf(x,t+1));)a.push({type:7,index:o}),t+=x.length-1}o++}}static createElement(t,e){const i=S.createElement("template");return i.innerHTML=t,i}}function V(t,e,i=t,n){var o,s,r,a;if(e===N)return e;let l=void 0!==n?null===(o=i._$Co)||void 0===o?void 0:o[n]:i._$Cl;const h=E(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(s=null==l?void 0:l._$AO)||void 0===s||s.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,i,n)),void 0!==n?(null!==(r=(a=i)._$Co)&&void 0!==r?r:a._$Co=[])[n]=l:i._$Cl=l),void 0!==l&&(e=V(t,l._$AS(t,e.values),l,n)),e}class U{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:n}=this._$AD,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:S).importNode(i,!0);q.currentNode=o;let s=q.nextNode(),r=0,a=0,l=n[0];for(;void 0!==l;){if(r===l.index){let e;2===l.type?e=new j(s,s.nextSibling,this,t):1===l.type?e=new l.ctor(s,l.name,l.strings,this,t):6===l.type&&(e=new J(s,this,t)),this.u.push(e),l=n[++a]}r!==(null==l?void 0:l.index)&&(s=q.nextNode(),r++)}return o}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class j{constructor(t,e,i,n){var o;this.type=2,this._$AH=R,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=n,this._$Cm=null===(o=null==n?void 0:n.isConnected)||void 0===o||o}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=V(this,t,e),E(t)?t===R||null==t||""===t?(this._$AH!==R&&this._$AR(),this._$AH=R):t!==this._$AH&&t!==N&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>T(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==R&&E(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:n}=t,o="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=F.createElement(n.h,this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.p(i);else{const t=new U(o,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=B.get(t.strings);return void 0===e&&B.set(t.strings,e=new F(t)),e}k(t){T(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const o of t)n===e.length?e.push(i=new j(this.O(C()),this.O(C()),this,this.options)):i=e[n],i._$AI(o),n++;n<e.length&&(this._$AR(i&&i._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class H{constructor(t,e,i,n,o){this.type=1,this._$AH=R,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=R}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const o=this.strings;let s=!1;if(void 0===o)t=V(this,t,e,0),s=!E(t)||t!==this._$AH&&t!==N,s&&(this._$AH=t);else{const n=t;let r,a;for(t=o[0],r=0;r<o.length-1;r++)a=V(this,n[i+r],e,r),a===N&&(a=this._$AH[r]),s||(s=!E(a)||a!==this._$AH[r]),a===R?t=R:t!==R&&(t+=(null!=a?a:"")+o[r+1]),this._$AH[r]=a}s&&!n&&this.j(t)}j(t){t===R?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class W extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===R?void 0:t}}const G=b?b.emptyScript:"";class K extends H{constructor(){super(...arguments),this.type=4}j(t){t&&t!==R?this.element.setAttribute(this.name,G):this.element.removeAttribute(this.name)}}class Y extends H{constructor(t,e,i,n,o){super(t,e,i,n,o),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=V(this,t,e,0))&&void 0!==i?i:R)===N)return;const n=this._$AH,o=t===R&&n!==R||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,s=t!==R&&(n===R||o);o&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class J{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){V(this,t)}}const X=y.litHtmlPolyfillSupport;null==X||X(F,j),(null!==(v=y.litHtmlVersions)&&void 0!==v?v:y.litHtmlVersions=[]).push("2.5.0");var Q,tt;class et extends g{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var n,o;const s=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let r=s._$litPart$;if(void 0===r){const t=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:null;s._$litPart$=r=new j(e.insertBefore(C(),t),t,void 0,null!=i?i:{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return N}}et.finalized=!0,et._$litElement$=!0,null===(Q=globalThis.litElementHydrateSupport)||void 0===Q||Q.call(globalThis,{LitElement:et});const it=globalThis.litElementPolyfillSupport;null==it||it({LitElement:et}),(null!==(tt=globalThis.litElementVersions)&&void 0!==tt?tt:globalThis.litElementVersions=[]).push("3.2.2");class nt extends et{constructor(){super(...arguments),this.eles={}}getEventHandlers(){return[]}connectedCallback(){super.connectedCallback();for(const t of this.getEventHandlers())t.isDocument?document.addEventListener(t.event,t.method.bind(this)):this.addEventListener(t.event,t.method.bind(this))}disconnectedCallback(){for(const t of this.getEventHandlers())t.isDocument?document.removeEventListener(t.event,t.method):this.removeEventListener(t.event,t.method);super.disconnectedCallback()}fireEvent(t){return this.dispatchEvent(new Event(t,{bubbles:!0,composed:!0}))}fireCustomEvent(t,e={}){const i=new CustomEvent(t,{detail:e,bubbles:!0,composed:!0});return this.dispatchEvent(i)}dispatchEvent(t){super.dispatchEvent(t);const e=t.target;if(e){const i=e["-"+t.type];if(i)return i(t);return new Function("event",`\n with(document) {\n with(this) {\n let handler = ${e.getAttribute("-"+t.type)};\n if(typeof handler === 'function') { \n handler(event);\n }\n }\n }\n `).call(e,t)}}closestElement(t,e=this){return function e(i){if(!i||i===document||i===window)return null;i.assignedSlot&&(i=i.assignedSlot);const n=i.closest(t);return n||e(i.getRootNode().host)}(e)}getDiv(t){let e=this.eles[t];return e||(e=this.shadowRoot.querySelector(t),e&&(this.eles[t]=e),e)}}const ot=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function st(t){return(e,i)=>void 0!==i?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,i):ot(t,e)}var rt,at;null===(rt=window.HTMLSlotElement)||void 0===rt||rt.prototype.assignedElements;class lt extends nt{constructor(){super(...arguments),this.hiddenInputs=[],this.name="",this.values=[],this.value="",this.inputRoot=this,this.disabled=!1}setValue(t){t?this.setValues([t]):this.setValues([]),this.value=t}setValues(t){this.values=t,this.requestUpdate("values")}addValue(t){this.values.push(t),this.requestUpdate("values")}removeValue(t){this.values=this.values.filter((e=>e!==t)),this.requestUpdate("values")}popValue(){this.values.pop(),this.requestUpdate("values")}clear(){this.values=[],this.requestUpdate("values")}serializeValue(t){return JSON.stringify(t)}updateInputs(){for(let t=null;t=this.hiddenInputs.pop();)t.remove();for(const t of this.values){const e=this.getAttribute("name");if(e){const i=document.createElement("input");i.setAttribute("type","hidden"),i.setAttribute("name",e),i.setAttribute("value",this.serializeValue(t)),this.hiddenInputs.push(i),this.inputRoot.parentElement.appendChild(i)}}}updated(t){super.updated(t),t.has("values")&&this.updateInputs()}}t([st({type:String})],lt.prototype,"name",void 0),t([st({type:String,attribute:"help_text"})],lt.prototype,"helpText",void 0),t([st({type:Boolean,attribute:"help_always"})],lt.prototype,"helpAlways",void 0),t([st({type:Boolean,attribute:"widget_only"})],lt.prototype,"widgetOnly",void 0),t([st({type:Boolean,attribute:"hide_label"})],lt.prototype,"hideLabel",void 0),t([st({type:String})],lt.prototype,"label",void 0),t([st({type:Array})],lt.prototype,"errors",void 0),t([st({type:Array})],lt.prototype,"values",void 0),t([st({type:String})],lt.prototype,"value",void 0),t([st({attribute:!1})],lt.prototype,"inputRoot",void 0),t([st({type:Boolean})],lt.prototype,"disabled",void 0),function(t){t.analytics="bar-chart-01",t.account="user-01",t.active="play",t.add_note="file-02",t.airtime="bank-note-01",t.archive="archive",t.arrow_up="chevron-up",t.arrow_down="chevron-down",t.arrow_left="chevron-left",t.arrow_right="chevron-right",t.attachment="paperclip",t.broadcast="announcement-01",t.call="phone-call-01",t.call_missed="phone-call-02",t.campaign="clock-refresh",t.campaigns="clock-refresh",t.channel="zap",t.children="git-branch-01",t.check="check",t.checkbox="square",t.checkbox_checked="check-square",t.compose="send-01",t.contact="user-01",t.contact_archived="archive",t.contact_blocked="message-x-square",t.contact_stopped="slash-octagon",t.contact_updated="user-edit",t.contacts="user-01",t.copy="copy-04",t.dashboard="pie-chart-01",t.delete="trash-03",t.delete_small="x",t.down="chevron-down",t.download="download-01",t.email="mail-01",t.error="alert-circle",t.event="zap",t.fields="user-edit",t.flow="flow",t.flow_interrupted="x-close",t.flow_ivr="phone-call-01",t.flow_message="message-square-02",t.flow_user="hard-drive",t.flows="flow",t.global="at-sign",t.group="users-01",t.group_smart="atom-01",t.help="help-circle",t.home="home-01",t.inbox="inbox-01",t.label="tag-01",t.language="globe-01",t.link="link-external-01",t.log="file-02",t.menu="menu-01",t.menu_collapse="chevron-left-double",t.message="message-square-02",t.messages="message-square-02",t.org_active="credit-card-02",t.org_anonymous="glasses-01",t.org_bulk="credit-card-plus",t.org_flagged="flag-01",t.org_new="stars-02",t.org_suspended="slash-circle-01",t.org_verified="check-verified-02",t.overview="pie-chart-01",t.featured="star-01",t.resthooks="share-07",t.restore="play",t.retry="refresh-cw-05",t.runs="rows-03",t.search="search-refraction",t.select_open="chevron-down",t.select_clear="x",t.service="magic-wand-01",t.settings="settings-02",t.sort="chevron-selector-vertical",t.staff="hard-drive",t.tickets="agent",t.tickets_all="archive",t.tickets_closed="check",t.tickets_mine="coffee",t.tickets_open="inbox-01",t.tickets_unassigned="inbox-01",t.two_factor_enabled="shield-02",t.two_factor_disabled="shield-01",t.trigger="signal-01",t.triggers="signal-01",t.updated="edit-02",t.up="chevron-up",t.upload="upload-cloud-01",t.usages="link-04",t.user="users-01",t.users="users-01",t.user_beta="shield-zap",t.webhook="link-external-01",t.workspace="folder",t.zendesk="zendesk",t.ext="lightning-01",t.fcm="lightning-01"}(at||(at={}));class ht extends lt{constructor(){super(...arguments),this.name="",this.disabled=!1,this.size=1.2,this.animateChange="pulse"}static get styles(){return r`
2
2
  :host {
3
3
  color: var(--color-text);
4
4
  display: inline-block;
@@ -463,7 +463,7 @@ function t(t,e,i,n){var o,s=arguments.length,r=s<3?e:null===n?n=Object.getOwnPro
463
463
  name=${this.buttonName}
464
464
  @click=${this.handleSendClick}
465
465
  ?disabled=${this.buttonDisabled}
466
- ></temba-button>`}}t([st({type:Boolean})],wt.prototype,"chatbox",void 0),t([st({type:Boolean})],wt.prototype,"attachments",void 0),t([st({type:Boolean})],wt.prototype,"counter",void 0),t([st({type:Boolean})],wt.prototype,"pendingDrop",void 0),t([st({type:Boolean})],wt.prototype,"button",void 0),t([st({type:String,attribute:!1})],wt.prototype,"currentChat",void 0),t([st({type:String})],wt.prototype,"accept",void 0),t([st({type:String,attribute:!1})],wt.prototype,"endpoint",void 0),t([st({type:Boolean,attribute:!1})],wt.prototype,"uploading",void 0),t([st({type:Array,attribute:!1})],wt.prototype,"errorValues",void 0),t([st({type:String})],wt.prototype,"buttonName",void 0),t([st({type:Boolean,attribute:!1})],wt.prototype,"buttonDisabled",void 0),t([st({type:String,attribute:!1})],wt.prototype,"buttonError",void 0);var kt,St,Ct,Et,Tt,$t,Lt,At,Mt,Ot,zt,Pt,It,Dt,Nt,Rt,Bt,qt,Zt=function(t,e,i){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,i),i},Ft=function(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)};const Vt=function(t){var e=0;t+="x";var i=Math.floor(65745979961613.07);for(let n=0;n<t.length;n++)e>i&&(e=Math.floor(e/137)),e=131*e+t.charCodeAt(n);return e},Ut="0123456789abcdef".split(""),jt=[-2147483648,8388608,32768,128],Ht=[24,16,8,0],Wt=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Gt=[];class Kt{constructor(t=!1,e=!1){kt.set(this,void 0),St.set(this,void 0),Ct.set(this,void 0),Et.set(this,void 0),Tt.set(this,void 0),$t.set(this,void 0),Lt.set(this,void 0),At.set(this,void 0),Mt.set(this,void 0),Ot.set(this,void 0),zt.set(this,void 0),Pt.set(this,void 0),It.set(this,void 0),Dt.set(this,void 0),Nt.set(this,void 0),Rt.set(this,void 0),Bt.set(this,0),qt.set(this,void 0),this.init(t,e)}init(t,e){e?(Gt[0]=Gt[16]=Gt[1]=Gt[2]=Gt[3]=Gt[4]=Gt[5]=Gt[6]=Gt[7]=Gt[8]=Gt[9]=Gt[10]=Gt[11]=Gt[12]=Gt[13]=Gt[14]=Gt[15]=0,Zt(this,St,Gt)):Zt(this,St,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t?(Zt(this,$t,3238371032),Zt(this,Lt,914150663),Zt(this,At,812702999),Zt(this,Mt,4144912697),Zt(this,Ot,4290775857),Zt(this,zt,1750603025),Zt(this,Pt,1694076839),Zt(this,It,3204075428)):(Zt(this,$t,1779033703),Zt(this,Lt,3144134277),Zt(this,At,1013904242),Zt(this,Mt,2773480762),Zt(this,Ot,1359893119),Zt(this,zt,2600822924),Zt(this,Pt,528734635),Zt(this,It,1541459225)),Zt(this,kt,Zt(this,qt,Zt(this,Ct,Zt(this,Nt,0)))),Zt(this,Et,Zt(this,Dt,!1)),Zt(this,Tt,!0),Zt(this,Rt,t)}update(t){if(Ft(this,Et))return this;let e;e=t instanceof ArrayBuffer?new Uint8Array(t):t;let i=0;const n=e.length,o=Ft(this,St);for(;i<n;){let t;if(Ft(this,Dt)&&(Zt(this,Dt,!1),o[0]=Ft(this,kt),o[16]=o[1]=o[2]=o[3]=o[4]=o[5]=o[6]=o[7]=o[8]=o[9]=o[10]=o[11]=o[12]=o[13]=o[14]=o[15]=0),"string"!=typeof e)for(t=Ft(this,qt);i<n&&t<64;++i)o[t>>2]|=e[i]<<Ht[3&t++];else for(t=Ft(this,qt);i<n&&t<64;++i){let n=e.charCodeAt(i);n<128?o[t>>2]|=n<<Ht[3&t++]:n<2048?(o[t>>2]|=(192|n>>6)<<Ht[3&t++],o[t>>2]|=(128|63&n)<<Ht[3&t++]):n<55296||n>=57344?(o[t>>2]|=(224|n>>12)<<Ht[3&t++],o[t>>2]|=(128|n>>6&63)<<Ht[3&t++],o[t>>2]|=(128|63&n)<<Ht[3&t++]):(n=65536+((1023&n)<<10|1023&e.charCodeAt(++i)),o[t>>2]|=(240|n>>18)<<Ht[3&t++],o[t>>2]|=(128|n>>12&63)<<Ht[3&t++],o[t>>2]|=(128|n>>6&63)<<Ht[3&t++],o[t>>2]|=(128|63&n)<<Ht[3&t++])}Zt(this,Bt,t),Zt(this,Ct,Ft(this,Ct)+(t-Ft(this,qt))),t>=64?(Zt(this,kt,o[16]),Zt(this,qt,t-64),this.hash(),Zt(this,Dt,!0)):Zt(this,qt,t)}return Ft(this,Ct)>4294967295&&(Zt(this,Nt,Ft(this,Nt)+(Ft(this,Ct)/4294967296<<0)),Zt(this,Ct,Ft(this,Ct)%4294967296)),this}finalize(){if(Ft(this,Et))return;Zt(this,Et,!0);const t=Ft(this,St),e=Ft(this,Bt);t[16]=Ft(this,kt),t[e>>2]|=jt[3&e],Zt(this,kt,t[16]),e>=56&&(Ft(this,Dt)||this.hash(),t[0]=Ft(this,kt),t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=Ft(this,Nt)<<3|Ft(this,Ct)>>>29,t[15]=Ft(this,Ct)<<3,this.hash()}hash(){let t=Ft(this,$t),e=Ft(this,Lt),i=Ft(this,At),n=Ft(this,Mt),o=Ft(this,Ot),s=Ft(this,zt),r=Ft(this,Pt),a=Ft(this,It);const l=Ft(this,St);let h,c,d,u,p,m,f,g,v,y;for(let t=16;t<64;++t)u=l[t-15],h=(u>>>7|u<<25)^(u>>>18|u<<14)^u>>>3,u=l[t-2],c=(u>>>17|u<<15)^(u>>>19|u<<13)^u>>>10,l[t]=l[t-16]+h+l[t-7]+c<<0;y=e&i;for(let b=0;b<64;b+=4)Ft(this,Tt)?(Ft(this,Rt)?(f=300032,u=l[0]-1413257819,a=u-150054599<<0,n=u+24177077<<0):(f=704751109,u=l[0]-210244248,a=u-1521486534<<0,n=u+143694565<<0),Zt(this,Tt,!1)):(h=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),c=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),f=t&e,d=f^t&i^y,m=o&s^~o&r,u=a+c+m+Wt[b]+l[b],p=h+d,a=n+u<<0,n=u+p<<0),h=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),c=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),g=n&t,d=g^n&e^f,m=a&o^~a&s,u=r+c+m+Wt[b+1]+l[b+1],p=h+d,r=i+u<<0,i=u+p<<0,h=(i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10),c=(r>>>6|r<<26)^(r>>>11|r<<21)^(r>>>25|r<<7),v=i&n,d=v^i&t^g,m=r&a^~r&o,u=s+c+m+Wt[b+2]+l[b+2],p=h+d,s=e+u<<0,e=u+p<<0,h=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),c=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),y=e&i,d=y^e&n^v,m=s&r^~s&a,u=o+c+m+Wt[b+3]+l[b+3],p=h+d,o=t+u<<0,t=u+p<<0;Zt(this,$t,Ft(this,$t)+t<<0),Zt(this,Lt,Ft(this,Lt)+e<<0),Zt(this,At,Ft(this,At)+i<<0),Zt(this,Mt,Ft(this,Mt)+n<<0),Zt(this,Ot,Ft(this,Ot)+o<<0),Zt(this,zt,Ft(this,zt)+s<<0),Zt(this,Pt,Ft(this,Pt)+r<<0),Zt(this,It,Ft(this,It)+a<<0)}hex(){this.finalize();const t=Ft(this,$t),e=Ft(this,Lt),i=Ft(this,At),n=Ft(this,Mt),o=Ft(this,Ot),s=Ft(this,zt),r=Ft(this,Pt),a=Ft(this,It);let l=Ut[t>>28&15]+Ut[t>>24&15]+Ut[t>>20&15]+Ut[t>>16&15]+Ut[t>>12&15]+Ut[t>>8&15]+Ut[t>>4&15]+Ut[15&t]+Ut[e>>28&15]+Ut[e>>24&15]+Ut[e>>20&15]+Ut[e>>16&15]+Ut[e>>12&15]+Ut[e>>8&15]+Ut[e>>4&15]+Ut[15&e]+Ut[i>>28&15]+Ut[i>>24&15]+Ut[i>>20&15]+Ut[i>>16&15]+Ut[i>>12&15]+Ut[i>>8&15]+Ut[i>>4&15]+Ut[15&i]+Ut[n>>28&15]+Ut[n>>24&15]+Ut[n>>20&15]+Ut[n>>16&15]+Ut[n>>12&15]+Ut[n>>8&15]+Ut[n>>4&15]+Ut[15&n]+Ut[o>>28&15]+Ut[o>>24&15]+Ut[o>>20&15]+Ut[o>>16&15]+Ut[o>>12&15]+Ut[o>>8&15]+Ut[o>>4&15]+Ut[15&o]+Ut[s>>28&15]+Ut[s>>24&15]+Ut[s>>20&15]+Ut[s>>16&15]+Ut[s>>12&15]+Ut[s>>8&15]+Ut[s>>4&15]+Ut[15&s]+Ut[r>>28&15]+Ut[r>>24&15]+Ut[r>>20&15]+Ut[r>>16&15]+Ut[r>>12&15]+Ut[r>>8&15]+Ut[r>>4&15]+Ut[15&r];return Ft(this,Rt)||(l+=Ut[a>>28&15]+Ut[a>>24&15]+Ut[a>>20&15]+Ut[a>>16&15]+Ut[a>>12&15]+Ut[a>>8&15]+Ut[a>>4&15]+Ut[15&a]),l}toString(){return this.hex()}digest(){this.finalize();const t=Ft(this,$t),e=Ft(this,Lt),i=Ft(this,At),n=Ft(this,Mt),o=Ft(this,Ot),s=Ft(this,zt),r=Ft(this,Pt),a=Ft(this,It),l=[t>>24&255,t>>16&255,t>>8&255,255&t,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24&255,i>>16&255,i>>8&255,255&i,n>>24&255,n>>16&255,n>>8&255,255&n,o>>24&255,o>>16&255,o>>8&255,255&o,s>>24&255,s>>16&255,s>>8&255,255&s,r>>24&255,r>>16&255,r>>8&255,255&r];return Ft(this,Rt)||l.push(a>>24&255,a>>16&255,a>>8&255,255&a),l}array(){return this.digest()}arrayBuffer(){this.finalize();const t=new ArrayBuffer(Ft(this,Rt)?28:32),e=new DataView(t);return e.setUint32(0,Ft(this,$t)),e.setUint32(4,Ft(this,Lt)),e.setUint32(8,Ft(this,At)),e.setUint32(12,Ft(this,Mt)),e.setUint32(16,Ft(this,Ot)),e.setUint32(20,Ft(this,zt)),e.setUint32(24,Ft(this,Pt)),Ft(this,Rt)||e.setUint32(28,Ft(this,It)),t}}function Yt(t){const e=new Kt;return e.update(t),parseInt(e.hex().substring(0,8),16)}kt=new WeakMap,St=new WeakMap,Ct=new WeakMap,Et=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Lt=new WeakMap,At=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,zt=new WeakMap,Pt=new WeakMap,It=new WeakMap,Dt=new WeakMap,Nt=new WeakMap,Rt=new WeakMap,Bt=new WeakMap,qt=new WeakMap;const Jt=function(t,e,i){var n=i<.5?i*(1+e):i+e-i*e,o=2*i-n;return[(t/=360)+1/3,t,t-1/3].map((function(t){return t<0&&t++,t>1&&t--,t=t<1/6?o+6*(n-o)*t:t<.5?n:t<2/3?o+6*(n-o)*(2/3-t):o,Math.round(255*t)}))};const Xt=new class{constructor(t={}){const[e,i]=[t.lightness,t.saturation].map((function(t){return t=void 0!==t?t:[.35,.5,.65],Array.isArray(t)?t.concat():[t]}));this.L=e,this.S=i,"number"==typeof t.hue&&(t.hue={min:t.hue,max:t.hue}),"object"!=typeof t.hue||Array.isArray(t.hue)||(t.hue=[t.hue]),void 0===t.hue&&(t.hue=[]),this.hueRanges=t.hue.map((function(t){return{min:void 0===t.min?0:t.min,max:void 0===t.max?360:t.max}})),this.hash=Yt,"function"==typeof t.hash&&(this.hash=t.hash),"bkdr"===t.hash&&(this.hash=Vt)}hsl(t){var e,i,n=this.hash(t);if(this.hueRanges.length){const t=this.hueRanges[n%this.hueRanges.length];e=n/this.hueRanges.length%727*(t.max-t.min)/727+t.min}else e=n%359;return n=Math.ceil(n/360),i=this.S[n%this.S.length],n=Math.ceil(n/this.S.length),[e,i,this.L[n%this.L.length]]}rgb(t){var e=this.hsl(t);return Jt.apply(this,e)}hex(t){var e,i=this.rgb(t);return e="#",i.forEach((function(t){t<16&&(e+=0),e+=t.toString(16)})),e}},Qt=/(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/,te=(t={})=>{const e=(t=>{for(const e of document.cookie.split(";")){const i=e.indexOf("=");let n=e.substr(0,i),o=e.substr(i+1);if(n=n.trim(),o=o.trim(),n===t)return o}return null})("csrftoken"),i=e?{"X-CSRFToken":e}:{};return i["X-Requested-With"]="XMLHttpRequest",Object.keys(t).forEach((e=>{i[e]=t[e]})),i},ee=(t,e=null,i={})=>new Promise(((n,o)=>{const s={method:"GET",headers:te(i)};e&&(s.signal=e.signal),fetch(t,s).then((t=>{t.text().then((i=>{let o={};try{o=JSON.parse(i)}catch(t){}n({controller:e,body:i,json:o,headers:t.headers,status:t.status})}))})).catch((t=>{o(t)}))})),ie=t=>{const e=[];Object.keys(t).forEach((i=>{t[i]&&e.push(i)}));let i=e.join(" ");return i.trim().length>0&&(i=" "+i),i.trim()},ne=(t,e=null)=>new Promise(((i,n)=>{ee(t,e).then((t=>{i({results:t.json.results,next:t.json.next})})).catch((t=>n(t)))})),oe=async t=>{if(!t)return new Promise((t=>t([])));let e=[],i=t;for(;i;){const t=await ne(i);t.results&&(e=e.concat(t.results)),i=t.next}return e},se=t=>new Promise(((e,i)=>{ee(t).then((t=>{e({assets:t.json.results,next:t.json.next})})).catch((t=>i(t)))})),re=async t=>{if(!t)return new Promise((t=>t([])));let e=[],i=t;for(;i;){const t=await se(i);e=e.concat(t.assets),i=t.next}return e},ae=(t,e,i={},n=null)=>{const o=te(i);n&&(o["Content-Type"]=n);const s={method:"POST",headers:o,body:e};return new Promise(((e,i)=>{fetch(t,s).then((async t=>{t.text().then((i=>{let n={};try{n=JSON.parse(i)}catch(t){}e({body:i,json:n,headers:t.headers,status:t.status,redirected:t.redirected,url:t.url})}))})).catch((t=>{i(t)}))}))},le=(t,e)=>ae(t,JSON.stringify(e),!1,"application/json"),he=(t,e)=>new Promise(((i,n)=>{ae(t,e,!0).then((e=>{e.status>=200&&e.status<300?i(e):n(t===xt?e:"Server failure")})).catch((t=>{console.error(t),n(t)}))})),ce=t=>{const e=t.parentNode||t.host;if(e){const t=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY,i=t&&!(t.includes("hidden")||t.includes("visible"));return e?i&&e.scrollHeight>=e.clientHeight?e:ce(e):null}return null},de=3600,ue=86400,pe=30*ue;const me=new class{getCurrentDate(){return new Date}},fe=(t,e={suffix:""})=>{const{compareDate:i,hideRecentText:n,suffix:o}=e,s=i||me.getCurrentDate(),r=Math.floor((s.getTime()-t.getTime())/1e3);if(r<60)return i?r+"s"+o:!n&&o?o:"just now";if(r<de)return Math.round(r/60)+"m"+o;if(r<=ue)return Math.round(r/de)+"h"+o;if(r<=pe)return Math.round(r/ue)+"d"+o;if(r<6*pe)return Math.round(r/pe)+"mth"+o;return t.getDate()+" "+t.toDateString().match(/ [a-zA-Z]*/)[0].replace(" ","")+(t.getFullYear()==s.getFullYear()?"":" "+t.getFullYear())},ge=(t,e,i=!1)=>{let n;return function(...o){const s=this,r=i&&!n;clearTimeout(n),n=setTimeout((function(){n=null,i||t.apply(s,o)}),e),r&&t.apply(s,o)}},ve=(t,e)=>{let i=!0;return function(...n){i&&(i=!1,t.apply(this,n),setTimeout((()=>{i=!0}),e))}},ye=(t,e)=>t.length>e?t.substring(0,e)+"...":t,be=(t,e="and")=>1===t.length?t[0]:2===t.length?"html"===t[0].type?D`${t[0]} ${e} ${t[1]}`:t.join(" "+e+" "):"html"===t[0].type?t.map(((i,n)=>n<t.length-1?D`${i}, `:D`${e} ${i}`)):t.join(", ")+e+t[t.length-1],_e=(t,e,i="and")=>be(t.map(e),i),xe=t=>"true"===((t=>{let e=null;if(document.cookie&&""!=document.cookie){const i=document.cookie.split(";");for(let n=0;n<i.length;n++){const o=i[n].trim();if(o.substring(0,t.length+1)==t+"="){e=decodeURIComponent(o.substring(t.length+1));break}}}return e})(t)||"");var we;!function(t){t.MENU_COLLAPSED="menu-collapsed",t.TICKET_SHOW_DETAILS="tickets.show-details"}(we||(we={}));const ke=t=>t.split("/")[1],Se=(t,e)=>{if(0==t)return"0 KB";const i=e||2,n=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,n)).toFixed(i))+" "+["B","KB","MB","GB"][n]},Ce=t=>{if(t.position||(t.position="right"),t.image)return D`<img src="${t.image}">`;let e=t.name;if(t.user&&(e=`${t.user.first_name} ${t.user.last_name}`),!e)return null;const i=Xt.hex(e);let n=e.indexOf(" ")+1;n<1&&(n=e.length>1?1:0);let o=e.substring(0,1)+e.substring(n,n+1);return o=o.toUpperCase(),D` <temba-tip text="${e}" position="${t.position}"> <div style="border:0 solid red;display:flex;flex-direction:column;align-items:center"> <div class="avatar-circle" style="display:flex;height:2em;width:2em;flex-direction:row;align-items:center;color:#fff;border-radius:100%;font-weight:400;border:.3em solid rgba(0,0,0,.05);background:${i}"> <div style="border:0 solid red;display:flex;flex-direction:column;align-items:center;flex-grow:1"> <div style="border:0 solid #00f">${o}</div> </div> </div> </div> </temba-tip> `};class Ee{constructor(t=0,e=0){this.first=null,this.items=Object.create(null),this.last=null,this.max=t,this.size=0,this.ttl=e}has(t){return t in this.items}clear(){return this.first=null,this.items=Object.create(null),this.last=null,this.size=0,this}delete(t){if(this.has(t)){const e=this.items[t];delete this.items[t],this.size--,null!==e.prev&&(e.prev.next=e.next),null!==e.next&&(e.next.prev=e.prev),this.first===e&&(this.first=e.next),this.last===e&&(this.last=e.prev)}return this}evict(t=!1){if(t||this.size>0){const t=this.first;delete this.items[t.key],this.size--,0===this.size?(this.first=null,this.last=null):(this.first=t.next,this.first.prev=null)}return this}get(t){let e;if(this.has(t)){const i=this.items[t];this.ttl>0&&i.expiry<=(new Date).getTime()?this.delete(t):(e=i.value,this.set(t,e,!0))}return e}keys(){return Object.keys(this.items)}set(t,e,i=!1){let n;if(i||this.has(t)){if(n=this.items[t],n.value=e,this.last!==n){const t=this.last,e=n.next,i=n.prev;this.first===n&&(this.first=n.next),n.next=null,n.prev=this.last,t.next=n,null!==i&&(i.next=e),null!==e&&(e.prev=i)}}else this.max>0&&this.size===this.max&&this.evict(!0),n=this.items[t]={expiry:this.ttl>0?(new Date).getTime()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:e},1==++this.size?this.first=n:this.last.next=n;return this.last=n,this}}function Te(t=1e3,e=0){if(isNaN(t)||t<0)throw new TypeError("Invalid max value");if(isNaN(e)||e<0)throw new TypeError("Invalid ttl value");return new Ee(t,e)}class $e extends Error{}class Le extends $e{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class Ae extends $e{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class Me extends $e{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Oe extends $e{}class ze extends $e{constructor(t){super(`Invalid unit ${t}`)}}class Pe extends $e{}class Ie extends $e{constructor(){super("Zone is an abstract class")}}const De="numeric",Ne="short",Re="long",Be={year:De,month:De,day:De},qe={year:De,month:Ne,day:De},Ze={year:De,month:Ne,day:De,weekday:Ne},Fe={year:De,month:Re,day:De},Ve={year:De,month:Re,day:De,weekday:Re},Ue={hour:De,minute:De},je={hour:De,minute:De,second:De},He={hour:De,minute:De,second:De,timeZoneName:Ne},We={hour:De,minute:De,second:De,timeZoneName:Re},Ge={hour:De,minute:De,hourCycle:"h23"},Ke={hour:De,minute:De,second:De,hourCycle:"h23"},Ye={hour:De,minute:De,second:De,hourCycle:"h23",timeZoneName:Ne},Je={hour:De,minute:De,second:De,hourCycle:"h23",timeZoneName:Re},Xe={year:De,month:De,day:De,hour:De,minute:De},Qe={year:De,month:De,day:De,hour:De,minute:De,second:De},ti={year:De,month:Ne,day:De,hour:De,minute:De},ei={year:De,month:Ne,day:De,hour:De,minute:De,second:De},ii={year:De,month:Ne,day:De,weekday:Ne,hour:De,minute:De},ni={year:De,month:Re,day:De,hour:De,minute:De,timeZoneName:Ne},oi={year:De,month:Re,day:De,hour:De,minute:De,second:De,timeZoneName:Ne},si={year:De,month:Re,day:De,weekday:Re,hour:De,minute:De,timeZoneName:Re},ri={year:De,month:Re,day:De,weekday:Re,hour:De,minute:De,second:De,timeZoneName:Re};function ai(t){return void 0===t}function li(t){return"number"==typeof t}function hi(t){return"number"==typeof t&&t%1==0}function ci(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(t){return!1}}function di(t,e,i){if(0!==t.length)return t.reduce(((t,n)=>{const o=[e(n),n];return t&&i(t[0],o[0])===t[0]?t:o}),null)[1]}function ui(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function pi(t,e,i){return hi(t)&&t>=e&&t<=i}function mi(t,e=2){let i;return i=t<0?"-"+(""+-t).padStart(e,"0"):(""+t).padStart(e,"0"),i}function fi(t){return ai(t)||null===t||""===t?void 0:parseInt(t,10)}function gi(t){return ai(t)||null===t||""===t?void 0:parseFloat(t)}function vi(t){if(!ai(t)&&null!==t&&""!==t){const e=1e3*parseFloat("0."+t);return Math.floor(e)}}function yi(t,e,i=!1){const n=10**e;return(i?Math.trunc:Math.round)(t*n)/n}function bi(t){return t%4==0&&(t%100!=0||t%400==0)}function _i(t){return bi(t)?366:365}function xi(t,e){const i=function(t,e){return t-e*Math.floor(t/e)}(e-1,12)+1;return 2===i?bi(t+(e-i)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][i-1]}function wi(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function ki(t){const e=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,i=t-1,n=(i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400))%7;return 4===e||3===n?53:52}function Si(t){return t>99?t:t>60?1900+t:2e3+t}function Ci(t,e,i,n=null){const o=new Date(t),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(s.timeZone=n);const r={timeZoneName:e,...s},a=new Intl.DateTimeFormat(i,r).formatToParts(o).find((t=>"timezonename"===t.type.toLowerCase()));return a?a.value:null}function Ei(t,e){let i=parseInt(t,10);Number.isNaN(i)&&(i=0);const n=parseInt(e,10)||0;return 60*i+(i<0||Object.is(i,-0)?-n:n)}function Ti(t){const e=Number(t);if("boolean"==typeof t||""===t||Number.isNaN(e))throw new Pe(`Invalid unit value ${t}`);return e}function $i(t,e){const i={};for(const n in t)if(ui(t,n)){const o=t[n];if(null==o)continue;i[e(n)]=Ti(o)}return i}function Li(t,e){const i=Math.trunc(Math.abs(t/60)),n=Math.trunc(Math.abs(t%60)),o=t>=0?"+":"-";switch(e){case"short":return`${o}${mi(i,2)}:${mi(n,2)}`;case"narrow":return`${o}${i}${n>0?`:${n}`:""}`;case"techie":return`${o}${mi(i,2)}${mi(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Ai(t){return function(t,e){return e.reduce(((e,i)=>(e[i]=t[i],e)),{})}(t,["hour","minute","second","millisecond"])}const Mi=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,Oi=["January","February","March","April","May","June","July","August","September","October","November","December"],zi=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Pi=["J","F","M","A","M","J","J","A","S","O","N","D"];function Ii(t){switch(t){case"narrow":return[...Pi];case"short":return[...zi];case"long":return[...Oi];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 Di=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ni=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ri=["M","T","W","T","F","S","S"];function Bi(t){switch(t){case"narrow":return[...Ri];case"short":return[...Ni];case"long":return[...Di];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const qi=["AM","PM"],Zi=["Before Christ","Anno Domini"],Fi=["BC","AD"],Vi=["B","A"];function Ui(t){switch(t){case"narrow":return[...Vi];case"short":return[...Fi];case"long":return[...Zi];default:return null}}function ji(t,e){let i="";for(const n of t)n.literal?i+=n.val:i+=e(n.val);return i}const Hi={D:Be,DD:qe,DDD:Fe,DDDD:Ve,t:Ue,tt:je,ttt:He,tttt:We,T:Ge,TT:Ke,TTT:Ye,TTTT:Je,f:Xe,ff:ti,fff:ni,ffff:si,F:Qe,FF:ei,FFF:oi,FFFF:ri};class Wi{static create(t,e={}){return new Wi(t,e)}static parseFormat(t){let e=null,i="",n=!1;const o=[];for(let s=0;s<t.length;s++){const r=t.charAt(s);"'"===r?(i.length>0&&o.push({literal:n,val:i}),e=null,i="",n=!n):n||r===e?i+=r:(i.length>0&&o.push({literal:!1,val:i}),i=r,e=r)}return i.length>0&&o.push({literal:n,val:i}),o}static macroTokenToFormatOpts(t){return Hi[t]}constructor(t,e){this.opts=e,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,e){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(t,{...this.opts,...e}).format()}formatDateTime(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e}).format()}formatDateTimeParts(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e}).formatToParts()}resolvedOptions(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e}).resolvedOptions()}num(t,e=0){if(this.opts.forceSimple)return mi(t,e);const i={...this.opts};return e>0&&(i.padTo=e),this.loc.numberFormatter(i).format(t)}formatDateTimeFromString(t,e){const i="en"===this.loc.listingMode(),n=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,o=(e,i)=>this.loc.extract(t,e,i),s=e=>t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):"",r=()=>i?function(t){return qi[t.hour<12?0:1]}(t):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(e,n)=>i?function(t,e){return Ii(e)[t.month-1]}(t,e):o(n?{month:e}:{month:e,day:"numeric"},"month"),l=(e,n)=>i?function(t,e){return Bi(e)[t.weekday-1]}(t,e):o(n?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday"),h=e=>{const i=Wi.macroTokenToFormatOpts(e);return i?this.formatWithSystemDefault(t,i):e},c=e=>i?function(t,e){return Ui(e)[t.year<0?0:1]}(t,e):o({era:e},"era");return ji(Wi.parseFormat(e),(e=>{switch(e){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12==0?12:t.hour%12);case"hh":return this.num(t.hour%12==0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.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 t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return r();case"d":return n?o({day:"numeric"},"day"):this.num(t.day);case"dd":return n?o({day:"2-digit"},"day"):this.num(t.day,2);case"c":case"E":return this.num(t.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 n?o({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return n?o({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return n?o({month:"numeric"},"month"):this.num(t.month);case"MM":return n?o({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return n?o({year:"numeric"},"year"):this.num(t.year);case"yy":return n?o({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return n?o({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return n?o({year:"numeric"},"year"):this.num(t.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return h(e)}}))}formatDurationFromString(t,e){const i=t=>{switch(t[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}},n=Wi.parseFormat(e),o=n.reduce(((t,{literal:e,val:i})=>e?t:t.concat(i)),[]),s=t.shiftTo(...o.map(i).filter((t=>t)));return ji(n,(t=>e=>{const n=i(e);return n?this.num(t.get(n),e.length):e})(s))}}class Gi{constructor(t,e){this.reason=t,this.explanation=e}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Ki{get type(){throw new Ie}get name(){throw new Ie}get ianaName(){return this.name}get isUniversal(){throw new Ie}offsetName(t,e){throw new Ie}formatOffset(t,e){throw new Ie}offset(t){throw new Ie}equals(t){throw new Ie}get isValid(){throw new Ie}}let Yi=null;class Ji extends Ki{static get instance(){return null===Yi&&(Yi=new Ji),Yi}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:e,locale:i}){return Ci(t,e,i)}formatOffset(t,e){return Li(this.offset(t),e)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return"system"===t.type}get isValid(){return!0}}let Xi={};const Qi={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let tn={};class en extends Ki{static create(t){return tn[t]||(tn[t]=new en(t)),tn[t]}static resetCache(){tn={},Xi={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch(t){return!1}}constructor(t){super(),this.zoneName=t,this.valid=en.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:e,locale:i}){return Ci(t,e,i,this.name)}formatOffset(t,e){return Li(this.offset(t),e)}offset(t){const e=new Date(t);if(isNaN(e))return NaN;const i=(n=this.name,Xi[n]||(Xi[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Xi[n]);var n;let[o,s,r,a,l,h,c]=i.formatToParts?function(t,e){const i=t.formatToParts(e),n=[];for(let t=0;t<i.length;t++){const{type:e,value:o}=i[t],s=Qi[e];"era"===e?n[s]=o:ai(s)||(n[s]=parseInt(o,10))}return n}(i,e):function(t,e){const i=t.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(i),[,o,s,r,a,l,h,c]=n;return[r,o,s,a,l,h,c]}(i,e);"BC"===a&&(o=1-Math.abs(o));let d=+e;const u=d%1e3;return d-=u>=0?u:1e3+u,(wi({year:o,month:s,day:r,hour:24===l?0:l,minute:h,second:c,millisecond:0})-d)/6e4}equals(t){return"iana"===t.type&&t.name===this.name}get isValid(){return this.valid}}let nn=null;class on extends Ki{static get utcInstance(){return null===nn&&(nn=new on(0)),nn}static instance(t){return 0===t?on.utcInstance:new on(t)}static parseSpecifier(t){if(t){const e=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new on(Ei(e[1],e[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${Li(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${Li(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,e){return Li(this.fixed,e)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return"fixed"===t.type&&t.fixed===this.fixed}get isValid(){return!0}}class sn extends Ki{constructor(t){super(),this.zoneName=t}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 rn(t,e){if(ai(t)||null===t)return e;if(t instanceof Ki)return t;if(function(t){return"string"==typeof t}(t)){const i=t.toLowerCase();return"local"===i||"system"===i?e:"utc"===i||"gmt"===i?on.utcInstance:on.parseSpecifier(i)||en.create(t)}return li(t)?on.instance(t):"object"==typeof t&&t.offset&&"number"==typeof t.offset?t:new sn(t)}let an,ln=()=>Date.now(),hn="system",cn=null,dn=null,un=null;class pn{static get now(){return ln}static set now(t){ln=t}static set defaultZone(t){hn=t}static get defaultZone(){return rn(hn,Ji.instance)}static get defaultLocale(){return cn}static set defaultLocale(t){cn=t}static get defaultNumberingSystem(){return dn}static set defaultNumberingSystem(t){dn=t}static get defaultOutputCalendar(){return un}static set defaultOutputCalendar(t){un=t}static get throwOnInvalid(){return an}static set throwOnInvalid(t){an=t}static resetCaches(){Sn.resetCache(),en.resetCache()}}let mn={};let fn={};function gn(t,e={}){const i=JSON.stringify([t,e]);let n=fn[i];return n||(n=new Intl.DateTimeFormat(t,e),fn[i]=n),n}let vn={};let yn={};let bn=null;function _n(t,e,i,n,o){const s=t.listingMode(i);return"error"===s?null:"en"===s?n(e):o(e)}class xn{constructor(t,e,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:n,floor:o,...s}=i;if(!e||Object.keys(s).length>0){const e={useGrouping:!1,...i};i.padTo>0&&(e.minimumIntegerDigits=i.padTo),this.inf=function(t,e={}){const i=JSON.stringify([t,e]);let n=vn[i];return n||(n=new Intl.NumberFormat(t,e),vn[i]=n),n}(t,e)}}format(t){if(this.inf){const e=this.floor?Math.floor(t):t;return this.inf.format(e)}return mi(this.floor?Math.floor(t):yi(t,3),this.padTo)}}class wn{constructor(t,e,i){let n;if(this.opts=i,t.zone.isUniversal){const e=t.offset/60*-1,o=e>=0?`Etc/GMT+${e}`:`Etc/GMT${e}`;0!==t.offset&&en.create(o).valid?(n=o,this.dt=t):(n="UTC",i.timeZoneName?this.dt=t:this.dt=0===t.offset?t:Ss.fromMillis(t.ts+60*t.offset*1e3))}else"system"===t.zone.type?this.dt=t:(this.dt=t,n=t.zone.name);const o={...this.opts};n&&(o.timeZone=n),this.dtf=gn(e,o)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class kn{constructor(t,e,i){this.opts={style:"long",...i},!e&&ci()&&(this.rtf=function(t,e={}){const{base:i,...n}=e,o=JSON.stringify([t,n]);let s=yn[o];return s||(s=new Intl.RelativeTimeFormat(t,e),yn[o]=s),s}(t,i))}format(t,e){return this.rtf?this.rtf.format(t,e):function(t,e,i="always",n=!1){const o={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(t);if("auto"===i&&s){const i="days"===t;switch(e){case 1:return i?"tomorrow":`next ${o[t][0]}`;case-1:return i?"yesterday":`last ${o[t][0]}`;case 0:return i?"today":`this ${o[t][0]}`}}const r=Object.is(e,-0)||e<0,a=Math.abs(e),l=1===a,h=o[t],c=n?l?h[1]:h[2]||h[1]:l?o[t][0]:t;return r?`${a} ${c} ago`:`in ${a} ${c}`}(e,t,this.opts.numeric,"long"!==this.opts.style)}formatToParts(t,e){return this.rtf?this.rtf.formatToParts(t,e):[]}}class Sn{static fromOpts(t){return Sn.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)}static create(t,e,i,n=!1){const o=t||pn.defaultLocale,s=o||(n?"en-US":bn||(bn=(new Intl.DateTimeFormat).resolvedOptions().locale,bn)),r=e||pn.defaultNumberingSystem,a=i||pn.defaultOutputCalendar;return new Sn(s,r,a,o)}static resetCache(){bn=null,fn={},vn={},yn={}}static fromObject({locale:t,numberingSystem:e,outputCalendar:i}={}){return Sn.create(t,e,i)}constructor(t,e,i,n){const[o,s,r]=function(t){const e=t.indexOf("-u-");if(-1===e)return[t];{let i;const n=t.substring(0,e);try{i=gn(t).resolvedOptions()}catch(t){i=gn(n).resolvedOptions()}const{numberingSystem:o,calendar:s}=i;return[n,o,s]}}(t);this.locale=o,this.numberingSystem=e||s||null,this.outputCalendar=i||r||null,this.intl=function(t,e,i){return i||e?(t+="-u",i&&(t+=`-ca-${i}`),e&&(t+=`-nu-${e}`),t):t}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=n,this.fastNumbersCached=null}get fastNumbers(){var t;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(t=this).numberingSystem||"latn"===t.numberingSystem)&&("latn"===t.numberingSystem||!t.locale||t.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),e=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t&&e?"en":"intl"}clone(t){return t&&0!==Object.getOwnPropertyNames(t).length?Sn.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1):this}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,e=!1,i=!0){return _n(this,t,i,Ii,(()=>{const i=e?{month:t,day:"numeric"}:{month:t},n=e?"format":"standalone";return this.monthsCache[n][t]||(this.monthsCache[n][t]=function(t){const e=[];for(let i=1;i<=12;i++){const n=Ss.utc(2016,i,1);e.push(t(n))}return e}((t=>this.extract(t,i,"month")))),this.monthsCache[n][t]}))}weekdays(t,e=!1,i=!0){return _n(this,t,i,Bi,(()=>{const i=e?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},n=e?"format":"standalone";return this.weekdaysCache[n][t]||(this.weekdaysCache[n][t]=function(t){const e=[];for(let i=1;i<=7;i++){const n=Ss.utc(2016,11,13+i);e.push(t(n))}return e}((t=>this.extract(t,i,"weekday")))),this.weekdaysCache[n][t]}))}meridiems(t=!0){return _n(this,void 0,t,(()=>qi),(()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ss.utc(2016,11,13,9),Ss.utc(2016,11,13,19)].map((e=>this.extract(e,t,"dayperiod")))}return this.meridiemCache}))}eras(t,e=!0){return _n(this,t,e,Ui,(()=>{const e={era:t};return this.eraCache[t]||(this.eraCache[t]=[Ss.utc(-40,1,1),Ss.utc(2017,1,1)].map((t=>this.extract(t,e,"era")))),this.eraCache[t]}))}extract(t,e,i){const n=this.dtFormatter(t,e).formatToParts().find((t=>t.type.toLowerCase()===i));return n?n.value:null}numberFormatter(t={}){return new xn(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,e={}){return new wn(t,this.intl,e)}relFormatter(t={}){return new kn(this.intl,this.isEnglish(),t)}listFormatter(t={}){return function(t,e={}){const i=JSON.stringify([t,e]);let n=mn[i];return n||(n=new Intl.ListFormat(t,e),mn[i]=n),n}(this.intl,t)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}}function Cn(...t){const e=t.reduce(((t,e)=>t+e.source),"");return RegExp(`^${e}$`)}function En(...t){return e=>t.reduce((([t,i,n],o)=>{const[s,r,a]=o(e,n);return[{...t,...s},r||i,a]}),[{},null,1]).slice(0,2)}function Tn(t,...e){if(null==t)return[null,null];for(const[i,n]of e){const e=i.exec(t);if(e)return n(e)}return[null,null]}function $n(...t){return(e,i)=>{const n={};let o;for(o=0;o<t.length;o++)n[t[o]]=fi(e[i+o]);return[n,null,i+o]}}const Ln=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,An=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Mn=RegExp(`${An.source}${`(?:${Ln.source}?(?:\\[(${Mi.source})\\])?)?`}`),On=RegExp(`(?:T${Mn.source})?`),zn=$n("weekYear","weekNumber","weekDay"),Pn=$n("year","ordinal"),In=RegExp(`${An.source} ?(?:${Ln.source}|(${Mi.source}))?`),Dn=RegExp(`(?: ${In.source})?`);function Nn(t,e,i){const n=t[e];return ai(n)?i:fi(n)}function Rn(t,e){return[{hours:Nn(t,e,0),minutes:Nn(t,e+1,0),seconds:Nn(t,e+2,0),milliseconds:vi(t[e+3])},null,e+4]}function Bn(t,e){const i=!t[e]&&!t[e+1],n=Ei(t[e+1],t[e+2]);return[{},i?null:on.instance(n),e+3]}function qn(t,e){return[{},t[e]?en.create(t[e]):null,e+1]}const Zn=RegExp(`^T?${An.source}$`),Fn=/^-?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 Vn(t){const[e,i,n,o,s,r,a,l,h]=t,c="-"===e[0],d=l&&"-"===l[0],u=(t,e=!1)=>void 0!==t&&(e||t&&c)?-t:t;return[{years:u(gi(i)),months:u(gi(n)),weeks:u(gi(o)),days:u(gi(s)),hours:u(gi(r)),minutes:u(gi(a)),seconds:u(gi(l),"-0"===l),milliseconds:u(vi(h),d)}]}const Un={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function jn(t,e,i,n,o,s,r){const a={year:2===e.length?Si(fi(e)):fi(e),month:zi.indexOf(i)+1,day:fi(n),hour:fi(o),minute:fi(s)};return r&&(a.second=fi(r)),t&&(a.weekday=t.length>3?Di.indexOf(t)+1:Ni.indexOf(t)+1),a}const Hn=/^(?:(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 Wn(t){const[,e,i,n,o,s,r,a,l,h,c,d]=t,u=jn(e,o,n,i,s,r,a);let p;return p=l?Un[l]:h?0:Ei(c,d),[u,new on(p)]}const Gn=/^(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$/,Kn=/^(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$/,Yn=/^(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 Jn(t){const[,e,i,n,o,s,r,a]=t;return[jn(e,o,n,i,s,r,a),on.utcInstance]}function Xn(t){const[,e,i,n,o,s,r,a]=t;return[jn(e,a,i,n,o,s,r),on.utcInstance]}const Qn=Cn(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,On),to=Cn(/(\d{4})-?W(\d\d)(?:-?(\d))?/,On),eo=Cn(/(\d{4})-?(\d{3})/,On),io=Cn(Mn),no=En((function(t,e){return[{year:Nn(t,e),month:Nn(t,e+1,1),day:Nn(t,e+2,1)},null,e+3]}),Rn,Bn,qn),oo=En(zn,Rn,Bn,qn),so=En(Pn,Rn,Bn,qn),ro=En(Rn,Bn,qn);const ao=En(Rn);const lo=Cn(/(\d{4})-(\d\d)-(\d\d)/,Dn),ho=Cn(In),co=En(Rn,Bn,qn);const uo={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}},po={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},...uo},mo=365.2425,fo=30.436875,go={years:{quarters:4,months:12,weeks:52.1775,days:mo,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:fo,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...uo},vo=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],yo=vo.slice(0).reverse();function bo(t,e,i=!1){const n={values:i?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy};return new xo(n)}function _o(t,e,i,n,o){const s=t[o][i],r=e[i]/s,a=!(Math.sign(r)===Math.sign(n[o]))&&0!==n[o]&&Math.abs(r)<=1?function(t){return t<0?Math.floor(t):Math.ceil(t)}(r):Math.trunc(r);n[o]+=a,e[i]-=a*s}class xo{constructor(t){const e="longterm"===t.conversionAccuracy||!1;this.values=t.values,this.loc=t.loc||Sn.create(),this.conversionAccuracy=e?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=e?go:po,this.isLuxonDuration=!0}static fromMillis(t,e){return xo.fromObject({milliseconds:t},e)}static fromObject(t,e={}){if(null==t||"object"!=typeof t)throw new Pe("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new xo({values:$i(t,xo.normalizeUnit),loc:Sn.fromObject(e),conversionAccuracy:e.conversionAccuracy})}static fromDurationLike(t){if(li(t))return xo.fromMillis(t);if(xo.isDuration(t))return t;if("object"==typeof t)return xo.fromObject(t);throw new Pe(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,e){const[i]=function(t){return Tn(t,[Fn,Vn])}(t);return i?xo.fromObject(i,e):xo.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,e){const[i]=function(t){return Tn(t,[Zn,ao])}(t);return i?xo.fromObject(i,e):xo.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,e=null){if(!t)throw new Pe("need to specify a reason the Duration is invalid");const i=t instanceof Gi?t:new Gi(t,e);if(pn.throwOnInvalid)throw new Me(i);return new xo({invalid:i})}static normalizeUnit(t){const e={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"}[t?t.toLowerCase():t];if(!e)throw new ze(t);return e}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,e={}){const i={...e,floor:!1!==e.round&&!1!==e.floor};return this.isValid?Wi.create(this.loc,i).formatDurationFromString(this,t):"Invalid Duration"}toHuman(t={}){const e=vo.map((e=>{const i=this.values[e];return ai(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:e.slice(0,-1)}).format(i)})).filter((t=>t));return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(e)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return 0!==this.years&&(t+=this.years+"Y"),0===this.months&&0===this.quarters||(t+=this.months+3*this.quarters+"M"),0!==this.weeks&&(t+=this.weeks+"W"),0!==this.days&&(t+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(t+="T"),0!==this.hours&&(t+=this.hours+"H"),0!==this.minutes&&(t+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(t+=yi(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===t&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const e=this.toMillis();if(e<0||e>=864e5)return null;t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let n="basic"===t.format?"hhmm":"hh:mm";t.suppressSeconds&&0===i.seconds&&0===i.milliseconds||(n+="basic"===t.format?"ss":":ss",t.suppressMilliseconds&&0===i.milliseconds||(n+=".SSS"));let o=i.toFormat(n);return t.includePrefix&&(o="T"+o),o}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const e=xo.fromDurationLike(t),i={};for(const t of vo)(ui(e.values,t)||ui(this.values,t))&&(i[t]=e.get(t)+this.get(t));return bo(this,{values:i},!0)}minus(t){if(!this.isValid)return this;const e=xo.fromDurationLike(t);return this.plus(e.negate())}mapUnits(t){if(!this.isValid)return this;const e={};for(const i of Object.keys(this.values))e[i]=Ti(t(this.values[i],i));return bo(this,{values:e},!0)}get(t){return this[xo.normalizeUnit(t)]}set(t){if(!this.isValid)return this;return bo(this,{values:{...this.values,...$i(t,xo.normalizeUnit)}})}reconfigure({locale:t,numberingSystem:e,conversionAccuracy:i}={}){const n={loc:this.loc.clone({locale:t,numberingSystem:e})};return i&&(n.conversionAccuracy=i),bo(this,n)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return function(t,e){yo.reduce(((i,n)=>ai(e[n])?i:(i&&_o(t,e,i,e,n),n)),null)}(this.matrix,t),bo(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(0===t.length)return this;t=t.map((t=>xo.normalizeUnit(t)));const e={},i={},n=this.toObject();let o;for(const s of vo)if(t.indexOf(s)>=0){o=s;let t=0;for(const e in i)t+=this.matrix[e][s]*i[e],i[e]=0;li(n[s])&&(t+=n[s]);const r=Math.trunc(t);e[s]=r,i[s]=(1e3*t-1e3*r)/1e3;for(const t in n)vo.indexOf(t)>vo.indexOf(s)&&_o(this.matrix,n,t,e,s)}else li(n[s])&&(i[s]=n[s]);for(const t in i)0!==i[t]&&(e[o]+=t===o?i[t]:i[t]/this.matrix[o][t]);return bo(this,{values:e},!0).normalize()}negate(){if(!this.isValid)return this;const t={};for(const e of Object.keys(this.values))t[e]=0===this.values[e]?0:-this.values[e];return bo(this,{values:t},!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(t){if(!this.isValid||!t.isValid)return!1;if(!this.loc.equals(t.loc))return!1;for(const n of vo)if(e=this.values[n],i=t.values[n],!(void 0===e||0===e?void 0===i||0===i:e===i))return!1;var e,i;return!0}}const wo="Invalid Interval";class ko{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,e=null){if(!t)throw new Pe("need to specify a reason the Interval is invalid");const i=t instanceof Gi?t:new Gi(t,e);if(pn.throwOnInvalid)throw new Ae(i);return new ko({invalid:i})}static fromDateTimes(t,e){const i=Cs(t),n=Cs(e),o=function(t,e){return t&&t.isValid?e&&e.isValid?e<t?ko.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null:ko.invalid("missing or invalid end"):ko.invalid("missing or invalid start")}(i,n);return null==o?new ko({start:i,end:n}):o}static after(t,e){const i=xo.fromDurationLike(e),n=Cs(t);return ko.fromDateTimes(n,n.plus(i))}static before(t,e){const i=xo.fromDurationLike(e),n=Cs(t);return ko.fromDateTimes(n.minus(i),n)}static fromISO(t,e){const[i,n]=(t||"").split("/",2);if(i&&n){let t,o,s,r;try{t=Ss.fromISO(i,e),o=t.isValid}catch(n){o=!1}try{s=Ss.fromISO(n,e),r=s.isValid}catch(n){r=!1}if(o&&r)return ko.fromDateTimes(t,s);if(o){const i=xo.fromISO(n,e);if(i.isValid)return ko.after(t,i)}else if(r){const t=xo.fromISO(i,e);if(t.isValid)return ko.before(s,t)}}return ko.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.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(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds"){if(!this.isValid)return NaN;const e=this.start.startOf(t),i=this.end.startOf(t);return Math.floor(i.diff(e,t).get(t))+1}hasSame(t){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,t))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return!!this.isValid&&this.s>t}isBefore(t){return!!this.isValid&&this.e<=t}contains(t){return!!this.isValid&&(this.s<=t&&this.e>t)}set({start:t,end:e}={}){return this.isValid?ko.fromDateTimes(t||this.s,e||this.e):this}splitAt(...t){if(!this.isValid)return[];const e=t.map(Cs).filter((t=>this.contains(t))).sort(),i=[];let{s:n}=this,o=0;for(;n<this.e;){const t=e[o]||this.e,s=+t>+this.e?this.e:t;i.push(ko.fromDateTimes(n,s)),n=s,o+=1}return i}splitBy(t){const e=xo.fromDurationLike(t);if(!this.isValid||!e.isValid||0===e.as("milliseconds"))return[];let i,{s:n}=this,o=1;const s=[];for(;n<this.e;){const t=this.start.plus(e.mapUnits((t=>t*o)));i=+t>+this.e?this.e:t,s.push(ko.fromDateTimes(n,i)),n=i,o+=1}return s}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return!!this.isValid&&+this.e==+t.s}abutsEnd(t){return!!this.isValid&&+t.e==+this.s}engulfs(t){return!!this.isValid&&(this.s<=t.s&&this.e>=t.e)}equals(t){return!(!this.isValid||!t.isValid)&&(this.s.equals(t.s)&&this.e.equals(t.e))}intersection(t){if(!this.isValid)return this;const e=this.s>t.s?this.s:t.s,i=this.e<t.e?this.e:t.e;return e>=i?null:ko.fromDateTimes(e,i)}union(t){if(!this.isValid)return this;const e=this.s<t.s?this.s:t.s,i=this.e>t.e?this.e:t.e;return ko.fromDateTimes(e,i)}static merge(t){const[e,i]=t.sort(((t,e)=>t.s-e.s)).reduce((([t,e],i)=>e?e.overlaps(i)||e.abutsStart(i)?[t,e.union(i)]:[t.concat([e]),i]:[t,i]),[[],null]);return i&&e.push(i),e}static xor(t){let e=null,i=0;const n=[],o=t.map((t=>[{time:t.s,type:"s"},{time:t.e,type:"e"}])),s=Array.prototype.concat(...o).sort(((t,e)=>t.time-e.time));for(const t of s)i+="s"===t.type?1:-1,1===i?e=t.time:(e&&+e!=+t.time&&n.push(ko.fromDateTimes(e,t.time)),e=null);return ko.merge(n)}difference(...t){return ko.xor([this].concat(t)).map((t=>this.intersection(t))).filter((t=>t&&!t.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:wo}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:wo}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:wo}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:wo}toFormat(t,{separator:e=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${e}${this.e.toFormat(t)}`:wo}toDuration(t,e){return this.isValid?this.e.diff(this.s,t,e):xo.invalid(this.invalidReason)}mapEndpoints(t){return ko.fromDateTimes(t(this.s),t(this.e))}}class So{static hasDST(t=pn.defaultZone){const e=Ss.now().setZone(t).set({month:12});return!t.isUniversal&&e.offset!==e.set({month:6}).offset}static isValidIANAZone(t){return en.isValidZone(t)}static normalizeZone(t){return rn(t,pn.defaultZone)}static months(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null,outputCalendar:o="gregory"}={}){return(n||Sn.create(e,i,o)).months(t)}static monthsFormat(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null,outputCalendar:o="gregory"}={}){return(n||Sn.create(e,i,o)).months(t,!0)}static weekdays(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null}={}){return(n||Sn.create(e,i,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null}={}){return(n||Sn.create(e,i,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return Sn.create(t).meridiems()}static eras(t="short",{locale:e=null}={}){return Sn.create(e,null,"gregory").eras(t)}static features(){return{relative:ci()}}}function Co(t,e){const i=t=>t.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=i(e)-i(t);return Math.floor(xo.fromMillis(n).as("days"))}function Eo(t,e,i,n){let[o,s,r,a]=function(t,e,i){const n=[["years",(t,e)=>e.year-t.year],["quarters",(t,e)=>e.quarter-t.quarter],["months",(t,e)=>e.month-t.month+12*(e.year-t.year)],["weeks",(t,e)=>{const i=Co(t,e);return(i-i%7)/7}],["days",Co]],o={};let s,r;for(const[a,l]of n)if(i.indexOf(a)>=0){s=a;let i=l(t,e);r=t.plus({[a]:i}),r>e?(t=t.plus({[a]:i-1}),i-=1):t=r,o[a]=i}return[t,o,r,s]}(t,e,i);const l=e-o,h=i.filter((t=>["hours","minutes","seconds","milliseconds"].indexOf(t)>=0));0===h.length&&(r<e&&(r=o.plus({[a]:1})),r!==o&&(s[a]=(s[a]||0)+l/(r-o)));const c=xo.fromObject(s,n);return h.length>0?xo.fromMillis(l,n).shiftTo(...h).plus(c):c}const To={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},$o={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]},Lo=To.hanidec.replace(/[\[|\]]/g,"").split("");function Ao({numberingSystem:t},e=""){return new RegExp(`${To[t||"latn"]}${e}`)}function Mo(t,e=(t=>t)){return{regex:t,deser:([t])=>e(function(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let i=0;i<t.length;i++){const n=t.charCodeAt(i);if(-1!==t[i].search(To.hanidec))e+=Lo.indexOf(t[i]);else for(const t in $o){const[i,o]=$o[t];n>=i&&n<=o&&(e+=n-i)}}return parseInt(e,10)}return e}(t))}}const Oo=`[ ${String.fromCharCode(160)}]`,zo=new RegExp(Oo,"g");function Po(t){return t.replace(/\./g,"\\.?").replace(zo,Oo)}function Io(t){return t.replace(/\./g,"").replace(zo," ").toLowerCase()}function Do(t,e){return null===t?null:{regex:RegExp(t.map(Po).join("|")),deser:([i])=>t.findIndex((t=>Io(i)===Io(t)))+e}}function No(t,e){return{regex:t,deser:([,t,e])=>Ei(t,e),groups:e}}function Ro(t){return{regex:t,deser:([t])=>t}}const Bo={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};let qo=null;function Zo(t,e){if(t.literal)return t;const i=Wi.macroTokenToFormatOpts(t.val);if(!i)return t;const n=Wi.create(e,i).formatDateTimeParts((qo||(qo=Ss.fromMillis(1555555555555)),qo)).map((t=>function(t,e,i){const{type:n,value:o}=t;if("literal"===n)return{literal:!0,val:o};const s=i[n];let r=Bo[n];return"object"==typeof r&&(r=r[s]),r?{literal:!1,val:r}:void 0}(t,0,i)));return n.includes(void 0)?t:n}function Fo(t,e,i){const n=function(t,e){return Array.prototype.concat(...t.map((t=>Zo(t,e))))}(Wi.parseFormat(i),t),o=n.map((e=>function(t,e){const i=Ao(e),n=Ao(e,"{2}"),o=Ao(e,"{3}"),s=Ao(e,"{4}"),r=Ao(e,"{6}"),a=Ao(e,"{1,2}"),l=Ao(e,"{1,3}"),h=Ao(e,"{1,6}"),c=Ao(e,"{1,9}"),d=Ao(e,"{2,4}"),u=Ao(e,"{4,6}"),p=t=>{return{regex:RegExp((e=t.val,e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([t])=>t,literal:!0};var e},m=(m=>{if(t.literal)return p(m);switch(m.val){case"G":return Do(e.eras("short",!1),0);case"GG":return Do(e.eras("long",!1),0);case"y":return Mo(h);case"yy":case"kk":return Mo(d,Si);case"yyyy":case"kkkk":return Mo(s);case"yyyyy":return Mo(u);case"yyyyyy":return Mo(r);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Mo(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Mo(n);case"MMM":return Do(e.months("short",!0,!1),1);case"MMMM":return Do(e.months("long",!0,!1),1);case"LLL":return Do(e.months("short",!1,!1),1);case"LLLL":return Do(e.months("long",!1,!1),1);case"o":case"S":return Mo(l);case"ooo":case"SSS":return Mo(o);case"u":return Ro(c);case"uu":return Ro(a);case"uuu":case"E":case"c":return Mo(i);case"a":return Do(e.meridiems(),0);case"EEE":return Do(e.weekdays("short",!1,!1),1);case"EEEE":return Do(e.weekdays("long",!1,!1),1);case"ccc":return Do(e.weekdays("short",!0,!1),1);case"cccc":return Do(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return No(new RegExp(`([+-]${a.source})(?::(${n.source}))?`),2);case"ZZZ":return No(new RegExp(`([+-]${a.source})(${n.source})?`),2);case"z":return Ro(/[a-z_+-/]{1,256}?/i);default:return p(m)}})(t)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return m.token=t,m}(e,t))),s=o.find((t=>t.invalidReason));if(s)return{input:e,tokens:n,invalidReason:s.invalidReason};{const[t,i]=function(t){const e=t.map((t=>t.regex)).reduce(((t,e)=>`${t}(${e.source})`),"");return[`^${e}$`,t]}(o),s=RegExp(t,"i"),[r,a]=function(t,e,i){const n=t.match(e);if(n){const t={};let e=1;for(const o in i)if(ui(i,o)){const s=i[o],r=s.groups?s.groups+1:1;!s.literal&&s.token&&(t[s.token.val[0]]=s.deser(n.slice(e,e+r))),e+=r}return[n,t]}return[n,{}]}(e,s,i),[l,h,c]=a?function(t){let e,i=null;ai(t.z)||(i=en.create(t.z)),ai(t.Z)||(i||(i=new on(t.Z)),e=t.Z),ai(t.q)||(t.M=3*(t.q-1)+1),ai(t.h)||(t.h<12&&1===t.a?t.h+=12:12===t.h&&0===t.a&&(t.h=0)),0===t.G&&t.y&&(t.y=-t.y),ai(t.u)||(t.S=vi(t.u));const n=Object.keys(t).reduce(((e,i)=>{const n=(t=>{switch(t){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}})(i);return n&&(e[n]=t[i]),e}),{});return[n,i,e]}(a):[null,null,void 0];if(ui(a,"a")&&ui(a,"H"))throw new Oe("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:n,regex:s,rawMatches:r,matches:a,result:l,zone:h,specificOffset:c}}}const Vo=[0,31,59,90,120,151,181,212,243,273,304,334],Uo=[0,31,60,91,121,152,182,213,244,274,305,335];function jo(t,e){return new Gi("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function Ho(t,e,i){const n=new Date(Date.UTC(t,e-1,i));t<100&&t>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const o=n.getUTCDay();return 0===o?7:o}function Wo(t,e,i){return i+(bi(t)?Uo:Vo)[e-1]}function Go(t,e){const i=bi(t)?Uo:Vo,n=i.findIndex((t=>t<e));return{month:n+1,day:e-i[n]}}function Ko(t){const{year:e,month:i,day:n}=t,o=Wo(e,i,n),s=Ho(e,i,n);let r,a=Math.floor((o-s+10)/7);return a<1?(r=e-1,a=ki(r)):a>ki(e)?(r=e+1,a=1):r=e,{weekYear:r,weekNumber:a,weekday:s,...Ai(t)}}function Yo(t){const{weekYear:e,weekNumber:i,weekday:n}=t,o=Ho(e,1,4),s=_i(e);let r,a=7*i+n-o-3;a<1?(r=e-1,a+=_i(r)):a>s?(r=e+1,a-=_i(e)):r=e;const{month:l,day:h}=Go(r,a);return{year:r,month:l,day:h,...Ai(t)}}function Jo(t){const{year:e,month:i,day:n}=t;return{year:e,ordinal:Wo(e,i,n),...Ai(t)}}function Xo(t){const{year:e,ordinal:i}=t,{month:n,day:o}=Go(e,i);return{year:e,month:n,day:o,...Ai(t)}}function Qo(t){const e=hi(t.year),i=pi(t.month,1,12),n=pi(t.day,1,xi(t.year,t.month));return e?i?!n&&jo("day",t.day):jo("month",t.month):jo("year",t.year)}function ts(t){const{hour:e,minute:i,second:n,millisecond:o}=t,s=pi(e,0,23)||24===e&&0===i&&0===n&&0===o,r=pi(i,0,59),a=pi(n,0,59),l=pi(o,0,999);return s?r?a?!l&&jo("millisecond",o):jo("second",n):jo("minute",i):jo("hour",e)}const es="Invalid DateTime",is=864e13;function ns(t){return new Gi("unsupported zone",`the zone "${t.name}" is not supported`)}function os(t){return null===t.weekData&&(t.weekData=Ko(t.c)),t.weekData}function ss(t,e){const i={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new Ss({...i,...e,old:i})}function rs(t,e,i){let n=t-60*e*1e3;const o=i.offset(n);if(e===o)return[n,e];n-=60*(o-e)*1e3;const s=i.offset(n);return o===s?[n,o]:[t-60*Math.min(o,s)*1e3,Math.max(o,s)]}function as(t,e){const i=new Date(t+=60*e*1e3);return{year:i.getUTCFullYear(),month:i.getUTCMonth()+1,day:i.getUTCDate(),hour:i.getUTCHours(),minute:i.getUTCMinutes(),second:i.getUTCSeconds(),millisecond:i.getUTCMilliseconds()}}function ls(t,e,i){return rs(wi(t),e,i)}function hs(t,e){const i=t.o,n=t.c.year+Math.trunc(e.years),o=t.c.month+Math.trunc(e.months)+3*Math.trunc(e.quarters),s={...t.c,year:n,month:o,day:Math.min(t.c.day,xi(n,o))+Math.trunc(e.days)+7*Math.trunc(e.weeks)},r=xo.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=wi(s);let[l,h]=rs(a,i,t.zone);return 0!==r&&(l+=r,h=t.zone.offset(l)),{ts:l,o:h}}function cs(t,e,i,n,o,s){const{setZone:r,zone:a}=i;if(t&&0!==Object.keys(t).length){const n=e||a,o=Ss.fromObject(t,{...i,zone:n,specificOffset:s});return r?o:o.setZone(a)}return Ss.invalid(new Gi("unparsable",`the input "${o}" can't be parsed as ${n}`))}function ds(t,e,i=!0){return t.isValid?Wi.create(Sn.create("en-US"),{allowZ:i,forceSimple:!0}).formatDateTimeFromString(t,e):null}function us(t,e){const i=t.c.year>9999||t.c.year<0;let n="";return i&&t.c.year>=0&&(n+="+"),n+=mi(t.c.year,i?6:4),e?(n+="-",n+=mi(t.c.month),n+="-",n+=mi(t.c.day)):(n+=mi(t.c.month),n+=mi(t.c.day)),n}function ps(t,e,i,n,o,s){let r=mi(t.c.hour);return e?(r+=":",r+=mi(t.c.minute),0===t.c.second&&i||(r+=":")):r+=mi(t.c.minute),0===t.c.second&&i||(r+=mi(t.c.second),0===t.c.millisecond&&n||(r+=".",r+=mi(t.c.millisecond,3))),o&&(t.isOffsetFixed&&0===t.offset&&!s?r+="Z":t.o<0?(r+="-",r+=mi(Math.trunc(-t.o/60)),r+=":",r+=mi(Math.trunc(-t.o%60))):(r+="+",r+=mi(Math.trunc(t.o/60)),r+=":",r+=mi(Math.trunc(t.o%60)))),s&&(r+="["+t.zone.ianaName+"]"),r}const ms={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},fs={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},gs={ordinal:1,hour:0,minute:0,second:0,millisecond:0},vs=["year","month","day","hour","minute","second","millisecond"],ys=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],bs=["year","ordinal","hour","minute","second","millisecond"];function _s(t){const e={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"}[t.toLowerCase()];if(!e)throw new ze(t);return e}function xs(t,e){const i=rn(e.zone,pn.defaultZone),n=Sn.fromObject(e),o=pn.now();let s,r;if(ai(t.year))s=o;else{for(const e of vs)ai(t[e])&&(t[e]=ms[e]);const e=Qo(t)||ts(t);if(e)return Ss.invalid(e);const n=i.offset(o);[s,r]=ls(t,n,i)}return new Ss({ts:s,zone:i,loc:n,o:r})}function ws(t,e,i){const n=!!ai(i.round)||i.round,o=(t,o)=>{t=yi(t,n||i.calendary?0:2,!0);return e.loc.clone(i).relFormatter(i).format(t,o)},s=n=>i.calendary?e.hasSame(t,n)?0:e.startOf(n).diff(t.startOf(n),n).get(n):e.diff(t,n).get(n);if(i.unit)return o(s(i.unit),i.unit);for(const t of i.units){const e=s(t);if(Math.abs(e)>=1)return o(e,t)}return o(t>e?-0:0,i.units[i.units.length-1])}function ks(t){let e,i={};return t.length>0&&"object"==typeof t[t.length-1]?(i=t[t.length-1],e=Array.from(t).slice(0,t.length-1)):e=Array.from(t),[i,e]}class Ss{constructor(t){const e=t.zone||pn.defaultZone;let i=t.invalid||(Number.isNaN(t.ts)?new Gi("invalid input"):null)||(e.isValid?null:ns(e));this.ts=ai(t.ts)?pn.now():t.ts;let n=null,o=null;if(!i){if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(e))[n,o]=[t.old.c,t.old.o];else{const t=e.offset(this.ts);n=as(this.ts,t),i=Number.isNaN(n.year)?new Gi("invalid input"):null,n=i?null:n,o=i?null:t}}this._zone=e,this.loc=t.loc||Sn.create(),this.invalid=i,this.weekData=null,this.c=n,this.o=o,this.isLuxonDateTime=!0}static now(){return new Ss({})}static local(){const[t,e]=ks(arguments),[i,n,o,s,r,a,l]=e;return xs({year:i,month:n,day:o,hour:s,minute:r,second:a,millisecond:l},t)}static utc(){const[t,e]=ks(arguments),[i,n,o,s,r,a,l]=e;return t.zone=on.utcInstance,xs({year:i,month:n,day:o,hour:s,minute:r,second:a,millisecond:l},t)}static fromJSDate(t,e={}){const i=function(t){return"[object Date]"===Object.prototype.toString.call(t)}(t)?t.valueOf():NaN;if(Number.isNaN(i))return Ss.invalid("invalid input");const n=rn(e.zone,pn.defaultZone);return n.isValid?new Ss({ts:i,zone:n,loc:Sn.fromObject(e)}):Ss.invalid(ns(n))}static fromMillis(t,e={}){if(li(t))return t<-is||t>is?Ss.invalid("Timestamp out of range"):new Ss({ts:t,zone:rn(e.zone,pn.defaultZone),loc:Sn.fromObject(e)});throw new Pe(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,e={}){if(li(t))return new Ss({ts:1e3*t,zone:rn(e.zone,pn.defaultZone),loc:Sn.fromObject(e)});throw new Pe("fromSeconds requires a numerical input")}static fromObject(t,e={}){t=t||{};const i=rn(e.zone,pn.defaultZone);if(!i.isValid)return Ss.invalid(ns(i));const n=pn.now(),o=ai(e.specificOffset)?i.offset(n):e.specificOffset,s=$i(t,_s),r=!ai(s.ordinal),a=!ai(s.year),l=!ai(s.month)||!ai(s.day),h=a||l,c=s.weekYear||s.weekNumber,d=Sn.fromObject(e);if((h||r)&&c)throw new Oe("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new Oe("Can't mix ordinal dates with month/day");const u=c||s.weekday&&!h;let p,m,f=as(n,o);u?(p=ys,m=fs,f=Ko(f)):r?(p=bs,m=gs,f=Jo(f)):(p=vs,m=ms);let g=!1;for(const t of p){ai(s[t])?s[t]=g?m[t]:f[t]:g=!0}const v=u?function(t){const e=hi(t.weekYear),i=pi(t.weekNumber,1,ki(t.weekYear)),n=pi(t.weekday,1,7);return e?i?!n&&jo("weekday",t.weekday):jo("week",t.week):jo("weekYear",t.weekYear)}(s):r?function(t){const e=hi(t.year),i=pi(t.ordinal,1,_i(t.year));return e?!i&&jo("ordinal",t.ordinal):jo("year",t.year)}(s):Qo(s),y=v||ts(s);if(y)return Ss.invalid(y);const b=u?Yo(s):r?Xo(s):s,[_,x]=ls(b,o,i),w=new Ss({ts:_,zone:i,o:x,loc:d});return s.weekday&&h&&t.weekday!==w.weekday?Ss.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${w.toISO()}`):w}static fromISO(t,e={}){const[i,n]=function(t){return Tn(t,[Qn,no],[to,oo],[eo,so],[io,ro])}(t);return cs(i,n,e,"ISO 8601",t)}static fromRFC2822(t,e={}){const[i,n]=function(t){return Tn(function(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(t),[Hn,Wn])}(t);return cs(i,n,e,"RFC 2822",t)}static fromHTTP(t,e={}){const[i,n]=function(t){return Tn(t,[Gn,Jn],[Kn,Jn],[Yn,Xn])}(t);return cs(i,n,e,"HTTP",e)}static fromFormat(t,e,i={}){if(ai(t)||ai(e))throw new Pe("fromFormat requires an input string and a format");const{locale:n=null,numberingSystem:o=null}=i,s=Sn.fromOpts({locale:n,numberingSystem:o,defaultToEN:!0}),[r,a,l,h]=function(t,e,i){const{result:n,zone:o,specificOffset:s,invalidReason:r}=Fo(t,e,i);return[n,o,s,r]}(s,t,e);return h?Ss.invalid(h):cs(r,a,i,`format ${e}`,t,l)}static fromString(t,e,i={}){return Ss.fromFormat(t,e,i)}static fromSQL(t,e={}){const[i,n]=function(t){return Tn(t,[lo,no],[ho,co])}(t);return cs(i,n,e,"SQL",t)}static invalid(t,e=null){if(!t)throw new Pe("need to specify a reason the DateTime is invalid");const i=t instanceof Gi?t:new Gi(t,e);if(pn.throwOnInvalid)throw new Le(i);return new Ss({invalid:i})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}get(t){return this[t]}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?os(this).weekYear:NaN}get weekNumber(){return this.isValid?os(this).weekNumber:NaN}get weekday(){return this.isValid?os(this).weekday:NaN}get ordinal(){return this.isValid?Jo(this.c).ordinal:NaN}get monthShort(){return this.isValid?So.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?So.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?So.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?So.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)}get isInLeapYear(){return bi(this.year)}get daysInMonth(){return xi(this.year,this.month)}get daysInYear(){return this.isValid?_i(this.year):NaN}get weeksInWeekYear(){return this.isValid?ki(this.weekYear):NaN}resolvedLocaleOptions(t={}){const{locale:e,numberingSystem:i,calendar:n}=Wi.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:e,numberingSystem:i,outputCalendar:n}}toUTC(t=0,e={}){return this.setZone(on.instance(t),e)}toLocal(){return this.setZone(pn.defaultZone)}setZone(t,{keepLocalTime:e=!1,keepCalendarTime:i=!1}={}){if((t=rn(t,pn.defaultZone)).equals(this.zone))return this;if(t.isValid){let n=this.ts;if(e||i){const e=t.offset(this.ts),i=this.toObject();[n]=ls(i,e,t)}return ss(this,{ts:n,zone:t})}return Ss.invalid(ns(t))}reconfigure({locale:t,numberingSystem:e,outputCalendar:i}={}){return ss(this,{loc:this.loc.clone({locale:t,numberingSystem:e,outputCalendar:i})})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const e=$i(t,_s),i=!ai(e.weekYear)||!ai(e.weekNumber)||!ai(e.weekday),n=!ai(e.ordinal),o=!ai(e.year),s=!ai(e.month)||!ai(e.day),r=o||s,a=e.weekYear||e.weekNumber;if((r||n)&&a)throw new Oe("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&n)throw new Oe("Can't mix ordinal dates with month/day");let l;i?l=Yo({...Ko(this.c),...e}):ai(e.ordinal)?(l={...this.toObject(),...e},ai(e.day)&&(l.day=Math.min(xi(l.year,l.month),l.day))):l=Xo({...Jo(this.c),...e});const[h,c]=ls(l,this.o,this.zone);return ss(this,{ts:h,o:c})}plus(t){if(!this.isValid)return this;return ss(this,hs(this,xo.fromDurationLike(t)))}minus(t){if(!this.isValid)return this;return ss(this,hs(this,xo.fromDurationLike(t).negate()))}startOf(t){if(!this.isValid)return this;const e={},i=xo.normalizeUnit(t);switch(i){case"years":e.month=1;case"quarters":case"months":e.day=1;case"weeks":case"days":e.hour=0;case"hours":e.minute=0;case"minutes":e.second=0;case"seconds":e.millisecond=0}if("weeks"===i&&(e.weekday=1),"quarters"===i){const t=Math.ceil(this.month/3);e.month=3*(t-1)+1}return this.set(e)}endOf(t){return this.isValid?this.plus({[t]:1}).startOf(t).minus(1):this}toFormat(t,e={}){return this.isValid?Wi.create(this.loc.redefaultToEN(e)).formatDateTimeFromString(this,t):es}toLocaleString(t=Be,e={}){return this.isValid?Wi.create(this.loc.clone(e),t).formatDateTime(this):es}toLocaleParts(t={}){return this.isValid?Wi.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:e=!1,suppressMilliseconds:i=!1,includeOffset:n=!0,extendedZone:o=!1}={}){if(!this.isValid)return null;const s="extended"===t;let r=us(this,s);return r+="T",r+=ps(this,s,e,i,n,o),r}toISODate({format:t="extended"}={}){return this.isValid?us(this,"extended"===t):null}toISOWeekDate(){return ds(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:e=!1,includeOffset:i=!0,includePrefix:n=!1,extendedZone:o=!1,format:s="extended"}={}){if(!this.isValid)return null;return(n?"T":"")+ps(this,"extended"===s,e,t,i,o)}toRFC2822(){return ds(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return ds(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?us(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:e=!1,includeOffsetSpace:i=!0}={}){let n="HH:mm:ss.SSS";return(e||t)&&(i&&(n+=" "),e?n+="z":t&&(n+="ZZ")),ds(this,n,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():es}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(t={}){if(!this.isValid)return{};const e={...this.c};return t.includeConfig&&(e.outputCalendar=this.outputCalendar,e.numberingSystem=this.loc.numberingSystem,e.locale=this.loc.locale),e}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,e="milliseconds",i={}){if(!this.isValid||!t.isValid)return xo.invalid("created by diffing an invalid DateTime");const n={locale:this.locale,numberingSystem:this.numberingSystem,...i},o=(a=e,Array.isArray(a)?a:[a]).map(xo.normalizeUnit),s=t.valueOf()>this.valueOf(),r=Eo(s?this:t,s?t:this,o,n);var a;return s?r.negate():r}diffNow(t="milliseconds",e={}){return this.diff(Ss.now(),t,e)}until(t){return this.isValid?ko.fromDateTimes(this,t):this}hasSame(t,e){if(!this.isValid)return!1;const i=t.valueOf(),n=this.setZone(t.zone,{keepLocalTime:!0});return n.startOf(e)<=i&&i<=n.endOf(e)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const e=t.base||Ss.fromObject({},{zone:this.zone}),i=t.padding?this<e?-t.padding:t.padding:0;let n=["years","months","days","hours","minutes","seconds"],o=t.unit;return Array.isArray(t.unit)&&(n=t.unit,o=void 0),ws(e,this.plus(i),{...t,numeric:"always",units:n,unit:o})}toRelativeCalendar(t={}){return this.isValid?ws(t.base||Ss.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(Ss.isDateTime))throw new Pe("min requires all arguments be DateTimes");return di(t,(t=>t.valueOf()),Math.min)}static max(...t){if(!t.every(Ss.isDateTime))throw new Pe("max requires all arguments be DateTimes");return di(t,(t=>t.valueOf()),Math.max)}static fromFormatExplain(t,e,i={}){const{locale:n=null,numberingSystem:o=null}=i;return Fo(Sn.fromOpts({locale:n,numberingSystem:o,defaultToEN:!0}),t,e)}static fromStringExplain(t,e,i={}){return Ss.fromFormatExplain(t,e,i)}static get DATE_SHORT(){return Be}static get DATE_MED(){return qe}static get DATE_MED_WITH_WEEKDAY(){return Ze}static get DATE_FULL(){return Fe}static get DATE_HUGE(){return Ve}static get TIME_SIMPLE(){return Ue}static get TIME_WITH_SECONDS(){return je}static get TIME_WITH_SHORT_OFFSET(){return He}static get TIME_WITH_LONG_OFFSET(){return We}static get TIME_24_SIMPLE(){return Ge}static get TIME_24_WITH_SECONDS(){return Ke}static get TIME_24_WITH_SHORT_OFFSET(){return Ye}static get TIME_24_WITH_LONG_OFFSET(){return Je}static get DATETIME_SHORT(){return Xe}static get DATETIME_SHORT_WITH_SECONDS(){return Qe}static get DATETIME_MED(){return ti}static get DATETIME_MED_WITH_SECONDS(){return ei}static get DATETIME_MED_WITH_WEEKDAY(){return ii}static get DATETIME_FULL(){return ni}static get DATETIME_FULL_WITH_SECONDS(){return oi}static get DATETIME_HUGE(){return si}static get DATETIME_HUGE_WITH_SECONDS(){return ri}}function Cs(t){if(Ss.isDateTime(t))return t;if(t&&t.valueOf&&li(t.valueOf()))return Ss.fromJSDate(t);if(t&&"object"==typeof t)return Ss.fromObject(t);throw new Pe(`Unknown datetime argument: ${t}, of type ${typeof t}`)}class Es extends nt{constructor(){super(...arguments),this.ttl=6e4,this.max=20,this.keyedAssets={},this.locale=[...navigator.languages],this.fields={},this.groups={},this.languages={},this.featuredFields=[],this.pendingResolves={},this.fetching={}}getLocale(){return this.locale[0]}reset(){this.cache=Te(this.max,this.ttl);const t=[];this.completionEndpoint&&t.push(ee(this.completionEndpoint).then((t=>{this.schema=t.json.context,this.fnOptions=t.json.functions}))),this.fieldsEndpoint&&t.push(this.refreshFields()),this.globalsEndpoint&&t.push(re(this.globalsEndpoint).then((t=>{this.keyedAssets.globals=t.map((t=>t.key))}))),this.languagesEndpoint&&t.push(re(this.languagesEndpoint).then((t=>{this.languages=t.reduce((function(t,e){return t[e.value]=e.name,t}),{})}))),this.groupsEndpoint&&t.push(re(this.groupsEndpoint).then((t=>{t.forEach((t=>{this.groups[t.uuid]=t}))}))),this.workspaceEndpoint&&t.push(ee(this.workspaceEndpoint).then((t=>{this.workspace=t.json;const e=t.headers.get("content-language");e&&(this.locale=[e,...this.locale])}))),this.httpComplete=Promise.all(t)}firstUpdated(){this.reset()}getLanguageCode(){return this.locale.length>0?this.locale[0].split("-")[0]:"en"}refreshFields(){return re(this.fieldsEndpoint).then((t=>{this.keyedAssets.fields=[],this.featuredFields=[],t.forEach((t=>{this.keyedAssets.fields.push(t.key),this.fields[t.key]=t,t.featured&&this.featuredFields.push(t)})),this.featuredFields.sort(((t,e)=>e.priority-t.priority)),this.keyedAssets.fields.sort(),this.fireCustomEvent(_t.StoreUpdated,{url:this.fieldsEndpoint,data:this.keyedAssets.fields})}))}getShortDuration(t,e=null){const i=e||Ss.now();return t.setLocale(this.locale[0]).toRelative({base:i,style:"long"})}getShortDurationFromIso(t,e=null){const i=Ss.fromISO(t),n=e?Ss.fromISO(e):Ss.now();return this.getShortDuration(i,n)}setKeyedAssets(t,e){this.keyedAssets[t]=e}updated(t){super.updated(t)}getCompletionSchema(){return this.schema}getFunctions(){return this.fnOptions}getKeyedAssets(){return this.keyedAssets}getFieldKeys(){return this.keyedAssets.fields||[]}getContactField(t){return this.fields[t]}getFeaturedFields(){return this.featuredFields}getLanguageName(t){return this.languages[t]}isDynamicGroup(t){const e=this.groups[t];return!(e&&!e.query)}getWorkspace(){return this.workspace}formatDate(t){return Ss.fromISO(t).setLocale(this.getLocale()).toLocaleString(Ss.DATETIME_SHORT)}postJSON(t,e=""){return le(t,e)}postForm(t,e){return((t,e)=>{const i=new FormData;return Object.keys(e).forEach((t=>{i.append(t,e[t])})),he(t,i)})(t,e)}postUrl(t,e="",i={},n=null){return ae(t,e,i,n)}getUrl(t,e){return!(e=e||{}).force&&this.cache.has(t)?new Promise((e=>{e(this.cache.get(t))})):ee(t,e.controller,e.headers||{}).then((e=>new Promise(((i,n)=>{e.status>=200&&e.status<=300?(this.cache.set(t,e),i(e)):n("Status: "+e.status)}))))}getResults(t,e){e=e||{};const i="results_"+t,n=this.cache.get(i);return!e.force&&n?new Promise((t=>{t(n)})):new Promise((e=>{const n=this.pendingResolves[t]||[];n.push(e),this.pendingResolves[t]=n,n.length<=1&&oe(t).then((e=>{this.cache.set(i,e);const n=this.pendingResolves[t]||[];for(;n.length>0;){n.pop()(e)}}))}))}updateCache(t,e){this.cache.set(t,e),this.fireCustomEvent(_t.StoreUpdated,{url:t,data:e})}makeRequest(t,e){const i=this.fetching[t],n=(new Date).getTime();if(i&&n-i<500)return;this.fetching[t]=n,e=e||{};const o=this.cache.get(t);o&&!e.force?this.fireCustomEvent(_t.StoreUpdated,{url:t,data:o}):oe(t).then((i=>{i=e.prepareData?e.prepareData(i):i,this.cache.set(t,i),this.fireCustomEvent(_t.StoreUpdated,{url:t,data:i}),delete this.fetching[t]}))}}t([st({type:Number})],Es.prototype,"ttl",void 0),t([st({type:Number})],Es.prototype,"max",void 0),t([st({type:String,attribute:"completion"})],Es.prototype,"completionEndpoint",void 0),t([st({type:String,attribute:"fields"})],Es.prototype,"fieldsEndpoint",void 0),t([st({type:String,attribute:"groups"})],Es.prototype,"groupsEndpoint",void 0),t([st({type:String,attribute:"globals"})],Es.prototype,"globalsEndpoint",void 0),t([st({type:String,attribute:"languages"})],Es.prototype,"languagesEndpoint",void 0),t([st({type:String,attribute:"workspace"})],Es.prototype,"workspaceEndpoint",void 0),t([st({type:Object,attribute:!1})],Es.prototype,"schema",void 0),t([st({type:Object,attribute:!1})],Es.prototype,"fnOptions",void 0),t([st({type:Object,attribute:!1})],Es.prototype,"keyedAssets",void 0);class Ts extends nt{constructor(){super(...arguments),this.marginHorizontal=0,this.marginVertical=7,this.scrollPct=75,this.cursorIndex=-1,this.nameKey="name",this.loading=!1,this.hideShadow=!1,this.getName=function(t){return t[this.nameKey||"name"]},this.renderInputOption=function(){return null},this.scrollHeight=0,this.triggerScroll=!1,this.scrollParent=null,this.setCursor=ve((function(t){t!==this.cursorIndex&&(this.cursorIndex=t)}),50)}static get styles(){return r`
466
+ ></temba-button>`}}t([st({type:Boolean})],wt.prototype,"chatbox",void 0),t([st({type:Boolean})],wt.prototype,"attachments",void 0),t([st({type:Boolean})],wt.prototype,"counter",void 0),t([st({type:Boolean})],wt.prototype,"pendingDrop",void 0),t([st({type:Boolean})],wt.prototype,"button",void 0),t([st({type:String,attribute:!1})],wt.prototype,"currentChat",void 0),t([st({type:String})],wt.prototype,"accept",void 0),t([st({type:String,attribute:!1})],wt.prototype,"endpoint",void 0),t([st({type:Boolean,attribute:!1})],wt.prototype,"uploading",void 0),t([st({type:Array,attribute:!1})],wt.prototype,"errorValues",void 0),t([st({type:String})],wt.prototype,"buttonName",void 0),t([st({type:Boolean,attribute:!1})],wt.prototype,"buttonDisabled",void 0),t([st({type:String,attribute:!1})],wt.prototype,"buttonError",void 0);var kt,St,Ct,Et,Tt,$t,Lt,At,Mt,Ot,zt,Pt,It,Dt,Nt,Rt,Bt,qt,Zt=function(t,e,i){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,i),i},Ft=function(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)};const Vt=function(t){var e=0;t+="x";var i=Math.floor(65745979961613.07);for(let n=0;n<t.length;n++)e>i&&(e=Math.floor(e/137)),e=131*e+t.charCodeAt(n);return e},Ut="0123456789abcdef".split(""),jt=[-2147483648,8388608,32768,128],Ht=[24,16,8,0],Wt=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Gt=[];class Kt{constructor(t=!1,e=!1){kt.set(this,void 0),St.set(this,void 0),Ct.set(this,void 0),Et.set(this,void 0),Tt.set(this,void 0),$t.set(this,void 0),Lt.set(this,void 0),At.set(this,void 0),Mt.set(this,void 0),Ot.set(this,void 0),zt.set(this,void 0),Pt.set(this,void 0),It.set(this,void 0),Dt.set(this,void 0),Nt.set(this,void 0),Rt.set(this,void 0),Bt.set(this,0),qt.set(this,void 0),this.init(t,e)}init(t,e){e?(Gt[0]=Gt[16]=Gt[1]=Gt[2]=Gt[3]=Gt[4]=Gt[5]=Gt[6]=Gt[7]=Gt[8]=Gt[9]=Gt[10]=Gt[11]=Gt[12]=Gt[13]=Gt[14]=Gt[15]=0,Zt(this,St,Gt)):Zt(this,St,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),t?(Zt(this,$t,3238371032),Zt(this,Lt,914150663),Zt(this,At,812702999),Zt(this,Mt,4144912697),Zt(this,Ot,4290775857),Zt(this,zt,1750603025),Zt(this,Pt,1694076839),Zt(this,It,3204075428)):(Zt(this,$t,1779033703),Zt(this,Lt,3144134277),Zt(this,At,1013904242),Zt(this,Mt,2773480762),Zt(this,Ot,1359893119),Zt(this,zt,2600822924),Zt(this,Pt,528734635),Zt(this,It,1541459225)),Zt(this,kt,Zt(this,qt,Zt(this,Ct,Zt(this,Nt,0)))),Zt(this,Et,Zt(this,Dt,!1)),Zt(this,Tt,!0),Zt(this,Rt,t)}update(t){if(Ft(this,Et))return this;let e;e=t instanceof ArrayBuffer?new Uint8Array(t):t;let i=0;const n=e.length,o=Ft(this,St);for(;i<n;){let t;if(Ft(this,Dt)&&(Zt(this,Dt,!1),o[0]=Ft(this,kt),o[16]=o[1]=o[2]=o[3]=o[4]=o[5]=o[6]=o[7]=o[8]=o[9]=o[10]=o[11]=o[12]=o[13]=o[14]=o[15]=0),"string"!=typeof e)for(t=Ft(this,qt);i<n&&t<64;++i)o[t>>2]|=e[i]<<Ht[3&t++];else for(t=Ft(this,qt);i<n&&t<64;++i){let n=e.charCodeAt(i);n<128?o[t>>2]|=n<<Ht[3&t++]:n<2048?(o[t>>2]|=(192|n>>6)<<Ht[3&t++],o[t>>2]|=(128|63&n)<<Ht[3&t++]):n<55296||n>=57344?(o[t>>2]|=(224|n>>12)<<Ht[3&t++],o[t>>2]|=(128|n>>6&63)<<Ht[3&t++],o[t>>2]|=(128|63&n)<<Ht[3&t++]):(n=65536+((1023&n)<<10|1023&e.charCodeAt(++i)),o[t>>2]|=(240|n>>18)<<Ht[3&t++],o[t>>2]|=(128|n>>12&63)<<Ht[3&t++],o[t>>2]|=(128|n>>6&63)<<Ht[3&t++],o[t>>2]|=(128|63&n)<<Ht[3&t++])}Zt(this,Bt,t),Zt(this,Ct,Ft(this,Ct)+(t-Ft(this,qt))),t>=64?(Zt(this,kt,o[16]),Zt(this,qt,t-64),this.hash(),Zt(this,Dt,!0)):Zt(this,qt,t)}return Ft(this,Ct)>4294967295&&(Zt(this,Nt,Ft(this,Nt)+(Ft(this,Ct)/4294967296<<0)),Zt(this,Ct,Ft(this,Ct)%4294967296)),this}finalize(){if(Ft(this,Et))return;Zt(this,Et,!0);const t=Ft(this,St),e=Ft(this,Bt);t[16]=Ft(this,kt),t[e>>2]|=jt[3&e],Zt(this,kt,t[16]),e>=56&&(Ft(this,Dt)||this.hash(),t[0]=Ft(this,kt),t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=Ft(this,Nt)<<3|Ft(this,Ct)>>>29,t[15]=Ft(this,Ct)<<3,this.hash()}hash(){let t=Ft(this,$t),e=Ft(this,Lt),i=Ft(this,At),n=Ft(this,Mt),o=Ft(this,Ot),s=Ft(this,zt),r=Ft(this,Pt),a=Ft(this,It);const l=Ft(this,St);let h,c,d,u,p,m,f,g,v,y;for(let t=16;t<64;++t)u=l[t-15],h=(u>>>7|u<<25)^(u>>>18|u<<14)^u>>>3,u=l[t-2],c=(u>>>17|u<<15)^(u>>>19|u<<13)^u>>>10,l[t]=l[t-16]+h+l[t-7]+c<<0;y=e&i;for(let b=0;b<64;b+=4)Ft(this,Tt)?(Ft(this,Rt)?(f=300032,u=l[0]-1413257819,a=u-150054599<<0,n=u+24177077<<0):(f=704751109,u=l[0]-210244248,a=u-1521486534<<0,n=u+143694565<<0),Zt(this,Tt,!1)):(h=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),c=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),f=t&e,d=f^t&i^y,m=o&s^~o&r,u=a+c+m+Wt[b]+l[b],p=h+d,a=n+u<<0,n=u+p<<0),h=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),c=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),g=n&t,d=g^n&e^f,m=a&o^~a&s,u=r+c+m+Wt[b+1]+l[b+1],p=h+d,r=i+u<<0,i=u+p<<0,h=(i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10),c=(r>>>6|r<<26)^(r>>>11|r<<21)^(r>>>25|r<<7),v=i&n,d=v^i&t^g,m=r&a^~r&o,u=s+c+m+Wt[b+2]+l[b+2],p=h+d,s=e+u<<0,e=u+p<<0,h=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),c=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),y=e&i,d=y^e&n^v,m=s&r^~s&a,u=o+c+m+Wt[b+3]+l[b+3],p=h+d,o=t+u<<0,t=u+p<<0;Zt(this,$t,Ft(this,$t)+t<<0),Zt(this,Lt,Ft(this,Lt)+e<<0),Zt(this,At,Ft(this,At)+i<<0),Zt(this,Mt,Ft(this,Mt)+n<<0),Zt(this,Ot,Ft(this,Ot)+o<<0),Zt(this,zt,Ft(this,zt)+s<<0),Zt(this,Pt,Ft(this,Pt)+r<<0),Zt(this,It,Ft(this,It)+a<<0)}hex(){this.finalize();const t=Ft(this,$t),e=Ft(this,Lt),i=Ft(this,At),n=Ft(this,Mt),o=Ft(this,Ot),s=Ft(this,zt),r=Ft(this,Pt),a=Ft(this,It);let l=Ut[t>>28&15]+Ut[t>>24&15]+Ut[t>>20&15]+Ut[t>>16&15]+Ut[t>>12&15]+Ut[t>>8&15]+Ut[t>>4&15]+Ut[15&t]+Ut[e>>28&15]+Ut[e>>24&15]+Ut[e>>20&15]+Ut[e>>16&15]+Ut[e>>12&15]+Ut[e>>8&15]+Ut[e>>4&15]+Ut[15&e]+Ut[i>>28&15]+Ut[i>>24&15]+Ut[i>>20&15]+Ut[i>>16&15]+Ut[i>>12&15]+Ut[i>>8&15]+Ut[i>>4&15]+Ut[15&i]+Ut[n>>28&15]+Ut[n>>24&15]+Ut[n>>20&15]+Ut[n>>16&15]+Ut[n>>12&15]+Ut[n>>8&15]+Ut[n>>4&15]+Ut[15&n]+Ut[o>>28&15]+Ut[o>>24&15]+Ut[o>>20&15]+Ut[o>>16&15]+Ut[o>>12&15]+Ut[o>>8&15]+Ut[o>>4&15]+Ut[15&o]+Ut[s>>28&15]+Ut[s>>24&15]+Ut[s>>20&15]+Ut[s>>16&15]+Ut[s>>12&15]+Ut[s>>8&15]+Ut[s>>4&15]+Ut[15&s]+Ut[r>>28&15]+Ut[r>>24&15]+Ut[r>>20&15]+Ut[r>>16&15]+Ut[r>>12&15]+Ut[r>>8&15]+Ut[r>>4&15]+Ut[15&r];return Ft(this,Rt)||(l+=Ut[a>>28&15]+Ut[a>>24&15]+Ut[a>>20&15]+Ut[a>>16&15]+Ut[a>>12&15]+Ut[a>>8&15]+Ut[a>>4&15]+Ut[15&a]),l}toString(){return this.hex()}digest(){this.finalize();const t=Ft(this,$t),e=Ft(this,Lt),i=Ft(this,At),n=Ft(this,Mt),o=Ft(this,Ot),s=Ft(this,zt),r=Ft(this,Pt),a=Ft(this,It),l=[t>>24&255,t>>16&255,t>>8&255,255&t,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24&255,i>>16&255,i>>8&255,255&i,n>>24&255,n>>16&255,n>>8&255,255&n,o>>24&255,o>>16&255,o>>8&255,255&o,s>>24&255,s>>16&255,s>>8&255,255&s,r>>24&255,r>>16&255,r>>8&255,255&r];return Ft(this,Rt)||l.push(a>>24&255,a>>16&255,a>>8&255,255&a),l}array(){return this.digest()}arrayBuffer(){this.finalize();const t=new ArrayBuffer(Ft(this,Rt)?28:32),e=new DataView(t);return e.setUint32(0,Ft(this,$t)),e.setUint32(4,Ft(this,Lt)),e.setUint32(8,Ft(this,At)),e.setUint32(12,Ft(this,Mt)),e.setUint32(16,Ft(this,Ot)),e.setUint32(20,Ft(this,zt)),e.setUint32(24,Ft(this,Pt)),Ft(this,Rt)||e.setUint32(28,Ft(this,It)),t}}function Yt(t){const e=new Kt;return e.update(t),parseInt(e.hex().substring(0,8),16)}kt=new WeakMap,St=new WeakMap,Ct=new WeakMap,Et=new WeakMap,Tt=new WeakMap,$t=new WeakMap,Lt=new WeakMap,At=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,zt=new WeakMap,Pt=new WeakMap,It=new WeakMap,Dt=new WeakMap,Nt=new WeakMap,Rt=new WeakMap,Bt=new WeakMap,qt=new WeakMap;const Jt=function(t,e,i){var n=i<.5?i*(1+e):i+e-i*e,o=2*i-n;return[(t/=360)+1/3,t,t-1/3].map((function(t){return t<0&&t++,t>1&&t--,t=t<1/6?o+6*(n-o)*t:t<.5?n:t<2/3?o+6*(n-o)*(2/3-t):o,Math.round(255*t)}))};const Xt=new class{constructor(t={}){const[e,i]=[t.lightness,t.saturation].map((function(t){return t=void 0!==t?t:[.35,.5,.65],Array.isArray(t)?t.concat():[t]}));this.L=e,this.S=i,"number"==typeof t.hue&&(t.hue={min:t.hue,max:t.hue}),"object"!=typeof t.hue||Array.isArray(t.hue)||(t.hue=[t.hue]),void 0===t.hue&&(t.hue=[]),this.hueRanges=t.hue.map((function(t){return{min:void 0===t.min?0:t.min,max:void 0===t.max?360:t.max}})),this.hash=Yt,"function"==typeof t.hash&&(this.hash=t.hash),"bkdr"===t.hash&&(this.hash=Vt)}hsl(t){var e,i,n=this.hash(t);if(this.hueRanges.length){const t=this.hueRanges[n%this.hueRanges.length];e=n/this.hueRanges.length%727*(t.max-t.min)/727+t.min}else e=n%359;return n=Math.ceil(n/360),i=this.S[n%this.S.length],n=Math.ceil(n/this.S.length),[e,i,this.L[n%this.L.length]]}rgb(t){var e=this.hsl(t);return Jt.apply(this,e)}hex(t){var e,i=this.rgb(t);return e="#",i.forEach((function(t){t<16&&(e+=0),e+=t.toString(16)})),e}},Qt=/(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/,te=(t={})=>{const e=(t=>{for(const e of document.cookie.split(";")){const i=e.indexOf("=");let n=e.substr(0,i),o=e.substr(i+1);if(n=n.trim(),o=o.trim(),n===t)return o}return null})("csrftoken"),i=e?{"X-CSRFToken":e}:{};return i["X-Requested-With"]="XMLHttpRequest",Object.keys(t).forEach((e=>{i[e]=t[e]})),i},ee=(t,e=null,i={})=>new Promise(((n,o)=>{const s={method:"GET",headers:te(i)};e&&(s.signal=e.signal),fetch(t,s).then((t=>{t.text().then((i=>{let o={};try{o=JSON.parse(i)}catch(t){}n({controller:e,body:i,json:o,headers:t.headers,status:t.status})}))})).catch((t=>{o(t)}))})),ie=t=>{const e=[];Object.keys(t).forEach((i=>{t[i]&&e.push(i)}));let i=e.join(" ");return i.trim().length>0&&(i=" "+i),i.trim()},ne=(t,e=null)=>new Promise(((i,n)=>{ee(t,e).then((t=>{i({results:t.json.results,next:t.json.next})})).catch((t=>n(t)))})),oe=async t=>{if(!t)return new Promise((t=>t([])));let e=[],i=t;for(;i;){const t=await ne(i);t.results&&(e=e.concat(t.results)),i=t.next}return e},se=t=>new Promise(((e,i)=>{ee(t).then((t=>{e({assets:t.json.results,next:t.json.next})})).catch((t=>i(t)))})),re=async t=>{if(!t)return new Promise((t=>t([])));let e=[],i=t;for(;i;){const t=await se(i);e=e.concat(t.assets),i=t.next}return e},ae=(t,e,i={},n=null)=>{const o=te(i);n&&(o["Content-Type"]=n);const s={method:"POST",headers:o,body:e};return new Promise(((e,i)=>{fetch(t,s).then((async t=>{t.text().then((i=>{let n={};try{n=JSON.parse(i)}catch(t){}e({body:i,json:n,headers:t.headers,status:t.status,redirected:t.redirected,url:t.url})}))})).catch((t=>{i(t)}))}))},le=(t,e)=>ae(t,JSON.stringify(e),!1,"application/json"),he=(t,e)=>new Promise(((i,n)=>{ae(t,e,!0).then((e=>{e.status>=200&&e.status<300?i(e):n(t===xt?e:"Server failure")})).catch((t=>{console.error(t),n(t)}))})),ce=t=>{const e=t.parentNode||t.host;if(e){const t=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY,i=t&&!(t.includes("hidden")||t.includes("visible"));return e?i&&e.scrollHeight>=e.clientHeight?e:ce(e):null}return null},de=3600,ue=86400,pe=30*ue;const me=new class{getCurrentDate(){return new Date}},fe=(t,e={suffix:""})=>{const{compareDate:i,hideRecentText:n,suffix:o}=e,s=i||me.getCurrentDate(),r=Math.floor((s.getTime()-t.getTime())/1e3);if(r<60)return i?r+"s"+o:!n&&o?o:"just now";if(r<de)return Math.round(r/60)+"m"+o;if(r<=ue)return Math.round(r/de)+"h"+o;if(r<=pe)return Math.round(r/ue)+"d"+o;if(r<6*pe)return Math.round(r/pe)+"mth"+o;return t.getDate()+" "+t.toDateString().match(/ [a-zA-Z]*/)[0].replace(" ","")+(t.getFullYear()==s.getFullYear()?"":" "+t.getFullYear())},ge=(t,e,i=!1)=>{let n;return function(...o){const s=this,r=i&&!n;clearTimeout(n),n=setTimeout((function(){n=null,i||t.apply(s,o)}),e),r&&t.apply(s,o)}},ve=(t,e)=>{let i=!0;return function(...n){i&&(i=!1,t.apply(this,n),setTimeout((()=>{i=!0}),e))}},ye=(t,e)=>t.length>e?t.substring(0,e)+"...":t,be=(t,e="and")=>1===t.length?t[0]:2===t.length?"html"===t[0].type?D`${t[0]} ${e} ${t[1]}`:t.join(" "+e+" "):"html"===t[0].type?t.map(((i,n)=>n<t.length-1?D`${i}, `:D`${e} ${i}`)):t.join(", ")+e+t[t.length-1],_e=(t,e,i="and")=>be(t.map(e),i),xe=t=>"true"===((t=>{let e=null;if(document.cookie&&""!=document.cookie){const i=document.cookie.split(";");for(let n=0;n<i.length;n++){const o=i[n].trim();if(o.substring(0,t.length+1)==t+"="){e=decodeURIComponent(o.substring(t.length+1));break}}}return e})(t)||"");var we;!function(t){t.MENU_COLLAPSED="menu-collapsed",t.TICKET_SHOW_DETAILS="tickets.show-details"}(we||(we={}));const ke=t=>t.split("/")[1],Se=(t,e)=>{if(0==t)return"0 KB";const i=e||2,n=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,n)).toFixed(i))+" "+["B","KB","MB","GB"][n]},Ce=t=>{if(t.position||(t.position="right"),t.image)return D`<img src="${t.image}">`;let e=t.name;if(t.user&&(e=`${t.user.first_name} ${t.user.last_name}`),!e)return null;const i=Xt.hex(e);let n=e.indexOf(" ")+1;n<1&&(n=e.length>1?1:0);let o=e.substring(0,1)+e.substring(n,n+1);return o=o.toUpperCase(),D` <temba-tip text="${e}" position="${t.position}"> <div style="border:0 solid red;display:flex;flex-direction:column;align-items:center"> <div class="avatar-circle" style="display:flex;height:2em;width:2em;flex-direction:row;align-items:center;color:#fff;border-radius:100%;font-weight:400;border:.3em solid rgba(0,0,0,.05);background:${i}"> <div style="border:0 solid red;display:flex;flex-direction:column;align-items:center;flex-grow:1"> <div style="border:0 solid #00f">${o}</div> </div> </div> </div> </temba-tip> `};class Ee{constructor(t=0,e=0){this.first=null,this.items=Object.create(null),this.last=null,this.max=t,this.size=0,this.ttl=e}has(t){return t in this.items}clear(){return this.first=null,this.items=Object.create(null),this.last=null,this.size=0,this}delete(t){if(this.has(t)){const e=this.items[t];delete this.items[t],this.size--,null!==e.prev&&(e.prev.next=e.next),null!==e.next&&(e.next.prev=e.prev),this.first===e&&(this.first=e.next),this.last===e&&(this.last=e.prev)}return this}evict(t=!1){if(t||this.size>0){const t=this.first;delete this.items[t.key],this.size--,0===this.size?(this.first=null,this.last=null):(this.first=t.next,this.first.prev=null)}return this}get(t){let e;if(this.has(t)){const i=this.items[t];this.ttl>0&&i.expiry<=(new Date).getTime()?this.delete(t):(e=i.value,this.set(t,e,!0))}return e}keys(){return Object.keys(this.items)}set(t,e,i=!1){let n;if(i||this.has(t)){if(n=this.items[t],n.value=e,this.last!==n){const t=this.last,e=n.next,i=n.prev;this.first===n&&(this.first=n.next),n.next=null,n.prev=this.last,t.next=n,null!==i&&(i.next=e),null!==e&&(e.prev=i)}}else this.max>0&&this.size===this.max&&this.evict(!0),n=this.items[t]={expiry:this.ttl>0?(new Date).getTime()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:e},1==++this.size?this.first=n:this.last.next=n;return this.last=n,this}}function Te(t=1e3,e=0){if(isNaN(t)||t<0)throw new TypeError("Invalid max value");if(isNaN(e)||e<0)throw new TypeError("Invalid ttl value");return new Ee(t,e)}class $e extends Error{}class Le extends $e{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class Ae extends $e{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class Me extends $e{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Oe extends $e{}class ze extends $e{constructor(t){super(`Invalid unit ${t}`)}}class Pe extends $e{}class Ie extends $e{constructor(){super("Zone is an abstract class")}}const De="numeric",Ne="short",Re="long",Be={year:De,month:De,day:De},qe={year:De,month:Ne,day:De},Ze={year:De,month:Ne,day:De,weekday:Ne},Fe={year:De,month:Re,day:De},Ve={year:De,month:Re,day:De,weekday:Re},Ue={hour:De,minute:De},je={hour:De,minute:De,second:De},He={hour:De,minute:De,second:De,timeZoneName:Ne},We={hour:De,minute:De,second:De,timeZoneName:Re},Ge={hour:De,minute:De,hourCycle:"h23"},Ke={hour:De,minute:De,second:De,hourCycle:"h23"},Ye={hour:De,minute:De,second:De,hourCycle:"h23",timeZoneName:Ne},Je={hour:De,minute:De,second:De,hourCycle:"h23",timeZoneName:Re},Xe={year:De,month:De,day:De,hour:De,minute:De},Qe={year:De,month:De,day:De,hour:De,minute:De,second:De},ti={year:De,month:Ne,day:De,hour:De,minute:De},ei={year:De,month:Ne,day:De,hour:De,minute:De,second:De},ii={year:De,month:Ne,day:De,weekday:Ne,hour:De,minute:De},ni={year:De,month:Re,day:De,hour:De,minute:De,timeZoneName:Ne},oi={year:De,month:Re,day:De,hour:De,minute:De,second:De,timeZoneName:Ne},si={year:De,month:Re,day:De,weekday:Re,hour:De,minute:De,timeZoneName:Re},ri={year:De,month:Re,day:De,weekday:Re,hour:De,minute:De,second:De,timeZoneName:Re};function ai(t){return void 0===t}function li(t){return"number"==typeof t}function hi(t){return"number"==typeof t&&t%1==0}function ci(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(t){return!1}}function di(t,e,i){if(0!==t.length)return t.reduce(((t,n)=>{const o=[e(n),n];return t&&i(t[0],o[0])===t[0]?t:o}),null)[1]}function ui(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function pi(t,e,i){return hi(t)&&t>=e&&t<=i}function mi(t,e=2){let i;return i=t<0?"-"+(""+-t).padStart(e,"0"):(""+t).padStart(e,"0"),i}function fi(t){return ai(t)||null===t||""===t?void 0:parseInt(t,10)}function gi(t){return ai(t)||null===t||""===t?void 0:parseFloat(t)}function vi(t){if(!ai(t)&&null!==t&&""!==t){const e=1e3*parseFloat("0."+t);return Math.floor(e)}}function yi(t,e,i=!1){const n=10**e;return(i?Math.trunc:Math.round)(t*n)/n}function bi(t){return t%4==0&&(t%100!=0||t%400==0)}function _i(t){return bi(t)?366:365}function xi(t,e){const i=function(t,e){return t-e*Math.floor(t/e)}(e-1,12)+1;return 2===i?bi(t+(e-i)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][i-1]}function wi(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function ki(t){const e=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,i=t-1,n=(i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400))%7;return 4===e||3===n?53:52}function Si(t){return t>99?t:t>60?1900+t:2e3+t}function Ci(t,e,i,n=null){const o=new Date(t),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(s.timeZone=n);const r={timeZoneName:e,...s},a=new Intl.DateTimeFormat(i,r).formatToParts(o).find((t=>"timezonename"===t.type.toLowerCase()));return a?a.value:null}function Ei(t,e){let i=parseInt(t,10);Number.isNaN(i)&&(i=0);const n=parseInt(e,10)||0;return 60*i+(i<0||Object.is(i,-0)?-n:n)}function Ti(t){const e=Number(t);if("boolean"==typeof t||""===t||Number.isNaN(e))throw new Pe(`Invalid unit value ${t}`);return e}function $i(t,e){const i={};for(const n in t)if(ui(t,n)){const o=t[n];if(null==o)continue;i[e(n)]=Ti(o)}return i}function Li(t,e){const i=Math.trunc(Math.abs(t/60)),n=Math.trunc(Math.abs(t%60)),o=t>=0?"+":"-";switch(e){case"short":return`${o}${mi(i,2)}:${mi(n,2)}`;case"narrow":return`${o}${i}${n>0?`:${n}`:""}`;case"techie":return`${o}${mi(i,2)}${mi(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Ai(t){return function(t,e){return e.reduce(((e,i)=>(e[i]=t[i],e)),{})}(t,["hour","minute","second","millisecond"])}const Mi=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,Oi=["January","February","March","April","May","June","July","August","September","October","November","December"],zi=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Pi=["J","F","M","A","M","J","J","A","S","O","N","D"];function Ii(t){switch(t){case"narrow":return[...Pi];case"short":return[...zi];case"long":return[...Oi];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 Di=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ni=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ri=["M","T","W","T","F","S","S"];function Bi(t){switch(t){case"narrow":return[...Ri];case"short":return[...Ni];case"long":return[...Di];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const qi=["AM","PM"],Zi=["Before Christ","Anno Domini"],Fi=["BC","AD"],Vi=["B","A"];function Ui(t){switch(t){case"narrow":return[...Vi];case"short":return[...Fi];case"long":return[...Zi];default:return null}}function ji(t,e){let i="";for(const n of t)n.literal?i+=n.val:i+=e(n.val);return i}const Hi={D:Be,DD:qe,DDD:Fe,DDDD:Ve,t:Ue,tt:je,ttt:He,tttt:We,T:Ge,TT:Ke,TTT:Ye,TTTT:Je,f:Xe,ff:ti,fff:ni,ffff:si,F:Qe,FF:ei,FFF:oi,FFFF:ri};class Wi{static create(t,e={}){return new Wi(t,e)}static parseFormat(t){let e=null,i="",n=!1;const o=[];for(let s=0;s<t.length;s++){const r=t.charAt(s);"'"===r?(i.length>0&&o.push({literal:n,val:i}),e=null,i="",n=!n):n||r===e?i+=r:(i.length>0&&o.push({literal:!1,val:i}),i=r,e=r)}return i.length>0&&o.push({literal:n,val:i}),o}static macroTokenToFormatOpts(t){return Hi[t]}constructor(t,e){this.opts=e,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,e){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(t,{...this.opts,...e}).format()}formatDateTime(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e}).format()}formatDateTimeParts(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e}).formatToParts()}resolvedOptions(t,e={}){return this.loc.dtFormatter(t,{...this.opts,...e}).resolvedOptions()}num(t,e=0){if(this.opts.forceSimple)return mi(t,e);const i={...this.opts};return e>0&&(i.padTo=e),this.loc.numberFormatter(i).format(t)}formatDateTimeFromString(t,e){const i="en"===this.loc.listingMode(),n=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,o=(e,i)=>this.loc.extract(t,e,i),s=e=>t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):"",r=()=>i?function(t){return qi[t.hour<12?0:1]}(t):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(e,n)=>i?function(t,e){return Ii(e)[t.month-1]}(t,e):o(n?{month:e}:{month:e,day:"numeric"},"month"),l=(e,n)=>i?function(t,e){return Bi(e)[t.weekday-1]}(t,e):o(n?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday"),h=e=>{const i=Wi.macroTokenToFormatOpts(e);return i?this.formatWithSystemDefault(t,i):e},c=e=>i?function(t,e){return Ui(e)[t.year<0?0:1]}(t,e):o({era:e},"era");return ji(Wi.parseFormat(e),(e=>{switch(e){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12==0?12:t.hour%12);case"hh":return this.num(t.hour%12==0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.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 t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return r();case"d":return n?o({day:"numeric"},"day"):this.num(t.day);case"dd":return n?o({day:"2-digit"},"day"):this.num(t.day,2);case"c":case"E":return this.num(t.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 n?o({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return n?o({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return n?o({month:"numeric"},"month"):this.num(t.month);case"MM":return n?o({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return n?o({year:"numeric"},"year"):this.num(t.year);case"yy":return n?o({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return n?o({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return n?o({year:"numeric"},"year"):this.num(t.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return h(e)}}))}formatDurationFromString(t,e){const i=t=>{switch(t[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}},n=Wi.parseFormat(e),o=n.reduce(((t,{literal:e,val:i})=>e?t:t.concat(i)),[]),s=t.shiftTo(...o.map(i).filter((t=>t)));return ji(n,(t=>e=>{const n=i(e);return n?this.num(t.get(n),e.length):e})(s))}}class Gi{constructor(t,e){this.reason=t,this.explanation=e}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Ki{get type(){throw new Ie}get name(){throw new Ie}get ianaName(){return this.name}get isUniversal(){throw new Ie}offsetName(t,e){throw new Ie}formatOffset(t,e){throw new Ie}offset(t){throw new Ie}equals(t){throw new Ie}get isValid(){throw new Ie}}let Yi=null;class Ji extends Ki{static get instance(){return null===Yi&&(Yi=new Ji),Yi}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:e,locale:i}){return Ci(t,e,i)}formatOffset(t,e){return Li(this.offset(t),e)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return"system"===t.type}get isValid(){return!0}}let Xi={};const Qi={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let tn={};class en extends Ki{static create(t){return tn[t]||(tn[t]=new en(t)),tn[t]}static resetCache(){tn={},Xi={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch(t){return!1}}constructor(t){super(),this.zoneName=t,this.valid=en.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:e,locale:i}){return Ci(t,e,i,this.name)}formatOffset(t,e){return Li(this.offset(t),e)}offset(t){const e=new Date(t);if(isNaN(e))return NaN;const i=(n=this.name,Xi[n]||(Xi[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Xi[n]);var n;let[o,s,r,a,l,h,c]=i.formatToParts?function(t,e){const i=t.formatToParts(e),n=[];for(let t=0;t<i.length;t++){const{type:e,value:o}=i[t],s=Qi[e];"era"===e?n[s]=o:ai(s)||(n[s]=parseInt(o,10))}return n}(i,e):function(t,e){const i=t.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(i),[,o,s,r,a,l,h,c]=n;return[r,o,s,a,l,h,c]}(i,e);"BC"===a&&(o=1-Math.abs(o));let d=+e;const u=d%1e3;return d-=u>=0?u:1e3+u,(wi({year:o,month:s,day:r,hour:24===l?0:l,minute:h,second:c,millisecond:0})-d)/6e4}equals(t){return"iana"===t.type&&t.name===this.name}get isValid(){return this.valid}}let nn=null;class on extends Ki{static get utcInstance(){return null===nn&&(nn=new on(0)),nn}static instance(t){return 0===t?on.utcInstance:new on(t)}static parseSpecifier(t){if(t){const e=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new on(Ei(e[1],e[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${Li(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${Li(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,e){return Li(this.fixed,e)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return"fixed"===t.type&&t.fixed===this.fixed}get isValid(){return!0}}class sn extends Ki{constructor(t){super(),this.zoneName=t}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 rn(t,e){if(ai(t)||null===t)return e;if(t instanceof Ki)return t;if(function(t){return"string"==typeof t}(t)){const i=t.toLowerCase();return"local"===i||"system"===i?e:"utc"===i||"gmt"===i?on.utcInstance:on.parseSpecifier(i)||en.create(t)}return li(t)?on.instance(t):"object"==typeof t&&t.offset&&"number"==typeof t.offset?t:new sn(t)}let an,ln=()=>Date.now(),hn="system",cn=null,dn=null,un=null;class pn{static get now(){return ln}static set now(t){ln=t}static set defaultZone(t){hn=t}static get defaultZone(){return rn(hn,Ji.instance)}static get defaultLocale(){return cn}static set defaultLocale(t){cn=t}static get defaultNumberingSystem(){return dn}static set defaultNumberingSystem(t){dn=t}static get defaultOutputCalendar(){return un}static set defaultOutputCalendar(t){un=t}static get throwOnInvalid(){return an}static set throwOnInvalid(t){an=t}static resetCaches(){Sn.resetCache(),en.resetCache()}}let mn={};let fn={};function gn(t,e={}){const i=JSON.stringify([t,e]);let n=fn[i];return n||(n=new Intl.DateTimeFormat(t,e),fn[i]=n),n}let vn={};let yn={};let bn=null;function _n(t,e,i,n,o){const s=t.listingMode(i);return"error"===s?null:"en"===s?n(e):o(e)}class xn{constructor(t,e,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:n,floor:o,...s}=i;if(!e||Object.keys(s).length>0){const e={useGrouping:!1,...i};i.padTo>0&&(e.minimumIntegerDigits=i.padTo),this.inf=function(t,e={}){const i=JSON.stringify([t,e]);let n=vn[i];return n||(n=new Intl.NumberFormat(t,e),vn[i]=n),n}(t,e)}}format(t){if(this.inf){const e=this.floor?Math.floor(t):t;return this.inf.format(e)}return mi(this.floor?Math.floor(t):yi(t,3),this.padTo)}}class wn{constructor(t,e,i){let n;if(this.opts=i,t.zone.isUniversal){const e=t.offset/60*-1,o=e>=0?`Etc/GMT+${e}`:`Etc/GMT${e}`;0!==t.offset&&en.create(o).valid?(n=o,this.dt=t):(n="UTC",i.timeZoneName?this.dt=t:this.dt=0===t.offset?t:Ss.fromMillis(t.ts+60*t.offset*1e3))}else"system"===t.zone.type?this.dt=t:(this.dt=t,n=t.zone.name);const o={...this.opts};n&&(o.timeZone=n),this.dtf=gn(e,o)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class kn{constructor(t,e,i){this.opts={style:"long",...i},!e&&ci()&&(this.rtf=function(t,e={}){const{base:i,...n}=e,o=JSON.stringify([t,n]);let s=yn[o];return s||(s=new Intl.RelativeTimeFormat(t,e),yn[o]=s),s}(t,i))}format(t,e){return this.rtf?this.rtf.format(t,e):function(t,e,i="always",n=!1){const o={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(t);if("auto"===i&&s){const i="days"===t;switch(e){case 1:return i?"tomorrow":`next ${o[t][0]}`;case-1:return i?"yesterday":`last ${o[t][0]}`;case 0:return i?"today":`this ${o[t][0]}`}}const r=Object.is(e,-0)||e<0,a=Math.abs(e),l=1===a,h=o[t],c=n?l?h[1]:h[2]||h[1]:l?o[t][0]:t;return r?`${a} ${c} ago`:`in ${a} ${c}`}(e,t,this.opts.numeric,"long"!==this.opts.style)}formatToParts(t,e){return this.rtf?this.rtf.formatToParts(t,e):[]}}class Sn{static fromOpts(t){return Sn.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)}static create(t,e,i,n=!1){const o=t||pn.defaultLocale,s=o||(n?"en-US":bn||(bn=(new Intl.DateTimeFormat).resolvedOptions().locale,bn)),r=e||pn.defaultNumberingSystem,a=i||pn.defaultOutputCalendar;return new Sn(s,r,a,o)}static resetCache(){bn=null,fn={},vn={},yn={}}static fromObject({locale:t,numberingSystem:e,outputCalendar:i}={}){return Sn.create(t,e,i)}constructor(t,e,i,n){const[o,s,r]=function(t){const e=t.indexOf("-u-");if(-1===e)return[t];{let i;const n=t.substring(0,e);try{i=gn(t).resolvedOptions()}catch(t){i=gn(n).resolvedOptions()}const{numberingSystem:o,calendar:s}=i;return[n,o,s]}}(t);this.locale=o,this.numberingSystem=e||s||null,this.outputCalendar=i||r||null,this.intl=function(t,e,i){return i||e?(t+="-u",i&&(t+=`-ca-${i}`),e&&(t+=`-nu-${e}`),t):t}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=n,this.fastNumbersCached=null}get fastNumbers(){var t;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(t=this).numberingSystem||"latn"===t.numberingSystem)&&("latn"===t.numberingSystem||!t.locale||t.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),e=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t&&e?"en":"intl"}clone(t){return t&&0!==Object.getOwnPropertyNames(t).length?Sn.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1):this}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,e=!1,i=!0){return _n(this,t,i,Ii,(()=>{const i=e?{month:t,day:"numeric"}:{month:t},n=e?"format":"standalone";return this.monthsCache[n][t]||(this.monthsCache[n][t]=function(t){const e=[];for(let i=1;i<=12;i++){const n=Ss.utc(2016,i,1);e.push(t(n))}return e}((t=>this.extract(t,i,"month")))),this.monthsCache[n][t]}))}weekdays(t,e=!1,i=!0){return _n(this,t,i,Bi,(()=>{const i=e?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},n=e?"format":"standalone";return this.weekdaysCache[n][t]||(this.weekdaysCache[n][t]=function(t){const e=[];for(let i=1;i<=7;i++){const n=Ss.utc(2016,11,13+i);e.push(t(n))}return e}((t=>this.extract(t,i,"weekday")))),this.weekdaysCache[n][t]}))}meridiems(t=!0){return _n(this,void 0,t,(()=>qi),(()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ss.utc(2016,11,13,9),Ss.utc(2016,11,13,19)].map((e=>this.extract(e,t,"dayperiod")))}return this.meridiemCache}))}eras(t,e=!0){return _n(this,t,e,Ui,(()=>{const e={era:t};return this.eraCache[t]||(this.eraCache[t]=[Ss.utc(-40,1,1),Ss.utc(2017,1,1)].map((t=>this.extract(t,e,"era")))),this.eraCache[t]}))}extract(t,e,i){const n=this.dtFormatter(t,e).formatToParts().find((t=>t.type.toLowerCase()===i));return n?n.value:null}numberFormatter(t={}){return new xn(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,e={}){return new wn(t,this.intl,e)}relFormatter(t={}){return new kn(this.intl,this.isEnglish(),t)}listFormatter(t={}){return function(t,e={}){const i=JSON.stringify([t,e]);let n=mn[i];return n||(n=new Intl.ListFormat(t,e),mn[i]=n),n}(this.intl,t)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}}function Cn(...t){const e=t.reduce(((t,e)=>t+e.source),"");return RegExp(`^${e}$`)}function En(...t){return e=>t.reduce((([t,i,n],o)=>{const[s,r,a]=o(e,n);return[{...t,...s},r||i,a]}),[{},null,1]).slice(0,2)}function Tn(t,...e){if(null==t)return[null,null];for(const[i,n]of e){const e=i.exec(t);if(e)return n(e)}return[null,null]}function $n(...t){return(e,i)=>{const n={};let o;for(o=0;o<t.length;o++)n[t[o]]=fi(e[i+o]);return[n,null,i+o]}}const Ln=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,An=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Mn=RegExp(`${An.source}${`(?:${Ln.source}?(?:\\[(${Mi.source})\\])?)?`}`),On=RegExp(`(?:T${Mn.source})?`),zn=$n("weekYear","weekNumber","weekDay"),Pn=$n("year","ordinal"),In=RegExp(`${An.source} ?(?:${Ln.source}|(${Mi.source}))?`),Dn=RegExp(`(?: ${In.source})?`);function Nn(t,e,i){const n=t[e];return ai(n)?i:fi(n)}function Rn(t,e){return[{hours:Nn(t,e,0),minutes:Nn(t,e+1,0),seconds:Nn(t,e+2,0),milliseconds:vi(t[e+3])},null,e+4]}function Bn(t,e){const i=!t[e]&&!t[e+1],n=Ei(t[e+1],t[e+2]);return[{},i?null:on.instance(n),e+3]}function qn(t,e){return[{},t[e]?en.create(t[e]):null,e+1]}const Zn=RegExp(`^T?${An.source}$`),Fn=/^-?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 Vn(t){const[e,i,n,o,s,r,a,l,h]=t,c="-"===e[0],d=l&&"-"===l[0],u=(t,e=!1)=>void 0!==t&&(e||t&&c)?-t:t;return[{years:u(gi(i)),months:u(gi(n)),weeks:u(gi(o)),days:u(gi(s)),hours:u(gi(r)),minutes:u(gi(a)),seconds:u(gi(l),"-0"===l),milliseconds:u(vi(h),d)}]}const Un={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function jn(t,e,i,n,o,s,r){const a={year:2===e.length?Si(fi(e)):fi(e),month:zi.indexOf(i)+1,day:fi(n),hour:fi(o),minute:fi(s)};return r&&(a.second=fi(r)),t&&(a.weekday=t.length>3?Di.indexOf(t)+1:Ni.indexOf(t)+1),a}const Hn=/^(?:(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 Wn(t){const[,e,i,n,o,s,r,a,l,h,c,d]=t,u=jn(e,o,n,i,s,r,a);let p;return p=l?Un[l]:h?0:Ei(c,d),[u,new on(p)]}const Gn=/^(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$/,Kn=/^(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$/,Yn=/^(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 Jn(t){const[,e,i,n,o,s,r,a]=t;return[jn(e,o,n,i,s,r,a),on.utcInstance]}function Xn(t){const[,e,i,n,o,s,r,a]=t;return[jn(e,a,i,n,o,s,r),on.utcInstance]}const Qn=Cn(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,On),to=Cn(/(\d{4})-?W(\d\d)(?:-?(\d))?/,On),eo=Cn(/(\d{4})-?(\d{3})/,On),io=Cn(Mn),no=En((function(t,e){return[{year:Nn(t,e),month:Nn(t,e+1,1),day:Nn(t,e+2,1)},null,e+3]}),Rn,Bn,qn),oo=En(zn,Rn,Bn,qn),so=En(Pn,Rn,Bn,qn),ro=En(Rn,Bn,qn);const ao=En(Rn);const lo=Cn(/(\d{4})-(\d\d)-(\d\d)/,Dn),ho=Cn(In),co=En(Rn,Bn,qn);const uo={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}},po={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},...uo},mo=365.2425,fo=30.436875,go={years:{quarters:4,months:12,weeks:52.1775,days:mo,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:fo,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...uo},vo=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],yo=vo.slice(0).reverse();function bo(t,e,i=!1){const n={values:i?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy};return new xo(n)}function _o(t,e,i,n,o){const s=t[o][i],r=e[i]/s,a=!(Math.sign(r)===Math.sign(n[o]))&&0!==n[o]&&Math.abs(r)<=1?function(t){return t<0?Math.floor(t):Math.ceil(t)}(r):Math.trunc(r);n[o]+=a,e[i]-=a*s}class xo{constructor(t){const e="longterm"===t.conversionAccuracy||!1;this.values=t.values,this.loc=t.loc||Sn.create(),this.conversionAccuracy=e?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=e?go:po,this.isLuxonDuration=!0}static fromMillis(t,e){return xo.fromObject({milliseconds:t},e)}static fromObject(t,e={}){if(null==t||"object"!=typeof t)throw new Pe("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new xo({values:$i(t,xo.normalizeUnit),loc:Sn.fromObject(e),conversionAccuracy:e.conversionAccuracy})}static fromDurationLike(t){if(li(t))return xo.fromMillis(t);if(xo.isDuration(t))return t;if("object"==typeof t)return xo.fromObject(t);throw new Pe(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,e){const[i]=function(t){return Tn(t,[Fn,Vn])}(t);return i?xo.fromObject(i,e):xo.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,e){const[i]=function(t){return Tn(t,[Zn,ao])}(t);return i?xo.fromObject(i,e):xo.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,e=null){if(!t)throw new Pe("need to specify a reason the Duration is invalid");const i=t instanceof Gi?t:new Gi(t,e);if(pn.throwOnInvalid)throw new Me(i);return new xo({invalid:i})}static normalizeUnit(t){const e={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"}[t?t.toLowerCase():t];if(!e)throw new ze(t);return e}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,e={}){const i={...e,floor:!1!==e.round&&!1!==e.floor};return this.isValid?Wi.create(this.loc,i).formatDurationFromString(this,t):"Invalid Duration"}toHuman(t={}){const e=vo.map((e=>{const i=this.values[e];return ai(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:e.slice(0,-1)}).format(i)})).filter((t=>t));return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(e)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return 0!==this.years&&(t+=this.years+"Y"),0===this.months&&0===this.quarters||(t+=this.months+3*this.quarters+"M"),0!==this.weeks&&(t+=this.weeks+"W"),0!==this.days&&(t+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(t+="T"),0!==this.hours&&(t+=this.hours+"H"),0!==this.minutes&&(t+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(t+=yi(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===t&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const e=this.toMillis();if(e<0||e>=864e5)return null;t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let n="basic"===t.format?"hhmm":"hh:mm";t.suppressSeconds&&0===i.seconds&&0===i.milliseconds||(n+="basic"===t.format?"ss":":ss",t.suppressMilliseconds&&0===i.milliseconds||(n+=".SSS"));let o=i.toFormat(n);return t.includePrefix&&(o="T"+o),o}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const e=xo.fromDurationLike(t),i={};for(const t of vo)(ui(e.values,t)||ui(this.values,t))&&(i[t]=e.get(t)+this.get(t));return bo(this,{values:i},!0)}minus(t){if(!this.isValid)return this;const e=xo.fromDurationLike(t);return this.plus(e.negate())}mapUnits(t){if(!this.isValid)return this;const e={};for(const i of Object.keys(this.values))e[i]=Ti(t(this.values[i],i));return bo(this,{values:e},!0)}get(t){return this[xo.normalizeUnit(t)]}set(t){if(!this.isValid)return this;return bo(this,{values:{...this.values,...$i(t,xo.normalizeUnit)}})}reconfigure({locale:t,numberingSystem:e,conversionAccuracy:i}={}){const n={loc:this.loc.clone({locale:t,numberingSystem:e})};return i&&(n.conversionAccuracy=i),bo(this,n)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return function(t,e){yo.reduce(((i,n)=>ai(e[n])?i:(i&&_o(t,e,i,e,n),n)),null)}(this.matrix,t),bo(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(0===t.length)return this;t=t.map((t=>xo.normalizeUnit(t)));const e={},i={},n=this.toObject();let o;for(const s of vo)if(t.indexOf(s)>=0){o=s;let t=0;for(const e in i)t+=this.matrix[e][s]*i[e],i[e]=0;li(n[s])&&(t+=n[s]);const r=Math.trunc(t);e[s]=r,i[s]=(1e3*t-1e3*r)/1e3;for(const t in n)vo.indexOf(t)>vo.indexOf(s)&&_o(this.matrix,n,t,e,s)}else li(n[s])&&(i[s]=n[s]);for(const t in i)0!==i[t]&&(e[o]+=t===o?i[t]:i[t]/this.matrix[o][t]);return bo(this,{values:e},!0).normalize()}negate(){if(!this.isValid)return this;const t={};for(const e of Object.keys(this.values))t[e]=0===this.values[e]?0:-this.values[e];return bo(this,{values:t},!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(t){if(!this.isValid||!t.isValid)return!1;if(!this.loc.equals(t.loc))return!1;for(const n of vo)if(e=this.values[n],i=t.values[n],!(void 0===e||0===e?void 0===i||0===i:e===i))return!1;var e,i;return!0}}const wo="Invalid Interval";class ko{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,e=null){if(!t)throw new Pe("need to specify a reason the Interval is invalid");const i=t instanceof Gi?t:new Gi(t,e);if(pn.throwOnInvalid)throw new Ae(i);return new ko({invalid:i})}static fromDateTimes(t,e){const i=Cs(t),n=Cs(e),o=function(t,e){return t&&t.isValid?e&&e.isValid?e<t?ko.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null:ko.invalid("missing or invalid end"):ko.invalid("missing or invalid start")}(i,n);return null==o?new ko({start:i,end:n}):o}static after(t,e){const i=xo.fromDurationLike(e),n=Cs(t);return ko.fromDateTimes(n,n.plus(i))}static before(t,e){const i=xo.fromDurationLike(e),n=Cs(t);return ko.fromDateTimes(n.minus(i),n)}static fromISO(t,e){const[i,n]=(t||"").split("/",2);if(i&&n){let t,o,s,r;try{t=Ss.fromISO(i,e),o=t.isValid}catch(n){o=!1}try{s=Ss.fromISO(n,e),r=s.isValid}catch(n){r=!1}if(o&&r)return ko.fromDateTimes(t,s);if(o){const i=xo.fromISO(n,e);if(i.isValid)return ko.after(t,i)}else if(r){const t=xo.fromISO(i,e);if(t.isValid)return ko.before(s,t)}}return ko.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.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(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds"){if(!this.isValid)return NaN;const e=this.start.startOf(t),i=this.end.startOf(t);return Math.floor(i.diff(e,t).get(t))+1}hasSame(t){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,t))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return!!this.isValid&&this.s>t}isBefore(t){return!!this.isValid&&this.e<=t}contains(t){return!!this.isValid&&(this.s<=t&&this.e>t)}set({start:t,end:e}={}){return this.isValid?ko.fromDateTimes(t||this.s,e||this.e):this}splitAt(...t){if(!this.isValid)return[];const e=t.map(Cs).filter((t=>this.contains(t))).sort(),i=[];let{s:n}=this,o=0;for(;n<this.e;){const t=e[o]||this.e,s=+t>+this.e?this.e:t;i.push(ko.fromDateTimes(n,s)),n=s,o+=1}return i}splitBy(t){const e=xo.fromDurationLike(t);if(!this.isValid||!e.isValid||0===e.as("milliseconds"))return[];let i,{s:n}=this,o=1;const s=[];for(;n<this.e;){const t=this.start.plus(e.mapUnits((t=>t*o)));i=+t>+this.e?this.e:t,s.push(ko.fromDateTimes(n,i)),n=i,o+=1}return s}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return!!this.isValid&&+this.e==+t.s}abutsEnd(t){return!!this.isValid&&+t.e==+this.s}engulfs(t){return!!this.isValid&&(this.s<=t.s&&this.e>=t.e)}equals(t){return!(!this.isValid||!t.isValid)&&(this.s.equals(t.s)&&this.e.equals(t.e))}intersection(t){if(!this.isValid)return this;const e=this.s>t.s?this.s:t.s,i=this.e<t.e?this.e:t.e;return e>=i?null:ko.fromDateTimes(e,i)}union(t){if(!this.isValid)return this;const e=this.s<t.s?this.s:t.s,i=this.e>t.e?this.e:t.e;return ko.fromDateTimes(e,i)}static merge(t){const[e,i]=t.sort(((t,e)=>t.s-e.s)).reduce((([t,e],i)=>e?e.overlaps(i)||e.abutsStart(i)?[t,e.union(i)]:[t.concat([e]),i]:[t,i]),[[],null]);return i&&e.push(i),e}static xor(t){let e=null,i=0;const n=[],o=t.map((t=>[{time:t.s,type:"s"},{time:t.e,type:"e"}])),s=Array.prototype.concat(...o).sort(((t,e)=>t.time-e.time));for(const t of s)i+="s"===t.type?1:-1,1===i?e=t.time:(e&&+e!=+t.time&&n.push(ko.fromDateTimes(e,t.time)),e=null);return ko.merge(n)}difference(...t){return ko.xor([this].concat(t)).map((t=>this.intersection(t))).filter((t=>t&&!t.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:wo}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:wo}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:wo}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:wo}toFormat(t,{separator:e=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${e}${this.e.toFormat(t)}`:wo}toDuration(t,e){return this.isValid?this.e.diff(this.s,t,e):xo.invalid(this.invalidReason)}mapEndpoints(t){return ko.fromDateTimes(t(this.s),t(this.e))}}class So{static hasDST(t=pn.defaultZone){const e=Ss.now().setZone(t).set({month:12});return!t.isUniversal&&e.offset!==e.set({month:6}).offset}static isValidIANAZone(t){return en.isValidZone(t)}static normalizeZone(t){return rn(t,pn.defaultZone)}static months(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null,outputCalendar:o="gregory"}={}){return(n||Sn.create(e,i,o)).months(t)}static monthsFormat(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null,outputCalendar:o="gregory"}={}){return(n||Sn.create(e,i,o)).months(t,!0)}static weekdays(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null}={}){return(n||Sn.create(e,i,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:e=null,numberingSystem:i=null,locObj:n=null}={}){return(n||Sn.create(e,i,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return Sn.create(t).meridiems()}static eras(t="short",{locale:e=null}={}){return Sn.create(e,null,"gregory").eras(t)}static features(){return{relative:ci()}}}function Co(t,e){const i=t=>t.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=i(e)-i(t);return Math.floor(xo.fromMillis(n).as("days"))}function Eo(t,e,i,n){let[o,s,r,a]=function(t,e,i){const n=[["years",(t,e)=>e.year-t.year],["quarters",(t,e)=>e.quarter-t.quarter],["months",(t,e)=>e.month-t.month+12*(e.year-t.year)],["weeks",(t,e)=>{const i=Co(t,e);return(i-i%7)/7}],["days",Co]],o={};let s,r;for(const[a,l]of n)if(i.indexOf(a)>=0){s=a;let i=l(t,e);r=t.plus({[a]:i}),r>e?(t=t.plus({[a]:i-1}),i-=1):t=r,o[a]=i}return[t,o,r,s]}(t,e,i);const l=e-o,h=i.filter((t=>["hours","minutes","seconds","milliseconds"].indexOf(t)>=0));0===h.length&&(r<e&&(r=o.plus({[a]:1})),r!==o&&(s[a]=(s[a]||0)+l/(r-o)));const c=xo.fromObject(s,n);return h.length>0?xo.fromMillis(l,n).shiftTo(...h).plus(c):c}const To={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},$o={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]},Lo=To.hanidec.replace(/[\[|\]]/g,"").split("");function Ao({numberingSystem:t},e=""){return new RegExp(`${To[t||"latn"]}${e}`)}function Mo(t,e=(t=>t)){return{regex:t,deser:([t])=>e(function(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let i=0;i<t.length;i++){const n=t.charCodeAt(i);if(-1!==t[i].search(To.hanidec))e+=Lo.indexOf(t[i]);else for(const t in $o){const[i,o]=$o[t];n>=i&&n<=o&&(e+=n-i)}}return parseInt(e,10)}return e}(t))}}const Oo=`[ ${String.fromCharCode(160)}]`,zo=new RegExp(Oo,"g");function Po(t){return t.replace(/\./g,"\\.?").replace(zo,Oo)}function Io(t){return t.replace(/\./g,"").replace(zo," ").toLowerCase()}function Do(t,e){return null===t?null:{regex:RegExp(t.map(Po).join("|")),deser:([i])=>t.findIndex((t=>Io(i)===Io(t)))+e}}function No(t,e){return{regex:t,deser:([,t,e])=>Ei(t,e),groups:e}}function Ro(t){return{regex:t,deser:([t])=>t}}const Bo={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};let qo=null;function Zo(t,e){if(t.literal)return t;const i=Wi.macroTokenToFormatOpts(t.val);if(!i)return t;const n=Wi.create(e,i).formatDateTimeParts((qo||(qo=Ss.fromMillis(1555555555555)),qo)).map((t=>function(t,e,i){const{type:n,value:o}=t;if("literal"===n)return{literal:!0,val:o};const s=i[n];let r=Bo[n];return"object"==typeof r&&(r=r[s]),r?{literal:!1,val:r}:void 0}(t,0,i)));return n.includes(void 0)?t:n}function Fo(t,e,i){const n=function(t,e){return Array.prototype.concat(...t.map((t=>Zo(t,e))))}(Wi.parseFormat(i),t),o=n.map((e=>function(t,e){const i=Ao(e),n=Ao(e,"{2}"),o=Ao(e,"{3}"),s=Ao(e,"{4}"),r=Ao(e,"{6}"),a=Ao(e,"{1,2}"),l=Ao(e,"{1,3}"),h=Ao(e,"{1,6}"),c=Ao(e,"{1,9}"),d=Ao(e,"{2,4}"),u=Ao(e,"{4,6}"),p=t=>{return{regex:RegExp((e=t.val,e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([t])=>t,literal:!0};var e},m=(m=>{if(t.literal)return p(m);switch(m.val){case"G":return Do(e.eras("short",!1),0);case"GG":return Do(e.eras("long",!1),0);case"y":return Mo(h);case"yy":case"kk":return Mo(d,Si);case"yyyy":case"kkkk":return Mo(s);case"yyyyy":return Mo(u);case"yyyyyy":return Mo(r);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Mo(a);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Mo(n);case"MMM":return Do(e.months("short",!0,!1),1);case"MMMM":return Do(e.months("long",!0,!1),1);case"LLL":return Do(e.months("short",!1,!1),1);case"LLLL":return Do(e.months("long",!1,!1),1);case"o":case"S":return Mo(l);case"ooo":case"SSS":return Mo(o);case"u":return Ro(c);case"uu":return Ro(a);case"uuu":case"E":case"c":return Mo(i);case"a":return Do(e.meridiems(),0);case"EEE":return Do(e.weekdays("short",!1,!1),1);case"EEEE":return Do(e.weekdays("long",!1,!1),1);case"ccc":return Do(e.weekdays("short",!0,!1),1);case"cccc":return Do(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return No(new RegExp(`([+-]${a.source})(?::(${n.source}))?`),2);case"ZZZ":return No(new RegExp(`([+-]${a.source})(${n.source})?`),2);case"z":return Ro(/[a-z_+-/]{1,256}?/i);default:return p(m)}})(t)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return m.token=t,m}(e,t))),s=o.find((t=>t.invalidReason));if(s)return{input:e,tokens:n,invalidReason:s.invalidReason};{const[t,i]=function(t){const e=t.map((t=>t.regex)).reduce(((t,e)=>`${t}(${e.source})`),"");return[`^${e}$`,t]}(o),s=RegExp(t,"i"),[r,a]=function(t,e,i){const n=t.match(e);if(n){const t={};let e=1;for(const o in i)if(ui(i,o)){const s=i[o],r=s.groups?s.groups+1:1;!s.literal&&s.token&&(t[s.token.val[0]]=s.deser(n.slice(e,e+r))),e+=r}return[n,t]}return[n,{}]}(e,s,i),[l,h,c]=a?function(t){let e,i=null;ai(t.z)||(i=en.create(t.z)),ai(t.Z)||(i||(i=new on(t.Z)),e=t.Z),ai(t.q)||(t.M=3*(t.q-1)+1),ai(t.h)||(t.h<12&&1===t.a?t.h+=12:12===t.h&&0===t.a&&(t.h=0)),0===t.G&&t.y&&(t.y=-t.y),ai(t.u)||(t.S=vi(t.u));const n=Object.keys(t).reduce(((e,i)=>{const n=(t=>{switch(t){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}})(i);return n&&(e[n]=t[i]),e}),{});return[n,i,e]}(a):[null,null,void 0];if(ui(a,"a")&&ui(a,"H"))throw new Oe("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:n,regex:s,rawMatches:r,matches:a,result:l,zone:h,specificOffset:c}}}const Vo=[0,31,59,90,120,151,181,212,243,273,304,334],Uo=[0,31,60,91,121,152,182,213,244,274,305,335];function jo(t,e){return new Gi("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function Ho(t,e,i){const n=new Date(Date.UTC(t,e-1,i));t<100&&t>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const o=n.getUTCDay();return 0===o?7:o}function Wo(t,e,i){return i+(bi(t)?Uo:Vo)[e-1]}function Go(t,e){const i=bi(t)?Uo:Vo,n=i.findIndex((t=>t<e));return{month:n+1,day:e-i[n]}}function Ko(t){const{year:e,month:i,day:n}=t,o=Wo(e,i,n),s=Ho(e,i,n);let r,a=Math.floor((o-s+10)/7);return a<1?(r=e-1,a=ki(r)):a>ki(e)?(r=e+1,a=1):r=e,{weekYear:r,weekNumber:a,weekday:s,...Ai(t)}}function Yo(t){const{weekYear:e,weekNumber:i,weekday:n}=t,o=Ho(e,1,4),s=_i(e);let r,a=7*i+n-o-3;a<1?(r=e-1,a+=_i(r)):a>s?(r=e+1,a-=_i(e)):r=e;const{month:l,day:h}=Go(r,a);return{year:r,month:l,day:h,...Ai(t)}}function Jo(t){const{year:e,month:i,day:n}=t;return{year:e,ordinal:Wo(e,i,n),...Ai(t)}}function Xo(t){const{year:e,ordinal:i}=t,{month:n,day:o}=Go(e,i);return{year:e,month:n,day:o,...Ai(t)}}function Qo(t){const e=hi(t.year),i=pi(t.month,1,12),n=pi(t.day,1,xi(t.year,t.month));return e?i?!n&&jo("day",t.day):jo("month",t.month):jo("year",t.year)}function ts(t){const{hour:e,minute:i,second:n,millisecond:o}=t,s=pi(e,0,23)||24===e&&0===i&&0===n&&0===o,r=pi(i,0,59),a=pi(n,0,59),l=pi(o,0,999);return s?r?a?!l&&jo("millisecond",o):jo("second",n):jo("minute",i):jo("hour",e)}const es="Invalid DateTime",is=864e13;function ns(t){return new Gi("unsupported zone",`the zone "${t.name}" is not supported`)}function os(t){return null===t.weekData&&(t.weekData=Ko(t.c)),t.weekData}function ss(t,e){const i={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new Ss({...i,...e,old:i})}function rs(t,e,i){let n=t-60*e*1e3;const o=i.offset(n);if(e===o)return[n,e];n-=60*(o-e)*1e3;const s=i.offset(n);return o===s?[n,o]:[t-60*Math.min(o,s)*1e3,Math.max(o,s)]}function as(t,e){const i=new Date(t+=60*e*1e3);return{year:i.getUTCFullYear(),month:i.getUTCMonth()+1,day:i.getUTCDate(),hour:i.getUTCHours(),minute:i.getUTCMinutes(),second:i.getUTCSeconds(),millisecond:i.getUTCMilliseconds()}}function ls(t,e,i){return rs(wi(t),e,i)}function hs(t,e){const i=t.o,n=t.c.year+Math.trunc(e.years),o=t.c.month+Math.trunc(e.months)+3*Math.trunc(e.quarters),s={...t.c,year:n,month:o,day:Math.min(t.c.day,xi(n,o))+Math.trunc(e.days)+7*Math.trunc(e.weeks)},r=xo.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=wi(s);let[l,h]=rs(a,i,t.zone);return 0!==r&&(l+=r,h=t.zone.offset(l)),{ts:l,o:h}}function cs(t,e,i,n,o,s){const{setZone:r,zone:a}=i;if(t&&0!==Object.keys(t).length){const n=e||a,o=Ss.fromObject(t,{...i,zone:n,specificOffset:s});return r?o:o.setZone(a)}return Ss.invalid(new Gi("unparsable",`the input "${o}" can't be parsed as ${n}`))}function ds(t,e,i=!0){return t.isValid?Wi.create(Sn.create("en-US"),{allowZ:i,forceSimple:!0}).formatDateTimeFromString(t,e):null}function us(t,e){const i=t.c.year>9999||t.c.year<0;let n="";return i&&t.c.year>=0&&(n+="+"),n+=mi(t.c.year,i?6:4),e?(n+="-",n+=mi(t.c.month),n+="-",n+=mi(t.c.day)):(n+=mi(t.c.month),n+=mi(t.c.day)),n}function ps(t,e,i,n,o,s){let r=mi(t.c.hour);return e?(r+=":",r+=mi(t.c.minute),0===t.c.second&&i||(r+=":")):r+=mi(t.c.minute),0===t.c.second&&i||(r+=mi(t.c.second),0===t.c.millisecond&&n||(r+=".",r+=mi(t.c.millisecond,3))),o&&(t.isOffsetFixed&&0===t.offset&&!s?r+="Z":t.o<0?(r+="-",r+=mi(Math.trunc(-t.o/60)),r+=":",r+=mi(Math.trunc(-t.o%60))):(r+="+",r+=mi(Math.trunc(t.o/60)),r+=":",r+=mi(Math.trunc(t.o%60)))),s&&(r+="["+t.zone.ianaName+"]"),r}const ms={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},fs={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},gs={ordinal:1,hour:0,minute:0,second:0,millisecond:0},vs=["year","month","day","hour","minute","second","millisecond"],ys=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],bs=["year","ordinal","hour","minute","second","millisecond"];function _s(t){const e={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"}[t.toLowerCase()];if(!e)throw new ze(t);return e}function xs(t,e){const i=rn(e.zone,pn.defaultZone),n=Sn.fromObject(e),o=pn.now();let s,r;if(ai(t.year))s=o;else{for(const e of vs)ai(t[e])&&(t[e]=ms[e]);const e=Qo(t)||ts(t);if(e)return Ss.invalid(e);const n=i.offset(o);[s,r]=ls(t,n,i)}return new Ss({ts:s,zone:i,loc:n,o:r})}function ws(t,e,i){const n=!!ai(i.round)||i.round,o=(t,o)=>{t=yi(t,n||i.calendary?0:2,!0);return e.loc.clone(i).relFormatter(i).format(t,o)},s=n=>i.calendary?e.hasSame(t,n)?0:e.startOf(n).diff(t.startOf(n),n).get(n):e.diff(t,n).get(n);if(i.unit)return o(s(i.unit),i.unit);for(const t of i.units){const e=s(t);if(Math.abs(e)>=1)return o(e,t)}return o(t>e?-0:0,i.units[i.units.length-1])}function ks(t){let e,i={};return t.length>0&&"object"==typeof t[t.length-1]?(i=t[t.length-1],e=Array.from(t).slice(0,t.length-1)):e=Array.from(t),[i,e]}class Ss{constructor(t){const e=t.zone||pn.defaultZone;let i=t.invalid||(Number.isNaN(t.ts)?new Gi("invalid input"):null)||(e.isValid?null:ns(e));this.ts=ai(t.ts)?pn.now():t.ts;let n=null,o=null;if(!i){if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(e))[n,o]=[t.old.c,t.old.o];else{const t=e.offset(this.ts);n=as(this.ts,t),i=Number.isNaN(n.year)?new Gi("invalid input"):null,n=i?null:n,o=i?null:t}}this._zone=e,this.loc=t.loc||Sn.create(),this.invalid=i,this.weekData=null,this.c=n,this.o=o,this.isLuxonDateTime=!0}static now(){return new Ss({})}static local(){const[t,e]=ks(arguments),[i,n,o,s,r,a,l]=e;return xs({year:i,month:n,day:o,hour:s,minute:r,second:a,millisecond:l},t)}static utc(){const[t,e]=ks(arguments),[i,n,o,s,r,a,l]=e;return t.zone=on.utcInstance,xs({year:i,month:n,day:o,hour:s,minute:r,second:a,millisecond:l},t)}static fromJSDate(t,e={}){const i=function(t){return"[object Date]"===Object.prototype.toString.call(t)}(t)?t.valueOf():NaN;if(Number.isNaN(i))return Ss.invalid("invalid input");const n=rn(e.zone,pn.defaultZone);return n.isValid?new Ss({ts:i,zone:n,loc:Sn.fromObject(e)}):Ss.invalid(ns(n))}static fromMillis(t,e={}){if(li(t))return t<-is||t>is?Ss.invalid("Timestamp out of range"):new Ss({ts:t,zone:rn(e.zone,pn.defaultZone),loc:Sn.fromObject(e)});throw new Pe(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,e={}){if(li(t))return new Ss({ts:1e3*t,zone:rn(e.zone,pn.defaultZone),loc:Sn.fromObject(e)});throw new Pe("fromSeconds requires a numerical input")}static fromObject(t,e={}){t=t||{};const i=rn(e.zone,pn.defaultZone);if(!i.isValid)return Ss.invalid(ns(i));const n=pn.now(),o=ai(e.specificOffset)?i.offset(n):e.specificOffset,s=$i(t,_s),r=!ai(s.ordinal),a=!ai(s.year),l=!ai(s.month)||!ai(s.day),h=a||l,c=s.weekYear||s.weekNumber,d=Sn.fromObject(e);if((h||r)&&c)throw new Oe("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new Oe("Can't mix ordinal dates with month/day");const u=c||s.weekday&&!h;let p,m,f=as(n,o);u?(p=ys,m=fs,f=Ko(f)):r?(p=bs,m=gs,f=Jo(f)):(p=vs,m=ms);let g=!1;for(const t of p){ai(s[t])?s[t]=g?m[t]:f[t]:g=!0}const v=u?function(t){const e=hi(t.weekYear),i=pi(t.weekNumber,1,ki(t.weekYear)),n=pi(t.weekday,1,7);return e?i?!n&&jo("weekday",t.weekday):jo("week",t.week):jo("weekYear",t.weekYear)}(s):r?function(t){const e=hi(t.year),i=pi(t.ordinal,1,_i(t.year));return e?!i&&jo("ordinal",t.ordinal):jo("year",t.year)}(s):Qo(s),y=v||ts(s);if(y)return Ss.invalid(y);const b=u?Yo(s):r?Xo(s):s,[_,x]=ls(b,o,i),w=new Ss({ts:_,zone:i,o:x,loc:d});return s.weekday&&h&&t.weekday!==w.weekday?Ss.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${w.toISO()}`):w}static fromISO(t,e={}){const[i,n]=function(t){return Tn(t,[Qn,no],[to,oo],[eo,so],[io,ro])}(t);return cs(i,n,e,"ISO 8601",t)}static fromRFC2822(t,e={}){const[i,n]=function(t){return Tn(function(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(t),[Hn,Wn])}(t);return cs(i,n,e,"RFC 2822",t)}static fromHTTP(t,e={}){const[i,n]=function(t){return Tn(t,[Gn,Jn],[Kn,Jn],[Yn,Xn])}(t);return cs(i,n,e,"HTTP",e)}static fromFormat(t,e,i={}){if(ai(t)||ai(e))throw new Pe("fromFormat requires an input string and a format");const{locale:n=null,numberingSystem:o=null}=i,s=Sn.fromOpts({locale:n,numberingSystem:o,defaultToEN:!0}),[r,a,l,h]=function(t,e,i){const{result:n,zone:o,specificOffset:s,invalidReason:r}=Fo(t,e,i);return[n,o,s,r]}(s,t,e);return h?Ss.invalid(h):cs(r,a,i,`format ${e}`,t,l)}static fromString(t,e,i={}){return Ss.fromFormat(t,e,i)}static fromSQL(t,e={}){const[i,n]=function(t){return Tn(t,[lo,no],[ho,co])}(t);return cs(i,n,e,"SQL",t)}static invalid(t,e=null){if(!t)throw new Pe("need to specify a reason the DateTime is invalid");const i=t instanceof Gi?t:new Gi(t,e);if(pn.throwOnInvalid)throw new Le(i);return new Ss({invalid:i})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}get(t){return this[t]}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?os(this).weekYear:NaN}get weekNumber(){return this.isValid?os(this).weekNumber:NaN}get weekday(){return this.isValid?os(this).weekday:NaN}get ordinal(){return this.isValid?Jo(this.c).ordinal:NaN}get monthShort(){return this.isValid?So.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?So.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?So.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?So.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)}get isInLeapYear(){return bi(this.year)}get daysInMonth(){return xi(this.year,this.month)}get daysInYear(){return this.isValid?_i(this.year):NaN}get weeksInWeekYear(){return this.isValid?ki(this.weekYear):NaN}resolvedLocaleOptions(t={}){const{locale:e,numberingSystem:i,calendar:n}=Wi.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:e,numberingSystem:i,outputCalendar:n}}toUTC(t=0,e={}){return this.setZone(on.instance(t),e)}toLocal(){return this.setZone(pn.defaultZone)}setZone(t,{keepLocalTime:e=!1,keepCalendarTime:i=!1}={}){if((t=rn(t,pn.defaultZone)).equals(this.zone))return this;if(t.isValid){let n=this.ts;if(e||i){const e=t.offset(this.ts),i=this.toObject();[n]=ls(i,e,t)}return ss(this,{ts:n,zone:t})}return Ss.invalid(ns(t))}reconfigure({locale:t,numberingSystem:e,outputCalendar:i}={}){return ss(this,{loc:this.loc.clone({locale:t,numberingSystem:e,outputCalendar:i})})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const e=$i(t,_s),i=!ai(e.weekYear)||!ai(e.weekNumber)||!ai(e.weekday),n=!ai(e.ordinal),o=!ai(e.year),s=!ai(e.month)||!ai(e.day),r=o||s,a=e.weekYear||e.weekNumber;if((r||n)&&a)throw new Oe("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&n)throw new Oe("Can't mix ordinal dates with month/day");let l;i?l=Yo({...Ko(this.c),...e}):ai(e.ordinal)?(l={...this.toObject(),...e},ai(e.day)&&(l.day=Math.min(xi(l.year,l.month),l.day))):l=Xo({...Jo(this.c),...e});const[h,c]=ls(l,this.o,this.zone);return ss(this,{ts:h,o:c})}plus(t){if(!this.isValid)return this;return ss(this,hs(this,xo.fromDurationLike(t)))}minus(t){if(!this.isValid)return this;return ss(this,hs(this,xo.fromDurationLike(t).negate()))}startOf(t){if(!this.isValid)return this;const e={},i=xo.normalizeUnit(t);switch(i){case"years":e.month=1;case"quarters":case"months":e.day=1;case"weeks":case"days":e.hour=0;case"hours":e.minute=0;case"minutes":e.second=0;case"seconds":e.millisecond=0}if("weeks"===i&&(e.weekday=1),"quarters"===i){const t=Math.ceil(this.month/3);e.month=3*(t-1)+1}return this.set(e)}endOf(t){return this.isValid?this.plus({[t]:1}).startOf(t).minus(1):this}toFormat(t,e={}){return this.isValid?Wi.create(this.loc.redefaultToEN(e)).formatDateTimeFromString(this,t):es}toLocaleString(t=Be,e={}){return this.isValid?Wi.create(this.loc.clone(e),t).formatDateTime(this):es}toLocaleParts(t={}){return this.isValid?Wi.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:e=!1,suppressMilliseconds:i=!1,includeOffset:n=!0,extendedZone:o=!1}={}){if(!this.isValid)return null;const s="extended"===t;let r=us(this,s);return r+="T",r+=ps(this,s,e,i,n,o),r}toISODate({format:t="extended"}={}){return this.isValid?us(this,"extended"===t):null}toISOWeekDate(){return ds(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:e=!1,includeOffset:i=!0,includePrefix:n=!1,extendedZone:o=!1,format:s="extended"}={}){if(!this.isValid)return null;return(n?"T":"")+ps(this,"extended"===s,e,t,i,o)}toRFC2822(){return ds(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return ds(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?us(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:e=!1,includeOffsetSpace:i=!0}={}){let n="HH:mm:ss.SSS";return(e||t)&&(i&&(n+=" "),e?n+="z":t&&(n+="ZZ")),ds(this,n,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():es}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(t={}){if(!this.isValid)return{};const e={...this.c};return t.includeConfig&&(e.outputCalendar=this.outputCalendar,e.numberingSystem=this.loc.numberingSystem,e.locale=this.loc.locale),e}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,e="milliseconds",i={}){if(!this.isValid||!t.isValid)return xo.invalid("created by diffing an invalid DateTime");const n={locale:this.locale,numberingSystem:this.numberingSystem,...i},o=(a=e,Array.isArray(a)?a:[a]).map(xo.normalizeUnit),s=t.valueOf()>this.valueOf(),r=Eo(s?this:t,s?t:this,o,n);var a;return s?r.negate():r}diffNow(t="milliseconds",e={}){return this.diff(Ss.now(),t,e)}until(t){return this.isValid?ko.fromDateTimes(this,t):this}hasSame(t,e){if(!this.isValid)return!1;const i=t.valueOf(),n=this.setZone(t.zone,{keepLocalTime:!0});return n.startOf(e)<=i&&i<=n.endOf(e)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const e=t.base||Ss.fromObject({},{zone:this.zone}),i=t.padding?this<e?-t.padding:t.padding:0;let n=["years","months","days","hours","minutes","seconds"],o=t.unit;return Array.isArray(t.unit)&&(n=t.unit,o=void 0),ws(e,this.plus(i),{...t,numeric:"always",units:n,unit:o})}toRelativeCalendar(t={}){return this.isValid?ws(t.base||Ss.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(Ss.isDateTime))throw new Pe("min requires all arguments be DateTimes");return di(t,(t=>t.valueOf()),Math.min)}static max(...t){if(!t.every(Ss.isDateTime))throw new Pe("max requires all arguments be DateTimes");return di(t,(t=>t.valueOf()),Math.max)}static fromFormatExplain(t,e,i={}){const{locale:n=null,numberingSystem:o=null}=i;return Fo(Sn.fromOpts({locale:n,numberingSystem:o,defaultToEN:!0}),t,e)}static fromStringExplain(t,e,i={}){return Ss.fromFormatExplain(t,e,i)}static get DATE_SHORT(){return Be}static get DATE_MED(){return qe}static get DATE_MED_WITH_WEEKDAY(){return Ze}static get DATE_FULL(){return Fe}static get DATE_HUGE(){return Ve}static get TIME_SIMPLE(){return Ue}static get TIME_WITH_SECONDS(){return je}static get TIME_WITH_SHORT_OFFSET(){return He}static get TIME_WITH_LONG_OFFSET(){return We}static get TIME_24_SIMPLE(){return Ge}static get TIME_24_WITH_SECONDS(){return Ke}static get TIME_24_WITH_SHORT_OFFSET(){return Ye}static get TIME_24_WITH_LONG_OFFSET(){return Je}static get DATETIME_SHORT(){return Xe}static get DATETIME_SHORT_WITH_SECONDS(){return Qe}static get DATETIME_MED(){return ti}static get DATETIME_MED_WITH_SECONDS(){return ei}static get DATETIME_MED_WITH_WEEKDAY(){return ii}static get DATETIME_FULL(){return ni}static get DATETIME_FULL_WITH_SECONDS(){return oi}static get DATETIME_HUGE(){return si}static get DATETIME_HUGE_WITH_SECONDS(){return ri}}function Cs(t){if(Ss.isDateTime(t))return t;if(t&&t.valueOf&&li(t.valueOf()))return Ss.fromJSDate(t);if(t&&"object"==typeof t)return Ss.fromObject(t);throw new Pe(`Unknown datetime argument: ${t}, of type ${typeof t}`)}class Es extends nt{constructor(){super(...arguments),this.ttl=6e4,this.max=20,this.keyedAssets={},this.locale=[...navigator.languages],this.fields={},this.groups={},this.languages={},this.featuredFields=[],this.pendingResolves={},this.fetching={}}getLocale(){return this.locale[0]}reset(){this.cache=Te(this.max,this.ttl);const t=[];this.completionEndpoint&&t.push(ee(this.completionEndpoint).then((t=>{this.schema=t.json.context,this.fnOptions=t.json.functions}))),this.fieldsEndpoint&&t.push(this.refreshFields()),this.globalsEndpoint&&t.push(re(this.globalsEndpoint).then((t=>{this.keyedAssets.globals=t.map((t=>t.key))}))),this.languagesEndpoint&&t.push(re(this.languagesEndpoint).then((t=>{this.languages=t.reduce((function(t,e){return t[e.value]=e.name,t}),{})}))),this.groupsEndpoint&&t.push(re(this.groupsEndpoint).then((t=>{t.forEach((t=>{this.groups[t.uuid]=t}))}))),this.workspaceEndpoint&&t.push(ee(this.workspaceEndpoint).then((t=>{this.workspace=t.json;const e=t.headers.get("content-language");e&&(this.locale=[e,...this.locale])}))),this.httpComplete=Promise.all(t)}firstUpdated(){this.reset()}getLanguageCode(){return this.locale.length>0?this.locale[0].split("-")[0]:"en"}refreshGlobals(){re(this.globalsEndpoint).then((t=>{this.keyedAssets.globals=t.map((t=>t.key))}))}refreshFields(){return re(this.fieldsEndpoint).then((t=>{this.keyedAssets.fields=[],this.featuredFields=[],t.forEach((t=>{this.keyedAssets.fields.push(t.key),this.fields[t.key]=t,t.featured&&this.featuredFields.push(t)})),this.featuredFields.sort(((t,e)=>e.priority-t.priority)),this.keyedAssets.fields.sort(),this.fireCustomEvent(_t.StoreUpdated,{url:this.fieldsEndpoint,data:this.keyedAssets.fields})}))}getShortDuration(t,e=null){const i=e||Ss.now();return t.setLocale(this.locale[0]).toRelative({base:i,style:"long"})}getShortDurationFromIso(t,e=null){const i=Ss.fromISO(t),n=e?Ss.fromISO(e):Ss.now();return this.getShortDuration(i,n)}setKeyedAssets(t,e){this.keyedAssets[t]=e}updated(t){super.updated(t)}getCompletionSchema(){return this.schema}getFunctions(){return this.fnOptions}getKeyedAssets(){return this.keyedAssets}getFieldKeys(){return this.keyedAssets.fields||[]}getContactField(t){return this.fields[t]}getFeaturedFields(){return this.featuredFields}getLanguageName(t){return this.languages[t]}isDynamicGroup(t){const e=this.groups[t];return!(e&&!e.query)}getWorkspace(){return this.workspace}formatDate(t){return Ss.fromISO(t).setLocale(this.getLocale()).toLocaleString(Ss.DATETIME_SHORT)}postJSON(t,e=""){return le(t,e)}postForm(t,e){return((t,e)=>{const i=new FormData;return Object.keys(e).forEach((t=>{i.append(t,e[t])})),he(t,i)})(t,e)}postUrl(t,e="",i={},n=null){return ae(t,e,i,n)}getUrl(t,e){return!(e=e||{}).force&&this.cache.has(t)?new Promise((e=>{e(this.cache.get(t))})):ee(t,e.controller,e.headers||{}).then((e=>new Promise(((i,n)=>{e.status>=200&&e.status<=300?(this.cache.set(t,e),i(e)):n("Status: "+e.status)}))))}getResults(t,e){e=e||{};const i="results_"+t,n=this.cache.get(i);return!e.force&&n?new Promise((t=>{t(n)})):new Promise((e=>{const n=this.pendingResolves[t]||[];n.push(e),this.pendingResolves[t]=n,n.length<=1&&oe(t).then((e=>{this.cache.set(i,e);const n=this.pendingResolves[t]||[];for(;n.length>0;){n.pop()(e)}}))}))}updateCache(t,e){this.cache.set(t,e),this.fireCustomEvent(_t.StoreUpdated,{url:t,data:e})}makeRequest(t,e){const i=this.fetching[t],n=(new Date).getTime();if(i&&n-i<500)return;this.fetching[t]=n,e=e||{};const o=this.cache.get(t);o&&!e.force?this.fireCustomEvent(_t.StoreUpdated,{url:t,data:o}):oe(t).then((i=>{i=e.prepareData?e.prepareData(i):i,this.cache.set(t,i),this.fireCustomEvent(_t.StoreUpdated,{url:t,data:i}),delete this.fetching[t]}))}}t([st({type:Number})],Es.prototype,"ttl",void 0),t([st({type:Number})],Es.prototype,"max",void 0),t([st({type:String,attribute:"completion"})],Es.prototype,"completionEndpoint",void 0),t([st({type:String,attribute:"fields"})],Es.prototype,"fieldsEndpoint",void 0),t([st({type:String,attribute:"groups"})],Es.prototype,"groupsEndpoint",void 0),t([st({type:String,attribute:"globals"})],Es.prototype,"globalsEndpoint",void 0),t([st({type:String,attribute:"languages"})],Es.prototype,"languagesEndpoint",void 0),t([st({type:String,attribute:"workspace"})],Es.prototype,"workspaceEndpoint",void 0),t([st({type:Object,attribute:!1})],Es.prototype,"schema",void 0),t([st({type:Object,attribute:!1})],Es.prototype,"fnOptions",void 0),t([st({type:Object,attribute:!1})],Es.prototype,"keyedAssets",void 0);class Ts extends nt{constructor(){super(...arguments),this.marginHorizontal=0,this.marginVertical=7,this.scrollPct=75,this.cursorIndex=-1,this.nameKey="name",this.loading=!1,this.hideShadow=!1,this.getName=function(t){return t[this.nameKey||"name"]},this.renderInputOption=function(){return null},this.scrollHeight=0,this.triggerScroll=!1,this.scrollParent=null,this.setCursor=ve((function(t){t!==this.cursorIndex&&(this.cursorIndex=t)}),50)}static get styles(){return r`
467
467
  .options-container {
468
468
  background: var(--color-options-bg);
469
469
  user-select: none;