UNPKG

gantt-schedule-timeline-calendar

Version:

Gantt, Schedule, Timeline, Calendar components all in one. [gantt, timeline, schedule, scheduler, calendar, booking, gantt chart, reservation, javascript gantt, javascript timeline, javascript schedule, javascript scheduler, javascript calendar, javascrip

98 lines 414 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).GSTC=e()}(this,(function(){"use strict"; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const t=globalThis,e=t.trustedTypes,i=e?e.createPolicy("lit-html",{createHTML:t=>t}):void 0,s="$lit$",a=`lit$${Math.random().toFixed(9).slice(2)}$`,n="?"+a,o=`<${n}>`,r=document,l=()=>r.createComment(""),c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,h=Array.isArray,u=t=>h(t)||"function"==typeof t?.[Symbol.iterator],d="[ \t\n\f\r]",m=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,g=/-->/g,f=/>/g,p=RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),b=/'/g,v=/"/g,y=/^(?:script|style|textarea|title)$/i,w=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),k=w(1),x=w(2),D=w(3),$=Symbol.for("lit-noChange"),S=Symbol.for("lit-nothing"),P=new WeakMap,z=r.createTreeWalker(r,129);function C(t,e){if(!h(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==i?i.createHTML(e):e}const I=(t,e)=>{const i=t.length-1,n=[];let r,l=2===e?"<svg>":3===e?"<math>":"",c=m;for(let e=0;e<i;e++){const i=t[e];let h,u,d=-1,w=0;for(;w<i.length&&(c.lastIndex=w,u=c.exec(i),null!==u);)w=c.lastIndex,c===m?"!--"===u[1]?c=g:void 0!==u[1]?c=f:void 0!==u[2]?(y.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=p):void 0!==u[3]&&(c=p):c===p?">"===u[0]?(c=r??m,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,h=u[1],c=void 0===u[3]?p:'"'===u[3]?v:b):c===v||c===b?c=p:c===g||c===f?c=m:(c=p,r=void 0);const k=c===p&&t[e+1].startsWith("/>")?" ":"";l+=c===m?i+o:d>=0?(n.push(h),i.slice(0,d)+s+i.slice(d)+a+k):i+a+(-2===d?e:k)}return[C(t,l+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),n]};class T{constructor({strings:t,_$litType$:i},o){let r;this.parts=[];let c=0,h=0;const u=t.length-1,d=this.parts,[m,g]=I(t,i);if(this.el=T.createElement(m,o),z.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=z.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(s)){const e=g[h++],i=r.getAttribute(t).split(a),s=/([.?@])?(.*)/.exec(e);d.push({type:1,index:c,name:s[2],strings:i,ctor:"."===s[1]?O:"?"===s[1]?j:"@"===s[1]?R:_}),r.removeAttribute(t)}else t.startsWith(a)&&(d.push({type:6,index:c}),r.removeAttribute(t));if(y.test(r.tagName)){const t=r.textContent.split(a),i=t.length-1;if(i>0){r.textContent=e?e.emptyScript:"";for(let e=0;e<i;e++)r.append(t[e],l()),z.nextNode(),d.push({type:2,index:++c});r.append(t[i],l())}}}else if(8===r.nodeType)if(r.data===n)d.push({type:2,index:c});else{let t=-1;for(;-1!==(t=r.data.indexOf(a,t+1));)d.push({type:7,index:c}),t+=a.length-1}c++}}static createElement(t,e){const i=r.createElement("template");return i.innerHTML=t,i}}function A(t,e,i=t,s){if(e===$)return e;let a=void 0!==s?i._$Co?.[s]:i._$Cl;const n=c(e)?void 0:e._$litDirective$;return a?.constructor!==n&&(a?._$AO?.(!1),void 0===n?a=void 0:(a=new n(t),a._$AT(t,i,s)),void 0!==s?(i._$Co??=[])[s]=a:i._$Cl=a),void 0!==a&&(e=A(t,a._$AS(t,e.values),a,s)),e}let M=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??r).importNode(e,!0);z.currentNode=s;let a=z.nextNode(),n=0,o=0,l=i[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new W(a,a.nextSibling,this,t):1===l.type?e=new l.ctor(a,l.name,l.strings,this,t):6===l.type&&(e=new L(a,this,t)),this._$AV.push(e),l=i[++o]}n!==l?.index&&(a=z.nextNode(),n++)}return z.currentNode=r,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}};class W{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=S,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}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=A(this,t,e),c(t)?t===S||null==t||""===t?(this._$AH!==S&&this._$AR(),this._$AH=S):t!==this._$AH&&t!==$&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==S&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=T.createElement(C(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new M(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=P.get(t.strings);return void 0===e&&P.set(t.strings,e=new T(t)),e}k(t){h(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const a of t)s===e.length?e.push(i=new W(this.O(l()),this.O(l()),this,this.options)):i=e[s],i._$AI(a),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class _{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,a){this.type=1,this._$AH=S,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=a,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=S}_$AI(t,e=this,i,s){const a=this.strings;let n=!1;if(void 0===a)t=A(this,t,e,0),n=!c(t)||t!==this._$AH&&t!==$,n&&(this._$AH=t);else{const s=t;let o,r;for(t=a[0],o=0;o<a.length-1;o++)r=A(this,s[i+o],e,o),r===$&&(r=this._$AH[o]),n||=!c(r)||r!==this._$AH[o],r===S?t=S:t!==S&&(t+=(r??"")+a[o+1]),this._$AH[o]=r}n&&!s&&this.j(t)}j(t){t===S?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class O extends _{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===S?void 0:t}}class j extends _{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==S)}}class R extends _{constructor(t,e,i,s,a){super(t,e,i,s,a),this.type=5}_$AI(t,e=this){if((t=A(this,t,e,0)??S)===$)return;const i=this._$AH,s=t===S&&i!==S||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,a=t!==S&&(i===S||s);s&&this.element.removeEventListener(this.name,this,i),a&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class L{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){A(this,t)}}const E={M:s,P:a,A:n,C:1,L:I,R:M,D:u,V:A,I:W,H:_,N:j,U:R,B:O,F:L},N=t.litHtmlPolyfillSupport;N?.(T,W),(t.litHtmlVersions??=[]).push("3.2.1");const V=(t,e,i)=>{const s=i?.renderBefore??e;let a=s._$litPart$;if(void 0===a){const t=i?.renderBefore??null;s._$litPart$=a=new W(e.insertBefore(l(),t),t,void 0,i??{})}return a._$AI(t),a};var G=Object.freeze({__proto__:null,_$LH:E,html:k,mathml:D,noChange:$,nothing:S,render:V,svg:x}); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const B={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},H=t=>(...e)=>({_$litDirective$:t,values:e});let q=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}; /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const{I:Y}=E,F=(t,e)=>void 0!==t?._$litType$,U=t=>void 0===t.strings,K=()=>document.createComment(""),Z=(t,e,i)=>{const s=t._$AA.parentNode,a=void 0===e?t._$AB:e._$AA;if(void 0===i){const e=s.insertBefore(K(),a),n=s.insertBefore(K(),a);i=new Y(e,n,t,t.options)}else{const e=i._$AB.nextSibling,n=i._$AM,o=n!==t;if(o){let e;i._$AQ?.(t),i._$AM=t,void 0!==i._$AP&&(e=t._$AU)!==n._$AU&&i._$AP(e)}if(e!==a||o){let t=i._$AA;for(;t!==e;){const e=t.nextSibling;s.insertBefore(t,a),t=e}}}return i},X=(t,e,i=t)=>(t._$AI(e,i),t),Q={},J=(t,e=Q)=>t._$AH=e,tt=t=>t._$AH,et=t=>{t._$AP?.(!1,!0);let e=t._$AA;const i=t._$AB.nextSibling;for(;e!==i;){const t=e.nextSibling;e.remove(),e=t}},it=t=>{t._$AR()},st=(t,e)=>{const i=t._$AN;if(void 0===i)return!1;for(const t of i)t._$AO?.(e,!1),st(t,e);return!0},at=t=>{let e,i;do{if(void 0===(e=t._$AM))break;i=e._$AN,i.delete(t),t=e}while(0===i?.size)},nt=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(void 0===i)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),lt(e)}}; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */function ot(t){void 0!==this._$AN?(at(this),this._$AM=t,nt(this)):this._$AM=t}function rt(t,e=!1,i=0){const s=this._$AH,a=this._$AN;if(void 0!==a&&0!==a.size)if(e)if(Array.isArray(s))for(let t=i;t<s.length;t++)st(s[t],!1),at(s[t]);else null!=s&&(st(s,!1),at(s));else st(this,t)}const lt=t=>{t.type==B.CHILD&&(t._$AP??=rt,t._$AQ??=ot)};class ct extends q{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),nt(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(st(this,t),at(this))}setValue(t){if(U(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}} /** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */class ht{constructor(t){this.Y=t}disconnect(){this.Y=void 0}reconnect(t){this.Y=t}deref(){return this.Y}}let ut=class{constructor(){this.Z=void 0,this.q=void 0}get(){return this.Z}pause(){this.Z??=new Promise((t=>this.q=t))}resume(){this.q?.(),this.Z=this.q=void 0}},dt=class extends ct{constructor(){super(...arguments),this._$CK=new ht(this),this._$CX=new ut}render(t,e){return $}update(t,[e,i]){if(this.isConnected||this.disconnected(),e===this._$CJ)return $;this._$CJ=e;let s=0;const{_$CK:a,_$CX:n}=this;return(async(t,e)=>{for await(const i of t)if(!1===await e(i))return})(e,(async t=>{for(;n.get();)await n.get();const o=a.deref();if(void 0!==o){if(o._$CJ!==e)return!1;void 0!==i&&(t=i(t,s)),o.commitValue(t,s),s++}return!0})),$}commitValue(t,e){this.setValue(t)}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const mt=H(dt),gt=H(class extends dt{constructor(t){if(super(t),t.type!==B.CHILD)throw Error("asyncAppend can only be used in child expressions")}update(t,e){return this._$Ctt=t,super.update(t,e)}commitValue(t,e){0===e&&it(this._$Ctt);const i=Z(this._$Ctt);X(i,t)}}),ft=t=>(t=>null!=t?._$litType$?.h)(t)?t._$litType$.h:t.strings,pt=H(class extends q{constructor(t){super(t),this.et=new WeakMap}render(t){return[t]}update(t,[e]){const i=F(this.it)?ft(this.it):null,s=F(e)?ft(e):null;if(null!==i&&(null===s||i!==s)){const e=tt(t).pop();let s=this.et.get(i);if(void 0===s){const t=document.createDocumentFragment();s=V(S,t),s.setConnected(!1),this.et.set(i,s)}J(s,[e]),Z(s,void 0,e)}if(null!==s){if(null===i||i!==s){const e=this.et.get(s);if(void 0!==e){const i=tt(e).pop();it(t),Z(t,void 0,i),J(t,[i])}}this.it=e}else this.it=void 0;return this.render(e)}}),bt={},vt=H(class extends q{constructor(){super(...arguments),this.ot=bt}render(t,e){return e()}update(t,[e,i]){if(Array.isArray(e)){if(Array.isArray(this.ot)&&this.ot.length===e.length&&e.every(((t,e)=>t===this.ot[e])))return $}else if(this.ot===e)return $;return this.ot=Array.isArray(e)?Array.from(e):e,this.render(e,i)}}),yt=t=>t??S /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */,wt=(t,e,i)=>{const s=new Map;for(let a=e;a<=i;a++)s.set(t[a],a);return s},kt=H(class extends q{constructor(t){if(super(t),t.type!==B.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,i){let s;void 0===i?i=e:void 0!==e&&(s=e);const a=[],n=[];let o=0;for(const e of t)a[o]=s?s(e,o):o,n[o]=i(e,o),o++;return{values:n,keys:a}}render(t,e,i){return this.dt(t,e,i).values}update(t,[e,i,s]){const a=tt(t),{values:n,keys:o}=this.dt(e,i,s);if(!Array.isArray(a))return this.ut=o,n;const r=this.ut??=[],l=[];let c,h,u=0,d=a.length-1,m=0,g=n.length-1;for(;u<=d&&m<=g;)if(null===a[u])u++;else if(null===a[d])d--;else if(r[u]===o[m])l[m]=X(a[u],n[m]),u++,m++;else if(r[d]===o[g])l[g]=X(a[d],n[g]),d--,g--;else if(r[u]===o[g])l[g]=X(a[u],n[g]),Z(t,l[g+1],a[u]),u++,g--;else if(r[d]===o[m])l[m]=X(a[d],n[m]),Z(t,a[u],a[d]),d--,m++;else if(void 0===c&&(c=wt(o,m,g),h=wt(r,u,d)),c.has(r[u]))if(c.has(r[d])){const e=h.get(o[m]),i=void 0!==e?a[e]:null;if(null===i){const e=Z(t,a[u]);X(e,n[m]),l[m]=e}else l[m]=X(i,n[m]),Z(t,a[u],i),a[e]=null;m++}else et(a[d]),d--;else et(a[u]),u++;for(;m<=g;){const e=Z(t,l[g+1]);X(e,n[m]),l[m++]=e}for(;u<=d;){const t=a[u++];null!==t&&et(t)}return this.ut=o,J(t,l),$}}); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ let xt=class extends q{constructor(t){if(super(t),this.it=S,t.type!==B.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===S||null==t)return this._t=void 0,this.it=t;if(t===$)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};xt.directiveName="unsafeHTML",xt.resultType=1;const Dt=H(xt),$t=t=>!(t=>null===t||"object"!=typeof t&&"function"!=typeof t)(t)&&"function"==typeof t.then,St=1073741823; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */class Pt extends ct{constructor(){super(...arguments),this._$Cwt=St,this._$Cbt=[],this._$CK=new ht(this),this._$CX=new ut}render(...t){return t.find((t=>!$t(t)))??$}update(t,e){const i=this._$Cbt;let s=i.length;this._$Cbt=e;const a=this._$CK,n=this._$CX;this.isConnected||this.disconnected();for(let t=0;t<e.length&&!(t>this._$Cwt);t++){const o=e[t];if(!$t(o))return this._$Cwt=t,o;t<s&&o===i[t]||(this._$Cwt=St,s=0,Promise.resolve(o).then((async t=>{for(;n.get();)await n.get();const e=a.deref();if(void 0!==e){const i=e._$Cbt.indexOf(o);i>-1&&i<e._$Cwt&&(e._$Cwt=i,e.setValue(t))}})))}return $}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}const zt=H(Pt),Ct=H(class extends q{constructor(t){if(super(t),t.type!==B.PROPERTY&&t.type!==B.ATTRIBUTE&&t.type!==B.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!U(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===$||e===S)return e;const i=t.element,s=t.name;if(t.type===B.PROPERTY){if(e===i[s])return $}else if(t.type===B.BOOLEAN_ATTRIBUTE){if(!!e===i.hasAttribute(s))return $}else if(t.type===B.ATTRIBUTE&&i.getAttribute(s)===e+"")return $;return J(t),e}}),It="important",Tt=" !"+It,At=H(class extends q{constructor(t){if(super(t),t.type!==B.ATTRIBUTE||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,i)=>{const s=t[i];return null==s?e:e+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(t,[e]){const{style:i}=t.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(e)),this.render(e);for(const t of this.ft)null==e[t]&&(this.ft.delete(t),t.includes("-")?i.removeProperty(t):i[t]=null);for(const t in e){const s=e[t];if(null!=s){this.ft.add(t);const e="string"==typeof s&&s.endsWith(Tt);t.includes("-")||e?i.setProperty(t,e?s.slice(0,-11):s,e?It:""):i[t]=s}}return $}}),Mt=H(class extends q{constructor(t){if(super(t),t.type!==B.ATTRIBUTE||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const i=t.element.classList;for(const t of this.st)t in e||(i.remove(t),this.st.delete(t));for(const t in e){const s=!!e[t];s===this.st.has(t)||this.nt?.has(t)||(s?(i.add(t),this.st.add(t)):(i.remove(t),this.st.delete(t)))}return $}}); /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ /** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ function Wt(t,e,i){return t?e(t):i?.(t)} /** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const _t=(t,e,i)=>{for(const i of e)if(i[0]===t)return(0,i[1])();return i?.()}; /** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */function*Ot(t,e){if(void 0!==t){let i=0;for(const s of t)yield e(s,i++)}} /** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */function*jt(t,e){const i="function"==typeof e;if(void 0!==t){let s=-1;for(const a of t)s>-1&&(yield i?e(s):e),s++,yield a}} /** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */function*Rt(t,e,i=1){const s=void 0===e?0:t;e??=t;for(let t=s;i>0?t<e:e<t;t+=i)yield t} /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const Lt=H(class extends q{constructor(t){if(super(t),t.type!==B.CHILD)throw Error("templateContent can only be used in child bindings")}render(t){return this.vt===t?$:(this.vt=t,document.importNode(t.content,!0))}}); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */class Et extends xt{}Et.directiveName="unsafeSVG",Et.resultType=2;const Nt=H(Et); /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */class Vt{}const Gt=new WeakMap,Bt=H(class extends ct{render(t){return S}update(t,[e]){const i=e!==this.Y;return i&&void 0!==this.Y&&this.rt(void 0),(i||this.lt!==this.ct)&&(this.Y=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),S}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.Y){const e=this.ht??globalThis;let i=Gt.get(e);void 0===i&&(i=new WeakMap,Gt.set(e,i)),void 0!==i.get(this.Y)&&this.Y.call(this.ht,void 0),i.set(this.Y,t),void 0!==t&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){return"function"==typeof this.Y?Gt.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),Ht=new WeakMap;class qt extends q{update(t,e){return e[0].execute(t),$}render(t){return t.toString()}}class Yt{constructor(t,e={schedule:!1}){this.schedule=!1,this.style=t,this._directive=H(qt),this.execute=this.execute.bind(this),this.schedule=e.schedule}directive(){return this._directive(this)}setStyle(t){for(const t in this.style)delete this.style[t];for(const e in t)this.style[e]=t[e]}toString(){return Object.keys(this.style).reduce(((t,e)=>{const i=this.style[e];return null==i?t:t+`${e=e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}_getInternalStyle(){return this.element?Ht.get(this.element):null}updateStyle(t,e,i){const s=i.previousStyle;for(const t of e)t&&!this.style[t]&&(i.toRemove.includes(t)||i.toRemove.push(t));for(const t in s)t&&t in this.style&&!this.style[t]&&e.includes(t)&&(i.toRemove.includes(t)||i.toRemove.push(t));for(const t in this.style){if(!t)continue;if(!(t in this.style))continue;const a=this.style[t];if(!a)continue;const n=s[t];void 0!==n&&n===a&&e.includes(t)||i.toUpdate.push(t)}if(i.toRemove.length||i.toUpdate.length){for(const e of i.toRemove)t.removeProperty(e),t[e]&&delete t[e],i.elementStyles=i.elementStyles.filter((t=>t!==e));for(const e of i.toUpdate){const s=this.style[e];s&&(e.includes("-")?t.setProperty(e,s):t[e]=s,i.elementStyles.includes(e)||i.elementStyles.push(e))}i.previousStyle=Object.assign({},this.style)}}execute(t){const e=t.element;let i;this.element=e,Ht.has(e)?i=Ht.get(e):(i={toUpdate:[],toRemove:[],previousStyle:{},elementStyles:[],styleTaken:!1},Ht.set(e,i)),i.toRemove.length=0,i.toUpdate.length=0;const s=e.style;let a;if(i.styleTaken)a=i.elementStyles;else{i.elementStyles=a=[];for(let t=i.length;t--;)a.push(s[t]);i.styleTaken=!0}this.schedule?requestAnimationFrame((()=>{this.updateStyle(s,a,i)})):this.updateStyle(s,a,i),Ht.set(e,i)}}const Ft=new WeakMap;const Ut=H(class extends q{render(t){return S}update(t,e){if("boolean"!=typeof e[0])throw new Error("[vido] Detach directive argument should be a boolean.");let i=e[0];const s=t.element;if(i)Ft.has(t)||Ft.set(t,{element:s,nextSibling:s.nextSibling,previousSibling:s.previousSibling,parent:s.parentNode}),s.remove();else{const e=Ft.get(t);e&&(e.nextSibling&&e.nextSibling.parentNode?e.nextSibling.parentNode.insertBefore(e.element,e.nextSibling):e.previousSibling&&e.previousSibling.parentNode?e.previousSibling.parentNode.appendChild(e.element):e.parent&&e.parent.appendChild(e.element),Ft.delete(t))}return this.render(i)}});class Kt{constructor(){this.isAction=!0}}Kt.prototype.isAction=!0;const Zt={element:document.createTextNode(""),axis:"xy",threshold:10,onDown(){},onMove(){},onUp(){},onWheel(){}},Xt="undefined"!=typeof PointerEvent;let Qt=0;class Jt extends Kt{constructor(t,e){super(),this.moving="",this.initialX=0,this.initialY=0,this.lastY=0,this.lastX=0,this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onWheel=this.onWheel.bind(this),this.element=t,this.id=++Qt,this.options=Object.assign(Object.assign({},Zt),e.pointerOptions),Xt?(t.addEventListener("pointerdown",this.onPointerDown),document.addEventListener("pointermove",this.onPointerMove),document.addEventListener("pointerup",this.onPointerUp)):(t.addEventListener("touchstart",this.onPointerDown),document.addEventListener("touchmove",this.onPointerMove,{passive:!1}),document.addEventListener("touchend",this.onPointerUp),document.addEventListener("touchcancel",this.onPointerUp),t.addEventListener("mousedown",this.onPointerDown),document.addEventListener("mousemove",this.onPointerMove,{passive:!1}),document.addEventListener("mouseup",this.onPointerUp))}normalizeMouseWheelEvent(t){let e=t.deltaX||0,i=t.deltaY||0,s=t.deltaZ||0;const a=t.deltaMode,n=parseInt(getComputedStyle(t.target).getPropertyValue("line-height"));let o=1;switch(a){case 1:o=n;break;case 2:o=window.height}return e*=o,i*=o,s*=o,{x:e,y:i,z:s,event:t}}onWheel(t){const e=this.normalizeMouseWheelEvent(t);this.options.onWheel(e)}normalizePointerEvent(t){let e={x:0,y:0,pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0,event:t};switch(t.type){case"wheel":const i=this.normalizeMouseWheelEvent(t);e.x=i.x,e.y=i.y,e.pageX=e.x,e.pageY=e.y,e.screenX=e.x,e.screenY=e.y,e.clientX=e.x,e.clientY=e.y;break;case"touchstart":case"touchmove":case"touchend":case"touchcancel":e.x=t.changedTouches[0].screenX,e.y=t.changedTouches[0].screenY,e.pageX=t.changedTouches[0].pageX,e.pageY=t.changedTouches[0].pageY,e.screenX=t.changedTouches[0].screenX,e.screenY=t.changedTouches[0].screenY,e.clientX=t.changedTouches[0].clientX,e.clientY=t.changedTouches[0].clientY;break;default:e.x=t.x,e.y=t.y,e.pageX=t.pageX,e.pageY=t.pageY,e.screenX=t.screenX,e.screenY=t.screenY,e.clientX=t.clientX,e.clientY=t.clientY}return e}onPointerDown(t){if("mousedown"===t.type&&0!==t.button)return;this.moving="xy";const e=this.normalizePointerEvent(t);this.lastX=e.x,this.lastY=e.y,this.initialX=e.x,this.initialY=e.y,this.options.onDown(e)}handleX(t){let e=t.x-this.lastX;return this.lastY=t.y,this.lastX=t.x,e}handleY(t){let e=t.y-this.lastY;return this.lastY=t.y,this.lastX=t.x,e}onPointerMove(t){if(""===this.moving||"mousemove"===t.type&&0!==t.button)return;const e=this.normalizePointerEvent(t);if("x|y"===this.options.axis){let i=0,s=0;("x"===this.moving||"xy"===this.moving&&Math.abs(e.x-this.initialX)>this.options.threshold)&&(this.moving="x",i=this.handleX(e)),("y"===this.moving||"xy"===this.moving&&Math.abs(e.y-this.initialY)>this.options.threshold)&&(this.moving="y",s=this.handleY(e)),this.options.onMove({movementX:i,movementY:s,x:e.x,y:e.y,initialX:this.initialX,initialY:this.initialY,lastX:this.lastX,lastY:this.lastY,event:t})}else if("xy"===this.options.axis){let i=0,s=0;Math.abs(e.x-this.initialX)>this.options.threshold&&(i=this.handleX(e)),Math.abs(e.y-this.initialY)>this.options.threshold&&(s=this.handleY(e)),this.options.onMove({movementX:i,movementY:s,x:e.x,y:e.y,initialX:this.initialX,initialY:this.initialY,lastX:this.lastX,lastY:this.lastY,event:t})}else if("x"===this.options.axis)("x"===this.moving||"xy"===this.moving&&Math.abs(e.x-this.initialX)>this.options.threshold)&&(this.moving="x",this.options.onMove({movementX:this.handleX(e),movementY:0,initialX:this.initialX,initialY:this.initialY,lastX:this.lastX,lastY:this.lastY,event:t}));else if("y"===this.options.axis){let i=0;("y"===this.moving||"xy"===this.moving&&Math.abs(e.y-this.initialY)>this.options.threshold)&&(this.moving="y",i=this.handleY(e)),this.options.onMove({movementX:0,movementY:i,x:e.x,y:e.y,initialX:this.initialX,initialY:this.initialY,lastX:this.lastX,lastY:this.lastY,event:t})}}onPointerUp(t){this.moving="";const e=this.normalizePointerEvent(t);this.options.onUp({movementX:0,movementY:0,x:e.x,y:e.y,initialX:this.initialX,initialY:this.initialY,lastX:this.lastX,lastY:this.lastY,event:t}),this.lastY=0,this.lastX=0}destroy(t){Xt?(t.removeEventListener("pointerdown",this.onPointerDown),document.removeEventListener("pointermove",this.onPointerMove),document.removeEventListener("pointerup",this.onPointerUp)):(t.removeEventListener("mousedown",this.onPointerDown),document.removeEventListener("mousemove",this.onPointerMove),document.removeEventListener("mouseup",this.onPointerUp),t.removeEventListener("touchstart",this.onPointerDown),document.removeEventListener("touchmove",this.onPointerMove),document.removeEventListener("touchend",this.onPointerUp),document.removeEventListener("touchcancel",this.onPointerUp))}}function te(t){let e=0;return function(i){e||(e=requestAnimationFrame((function(){e=0,t.apply(void 0,[i])})))}}function ee(t){return null==t||"string"==typeof t||"number"==typeof t||"boolean"==typeof t||"bigint"==typeof t||"symbol"==typeof t}function ie(t){return!ee(t)&&(t&&t.constructor?"Object"===t.constructor.name:"object"==typeof t&&null!==t)}function se(t){return!ee(t)&&(Array.isArray(t)||ie(t))}function ae(t,...e){const i=e.shift();if(ie(i)){ie(t)||(t=Object.create(null));for(const e in i){const s=i[e];se(s)?t[e]=ae(t[e],s):t[e]=s}}else if(Array.isArray(i)){const e=i.length;Array.isArray(t)?t.length=e:t=new Array(e);let s=0;for(;s<e;s++){const e=i[s];se(e)?t[s]=ae(t[s],e):t[s]=e}void 0!==i.raw&&(t.raw=i.raw.slice())}else t=i;return e.length?ae(t,...e):t}function ne(t){if(void 0!==t.actions){const e=t.actions.map((t=>{const e=Object.assign({},t),i=Object.assign({},e.props);return delete i.state,delete i.api,delete e.element,e.props=i,e}));t.actions=e}return ae({},t)}var oe={mergeDeep:ae,clone:ne,schedule:te};class re{constructor(t,e){this.slotInstances={},this.destroyed=!1,this.vido=t,this.props=e,this.destroy=this.destroy.bind(this),this.change=this.change.bind(this),this.html=this.html.bind(this),this.getInstances=this.getInstances.bind(this),this.setComponents=this.setComponents.bind(this),this.vido.onDestroy((()=>{this.destroy()}))}setComponents(t){if(t&&!this.destroyed){for(const e in t){const i=t[e];void 0===this.slotInstances[e]&&(this.slotInstances[e]=[]);for(const t of this.slotInstances[e])t.destroy();this.slotInstances[e].length=0;for(const t of i)this.slotInstances[e].push(this.vido.createComponent(t,this.props))}this.vido.update()}}destroy(){if(!this.destroyed){for(const t in this.slotInstances){for(const e of this.slotInstances[t])e.destroy();this.slotInstances[t].length=0}this.destroyed=!0}}change(t,e=void 0){if(!this.destroyed){this.props=t;for(const i in this.slotInstances){const s=this.slotInstances[i];for(const i of s)i.change(t,e)}}}getInstances(t){return this.destroyed?[]:void 0===t?this.slotInstances:this.slotInstances[t]}html(t,e){if(this.destroyed)return;if(!this.slotInstances[t]||0===this.slotInstances[t].length)return e;let i=e;for(const e of this.slotInstances[t])i=e.html(i);return i}getProps(){return this.props}isDestroyed(){return this.destroyed}}class le extends q{update(t,e){if("function"!=typeof e[0])throw new Error("[vido] GetElementDirective argument should be a function.");(0,e[0])(t.element)}render(){return S}}function ce(t,e){let i=0;const s=new Map;let a,n,o=new Map,r=0;const l=[],c=Promise.resolve(),h={},u=function(t){return class extends q{update(e,i){const s=e.element,a=i[0],n=i[1],o=i[2];for(const e of n)if(void 0!==e){let i;if(t.has(a))for(const n of t.get(a))if(n.componentAction.create===e&&n.element===s){i=n;break}if(i)i.props=o;else{void 0!==s.vido&&delete s.vido;const i={instance:a,componentAction:{create:e,update(){},destroy(){}},element:s,props:o};let n=[];t.has(a)&&(n=t.get(a)),n.push(i),t.set(a,n)}}}render(t,e,i){return S}}}(o);class d{constructor(t){this.instance=t}create(t,e){const i=H(u);return()=>i(this.instance,t,e)}}const m=function(t,e,i){return class{constructor(t,e,i={}){this.destroyed=!1,this.instance=t,this.name=e.name,this.vidoInstance=e,this.props=i,this.destroy=this.destroy.bind(this),this.update=this.update.bind(this),this.change=this.change.bind(this),this.html=this.html.bind(this)}destroy(){this.destroyed||(this.vidoInstance.debug&&(console.groupCollapsed(`destroying component ${this.instance}`),console.log(i({components:t.keys(),actionsByInstance:e})),console.trace(),console.groupEnd()),this.vidoInstance.destroyComponent(this.instance,this.vidoInstance),this.destroyed=!0)}update(s=void 0){return this.vidoInstance.debug&&(console.groupCollapsed(`updating component ${this.instance}`),console.log(i({components:t.keys(),actionsByInstance:e})),console.trace(),console.groupEnd()),this.vidoInstance.updateTemplate(s)}change(s,a={}){this.vidoInstance.debug&&(console.groupCollapsed(`changing component ${this.instance}`),console.log(i({props:this.props,newProps:s,components:t.keys(),actionsByInstance:e})),console.trace(),console.groupEnd());const n=t.get(this.instance);n&&n.change(s,a)}html(e={}){const i=t.get(this.instance);if(i&&!i.destroyed)return i.update(e,this.vidoInstance)}_getComponents(){return t}_getActions(){return e}}}(s,o,ne),g=function(t,e,i){return class{constructor(t,e,i){this.destroyed=!1,this.instance=t,this.vidoInstance=e,this.renderFunction=i,this.destroy=this.destroy.bind(this),this.update=this.update.bind(this),this.change=this.change.bind(this)}destroy(){if(!this.destroyed){this.vidoInstance.debug&&(console.groupCollapsed(`component destroy method fired ${this.instance}`),console.log(i({props:this.vidoInstance.props,components:t.keys(),destroyable:this.vidoInstance.destroyable,actionsByInstance:e})),console.trace(),console.groupEnd()),this.content&&"function"==typeof this.content.destroy&&this.content.destroy();for(const t of this.vidoInstance.destroyable)t();this.vidoInstance.onChangeFunctions.length=0,this.vidoInstance.destroyable.length=0,this.vidoInstance.destroyed=!0,this.destroyed=!0,this.vidoInstance.update()}}update(s={}){return this.vidoInstance.debug&&(console.groupCollapsed(`component update method fired ${this.instance}`),console.log(i({components:t.keys(),actionsByInstance:e})),console.trace(),console.groupEnd()),this.renderFunction(s)}change(s,a={leave:!1}){const n=s;this.vidoInstance.debug&&(console.groupCollapsed(`component change method fired ${this.instance}`),console.log(i({props:n,components:t.keys(),onChangeFunctions:this.vidoInstance.onChangeFunctions,changedProps:s,actionsByInstance:e})),console.trace(),console.groupEnd());for(const t of this.vidoInstance.onChangeFunctions)t(s,a)}}}(s,o,ne);class f{constructor(i="",a=""){this.instance="",this.name="",this.destroyable=[],this.destroyed=!1,this.onChangeFunctions=[],this.debug=!1,this.state=t,this.api=e,this.lastProps={},this.html=k,this.svg=x,this.lithtml=G,this.directive=H,this.asyncAppend=gt,this.asyncReplace=mt,this.cache=pt,this.classMap=Mt,this.styleMap=At,this.StyleMap=Yt,this.guard=vt,this.live=Ct,this.ifDefined=yt,this.repeat=kt,this.unsafeHTML=Dt,this.until=zt,this.when=Wt,this.choose=_t,this.map=Ot,this.join=jt,this.range=Rt,this.templateContent=Lt,this.unsafeSVG=Nt,this.ref=Bt,this.schedule=te,this.getElement=H(le),this.actionsByInstance=()=>{},this.detach=Ut,this.PointerAction=Jt,this.Action=Kt,this.Slots=re,this._components=s,this._actions=o,this.instance=i,this.reuseComponents=this.reuseComponents.bind(this),this.onDestroy=this.onDestroy.bind(this),this.onChange=this.onChange.bind(this),this.update=this.update.bind(this),this.destroyComponent=this.destroyComponent.bind(this);for(const t in h)this[t]=h[t].bind(this);this.name=a,this.Actions=new d(i)}static addMethod(t,e){h[t]=e}onDestroy(t){this.destroyable.push(t)}onChange(t){this.onChangeFunctions.push(t)}update(t){return this.updateTemplate(t)}reuseComponents(t,e,i,s,a=!0,n=!1){const o=[],r=t.length,l=e.length;let c=!1;!a||void 0!==e&&0!==e.length||(c=!0);let h=0;if(r<l){let a=l-r;for(;a;){const n=e[l-a],r=this.createComponent(s,i(n));t.push(r),o.push(r),a--}}else if(r>l){let e=r-l;if(a)c=!0,h=r-e;else{for(;e;){const i=r-e;o.push(t[i]),t[i].destroy(),e--}t.length=l}}let u=0;n&&console.log("modified components",o),n&&console.log("current components",t),n&&console.log("data array",e);for(const s of t){const t=e[u];n&&console.log(`reuse components data at '${u}'`,t),s&&!o.includes(s)&&(n&&console.log("getProps fn result",i(t)),s.change(i(t),{leave:c&&u>=h})),u++}}createComponent(t,e={}){const a=t.name+":"+i++;let n;n=new f(a,t.name);const r=new m(a,n,e),l=new g(a,n,t(n,e));return s.set(a,l),s.get(a).change(e),n.debug&&(console.groupCollapsed(`component created ${a}`),console.log(ne({props:e,components:s.keys(),actionsByInstance:o})),console.trace(),console.groupEnd()),r}destroyComponent(t,e){if(e.debug&&(console.groupCollapsed(`destroying component ${t}...`),console.log(ne({components:s.keys(),actionsByInstance:o})),console.trace(),console.groupEnd()),o.has(t))for(const e of o.get(t))"function"==typeof e.componentAction.destroy&&e.componentAction.destroy(e.element,e.props);o.delete(t);const i=s.get(t);i?(i.destroy(),s.delete(t),e.debug&&(console.groupCollapsed(`component destroyed ${t}`),console.log(ne({components:s.keys(),actionsByInstance:o})),console.trace(),console.groupEnd())):console.warn(`No component to destroy! [${t}]`)}executeActions(){for(const t of o.values()){for(const e of t)if(void 0===e.element.vido){const t=s.get(e.instance);e.isActive=function(){return t&&!1===t.destroyed};const i=e.componentAction,a=i.create;if(void 0!==a){let t;t=a.prototype&&(a.prototype.isAction||a.prototype.update||a.prototype.destroy)||a.isAction?new a(e.element,e.props):a(e.element,e.props),void 0!==t&&("function"==typeof t?i.destroy=t:("function"==typeof t.update&&(i.update=t.update.bind(t)),"function"==typeof t.destroy&&(i.destroy=t.destroy.bind(t))))}}else e.element.vido=e.props,"function"==typeof e.componentAction.update&&e.isActive()&&e.componentAction.update(e.element,e.props);for(const e of t)e.element.vido=e.props}}updateTemplate(t=void 0){return t&&l.push(t),new Promise((t=>{const e=++r,i=this;c.then((function(){if(e===r){r=0,i.render();for(const t of l)t();l.length=0,t(null)}}))}))}createApp(t){n=t.element;const e=this.createComponent(t.component,t.props);return a=e.instance,this.render(),e}render(){const t=s.get(a);t?(V(t.update(),n),this.executeActions()):n&&n.remove()}}return new f}ce.lithtml=G,ce.Action=Kt,ce.Directive=q,ce.StyleMap=Yt,ce.PointerAction=Jt,ce.Slots=re,ce.directives={schedule:te,detach:Ut,styleMap:At,classMap:Mt,asyncAppend:gt,asyncReplace:mt,cache:pt,guard:vt,live:Ct,ifDefined:yt,repeat:kt,unsafeHTML:Dt,until:zt,when:Wt,choose:_t,map:Ot,join:jt,range:Rt,templateContent:Lt,unsafeSVG:Nt,ref:Bt};const he=G;var ue=Object.freeze({__proto__:null,Action:Kt,AsyncReplaceDirective:dt,Directive:q,PartType:B,PointerAction:Jt,Slots:re,StyleMap:Yt,UnsafeHTMLDirective:xt,UntilDirective:Pt,_$LH:E,asyncAppend:gt,asyncReplace:mt,cache:pt,choose:_t,classMap:Mt,createRef:()=>new Vt,default:ce,detach:Ut,directive:H,guard:vt,helpers:oe,html:k,ifDefined:yt,join:jt,lit:he,lithtml:G,map:Ot,mathml:D,noChange:$,nothing:S,range:Rt,ref:Bt,render:V,repeat:kt,schedule:te,styleMap:At,svg:x,templateContent:Lt,unsafeHTML:Dt,unsafeSVG:Nt,until:zt,when:Wt}),de=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self,{exports:{}});!function(t){t.exports=function(){var t=1e3,e=6e4,i=36e5,s="millisecond",a="second",n="minute",o="hour",r="day",l="week",c="month",h="quarter",u="year",d="date",m="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],i=t%100;return"["+t+(e[(i-20)%10]||e[i]||e[0])+"]"}},b=function(t,e,i){var s=String(t);return!s||s.length>=e?t:""+Array(e+1-s.length).join(i)+t},v={s:b,z:function(t){var e=-t.utcOffset(),i=Math.abs(e),s=Math.floor(i/60),a=i%60;return(e<=0?"+":"-")+b(s,2,"0")+":"+b(a,2,"0")},m:function t(e,i){if(e.date()<i.date())return-t(i,e);var s=12*(i.year()-e.year())+(i.month()-e.month()),a=e.clone().add(s,c),n=i-a<0,o=e.clone().add(s+(n?-1:1),c);return+(-(s+(i-a)/(n?a-o:o-a))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:u,w:l,d:r,D:d,h:o,m:n,s:a,ms:s,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},y="en",w={};w[y]=p;var k="$isDayjsObject",x=function(t){return t instanceof P||!(!t||!t[k])},D=function t(e,i,s){var a;if(!e)return y;if("string"==typeof e){var n=e.toLowerCase();w[n]&&(a=n),i&&(w[n]=i,a=n);var o=e.split("-");if(!a&&o.length>1)return t(o[0])}else{var r=e.name;w[r]=e,a=r}return!s&&a&&(y=a),a||!s&&y},$=function(t,e){if(x(t))return t.clone();var i="object"==typeof e?e:{};return i.date=t,i.args=arguments,new P(i)},S=v;S.l=D,S.i=x,S.w=function(t,e){return $(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var P=function(){function p(t){this.$L=D(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[k]=!0}var b=p.prototype;return b.parse=function(t){this.$d=function(t){var e=t.date,i=t.utc;if(null===e)return new Date(NaN);if(S.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var s=e.match(g);if(s){var a=s[2]-1||0,n=(s[7]||"0").substring(0,3);return i?new Date(Date.UTC(s[1],a,s[3]||1,s[4]||0,s[5]||0,s[6]||0,n)):new Date(s[1],a,s[3]||1,s[4]||0,s[5]||0,s[6]||0,n)}}return new Date(e)}(t),this.init()},b.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},b.$utils=function(){return S},b.isValid=function(){return!(this.$d.toString()===m)},b.isSame=function(t,e){var i=$(t);return this.startOf(e)<=i&&i<=this.endOf(e)},b.isAfter=function(t,e){return $(t)<this.startOf(e)},b.isBefore=function(t,e){return this.endOf(e)<$(t)},b.$g=function(t,e,i){return S.u(t)?this[e]:this.set(i,t)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(t,e){var i=this,s=!!S.u(e)||e,h=S.p(t),m=function(t,e){var a=S.w(i.$u?Date.UTC(i.$y,e,t):new Date(i.$y,e,t),i);return s?a:a.endOf(r)},g=function(t,e){return S.w(i.toDate()[t].apply(i.toDate("s"),(s?[0,0,0,0]:[23,59,59,999]).slice(e)),i)},f=this.$W,p=this.$M,b=this.$D,v="set"+(this.$u?"UTC":"");switch(h){case u:return s?m(1,0):m(31,11);case c:return s?m(1,p):m(0,p+1);case l:var y=this.$locale().weekStart||0,w=(f<y?f+7:f)-y;return m(s?b-w:b+(6-w),p);case r:case d:return g(v+"Hours",0);case o:return g(v+"Minutes",1);case n:return g(v+"Seconds",2);case a:return g(v+"Milliseconds",3);default:return this.clone()}},b.endOf=function(t){return this.startOf(t,!1)},b.$set=function(t,e){var i,l=S.p(t),h="set"+(this.$u?"UTC":""),m=(i={},i[r]=h+"Date",i[d]=h+"Date",i[c]=h+"Month",i[u]=h+"FullYear",i[o]=h+"Hours",i[n]=h+"Minutes",i[a]=h+"Seconds",i[s]=h+"Milliseconds",i)[l],g=l===r?this.$D+(e-this.$W):e;if(l===c||l===u){var f=this.clone().set(d,1);f.$d[m](g),f.init(),this.$d=f.set(d,Math.min(this.$D,f.daysInMonth())).$d}else m&&this.$d[m](g);return this.init(),this},b.set=function(t,e){return this.clone().$set(t,e)},b.get=function(t){return this[S.p(t)]()},b.add=function(s,h){var d,m=this;s=Number(s);var g=S.p(h),f=function(t){var e=$(m);return S.w(e.date(e.date()+Math.round(t*s)),m)};if(g===c)return this.set(c,this.$M+s);if(g===u)return this.set(u,this.$y+s);if(g===r)return f(1);if(g===l)return f(7);var p=(d={},d[n]=e,d[o]=i,d[a]=t,d)[g]||1,b=this.$d.getTime()+s*p;return S.w(b,this)},b.subtract=function(t,e){return this.add(-1*t,e)},b.format=function(t){var e=this,i=this.$locale();if(!this.isValid())return i.invalidDate||m;var s=t||"YYYY-MM-DDTHH:mm:ssZ",a=S.z(this),n=this.$H,o=this.$m,r=this.$M,l=i.weekdays,c=i.months,h=i.meridiem,u=function(t,i,a,n){return t&&(t[i]||t(e,s))||a[i].slice(0,n)},d=function(t){return S.s(n%12||12,t,"0")},g=h||function(t,e,i){var s=t<12?"AM":"PM";return i?s.toLowerCase():s};return s.replace(f,(function(t,s){return s||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return S.s(e.$y,4,"0");case"M":return r+1;case"MM":return S.s(r+1,2,"0");case"MMM":return u(i.monthsShort,r,c,3);case"MMMM":return u(c,r);case"D":return e.$D;case"DD":return S.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return u(i.weekdaysMin,e.$W,l,2);case"ddd":return u(i.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(n);case"HH":return S.s(n,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return g(n,o,!0);case"A":return g(n,o,!1);case"m":return String(o);case"mm":return S.s(o,2,"0");case"s":return String(e.$s);case"ss":return S.s(e.$s,2,"0");case"SSS":return S.s(e.$ms,3,"0");case"Z":return a}return null}(t)||a.replace(":","")}))},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(s,d,m){var g,f=this,p=S.p(d),b=$(s),v=(b.utcOffset()-this.utcOffset())*e,y=this-b,w=function(){return S.m(f,b)};switch(p){case u:g=w()/12;break;case c:g=w();break;case h:g=w()/3;break;case l:g=(y-v)/6048e5;break;case r:g=(y-v)/864e5;break;case o:g=y/i;break;case n:g=y/e;break;case a:g=y/t;break;default:g=y}return m?g:S.a(g)},b.daysInMonth=function(){return this.endOf(c).$D},b.$locale=function(){return w[this.$L]},b.locale=function(t,e){if(!t)return this.$L;var i=this.clone(),s=D(t,e,!0);return s&&(i.$L=s),i},b.clone=function(){return S.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},p}(),z=P.prototype;return $.prototype=z,[["$ms",s],["$s",a],["$m",n],["$H",o],["$W",r],["$M",c],["$y",u],["$D",d]].forEach((function(t){z[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),$.extend=function(t,e){return t.$i||(t(e,P,$),t.$i=!0),$},$.locale=D,$.isDayjs=x,$.unix=function(t){return $(1e3*t)},$.en=w[y],$.Ls=w,$.p={},$}()}(de);var me=de.exports,ge={exports:{}};!function(t){t.exports=function(){var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(s,a,n){var o=a.prototype;n.utc=function(t){return new a({date:t,utc:!0,args:arguments})},o.utc=function(e){var i=n(this.toDate(),{locale:this.$L,utc:!0});return e?i.add(this.utcOffset(),t):i},o.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var r=o.parse;o.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),r.call(this,t)};var l=o.init;o.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else l.call(this)};var c=o.utcOffset;o.utcOffset=function(s,a){var n=this.$utils().u;if(n(s))return this.$u?0:n(this.$offset)?c.call(this):this.$offset;if("string"==typeof s&&(s=function(t){void 0===t&&(t="");var s=t.match(e);if(!s)return null;var a=(""+s[0]).match(i)||["-",0,0],n=a[0],o=60*+a[1]+ +a[2];return 0===o?0:"+"===n?o:-o}(s),null===s))return this;var o=Math.abs(s)<=16?60*s:s,r=this;if(a)return r.$offset=o,r.$u=0===s,r;if(0!==s){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(r=this.local().add(o+l,t)).$offset=o,r.$x.$localOffset=l}else r=this.utc();return r};var h=o.format;o.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,e)},o.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var u=o.toDate;o.toDate=function(t){return"s"===t&&this.$offset?n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():u.call(this)};var d=o.diff;o.diff=function(t,e,i){if(t&&this.$u===t.$u)return d.call(this,t,e,i);var s=this.local(),a=n(t).local();return d.call(s,a,e,i)}}}()}(ge);var fe=ge.exports,pe={exports:{}};!function(t){t.exports=function(){var t,e,i=1e3,s=6e4,a=36e5,n=864e5,o=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,r=31536e6,l=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:r,months:l,days:n,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},u=function(t){return t instanceof v},d=function(t,e,i){return new v(t,i,e.$l)},m=function(t){return e.p(t)+"s"},g=function(t){return t<0},f=function(t){return g(t)?Math.ceil(t):Math.floor(t)},p=function(t){return Math.abs(t)},b=function(t,e){return t?g(t)?{negative:!0,format:""+p(t)+e}:{negative:!1,format:""+t+e}:{negative:!1,format:""}},v=function(){function g(t,e,i){var s=this;if(this.$d={},this.$l=i,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),e)return d(t*h[m(e)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach((function(e){s.$d[m(e)]=t[e]})),this.calMilliseconds(),this;if("string"==typeof t){var a=t.match(c);if(a){var n=a.slice(2).map((function(t){return null!=t?Number(t):0}));return this.$d.years=n[0],this.$d.months=n[1],this.$d.weeks=n[2],this.$d.days=n[3],this.$d.hours=n[4],this.$d.minutes=n[5],this.$d.seconds=n[6],this.calMilliseconds(),this}}return this}var p=g.prototype;return p.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce((function(e,i){return e+(t.$d[i]||0)*h[i]}),0)},p.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=f(t/r),t%=r,this.$d.months=f(t/l),t%=l,this.$d.days=f(t/n),t%=n,this.$d.hours=f(t/a),t%=a,this.$d.minutes=f(t/s),t%=s,this.$d.seconds=f(t/i),t%=i,this.$d.milliseconds=t},p.toISOString=function(){var t=b(this.$d.years,"Y"),e=b(this.$d.months,"M"),i=+this.$d.days||0;this.$d.weeks&&(i+=7*this.$d.weeks);var s=b(i,"D"),a=b(this.$d.hours,"H"),n=b(this.$d.minutes,"M"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var r=b(o,"S"),l=t.negative||e.negative||s.negative||a.negative||n.negative||r.negative,c=a.format||n.format||r.format?"T":"",h=(l?"-":"")+"P"+t.format+e.format+s.format+c+a.format+n.format+r.format;return"P"===h||"-P"===h?"P0D":h},p.toJSON=function(){return this.toISOString()},p.format=function(t){var i=t||"YYYY-MM-DDTHH:mm:ss",s={Y:this.$d.years,YY:e.s(this.$d.years,2,"0"),YYYY:e.s(this.$d.years,4,"0"),M:this.$d.months,MM:e.s(this.$d.months,2,"0"),D:this.$d.days,DD:e.s(this.$d.days,2,"0"),H:this.$d.hours,HH:e.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:e.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:e.s(this.$d.seconds,2,"0"),SSS:e.s(this.$d.milliseconds,3,"0")};return i.replace(o,(function(t,e){return e||String(s[t])}))},p.as=function(t){return this.$ms/h[m(t)]},p.get=function(t){var e=this.$ms,i=m(t);return"milliseconds"===i?e%=1e3:e="weeks"===i?f(e/h[i]):this.$d[i],e||0},p.add=function(t,e,i){var s;return s=e?t*h[m(e)]:u(t)?t.$ms:d(t,this).$ms,d(this.$ms+s*(i?-1:1),this)},p.subtract=function(t,e){return this.add