2 lines
63 KiB
JavaScript
2 lines
63 KiB
JavaScript
/*! For license information please see 449c061d.js.LICENSE.txt */
|
|
(()=>{var t={579:function(t){t.exports=function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",o="second",i="minute",s="hour",a="day",l="week",c="month",d="quarter",h="year",u="date",p="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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,v={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"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(o,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),o=e.clone().add(r,c),i=n-o<0,s=e.clone().add(r+(i?-1:1),c);return+(-(r+(n-o)/(i?o-s:s-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:l,d:a,D:u,h:s,m:i,s:o,ms:r,Q:d}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",$={};$[b]=v;var w="$isDayjsObject",x=function(t){return t instanceof S||!(!t||!t[w])},k=function t(e,n,r){var o;if(!e)return b;if("string"==typeof e){var i=e.toLowerCase();$[i]&&(o=i),n&&($[i]=n,o=i);var s=e.split("-");if(!o&&s.length>1)return t(s[0])}else{var a=e.name;$[a]=e,o=a}return!r&&o&&(b=o),o||!r&&b},E=function(t,e){if(x(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new S(n)},_=g;_.l=k,_.i=x,_.w=function(t,e){return E(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var S=function(){function v(t){this.$L=k(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[w]=!0}var m=v.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(_.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(f);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(e)}(t),this.init()},m.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()},m.$utils=function(){return _},m.isValid=function(){return!(this.$d.toString()===p)},m.isSame=function(t,e){var n=E(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return E(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<E(t)},m.$g=function(t,e,n){return _.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!_.u(e)||e,d=_.p(t),p=function(t,e){var o=_.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?o:o.endOf(a)},f=function(t,e){return _.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,v=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(d){case h:return r?p(1,0):p(31,11);case c:return r?p(1,v):p(0,v+1);case l:var b=this.$locale().weekStart||0,$=(y<b?y+7:y)-b;return p(r?m-$:m+(6-$),v);case a:case u:return f(g+"Hours",0);case s:return f(g+"Minutes",1);case i:return f(g+"Seconds",2);case o:return f(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,l=_.p(t),d="set"+(this.$u?"UTC":""),p=(n={},n[a]=d+"Date",n[u]=d+"Date",n[c]=d+"Month",n[h]=d+"FullYear",n[s]=d+"Hours",n[i]=d+"Minutes",n[o]=d+"Seconds",n[r]=d+"Milliseconds",n)[l],f=l===a?this.$D+(e-this.$W):e;if(l===c||l===h){var y=this.clone().set(u,1);y.$d[p](f),y.init(),this.$d=y.set(u,Math.min(this.$D,y.daysInMonth())).$d}else p&&this.$d[p](f);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[_.p(t)]()},m.add=function(r,d){var u,p=this;r=Number(r);var f=_.p(d),y=function(t){var e=E(p);return _.w(e.date(e.date()+Math.round(t*r)),p)};if(f===c)return this.set(c,this.$M+r);if(f===h)return this.set(h,this.$y+r);if(f===a)return y(1);if(f===l)return y(7);var v=(u={},u[i]=e,u[s]=n,u[o]=t,u)[f]||1,m=this.$d.getTime()+r*v;return _.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=t||"YYYY-MM-DDTHH:mm:ssZ",o=_.z(this),i=this.$H,s=this.$m,a=this.$M,l=n.weekdays,c=n.months,d=n.meridiem,h=function(t,n,o,i){return t&&(t[n]||t(e,r))||o[n].slice(0,i)},u=function(t){return _.s(i%12||12,t,"0")},f=d||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return _.s(e.$y,4,"0");case"M":return a+1;case"MM":return _.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return _.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,l,2);case"ddd":return h(n.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(i);case"HH":return _.s(i,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return f(i,s,!0);case"A":return f(i,s,!1);case"m":return String(s);case"mm":return _.s(s,2,"0");case"s":return String(e.$s);case"ss":return _.s(e.$s,2,"0");case"SSS":return _.s(e.$ms,3,"0");case"Z":return o}return null}(t)||o.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,u,p){var f,y=this,v=_.p(u),m=E(r),g=(m.utcOffset()-this.utcOffset())*e,b=this-m,$=function(){return _.m(y,m)};switch(v){case h:f=$()/12;break;case c:f=$();break;case d:f=$()/3;break;case l:f=(b-g)/6048e5;break;case a:f=(b-g)/864e5;break;case s:f=b/n;break;case i:f=b/e;break;case o:f=b/t;break;default:f=b}return p?f:_.a(f)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return $[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=k(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return _.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},v}(),A=S.prototype;return E.prototype=A,[["$ms",r],["$s",o],["$m",i],["$H",s],["$W",a],["$M",c],["$y",h],["$D",u]].forEach((function(t){A[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),E.extend=function(t,e){return t.$i||(t(e,S,E),t.$i=!0),E},E.locale=k,E.isDayjs=x,E.unix=function(t){return E(1e3*t)},E.en=$[b],E.Ls=$,E.p={},E}()}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=n(579),e=n.n(t);class r{constructor(t,n,r=e()().year()){if(this.isUserDragging=!1,this.lastMouseX=0,this.currentDayWidth=30,this.handleMouseDown=t=>{this.isUserDragging=!0,this.lastMouseX=t.clientX},this.handleMouseMove=t=>{if(this.isUserDragging){const e=t.clientX-this.lastMouseX;this.chartContainer.scrollBy(-e,0),this.lastMouseX=t.clientX}},this.handleMouseUp=()=>{this.isUserDragging=!1},this.currentYear=r,this.taskList=n,this.chartContainer=document.querySelector(t),!this.chartContainer)throw new Error(`Container with selector ${t} not found`);this.renderChart(),this.handleMouseWheelInView(),this.centerOnCurrentDay(),this.updateDayWidthOnScroll()}getDaysOfMonth(t,e){return new Date(t,e+1,0).getDate()}renderChart(){this.chartContainer.innerHTML="";const t=document.createElement("div");t.className="timeline-container";const n=document.createElement("div");n.className="task-container",this.chartContainer.addEventListener("mousedown",this.handleMouseDown),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp);const r=document.createElement("div");r.className="months-row";const o=document.createElement("div");o.className="days-row";let i=0;for(let t=0;t<12;t++){const a=document.createElement("div");a.className="month",a.textContent=`${window.i18n[(s=t+1,{1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"}[s])]}`,a.style.left=`${i}px`,r.appendChild(a);const l=this.getDaysOfMonth(this.currentYear,t);if(i>0){const t=document.createElement("div");t.style.position="absolute",t.style.height="100%",t.style.width="0",t.style.borderLeft="1px dashed var(--color-border)",t.style.left=`${i}px`,n.appendChild(t)}for(let n=1;n<=l;n++){const r=document.createElement("div");r.className="day";const s=`${this.currentYear}-${t+1}-${n}`;r.setAttribute("data-ymd",e()(s).format("YYYY-MM-DD")),r.textContent=`${n}`,r.style.position="absolute",r.style.left=`${i}px`,o.appendChild(r),i+=this.currentDayWidth}}var s;this.taskList.forEach(((t,r)=>{const o=document.createElement("div"),i=e()(),s=e()(t.start),a=e()(t.end),l=a.isBefore(i)?"expired":s.isBefore(i)&&a.isAfter(i)?"doing":"todo";o.classList.add("task-bar","ellipsis",l),o.setAttribute("data-start",e()(t.start).format("YYYY-MM-DD")),o.setAttribute("data-end",e()(t.end).format("YYYY-MM-DD")),o.style.position="absolute",o.style.padding="6px",o.style.display="flex",o.style.alignItems="center",o.style.lineHeight="1",o.style.top=34*r+"px";const c=e()(t.end).diff(t.start,"day");o.innerHTML=`<cosy-label color="${{expired:"grey",doing:"red",todo:"green"}[l]}" hovered>${c} 天</cosy-label><span style="padding-left:12px">${t.title}</span>`,n.appendChild(o),o.addEventListener("click",(()=>{var n;const r=document.createElement("cosy-popup"),o=`\n <div style="max-width: 860px;line-height: 1.5">\n <p style="margin: 0px 0px 8px; font-size: 12px; color: var(--color-font-2);">${`${e()(t.start).format("DD/MM/YYYY")} - ${e()(t.end).format("DD/MM/YYYY")}`}</p>\n <p style="margin: 0px; font-size: 14px">${null!==(n=t.content)&&void 0!==n?n:t.title}</p>\n </div>\n `;r.innerHTML=o,document.body.append(r)}))})),t.appendChild(r),t.appendChild(o),this.chartContainer.appendChild(t),this.chartContainer.appendChild(n),this.renderTodayVerticalLine(),this.updateTaskBars()}centerOnCurrentDay(){const t=new Date,e=t.getFullYear(),n=t.getMonth(),r=t.getDate();if(this.currentYear===e){let t=0;for(let r=0;r<n;r++)t+=this.getDaysOfMonth(e,r);t+=r;const o=t*this.currentDayWidth-this.chartContainer.offsetWidth/2;this.chartContainer.scrollLeft=o}}handleMouseWheelInView(){this.chartContainer.addEventListener("wheel",(t=>{t.deltaY>0&&this.currentDayWidth<5||(this.currentDayWidth*=t.deltaY>0?.9:1.1,this.renderChart(),this.updateDayWidthOnScroll(),this.updateTaskBars())}))}updateDayWidthOnScroll(){const t=[...this.chartContainer.querySelectorAll(".day")];this.currentDayWidth<25?t.forEach(((t,e)=>{t.style.display=e%8==0?"block":"none"})):t.forEach((t=>{t.style.display="block"})),this.updateTaskBars()}updateTaskBars(){[...this.chartContainer.querySelectorAll(".task-bar")].forEach((t=>{const n=t.getAttribute("data-start"),r=t.getAttribute("data-end"),o=this.chartContainer.querySelector(`.day[data-ymd="${n}"]`),i=this.chartContainer.querySelector(`.day[data-ymd="${e()(r).format("YYYY-MM-DD")}"]`);if(o&&i){const e=parseInt(o.style.left,10),n=parseInt(i.style.left,10)-e;t.style.left=`${e}px`,t.style.width=`${n}px`}}))}renderTodayVerticalLine(){const t=e()().format("YYYY-MM-DD"),n=this.chartContainer.querySelector(`.day[data-ymd="${t}"]`);if(!n)return;n.classList.add("today");const r=+n.style.left.replace("px","")+n.offsetWidth/2,o=document.createElement("div");o.className="today-vertical-line",o.style.position="absolute",o.style.height="100%",o.style.width="0",o.style.borderLeft="2px dashed var(--color-primary)",o.style.left=r-2-1+"px";this.chartContainer.querySelector(".task-container").appendChild(o)}updateTasks(t,e){this.currentDayWidth=30,this.currentYear=e,this.taskList=t,this.renderChart()}}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,s(r.key),r)}}function s(t){var e=function(t,e){if("object"!=o(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==o(e)?e:e+""}var a=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"emit",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,r=new CustomEvent(t,{detail:e,bubbles:!0,composed:!0});n.dispatchEvent(r)}},{key:"on",value:function(t,e){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:document).addEventListener(t,e)}},{key:"off",value:function(t,e){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:document).removeEventListener(t,e)}}],e&&i(t.prototype,e),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}(),l=new a;const c=globalThis,d=c.ShadowRoot&&(void 0===c.ShadyCSS||c.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,h=Symbol(),u=new WeakMap;class p{constructor(t,e,n){if(this._$cssResult$=!0,n!==h)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(d&&void 0===t){const n=void 0!==e&&1===e.length;n&&(t=u.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&u.set(e,t))}return t}toString(){return this.cssText}}const f=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,n,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[r+1]),t[0]);return new p(n,t,h)},y=d?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return(t=>new p("string"==typeof t?t:t+"",void 0,h))(e)})(t):t,{is:v,defineProperty:m,getOwnPropertyDescriptor:g,getOwnPropertyNames:b,getOwnPropertySymbols:$,getPrototypeOf:w}=Object,x=globalThis,k=x.trustedTypes,E=k?k.emptyScript:"",_=x.reactiveElementPolyfillSupport,S=(t,e)=>t,A={toAttribute(t,e){switch(e){case Boolean:t=t?E:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},C=(t,e)=>!v(t,e),D={attribute:!0,type:String,converter:A,reflect:!1,hasChanged:C};Symbol.metadata??=Symbol("metadata"),x.litPropertyMetadata??=new WeakMap;class M extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=D){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const n=Symbol(),r=this.getPropertyDescriptor(t,n,e);void 0!==r&&m(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){const{get:r,set:o}=g(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return r?.call(this)},set(e){const i=r?.call(this);o.call(this,e),this.requestUpdate(t,i,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??D}static _$Ei(){if(this.hasOwnProperty(S("elementProperties")))return;const t=w(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(S("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(S("properties"))){const t=this.properties,e=[...b(t),...$(t)];for(const n of e)this.createProperty(n,t[n])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,n]of e)this.elementProperties.set(t,n)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const n=this._$Eu(t,e);void 0!==n&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)e.unshift(y(t))}else void 0!==t&&e.push(y(t));return e}static _$Eu(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const n of e.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(d)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const n of e){const e=document.createElement("style"),r=c.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=n.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$EC(t,e){const n=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,n);if(void 0!==r&&!0===n.reflect){const o=(void 0!==n.converter?.toAttribute?n.converter:A).toAttribute(e,n.type);this._$Em=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){const n=this.constructor,r=n._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=n.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:A;this._$Em=r,this[r]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,n){if(void 0!==t){if(n??=this.constructor.getPropertyOptions(t),!(n.hasChanged??C)(this[t],e))return;this.P(t,e,n)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,n){this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,n]of t)!0!==n.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],n)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}M.elementStyles=[],M.shadowRootOptions={mode:"open"},M[S("elementProperties")]=new Map,M[S("finalized")]=new Map,_?.({ReactiveElement:M}),(x.reactiveElementVersions??=[]).push("2.0.4");const O=globalThis,P=O.trustedTypes,z=P?P.createPolicy("lit-html",{createHTML:t=>t}):void 0,T="$lit$",L=`lit$${(Math.random()+"").slice(9)}$`,U="?"+L,N=`<${U}>`,j=document,Y=()=>j.createComment(""),W=t=>null===t||"object"!=typeof t&&"function"!=typeof t,H=Array.isArray,R=t=>H(t)||"function"==typeof t?.[Symbol.iterator],B="[ \t\n\f\r]",I=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,q=/-->/g,X=/>/g,V=RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),F=/'/g,J=/"/g,Z=/^(?:script|style|textarea|title)$/i,K=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),Q=K(1),G=(K(2),Symbol.for("lit-noChange")),tt=Symbol.for("lit-nothing"),et=new WeakMap,nt=j.createTreeWalker(j,129);function rt(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==z?z.createHTML(e):e}const ot=(t,e)=>{const n=t.length-1,r=[];let o,i=2===e?"<svg>":"",s=I;for(let e=0;e<n;e++){const n=t[e];let a,l,c=-1,d=0;for(;d<n.length&&(s.lastIndex=d,l=s.exec(n),null!==l);)d=s.lastIndex,s===I?"!--"===l[1]?s=q:void 0!==l[1]?s=X:void 0!==l[2]?(Z.test(l[2])&&(o=RegExp("</"+l[2],"g")),s=V):void 0!==l[3]&&(s=V):s===V?">"===l[0]?(s=o??I,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?V:'"'===l[3]?J:F):s===J||s===F?s=V:s===q||s===X?s=I:(s=V,o=void 0);const h=s===V&&t[e+1].startsWith("/>")?" ":"";i+=s===I?n+N:c>=0?(r.push(a),n.slice(0,c)+T+n.slice(c)+L+h):n+L+(-2===c?e:h)}return[rt(t,i+(t[n]||"<?>")+(2===e?"</svg>":"")),r]};class it{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let o=0,i=0;const s=t.length-1,a=this.parts,[l,c]=ot(t,e);if(this.el=it.createElement(l,n),nt.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=nt.nextNode())&&a.length<s;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(T)){const e=c[i++],n=r.getAttribute(t).split(L),s=/([.?@])?(.*)/.exec(e);a.push({type:1,index:o,name:s[2],strings:n,ctor:"."===s[1]?dt:"?"===s[1]?ht:"@"===s[1]?ut:ct}),r.removeAttribute(t)}else t.startsWith(L)&&(a.push({type:6,index:o}),r.removeAttribute(t));if(Z.test(r.tagName)){const t=r.textContent.split(L),e=t.length-1;if(e>0){r.textContent=P?P.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],Y()),nt.nextNode(),a.push({type:2,index:++o});r.append(t[e],Y())}}}else if(8===r.nodeType)if(r.data===U)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=r.data.indexOf(L,t+1));)a.push({type:7,index:o}),t+=L.length-1}o++}}static createElement(t,e){const n=j.createElement("template");return n.innerHTML=t,n}}function st(t,e,n=t,r){if(e===G)return e;let o=void 0!==r?n._$Co?.[r]:n._$Cl;const i=W(e)?void 0:e._$litDirective$;return o?.constructor!==i&&(o?._$AO?.(!1),void 0===i?o=void 0:(o=new i(t),o._$AT(t,n,r)),void 0!==r?(n._$Co??=[])[r]=o:n._$Cl=o),void 0!==o&&(e=st(t,o._$AS(t,e.values),o,r)),e}class at{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:n}=this._$AD,r=(t?.creationScope??j).importNode(e,!0);nt.currentNode=r;let o=nt.nextNode(),i=0,s=0,a=n[0];for(;void 0!==a;){if(i===a.index){let e;2===a.type?e=new lt(o,o.nextSibling,this,t):1===a.type?e=new a.ctor(o,a.name,a.strings,this,t):6===a.type&&(e=new pt(o,this,t)),this._$AV.push(e),a=n[++s]}i!==a?.index&&(o=nt.nextNode(),i++)}return nt.currentNode=j,r}p(t){let e=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class lt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,r){this.type=2,this._$AH=tt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$Cv=r?.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=st(this,t,e),W(t)?t===tt||null==t||""===t?(this._$AH!==tt&&this._$AR(),this._$AH=tt):t!==this._$AH&&t!==G&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):R(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==tt&&W(this._$AH)?this._$AA.nextSibling.data=t:this.T(j.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:n}=t,r="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=it.createElement(rt(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new at(r,this),n=t.u(this.options);t.p(e),this.T(n),this._$AH=t}}_$AC(t){let e=et.get(t.strings);return void 0===e&&et.set(t.strings,e=new it(t)),e}k(t){H(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,r=0;for(const o of t)r===e.length?e.push(n=new lt(this.S(Y()),this.S(Y()),this,this.options)):n=e[r],n._$AI(o),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$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 ct{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,r,o){this.type=1,this._$AH=tt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=o,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=tt}_$AI(t,e=this,n,r){const o=this.strings;let i=!1;if(void 0===o)t=st(this,t,e,0),i=!W(t)||t!==this._$AH&&t!==G,i&&(this._$AH=t);else{const r=t;let s,a;for(t=o[0],s=0;s<o.length-1;s++)a=st(this,r[n+s],e,s),a===G&&(a=this._$AH[s]),i||=!W(a)||a!==this._$AH[s],a===tt?t=tt:t!==tt&&(t+=(a??"")+o[s+1]),this._$AH[s]=a}i&&!r&&this.j(t)}j(t){t===tt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class dt extends ct{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===tt?void 0:t}}class ht extends ct{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==tt)}}class ut extends ct{constructor(t,e,n,r,o){super(t,e,n,r,o),this.type=5}_$AI(t,e=this){if((t=st(this,t,e,0)??tt)===G)return;const n=this._$AH,r=t===tt&&n!==tt||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,o=t!==tt&&(n===tt||r);r&&this.element.removeEventListener(this.name,this,n),o&&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 pt{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){st(this,t)}}const ft=O.litHtmlPolyfillSupport;ft?.(it,lt),(O.litHtmlVersions??=[]).push("3.1.2");class yt extends M{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,n)=>{const r=n?.renderBefore??e;let o=r._$litPart$;if(void 0===o){const t=n?.renderBefore??null;r._$litPart$=o=new lt(e.insertBefore(Y(),t),t,void 0,n??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return G}}yt._$litElement$=!0,yt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:yt});const vt=globalThis.litElementPolyfillSupport;vt?.({LitElement:yt});(globalThis.litElementVersions??=[]).push("4.0.4");const mt={attribute:!0,type:String,converter:A,reflect:!1,hasChanged:C},gt=(t=mt,e,n)=>{const{kind:r,metadata:o}=n;let i=globalThis.litPropertyMetadata.get(o);if(void 0===i&&globalThis.litPropertyMetadata.set(o,i=new Map),i.set(n.name,t),"accessor"===r){const{name:r}=n;return{set(n){const o=e.get.call(this);e.set.call(this,n),this.requestUpdate(r,o,t)},init(e){return void 0!==e&&this.P(r,void 0,t),e}}}if("setter"===r){const{name:r}=n;return function(n){const o=this[r];e.call(this,n),this.requestUpdate(r,o,t)}}throw Error("Unsupported decorator location: "+r)};function bt(t){return(e,n)=>"object"==typeof n?gt(t,e,n):((t,e,n)=>{const r=e.hasOwnProperty(n);return e.constructor.createProperty(n,r?{...t,wrapped:!0}:t),r?Object.getOwnPropertyDescriptor(e,n):void 0})(t,e,n)}var $t,wt,xt,kt,Et,_t,St,At,Ct,Dt,Mt,Ot,Pt,zt,Tt,Lt,Ut,Nt,jt,Yt,Wt,Ht,Rt,Bt,It,qt,Xt;function Vt(){return Vt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ee(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Vt.apply(this,arguments)}function Ft(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function Jt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Zt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Qt(r.key),r)}}function Kt(t,e,n){return e&&Zt(t.prototype,e),n&&Zt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Qt(t){var e=function(t,e){if("object"!=oe(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=oe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==oe(e)?e:e+""}function Gt(t,e,n){return e=ee(e),function(t,e){if(e&&("object"===oe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,te()?Reflect.construct(e,n||[],ee(t).constructor):e.apply(t,n))}function te(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(te=function(){return!!t})()}function ee(t){return ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ee(t)}function ne(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&re(t,e)}function re(t,e){return re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},re(t,e)}function oe(t){return oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oe(t)}function ie(t,e,n,r){var o,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"===("undefined"==typeof Reflect?"undefined":oe(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s}"function"==typeof SuppressedError&&SuppressedError;var se=function(t){function e(){var t;return Jt(this,e),(t=Gt(this,e)).invisible=!1,t.uid=t.generateUniqueId(),t.eventBus=l,t}return ne(e,t),Kt(e,[{key:"generateUniqueId",value:function(){return"unique-".concat(Math.random().toString(36).slice(2,11))}}])}(yt);se.styles=f($t||($t=Ft(["\n :host([invisible]) {\n display: none;\n }\n :host([disabled]) {\n pointer-events: none;\n opacity: 0.6;\n }\n "]))),ie([bt({type:String})],se.prototype,"uid",void 0),ie([bt({type:Boolean})],se.prototype,"disabled",void 0),ie([bt({type:Boolean,reflect:!0})],se.prototype,"invisible",void 0);var ae=function(t){function e(){var t;return Jt(this,e),(t=Gt(this,e,arguments)).size="md",t.type="solid",t}return ne(e,t),Kt(e,[{key:"render",value:function(){return Q(wt||(wt=Ft(['<button\n class="size-'," ",'"\n @click="','"\n style="border-style:','"\n >\n \x3c!-- prefix图标插槽 --\x3e\n <slot name="prefix"></slot>\n \x3c!-- 文本插槽 --\x3e\n <slot name="content"></slot>\n \x3c!-- suffix图标插槽 --\x3e\n <slot name="suffix"></slot>\n </button>'])),this.size,this.round?"round":"",this.handleClick,this.type)}},{key:"handleClick",value:function(){var t=this.uid;this.eventBus.emit("cosy-button:click:".concat(t),{uid:t})}}],[{key:"styles",get:function(){return[se.styles,f(xt||(xt=Ft(['\n button {\n transition: all 0.3s ease;\n background-color: var(--color-button-bg);\n border-width: 1px;\n border-color: var(--color-button-border);\n color: var(--color-button-font);\n text-align: center;\n text-decoration: none;\n border-radius: var(--radius-base, 4px);\n display: inline-flex;\n gap: 6px;\n align-items: center;\n cursor: pointer;\n }\n button:hover {\n color: var(--color-button-font-hover);\n background-color: var(--color-button-bg-hover);\n border-color: var(--color-button-border-hover);\n }\n ::slotted([slot="content"]) {\n padding-right: 2px;\n line-height: 1.5;\n }\n .round {\n border-radius: 16px;\n }\n .size-sm {\n padding: 2px 6px;\n font-size: 12px;\n }\n .size-md {\n padding: 2px 6px;\n font-size: 14px;\n }\n .size-lg {\n padding: 2px 6px;\n font-size: 16px;\n }\n\n .size-sm ::slotted([slot="prefix"]),\n .size-sm ::slotted([slot="suffix"]) {\n width: 12px;\n height: 12px;\n }\n\n .size-md ::slotted([slot="prefix"]),\n .size-md ::slotted([slot="suffix"]) {\n width: 14px;\n height: 14px;\n }\n\n .size-lg ::slotted([slot="prefix"]),\n .size-lg ::slotted([slot="suffix"]) {\n width: 16px;\n height: 16px;\n }\n '])))]}}])}(se);ie([bt({type:String})],ae.prototype,"size",void 0),ie([bt({type:String})],ae.prototype,"type",void 0),ie([bt({type:Boolean})],ae.prototype,"round",void 0),customElements.get("cosy-button")||customElements.define("cosy-button",ae);var le="cosy-icon",ce=function(t){function e(){var t;return Jt(this,e),(t=Gt(this,e,arguments)).size="md",t.blank=!1,t.buttonStyle=!1,t}return ne(e,t),Kt(e,[{key:"render",value:function(){if(this.href){var t=this.blank?"blank":"";return Q(Et||(Et=Ft(['<a\n href="','"\n target="','"\n class="size-','"\n ><slot></slot\n ></a>'])),this.href,t,this.size)}return Q(kt||(kt=Ft(['<a class="size-','"><slot></slot></a>'])),this.size)}}],[{key:"styles",get:function(){return[se.styles,f(_t||(_t=Ft(["\n :host {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n }\n a {\n color: var(--color-icon);\n text-decoration: none;\n transition: color 0.3s;\n cursor: pointer;\n }\n a:hover {\n color: var(--color-icon-hover);\n }\n .size-sm {\n width: 16px;\n height: 16px;\n }\n .size-md {\n width: 20px;\n height: 20px;\n }\n .size-lg {\n width: 24px;\n height: 24px;\n }\n svg {\n width: 100%;\n height: 100%;\n fill: currentColor;\n }\n :host([bordered]) {\n background: var(--color-button-bg);\n border: 1px solid var(--color-button-border);\n border-radius: var(--raius-base, 4px);\n }\n :host([bordered]:hover) {\n background: var(--color-button-bg-hover);\n border-color: var(--color-button-border-hover);\n }\n "])))]}}])}(se);ie([bt({type:String})],ce.prototype,"size",void 0),ie([bt({type:String})],ce.prototype,"href",void 0),ie([bt({type:Boolean})],ce.prototype,"blank",void 0),ie([bt({type:Boolean,attribute:"bordered"})],ce.prototype,"buttonStyle",void 0),customElements.get(le)||customElements.define(le,ce);var de=function(t){function e(){var t;return Jt(this,e),(t=Gt(this,e,arguments)).size="md",t}return ne(e,t),Kt(e,[{key:"render",value:function(){return Q(St||(St=Ft(["<div class=",">\n <span><slot></slot></span>\n </div>"])),"size-".concat(this.size))}}],[{key:"styles",get:function(){return[se.styles,f(At||(At=Ft(["\n div {\n display: inline-flex;\n padding: 6px;\n border-radius: var(--radius-base, 4px);\n background-color: var(--color-short-key-bg);\n color: var(--color-short-key-font);\n }\n .size-sm {\n padding: 2px;\n }\n .size-md {\n padding: 4px;\n }\n .size-lg {\n padding: 6px;\n }\n span {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n text-transform: capitalize;\n height: 14px;\n min-width: 14px;\n font-size: 14px;\n }\n svg {\n width: 100%;\n height: 100%;\n fill: currentColor;\n }\n "])))]}}])}(se);ie([bt({type:String})],de.prototype,"size",void 0),customElements.get("cosy-short-key")||customElements.define("cosy-short-key",de);var he=function(t){function e(){var t;return Jt(this,e),(t=Gt(this,e,arguments)).placeholder="搜索",t.iconOnly=!1,t}return ne(e,t),Kt(e,[{key:"handleClick",value:function(){}},{key:"render",value:function(){return Q(Ct||(Ct=Ft(['<form\n @click="','"\n class="','"\n >\n <svg\n xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink"\n viewBox="0 0 20 20"\n >\n <g fill="none">\n <path\n d="M8.5 3a5.5 5.5 0 0 1 4.227 9.02l4.127 4.126a.5.5 0 0 1-.638.765l-.07-.057l-4.126-4.127A5.5 5.5 0 1 1 8.5 3zm0 1a4.5 4.5 0 1 0 0 9a4.5 4.5 0 0 0 0-9z"\n fill="currentColor"\n ></path>\n </g>\n </svg>\n <span>','</span>\n <slot name="short-key"></slot>\n </form>'])),this.handleClick,this.iconOnly?"icon-only":"",this.placeholder)}}],[{key:"styles",get:function(){return[se.styles,f(Dt||(Dt=Ft(["\n form {\n display: flex;\n align-items: center;\n padding: 0 6px;\n height: 32px;\n border-radius: var(--radius-base, 4px);\n background: var(--color-search-bg);\n border: 1px solid var(--color-search-border);\n transition: all 0.3s;\n cursor: pointer;\n }\n .icon-only {\n display: inline-flex;\n justify-content: center;\n padding: 6px;\n height: auto;\n }\n .icon-only span {\n display: none;\n }\n .icon-only slot {\n display: none;\n }\n form:hover {\n border-color: var(--color-search-border-hover);\n }\n svg {\n transition: all 0.3s;\n color: var(--color-search-font);\n width: 16px;\n height: 16px;\n }\n span {\n flex: 1;\n padding: 0 6px;\n font-size: 13px;\n color: var(--color-search-font);\n }\n "])))]}}])}(se);ie([bt({type:String})],he.prototype,"placeholder",void 0),ie([bt({type:Boolean,attribute:"icon-only"})],he.prototype,"iconOnly",void 0),customElements.get("cosy-search")||customElements.define("cosy-search",he);var ue=function(t){function e(){var t;return Jt(this,e),(t=Gt(this,e,arguments)).checked=!1,t.size="md",t}return ne(e,t),Kt(e,[{key:"toggleChecked",value:function(){this.checked=!this.checked}},{key:"render",value:function(){return Q(Mt||(Mt=Ft(['\n <div class="switch switch-','" @click="','">\n <div class="switch-knob">\n <div class="content content-left">\n <slot name="left"></slot>\n </div>\n <div class="content content-right">\n <slot name="right"></slot>\n </div>\n </div>\n </div>\n '])),this.size,this.toggleChecked)}}],[{key:"styles",get:function(){return[se.styles,f(Ot||(Ot=Ft(["\n .switch-sm {\n --switch-width: 36px; /* 默认宽度 */\n --switch-height: 18px; /* 默认高度 */\n --switch-radius: 9px; /* 默认圆角 */\n }\n .switch-md {\n --switch-width: 42px; /* 默认宽度 */\n --switch-height: 20px; /* 默认高度 */\n --switch-radius: 10px; /* 默认圆角 */\n }\n .switch-lg {\n --switch-width: 48px; /* 默认宽度 */\n --switch-height: 24px; /* 默认高度 */\n --switch-radius: 12px; /* 默认圆角 */\n }\n .switch {\n width: var(--switch-width);\n height: var(--switch-height);\n border-radius: var(--switch-radius);\n background-color: var(--color-switch-track-bg);\n border: 1px solid var(--color-switch-border);\n position: relative;\n cursor: pointer;\n transition: border 0.3s, background-color 0.3s;\n }\n .switch:hover {\n border-color: var(--color-switch-border-hover);\n }\n .switch-knob {\n position: absolute;\n width: 50%;\n height: 100%;\n background-color: var(--color-switch-bg);\n border-radius: var(--switch-radius);\n transition: background-color 0.3s, border 0.3s, left 0.3s;\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n transform: scale(1.05);\n left: 0;\n }\n :host([checked]) .switch {\n background-color: var(--color-switch-track-bg-checked);\n }\n :host([checked]) .switch-knob {\n left: 50%;\n color: var(--color-switch-font-checked);\n background-color: var(--color-switch-bg-checked);\n }\n .content {\n position: absolute;\n width: 100%;\n height: 100%;\n display: none;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n }\n .content ::slotted(*) {\n max-width: 70%;\n max-height: 70%;\n text-align: center;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n :host(:not([checked])) .content-left,\n :host([checked]) .content-right {\n display: flex;\n }\n "])))]}}])}(se);ie([bt({type:Boolean,reflect:!0})],ue.prototype,"checked",void 0),ie([bt({type:String})],ue.prototype,"size",void 0),customElements.get("cosy-switch")||customElements.define("cosy-switch",ue);var pe=function(t){function e(){var t;return Jt(this,e),(t=Gt(this,e,arguments)).placement="bottom",t.maxWidth="220px",t.textWrap=!1,t.textWrapWidth="220px",t.fontColor="var(--color-font-1)",t}return ne(e,t),Kt(e,[{key:"render",value:function(){return Q(Pt||(Pt=Ft(['<div class="tooltip">\n <slot\n name="content"\n class="tooltip-content ','"\n style="color:',";max-width: ",";white-space: ","; line-height: "," ; width: ",'"\n ></slot\n ><slot style="line-height:1.2"></slot>\n </div>'])),this.placement,this.fontColor,this.maxWidth,this.textWrap?"wrap":"nowrap",this.textWrap?1.5:1,this.textWrap?this.textWrapWidth:"inherit")}}],[{key:"styles",get:function(){return[se.styles,f(zt||(zt=Ft(["\n .tooltip {\n position: relative;\n display: inline-flex;\n user-select: none;\n }\n .tooltip-content {\n display: inline-block;\n visibility: hidden;\n opacity: 0;\n background-color: var(--color-tooltip-bg);\n border: 1px solid var(--color-tooltip-border);\n backdrop-filter: var(--color-frost-bg);\n padding: 4px 8px;\n border-radius: var(--radius-base, 4px);\n position: absolute;\n z-index: 1;\n font-size: 13px;\n transition: opacity 0.3s ease, visibility 0.3s;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .tooltip:hover .tooltip-content {\n visibility: visible;\n opacity: 1;\n }\n .top {\n bottom: calc(100% + 6px);\n left: 50%;\n transform: translateX(-50%);\n }\n .top-left {\n left: 0;\n bottom: calc(100% + 6px);\n }\n .top-right {\n right: 0;\n bottom: 115%;\n }\n .bottom {\n top: calc(100% + 6px);\n left: 50%;\n transform: translateX(-50%);\n }\n .bottom-left {\n left: 0;\n top: calc(100% + 6px);\n }\n .bottom-right {\n right: 0;\n top: calc(100% + 6px);\n }\n .left {\n right: calc(100% + 6px);\n top: 50%;\n transform: translateY(-50%);\n }\n .right {\n left: calc(100% + 6px);\n top: 50%;\n transform: translateY(-50%);\n }\n "])))]}}])}(se);ie([bt({type:String})],pe.prototype,"placement",void 0),ie([bt({type:String,attribute:"max-width"})],pe.prototype,"maxWidth",void 0),ie([bt({type:Boolean,attribute:"text-wrap"})],pe.prototype,"textWrap",void 0),ie([bt({type:String,attribute:"text-wrap-width"})],pe.prototype,"textWrapWidth",void 0),ie([bt({type:String,attribute:"font-color"})],pe.prototype,"fontColor",void 0),customElements.get("cosy-tooltip")||customElements.define("cosy-tooltip",pe);var fe="cosy-drag-box",ye=function(t){function e(){var t;return Jt(this,e),(t=Gt(this,e,arguments)).trigger="right",t.minWidth=100,t.hideThreshold=50,t.dragging=null,t.startX=0,t.startWidth=0,t.drag=function(e){if(t.dragging){t.updateDraggerOpacity();var n=e.clientX-t.startX,r="left"===t.dragging?t.startWidth-n:t.startWidth+n;r>t.minWidth?t.style.width="".concat(r,"px"):r<t.hideThreshold&&(t.invisible=!0,t.dragging=null,t.eventBus.emit("".concat(fe,":").concat(t.uid),{uid:t.uid,invisible:!0}))}},t.stopDrag=function(){t.dragging&&(document.removeEventListener("mousemove",t.drag),document.removeEventListener("mouseup",t.stopDrag),t.dragging=null),t.updateDraggerOpacity()},t.startDrag=function(e,n){t.dragging=n,t.startX=e.clientX,t.startWidth=t.offsetWidth,document.addEventListener("mousemove",t.drag),document.addEventListener("mouseup",t.stopDrag),e.preventDefault()},t.renderDragger=function(){var e=t.trigger;return Q(Tt||(Tt=Ft(['\n <div\n class="dragger dragger-','"\n @mousedown="','"\n ></div>\n '])),e,(function(n){return t.startDrag(n,e)}))},t}return ne(e,t),Kt(e,[{key:"updateDraggerOpacity",value:function(){var t,e,n=this;null===(e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelectorAll(".dragger"))||void 0===e||e.forEach((function(t){n.dragging?t.style.opacity="1":t.removeAttribute("style")}))}},{key:"render",value:function(){var t="min-width: ".concat(this.minWidth,"px;border-").concat(this.trigger,":1px solid var(--color-border);height:100%");return Q(Lt||(Lt=Ft(['\n <div style="','">\n ',"\n <slot></slot>\n </div>\n "])),t,this.renderDragger())}}],[{key:"styles",get:function(){return[se.styles,f(Ut||(Ut=Ft(["\n :host {\n display: block;\n position: relative;\n overflow-x: hidden;\n }\n .dragger {\n position: absolute;\n background-color: var(--color-dragger);\n opacity: 0;\n transition: opacity 0.2s;\n }\n .dragger:hover {\n opacity: 1;\n }\n .dragger[dragging] {\n opacity: 1;\n }\n .dragger-left,\n .dragger-right {\n top: 0;\n bottom: 0;\n width: 3px;\n cursor: col-resize;\n }\n .dragger-left {\n left: 0;\n }\n .dragger-right {\n right: 0;\n }\n "])))]}}])}(se);ie([bt({type:String})],ye.prototype,"trigger",void 0),ie([bt({type:Number,attribute:"min-width"})],ye.prototype,"minWidth",void 0),ie([bt({type:Number,attribute:"threshold"})],ye.prototype,"hideThreshold",void 0),customElements.get(fe)||customElements.define(fe,ye);var ve=function(t){function e(){var t;return Jt(this,e),(t=Gt(this,e,arguments)).margin="1rem 0",t}return ne(e,t),Kt(e,[{key:"render",value:function(){return Q(Nt||(Nt=Ft(['<div style="margin: ','"></div>'])),this.margin)}}],[{key:"styles",get:function(){return[se.styles,f(jt||(jt=Ft(["\n div {\n height: 1px;\n background-image: linear-gradient(\n to right,\n transparent,\n var(--color-border),\n transparent\n );\n }\n "])))]}}])}(se);ie([bt({type:String})],ve.prototype,"margin",void 0),customElements.get("cosy-divider")||customElements.define("cosy-divider",ve);var me="cosy-popup",ge=function(t){function e(){return Jt(this,e),Gt(this,e,arguments)}return ne(e,t),Kt(e,[{key:"destroy",value:function(){this.parentNode&&this.parentNode.removeChild(this)}},{key:"onBackdropClick",value:function(t){t.target===this&&this.destroy()}},{key:"connectedCallback",value:function(){Vt(ee(e.prototype),"connectedCallback",this).call(this),this.addEventListener("click",this.onBackdropClick)}},{key:"disconnectedCallback",value:function(){this.removeEventListener("click",this.onBackdropClick),Vt(ee(e.prototype),"disconnectedCallback",this).call(this)}},{key:"render",value:function(){return Q(Yt||(Yt=Ft(['\n <div class="content">\n <slot></slot>\n </div>\n '])))}}],[{key:"styles",get:function(){return f(Wt||(Wt=Ft(["\n :host {\n display: block;\n position: fixed;\n padding: 24px;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--color-popup-mask-bg); /* 半透明蒙版 */\n backdrop-filter: blur(5px); /* 模糊效果 */\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 19940121;\n }\n .content {\n background: var(--color-popup-bg);\n padding: 20px;\n border-radius: var(--radius-base, 4px);\n box-shadow: rgba(0, 0, 0, 0.2) 0px 16px 70px;\n backdrop-filter: blur(20px) saturate(190%) contrast(70%) brightness(80%);\n border: 0.5px solid var(--color-popup-border);\n }\n "])))}}])}(se);customElements.get(me)||customElements.define(me,ge);var be=function(t){function e(){var t;return Jt(this,e),(t=Gt(this,e,arguments)).blank=!1,t}return ne(e,t),Kt(e,[{key:"render",value:function(){var t=this.href?this.href:"javascript:void(0);",e=this.blank?"blank":"";return Q(Ht||(Ht=Ft(['\n <a\n class="','"\n href="','"\n target="','"\n ><span class="','"></span>\n <slot></slot\n ></a>\n '])),this.bordered?"bordered":"",t,e,this.color?"dot "+this.color:"")}}],[{key:"styles",get:function(){return[se.styles,f(Rt||(Rt=Ft(["\n a {\n padding: 4px;\n transition: all 0.3s ease;\n background-color: var(--color-label-bg);\n color: var(--color-label-font);\n border-radius: var(--radius-base, 4px);\n display: inline-flex;\n align-items: center;\n font-size: 12px;\n text-decoration: none;\n user-select: none;\n }\n .bordered {\n border: 1px solid var(--color-label-border);\n }\n a:hover {\n border-color: var(--color-label-border-hover);\n /* background-color: var(--color-label-bg-hover); */\n color: var(--color-label-font-hover);\n }\n .round {\n border-radius: 16px;\n }\n .dot {\n margin-right: 6px;\n display: inline-block;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n }\n .yellow {\n background: var(--color-yellow);\n }\n .orange {\n background: var(--color-orange);\n }\n .teal {\n background: var(--color-teal);\n }\n .red {\n background: var(--color-red);\n }\n .blue {\n background: var(--color-blue);\n }\n .grey {\n background: var(--color-grey);\n }\n .green {\n background: var(--color-green);\n }\n "])))]}}])}(se);ie([bt({type:String})],be.prototype,"color",void 0),ie([bt({type:Boolean})],be.prototype,"bordered",void 0),ie([bt({type:String})],be.prototype,"href",void 0),ie([bt({type:Boolean})],be.prototype,"blank",void 0),customElements.get("cosy-label")||customElements.define("cosy-label",be);var $e="cosy-card",we=function(t){function e(){return Jt(this,e),Gt(this,e,arguments)}return ne(e,t),Kt(e,[{key:"handleCardMouseMove",value:function(t){var e=t.detail,n=e.mouseX,r=e.mouseY,o=this.getBoundingClientRect(),i=n-o.left,s=r-o.top;this.style.setProperty("--mouse-x","".concat(i,"px")),this.style.setProperty("--mouse-y","".concat(s,"px"))}},{key:"connectedCallback",value:function(){var t=this;Vt(ee(e.prototype),"connectedCallback",this).call(this),this.eventBus.on("card-group:mousemove",(function(e){return t.handleCardMouseMove(e)}))}},{key:"disconnectedCallback",value:function(){Vt(ee(e.prototype),"disconnectedCallback",this).call(this),this.eventBus.off("card-group:mousemove",this.handleCardMouseMove)}},{key:"render",value:function(){return Q(Bt||(Bt=Ft(['<a class="card">\n <div class="mask"></div>\n <div class="content"><slot></slot></div>\n </a>'])))}}],[{key:"styles",get:function(){return[se.styles,f(It||(It=Ft(['\n .card {\n background-color: var(--color-border);\n border-radius: 10px;\n cursor: pointer;\n display: inline-flex;\n flex-direction: column;\n position: relative;\n color: var(--color-font);\n }\n\n .card::before,\n .card::after {\n border-radius: inherit;\n content: "";\n height: 100%;\n left: 0px;\n opacity: 0;\n position: absolute;\n top: 0px;\n transition: opacity 500ms;\n width: 100%;\n background: radial-gradient(\n 800px circle at var(--mouse-x) var(--mouse-y),\n var(--color-radial-before),\n transparent 40%\n );\n z-index: 3;\n }\n\n .card::after {\n background: radial-gradient(\n 800px circle at var(--mouse-x) var(--mouse-y),\n var(--color-radial-after),\n transparent 40%\n );\n opacity: 1;\n z-index: 1;\n }\n\n .mask {\n position: absolute;\n background-color: var(--color-bg-2);\n border-radius: inherit;\n inset: 1px;\n z-index: 2;\n }\n\n .content {\n z-index: 4;\n }\n '])))]}}])}(se);customElements.get($e)||customElements.define($e,we);var xe="cosy-card-group",ke=function(t){function e(){var t;return Jt(this,e),(t=Gt(this,e,arguments)).row=3,t}return ne(e,t),Kt(e,[{key:"handleMouseMove",value:function(t){var e=t.clientX,n=t.clientY;this.eventBus.emit("card-group:mousemove",{mouseX:e,mouseY:n})}},{key:"render",value:function(){return Q(qt||(qt=Ft(['<div\n class="card-group"\n style="grid-template-columns: repeat(auto-fill, minmax(250px, 1fr))"\n @mousemove="','"\n >\n <slot></slot>\n </div>'])),this.handleMouseMove)}}],[{key:"styles",get:function(){return[se.styles,f(Xt||(Xt=Ft(["\n .card-group {\n display: grid;\n justify-items: center;\n align-items: center;\n gap: 12px;\n }\n "])))]}}])}(se);ie([bt({type:Number})],ke.prototype,"row",void 0),customElements.get(xe)||customElements.define(xe,ke);var Ee=function(){function t(e,n,r){Jt(this,t),this.dropdownElement=null,this.selector=e,this.options=n,this.element=document.querySelector(this.selector),this.onClickItem=r.onClickItem,this.init()}return Kt(t,[{key:"init",value:function(){this.element&&(this.element.addEventListener("click",this.toggleDropdown.bind(this)),document.addEventListener("click",this.handleDocumentClick.bind(this)))}},{key:"toggleDropdown",value:function(e){e.stopPropagation(),t.activeDropdown&&t.activeDropdown!==this&&t.activeDropdown.removeDropdown(),this.dropdownElement?this.removeDropdown():(this.createDropdown(),t.activeDropdown=this)}},{key:"fadeIn",value:function(t,e){var n=0,r=16.7/e;!function e(){if((n+=r)>=1)return n=1,void(t.style.opacity=String(n));t.style.opacity=String(n),requestAnimationFrame(e)}()}},{key:"fadeOut",value:function(t,e,n){var r=1,o=16.7/e,i=t;!function t(){if(i){if((r-=o)<=0)return r=0,i.style.opacity=String(r),void n();i.style.opacity=String(r),requestAnimationFrame(t)}}()}},{key:"createDropdown",value:function(){var t,e=this;this.dropdownElement=document.createElement("div"),this.dropdownElement.style.opacity="0",this.options.forEach((function(t){var n=document.createElement("div");if(n.style.padding="8px 12px",n.style.color="var(--color-font-2)",n.style.borderRadius="var(--radius-base, 4px)",n.style.fontSize="13px",n.style.cursor="pointer",n.style.display="flex",n.style.alignItems="center",t.icon){var r=document.createElement("span");r.innerHTML=t.icon,r.style.marginRight="8px",r.style.width="16px",r.style.height="16px",n.appendChild(r)}var o=document.createTextNode(String(t.label));n.appendChild(o),n.addEventListener("click",(function(){var n;null===(n=e.onClickItem)||void 0===n||n.call(e,t),e.removeDropdown()})),n.addEventListener("mouseenter",(function(){n.style.backgroundColor="var(--color-dropdown-hover)",n.style.color="var(--color-font)"})),n.addEventListener("mouseleave",(function(){n.style.backgroundColor="",n.style.color="var(--color-font-2)"})),e.dropdownElement.appendChild(n)})),document.body.appendChild(this.dropdownElement),this.dropdownElement.style.position="absolute",this.dropdownElement.style.padding="6px 4px",this.dropdownElement.style.borderRadius="var(--radius-base,4px)",this.dropdownElement.style.background="var(--color-dropdown-bg)",this.dropdownElement.style.backdropFilter="var(--color-frost-bg)",this.dropdownElement.style.border="1px solid var(--color-dropdown-border)",this.dropdownElement.style.boxShadow="var(--color-dropdown-shadow)";var n=null===(t=document.querySelector(this.selector))||void 0===t?void 0:t.getBoundingClientRect();this.dropdownElement.style.top="".concat(n.top,"px"),this.dropdownElement.style.left="".concat(n.left,"px"),this.dropdownElement.style.minWidth="".concat(n.width,"px"),this.fadeIn(this.dropdownElement,150)}},{key:"removeDropdown",value:function(){var t=this;if(this.dropdownElement){var e=this.dropdownElement;this.fadeOut(e,150,(function(){e.remove(),t.dropdownElement===e&&(t.dropdownElement=null)}))}}},{key:"handleDocumentClick",value:function(){this.removeDropdown()}}])}();Ee.activeDropdown=null;var _e=function(){function t(e,n){Jt(this,t),this.popoverElement=null,this.options=n,this.element="string"==typeof e?document.querySelector(e):e,this.init()}return Kt(t,[{key:"init",value:function(){this.element&&(this.element.addEventListener("click",this.togglePopover.bind(this)),document.addEventListener("click",this.handleDocumentClick.bind(this)))}},{key:"togglePopover",value:function(e){e.stopPropagation(),t.activePopover&&t.activePopover!==this&&t.activePopover.removePopover(),this.popoverElement?this.removePopover():(this.createPopover(),t.activePopover=this)}},{key:"fadeIn",value:function(t,e){var n=0,r=16.7/e;!function e(){if((n+=r)>=1)return n=1,void(t.style.opacity=String(n));t.style.opacity=String(n),requestAnimationFrame(e)}()}},{key:"fadeOut",value:function(t,e,n){var r=1,o=16.7/e,i=t;!function t(){if(i){if((r-=o)<=0)return r=0,i.style.opacity=String(r),void n();i.style.opacity=String(r),requestAnimationFrame(t)}}()}},{key:"createPopover",value:function(){var t=this;this.popoverElement=document.createElement("div");var e=this.options.classNames,n=void 0===e?[]:e;if(this.popoverElement.classList.add("popover-content","scrollbar-obtrusive"),n.forEach((function(e){var n;return null===(n=t.popoverElement)||void 0===n?void 0:n.classList.add(e)})),this.popoverElement.style.opacity="0",this.options.title){var r=document.createElement("p");r.textContent=this.options.title,r.style.margin="0 0 8px 0",r.style.fontSize="12px",r.style.color="var(--color-font-2)",this.popoverElement.appendChild(r)}if(this.options.content){var o=document.createElement("p");o.style.margin="0",o.textContent=this.options.content,this.popoverElement.appendChild(o)}document.body.appendChild(this.popoverElement);var i=this.options.styles,s=void 0===i?null:i;if(s)for(var a in s)this.popoverElement.style.setProperty(a,s[a]);this.popoverElement.style.lineHeight="1.5",this.popoverElement.style.zIndex="20231026",this.popoverElement.style.overflow="auto",this.popoverElement.style.padding="10px",this.popoverElement.style.borderRadius="var(--radius)",this.popoverElement.style.backdropFilter="var(--dropdown-bdf)",this.popoverElement.style.background="var(--dropdown-bg)",this.popoverElement.style.border="var(--dropdown-border)",this.popoverElement.style.boxShadow="var(--dropdown-boxShadow)",this.fadeIn(this.popoverElement,150)}},{key:"removePopover",value:function(){var t=this;if(this.popoverElement){var e=this.popoverElement;this.fadeOut(e,150,(function(){e.remove(),t.popoverElement===e&&(t.popoverElement=null)}))}}},{key:"handleDocumentClick",value:function(t){t.target&&this.popoverElement&&this.popoverElement.contains(t.target)||this.removePopover()}}])}();_e.activePopover=null;const Se=(t,n)=>n.map((n=>Object.assign(Object.assign({},n),{start:e()(`${t}-${n.start}`).toString(),end:e()(`${t}-${n.end}`).toString()})));var Ae;Ae=()=>{const{roadmapYears:t=null,initYear:n}=window,o=document.querySelector("#tody-button");if(n===e()().year().toString()&&o&&(o.style.display="inherit"),t){const p=Object.keys(t).map((t=>({value:String(Number(t)),label:Number(t)})));new Ee("#year-dropdown",p,{onClickItem:n=>{const{value:r}=n;document.querySelector("#year-dropdown span").textContent=r,o.style.display=r===e()().year().toString()?"inherit":"none";const i=Se(r,t[r]);y.updateTasks(i,Number(r))}});const f=Se(n,t[n]),y=new r("#gantt-container",f,Number(n));null==o||o.addEventListener("click",(()=>y.centerOnCurrentDay())),s=(i={key:"d",preventDefault:!0,handler:()=>y.centerOnCurrentDay()}).key,a=i.handler,l=i.preventDefault,c=void 0!==l&&l,d=s.toLowerCase().split("+").map((function(t){return t.trim()})),h=/Mac|iPod|iPhone|iPad/.test(navigator.platform),u=function(t){var e=d.every((function(e){return"control"===e?h?t.metaKey:t.ctrlKey:t.key.toLowerCase()===e}));e&&(c&&t.preventDefault(),a(t))},document.addEventListener("keydown",u)}var i,s,a,l,c,d,h,u},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",Ae):Ae()})()})(); |