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