idea-react 2.3.3 → 2.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1 +1,41 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));let c=require("@swc/helpers/_/_object_spread"),l=require("@swc/helpers/_/_object_without_properties"),u=require("react/jsx-runtime"),d=require("classnames");d=s(d);let f=require("@swc/helpers/_/_define_property"),p=require("@swc/helpers/_/_object_spread_props"),m=require("react"),ee=require("@shikijs/langs/javascript");ee=s(ee);let h=require("@shikijs/langs/jsx");h=s(h);let te=require("@shikijs/langs/tsx");te=s(te);let ne=require("@shikijs/langs/typescript");ne=s(ne);let re=require("@shikijs/themes/github-light");re=s(re);let g=require("react-element-to-jsx-string");g=s(g);let ie=require("shiki/core"),ae=require("shiki/engine/javascript"),_=require("@swc/helpers/_/_apply_decs_2203_r"),v=require("@swc/helpers/_/_class_private_field_get"),y=require("@swc/helpers/_/_class_private_field_init"),b=require("@swc/helpers/_/_class_private_field_set"),x=require("@swc/helpers/_/_identity"),S=require("mobx"),C=require("mobx-react"),w=require("mobx-react-helper"),T=require("web-utility"),oe=require("iterable-observer"),E=require("@swc/helpers/_/_async_to_generator"),se=require("react-editor-js"),ce=require("editorjs-html");ce=s(ce);let D=require("react-live"),O=require("react-bootstrap"),le=require("html2canvas");le=s(le);function ue(e){return t=>t&&new IntersectionObserver(([{isIntersecting:t,target:n}],r)=>{if(!t)return;let i=[`animate__animated`,`animate__${e}`];n.classList.add(...i),n.addEventListener(`animationend`,()=>n.classList.remove(...i),{once:!0}),r.disconnect()}).observe(t)}const de=e=>{let{className:t,style:n,size:r=3}=e,i=(0,l._)(e,[`className`,`style`,`size`]);return(0,u.jsx)(`img`,(0,c._)({className:(0,d.default)(`object-fit-cover rounded-circle`,t),style:(0,c._)({width:`${r}rem`,height:`${r}rem`},n)},i))};de.displayName=`Avatar`;var fe=class extends m.PureComponent{componentDidMount(){window.addEventListener(`click`,this.switchClick,!0)}componentWillUnmount(){window.removeEventListener(`click`,this.switchClick,!0)}render(){let e=this.props,{children:t,onInnerClick:n,onOuterClick:r}=e,i=(0,l._)(e,[`children`,`onInnerClick`,`onOuterClick`]);return(0,u.jsx)(`div`,(0,p._)((0,c._)({ref:this.root},i),{children:t}))}constructor(...e){super(...e),(0,f._)(this,`root`,(0,m.createRef)()),(0,f._)(this,`switchClick`,e=>{var t;let{onInnerClick:n,onOuterClick:r}=this.props;(t=this.root.current)!=null&&t.contains(e.target)?n==null||n(e):r==null||r(e)})}};const pe=(0,ie.createHighlighterCoreSync)({themes:[re.default],langs:[ee.default,h.default,ne.default,te.default],engine:(0,ae.createJavaScriptRegexEngine)()}),me=e=>{let{className:t=``,language:n,children:r}=e,i=(0,l._)(e,[`className`,`language`,`children`]),a=typeof r==`string`?r:g.default((0,m.isValidElement)(r)?r:(0,u.jsx)(u.Fragment,{children:r})),o=pe.codeToHtml(a,{lang:n,theme:`github-light`,structure:`inline`});return(0,u.jsx)(`pre`,(0,p._)((0,c._)({className:`m-0 language-${n} ${t}`},i),{children:(0,u.jsx)(`code`,{dangerouslySetInnerHTML:{__html:o},className:`language-${n}`})}))},he=[`primary`,`secondary`,`success`,`danger`,`warning`,`info`,`dark`,`light`];function ge(e,t=[]){let n=t[0]?he.filter(e=>!t.find(t=>t===e)):he;return n[[...e].reduce((e,t)=>e+t.charCodeAt(0),0)%n.length]}let _e;var k,ve,ye,be,xe,Se=(0,w.reaction)(e=>e.observedProps.endTime),Ce,we;let Te;new(_e=(k=new WeakMap,ve=class extends (xe=w.ObservedComponent){get rest(){return(0,v._)(this,k)}set rest(e){(0,b._)(this,k,e)}get endTimestamp(){return+new Date(this.props.endTime||Date.now())}get timeSections(){let{units:e}=this.observedProps,{rest:t}=this;return e.reduce((n,{label:r},i)=>{let a=e.slice(i).map(({scale:e})=>e).reduce((e,t)=>e*t,1),o=~~(t/a);return t-=o*a,n.push({value:o,label:r}),n},[])}stop(){this.timer&&(window.clearInterval(this.timer),this.timer=0)}componentDidMount(){super.componentDidMount(),this.initTimer()}initTimer(){this.stop(),this.tick(),this.timer=window.setInterval(this.tick,T.Second)}componentWillUnmount(){super.componentWillUnmount(),this.stop()}render(){let e=this.props,{className:t=``,itemClassName:n=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,units:r,endTime:i,onEnd:a}=e,o=(0,l._)(e,[`className`,`itemClassName`,`units`,`endTime`,`onEnd`]),{timeSections:s}=this;return(0,u.jsx)(`ol`,(0,p._)((0,c._)({className:`list-unstyled m-0 ${t}`},o),{children:s.map(({value:e,label:t})=>(0,u.jsxs)(`li`,{className:n,children:[(0,u.jsx)(`strong`,{children:(e+``).padStart(2,`0`)}),(0,u.jsx)(`span`,{children:t})]},t))}))}constructor(...e){super(...e),(0,y._)(this,k,{writable:!0,value:(we(this),Ce(this,0))}),(0,f._)(this,`timer`,0),(0,f._)(this,`tick`,()=>{let{onEnd:e,endTime:t}=this.props,n=this.endTimestamp-Date.now();n>0?this.rest=n:(this.rest=0,this.stop(),e==null||e(t))})}},{e:[Ce,we],c:[Te,be]}=(0,_._)(ve,[[S.observable,1,`rest`],[S.computed,3,`timeSections`],[Se,2,`initTimer`]],[C.observer],xe),ve),ye=class extends x._{constructor(){super(Te),(0,f._)(this,`displayName`,`Countdown`),be()}},(0,f._)(ye,_e,void 0),ye);var Ee,De,Oe,ke=class extends Error{constructor(e=`Dialog closed`){super(e)}},Ae=new WeakMap,je=new WeakMap,Me=class{get input(){return(0,v._)(this,Ae)}set input(e){(0,b._)(this,Ae,e)}get defer(){return(0,v._)(this,je)}set defer(e){(0,b._)(this,je,e)}open(e){return e&&(this.input=e),this.defer=new oe.Defer,this.defer.promise.finally(()=>this.defer=void 0),this.defer.promise}constructor(e){(0,y._)(this,Ae,{writable:!0,value:(Oe(this),Ee(this,{}))}),(0,y._)(this,je,{writable:!0,value:De(this)}),(0,f._)(this,`Component`,void 0),this.Component=(0,C.observer)(t=>(0,u.jsx)(e,(0,p._)((0,c._)({},t,this.input),{defer:this.defer}))),this.Component.displayName=`DialogComponent`}};({e:[Ee,De,Oe]}=(0,_._)(Me,[[S.observable,1,`input`],[S.observable,1,`defer`]],[]));let Ne;var A,Pe,Fe,Ie,Le,Re,ze;const Be=(0,se.createReactEditorJS)();let Ve;new(Ne=(A=new WeakMap,Pe=class extends (Le=m.Component){get innerValue(){return(0,v._)(this,A)}set innerValue(e){(0,b._)(this,A,e)}render(){let e=this.props,{name:t,required:n,children:r}=e,i=(0,l._)(e,[`name`,`required`,`children`]),{innerValue:a}=this;return(0,u.jsxs)(`div`,{className:`form-control`,tabIndex:-1,onBlur:this.save,children:[(0,u.jsx)(`input`,{hidden:!0,name:t,required:n,value:JSON.stringify(a)}),(0,u.jsx)(Be,(0,p._)((0,c._)({},i),{onInitialize:e=>{var t;this.core=e,(t=i.onInitialize)==null||t.call(i,e)}}))]})}constructor(...e){var t;super(...e),t=this,(0,f._)(this,`core`,void 0),(0,y._)(this,A,{writable:!0,value:(ze(this),Re(this,this.props.defaultValue))}),(0,f._)(this,`save`,()=>(0,E._)(function*(){return t.core&&(t.innerValue=yield t.core.save())})())}},{e:[Re,ze],c:[Ve,Ie]}=(0,_._)(Pe,[[S.observable,1,`innerValue`]],[C.observer],Le),Pe),Fe=class extends x._{constructor(){super(Ve),(0,f._)(this,`displayName`,`Editor`),Ie()}},(0,f._)(Fe,Ne,void 0),Fe);const He=(0,ce.default)({link:({data:{link:e}})=>`<a href="${e}">${e}</a>`}),Ue=e=>{let{data:t}=e,n=(0,l._)(e,[`data`]);return(0,u.jsx)(`article`,(0,p._)((0,c._)({},n),{dangerouslySetInnerHTML:{__html:He.parse(t)}}))};Ue.displayName=`EditorHTML`;const j=e=>{let{className:t=``,children:n,maxWidth:r=`100%`,duration:i,height:a}=e,o=(0,l._)(e,[`className`,`children`,`maxWidth`,`duration`,`height`]);return(0,u.jsx)(`div`,(0,p._)((0,c._)({className:`overflow-hidden mw-100 ${t}`},o),{children:(0,u.jsx)(`div`,{className:`d-inline-block align-top text-nowrap lRDfma_scrollWrap`,style:{maxWidth:r,animationDuration:i,height:a,lineHeight:a},children:(0,u.jsx)(`div`,{className:`d-inline-block lRDfma_scrollItem`,style:{animationDuration:i},children:n})})}))},We=({children:e,maxWidth:t,duration:n,height:r})=>r?(0,u.jsx)(`div`,{className:`overflow-hidden lRDfma_scrollHeightWrap`,style:{maxWidth:t,"--scroll-height":r},children:(0,u.jsxs)(`div`,{className:`d-inline-block overflow-hidden mw-100 lRDfma_scrollContainer`,children:[(0,u.jsx)(`div`,{className:`d-block overflow-hidden text-wrap text-break lRDfma_unScrollItem`,children:e}),(0,u.jsx)(j,{duration:n,children:e})]})}):(0,u.jsx)(j,{maxWidth:t,duration:n,height:r,children:e});j.displayName=`HorizontalMarquee`;const M=e=>{let{className:t,style:n,name:r,size:i}=e,a=(0,l._)(e,[`className`,`style`,`name`,`size`]);return(0,u.jsx)(`span`,(0,c._)({className:(0,d.default)(`bi-${r}`,t),style:(0,c._)({fontSize:i&&`${i}rem`},n)},a))};M.displayName=`Icon`;const Ge=({scope:e,children:t})=>{let n=typeof t==`string`?t:(0,g.default)((0,m.isValidElement)(t)?t:(0,u.jsx)(u.Fragment,{children:t}));return(0,u.jsxs)(D.LiveProvider,{code:n,scope:e,language:`tsx`,children:[(0,u.jsx)(D.LivePreview,{className:`mb-3`}),(0,u.jsx)(D.LiveEditor,{}),(0,u.jsx)(D.LiveError,{className:`text-danger small p-2`})]})},N=e=>{let{className:t=``,children:n=`Loading...`}=e,r=(0,l._)(e,[`className`,`children`]);return(0,u.jsxs)(`div`,(0,p._)((0,c._)({className:`fixed-top h-100 w-100 d-flex justify-content-center align-items-center opacity-25 bg-black ${t}`},r),{children:[(0,u.jsx)(O.Spinner,{animation:`border`,variant:`success`}),(0,u.jsx)(`span`,{className:`ml-3 text-white`,children:n})]}))};N.displayName=`Loading`;const P=e=>{let{title:t,detail:n,children:r}=e,i=(0,l._)(e,[`title`,`detail`,`children`]);return(0,u.jsx)(O.OverlayTrigger,(0,p._)((0,c._)({},i),{overlay:n?(0,u.jsxs)(O.Popover,{children:[(0,u.jsx)(O.Popover.Header,{children:t}),(0,u.jsx)(O.Popover.Body,{children:n})]}):(0,u.jsx)(O.Tooltip,{children:t}),children:r}))};P.displayName=`OverlayBox`;let Ke;var F,I,L,qe,Je,Ye,Xe;let R;new(Ke=(F=new WeakMap,I=class extends (Je=w.ObservedComponent){get weekFormatter(){var e;let{locale:t=(e=globalThis.navigator)==null?void 0:e.language}=this.observedProps;return new Intl.DateTimeFormat(t,{weekday:`long`})}get currentDate(){return(0,v._)(this,F)}set currentDate(e){(0,b._)(this,F,e)}get dateGrid(){let e=new Date(this.currentDate);e.setDate(1),e=new Date(+e-e.getDay()*T.Day);let t=Array.from(Array(42),(t,n)=>new Date(+e+n*T.Day));return(0,T.splitArray)(t,7)}changeMonth(e){var t,n;this.currentDate=(0,T.changeMonth)(this.currentDate,e),(t=(n=this.props).onChange)==null||t.call(n,this.currentDate)}render(){let{weekFormatter:e,currentDate:t,dateGrid:n}=this,r=this.observedProps,{style:i,variant:a=`primary`,onChange:o,onSelect:s}=r,d=(0,l._)(r,[`style`,`variant`,`onChange`,`onSelect`]);return(0,u.jsxs)(O.Table,(0,p._)((0,c._)({},d),{style:(0,c._)({tableLayout:`fixed`},i),children:[(0,u.jsx)(`caption`,{children:(0,u.jsxs)(`div`,{className:`d-flex justify-content-between align-items-center`,children:[(0,u.jsx)(O.Button,{variant:a,onClick:()=>this.changeMonth(-1),children:`<`}),(0,T.formatDate)(t,`YYYY-MM`),(0,u.jsx)(O.Button,{variant:a,onClick:()=>this.changeMonth(1),children:`>`})]})}),(0,u.jsx)(`thead`,{children:(0,u.jsx)(`tr`,{children:n[0].map((t,n,{length:r})=>(0,u.jsx)(`td`,{className:`bg-${a} text-white`,style:{width:`calc(100% / ${r})`},children:e.format(t)},n))})}),(0,u.jsx)(`tbody`,{children:n.map(e=>(0,u.jsx)(`tr`,{children:e.map(this.renderDate)},e[0]+``))})]}))}constructor(...e){super(...e),(0,y._)(this,F,{writable:!0,value:(Xe(this),Ye(this,new Date))}),(0,f._)(this,`renderDate`,e=>{let{variant:t=`primary`,value:n,onSelect:r}=this.observedProps,i=(0,T.formatDate)(e,`YYYY-MM-DD`),a=n==null?void 0:n.filter(({date:e})=>(0,T.formatDate)(e,`YYYY-MM-DD`)===i);return(0,u.jsxs)(`td`,{className:(0,d.default)({"opacity-50":e.getMonth()!==this.currentDate.getMonth(),"fw-bold":i===(0,T.formatDate)(new Date,`YYYY-MM-DD`)}),children:[(0,u.jsx)(`time`,{className:`d-block`,dateTime:e.toJSON(),children:e.getDate()}),a==null?void 0:a.map(e=>typeof e.content==`object`?e.content:(0,u.jsx)(P,{title:e.content,children:(0,u.jsx)(O.Badge,{as:`a`,className:`d-inline-block text-decoration-none w-100 text-truncate`,bg:ge(e.content+``,[`light`]),href:e.link,onClick:()=>r==null?void 0:r(e),children:e.content})},e.date+``))]},e+``)})}},{e:[Ye,Xe],c:[R,qe]}=(0,_._)(I,[[S.computed,3,`weekFormatter`],[S.observable,1,`currentDate`],[S.computed,3,`dateGrid`]],[C.observer],Je),I),L=class extends x._{constructor(){super(R),(0,f._)(this,`displayName`,`MonthCalendar`),qe()}},(0,f._)(L,Ke,void 0),L);const z=({avatar:e,name:t})=>(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(de,{size:2,style:{marginRight:`0.5rem`},src:e}),(0,u.jsx)(`span`,{className:`align-middle`,children:t})]});z.displayName=`Nameplate`;let Ze;var B,V,Qe,$e,et,tt,nt,rt,it;const at=Array.from([,,,,,,],(e,t)=>`h${++t}`)+``;let ot;new(Ze=(B=new WeakMap,V=new WeakMap,Qe=class extends (tt=m.Component){get list(){return(0,v._)(this,B)}set list(e){(0,b._)(this,B,e)}get scrollY(){return(0,v._)(this,V)}set scrollY(e){(0,b._)(this,V,e)}get currentActiveId(){var e;let{list:t,scrollY:n}=this;return(e=t[t.findIndex(({top:e})=>e>n)-1])==null?void 0:e.id}componentDidMount(){globalThis.document&&(window.addEventListener(`scroll`,this.updateScrollY),this.list=Array.from(document.querySelectorAll(at),e=>{var t;(t=e).id||(t.id=(0,T.uniqueID)());let{id:n,tagName:r,textContent:i,offsetTop:a}=e;return{id:n,level:+r[1],text:i.trim(),top:a}}))}componentWillUnmount(){var e,t;(e=(t=globalThis).removeEventListener)==null||e.call(t,`scroll`,this.updateScrollY)}render(){let{list:e}=this,t=this.props,{style:n,variant:r=`underline`}=t,i=(0,l._)(t,[`style`,`variant`]);return(0,u.jsx)(O.Nav,(0,p._)((0,c._)({},i),{variant:r,style:(0,c._)({flexDirection:`column`},n),children:e.map(this.renderLink)}))}constructor(...e){super(...e),(0,y._)(this,B,{writable:!0,value:(it(this),nt(this,[]))}),(0,y._)(this,V,{writable:!0,value:rt(this,0)}),(0,f._)(this,`updateScrollY`,()=>this.scrollY=window.scrollY),(0,f._)(this,`scrollTo`,e=>()=>{var t,n;setTimeout(()=>(0,T.scrollTo)(`[id="${e.id}"]`)),(t=(n=this.props).onItemClick)==null||t.call(n,e)}),(0,f._)(this,`renderLink`,({id:e,level:t,text:n,top:r})=>{let{currentActiveId:i}=this,{depth:a=1/0}=this.props;return t<=a&&(0,u.jsx)(O.Nav.Item,{style:{textIndent:`${t-1}rem`},children:(0,u.jsx)(O.Nav.Link,{href:`#${e}`,active:i===e,onClick:this.scrollTo({id:e,level:t,text:n,top:r}),children:n})},e)})}},{e:[nt,rt,it],c:[ot,et]}=(0,_._)(Qe,[[S.observable,1,`list`],[S.observable,1,`scrollY`],[S.computed,3,`currentActiveId`]],[C.observer],tt),Qe),$e=class extends x._{constructor(){super(ot),(0,f._)(this,`displayName`,`PageNav`),et()}},(0,f._)($e,Ze,void 0),$e);let st;var H,U,W,ct,lt,ut,dt,ft,pt,mt,ht;let gt;new(st=(H=new WeakMap,U=new WeakMap,W=new WeakMap,ct=class extends (dt=m.Component){get scrollLeft(){return(0,v._)(this,H)}set scrollLeft(e){(0,b._)(this,H,e)}get scrollWidth(){return(0,v._)(this,U)}set scrollWidth(e){(0,b._)(this,U,e)}get clientWidth(){return(0,v._)(this,W)}set clientWidth(e){(0,b._)(this,W,e)}get canScrollLeft(){return this.scrollLeft>0}get canScrollRight(){return this.scrollLeft+this.clientWidth<this.scrollWidth}componentDidMount(){let e=this.updateScroll();e&&(e.addEventListener(`scroll`,this.updateScroll),this.resizeObserver=new ResizeObserver(this.updateScroll),this.resizeObserver.observe(e))}componentWillUnmount(){var e,t;(e=this.resizeObserver)==null||e.disconnect(),(t=this.scrollerRef.current)==null||t.removeEventListener(`scroll`,this.updateScroll)}render(){let{canScrollLeft:e,canScrollRight:t}=this,n=this.props,{className:r=``,children:i}=n,a=(0,l._)(n,[`className`,`children`]);return(0,u.jsxs)(`div`,{className:`position-relative overflow-y-hidden ${r}`,children:[e&&(0,u.jsx)(`button`,{type:`button`,className:`position-absolute top-0 bottom-0 start-0 z-1 border-0 px-2 aEvBXq_scrollButtonLeft`,"aria-label":`Scroll left`,onClick:this.scrollBy(-1),children:(0,u.jsx)(M,{name:`caret-left-fill`})}),(0,u.jsx)(`div`,{ref:this.scrollerRef,className:`overflow-x-auto aEvBXq_scrollerInner`,children:(0,u.jsx)(O.Nav,(0,p._)((0,c._)({},a),{className:`flex-nowrap`,children:i}))}),t&&(0,u.jsx)(`button`,{type:`button`,className:`position-absolute top-0 bottom-0 end-0 z-1 border-0 px-2 aEvBXq_scrollButtonRight`,"aria-label":`Scroll right`,onClick:this.scrollBy(1),children:(0,u.jsx)(M,{name:`caret-right-fill`})})]})}constructor(...e){super(...e),(0,f._)(this,`scrollerRef`,(ht(this),(0,m.createRef)())),(0,y._)(this,H,{writable:!0,value:ft(this,0)}),(0,y._)(this,U,{writable:!0,value:pt(this,0)}),(0,y._)(this,W,{writable:!0,value:mt(this,0)}),(0,f._)(this,`updateScroll`,()=>{let e=this.scrollerRef.current;return e&&(this.scrollLeft=e.scrollLeft,this.scrollWidth=e.scrollWidth,this.clientWidth=e.clientWidth),e}),(0,f._)(this,`resizeObserver`,void 0),(0,f._)(this,`scrollBy`,e=>()=>{let t=this.scrollerRef.current;t&&t.scrollBy({left:e*t.clientWidth*.8,behavior:`smooth`})})}},{e:[ft,pt,mt,ht],c:[gt,ut]}=(0,_._)(ct,[[S.observable,1,`scrollLeft`],[S.observable,1,`scrollWidth`],[S.observable,1,`clientWidth`],[S.computed,3,`canScrollLeft`],[S.computed,3,`canScrollRight`]],[C.observer],dt),ct),lt=class extends x._{constructor(){super(gt),(0,f._)(this,`displayName`,`ScrollNav`),ut()}},(0,f._)(lt,st,void 0),lt);const _t=e=>{let{value:t,children:n}=e,r=(0,l._)(e,[`value`,`children`]);return(0,u.jsx)(O.Dropdown.Item,(0,p._)((0,c._)({},r),{"data-value":t,children:n}))};_t.displayName=`Option`;const vt=({className:e,style:t,variant:n,menuVariant:r,children:i,value:a,onChange:o,valueRender:s})=>{let c=(0,T.makeArray)(i).flat(1/0).find(e=>(0,m.isValidElement)(e)&&e.type===_t&&e.props.value===a);return(0,u.jsxs)(O.Dropdown,{onClick:({target:e})=>{let t=e.closest(`.dropdown-item`);if(!t)return;let{value:n}=t.dataset;o==null||o(n)},children:[(0,u.jsx)(O.Dropdown.Toggle,{className:(0,d.default)(`w-100`,`d-flex`,`justify-content-between`,`align-items-center`,!n&&`bg-white text-dark`,e),style:t,variant:n,children:(s==null?void 0:s(a))||(0,u.jsx)(`div`,{className:c==null?void 0:c.props.className,children:c==null?void 0:c.props.children})}),(0,u.jsx)(O.Dropdown.Menu,{variant:r,children:i})]})};vt.displayName=`Select`;let yt;var G,K,bt,xt,St,Ct,wt,Tt,Et;function Dt(e,t,n){return(0,E._)(function*(){let r=yield(0,le.default)(e,{useCORS:!0});return new Promise((e,i)=>r.toBlob(t=>t?e(URL.createObjectURL(t)):i(),t,n))})()}let Ot;new(yt=(G=new WeakMap,K=new WeakMap,bt=class extends (Ct=m.Component){get loading(){return(0,v._)(this,G)}set loading(e){(0,b._)(this,G,e)}get imageURI(){return(0,v._)(this,K)}set imageURI(e){(0,b._)(this,K,e)}componentDidMount(){var e,t;(e=(t=globalThis).addEventListener)==null||e.call(t,`resize`,this.generateImage)}componentWillUnmount(){var e,t;(e=(t=globalThis).removeEventListener)==null||e.call(t,`resize`,this.generateImage)}render(){let e=this.props,{className:t=``,children:n}=e,r=(0,l._)(e,[`className`,`children`]),{loading:i,imageURI:a}=this;return(0,u.jsxs)(u.Fragment,{children:[i&&(0,u.jsx)(N,{}),(0,u.jsxs)(`div`,(0,p._)((0,c._)({},r),{ref:this.root,className:`position-relative ${t}`,onMouseEnter:a?void 0:this.generateImage,onTouchStart:a?void 0:this.generateImage,children:[n,a&&(0,u.jsx)(O.Image,{className:`position-absolute start-0 top-0 w-100 h-100`,src:a,alt:`Share Image`,fluid:!0,onClick:this.share})]}))]})}constructor(...e){var t;super(...e),t=this,(0,f._)(this,`root`,(Et(this),(0,m.createRef)())),(0,y._)(this,G,{writable:!0,value:wt(this,!1)}),(0,y._)(this,K,{writable:!0,value:Tt(this,``)}),(0,f._)(this,`generateImage`,()=>(0,E._)(function*(){t.imageURI&&(URL.revokeObjectURL(t.imageURI),t.imageURI=``),t.loading=!0,t.imageURI=yield Dt(t.root.current),t.loading=!1})()),(0,f._)(this,`share`,e=>(0,E._)(function*(){var n,r;e.stopPropagation();let i=yield(0,T.blobOf)(t.imageURI),a=new File([i],`${t.props.title}.png`,{type:i.type});yield(n=(r=navigator).share)==null?void 0:n.call(r,(0,c._)({files:[a]},t.props))})())}},{e:[wt,Tt,Et],c:[Ot,St]}=(0,_._)(bt,[[S.observable,1,`loading`],[S.observable,1,`imageURI`]],[C.observer],Ct),bt),xt=class extends x._{constructor(){super(Ot),(0,f._)(this,`displayName`,`ShareBox`),St()}},(0,f._)(xt,yt,void 0),xt);const kt=e=>{let{animation:t,loading:n,disabled:r,children:i}=e,a=(0,l._)(e,[`animation`,`loading`,`disabled`,`children`]);return(0,u.jsxs)(O.Button,(0,p._)((0,c._)({},a),{disabled:n||r,children:[n&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(O.Spinner,{as:`span`,className:i?`me-2`:``,size:`sm`,animation:t,role:`status`,"aria-hidden":`true`}),!i&&(0,u.jsx)(`span`,{className:`visually-hidden`,children:`Loading...`})]}),i]}))};kt.displayName=`SpinnerButton`;const At=e=>{let{animation:t=`border`,variant:n=`primary`,size:r,colSpan:i}=e,a=(0,l._)(e,[`animation`,`variant`,`size`,`colSpan`]);return(0,u.jsx)(`tr`,(0,p._)((0,c._)({},a),{children:(0,u.jsx)(`td`,{className:`text-center p-4`,colSpan:i,children:(0,u.jsx)(O.Spinner,{animation:t,variant:n,size:r})})}))};At.displayName=`TableSpinner`;let jt;var q,J,Y,Mt,Nt,Pt,Ft,It,Lt;let Rt;new(jt=(q=new WeakMap,J=new WeakMap,Y=class extends (Pt=m.Component){get expanded(){return(0,v._)(this,q)}set expanded(e){(0,b._)(this,q,e)}get overflowed(){return(0,v._)(this,J)}set overflowed(e){(0,b._)(this,J,e)}componentDidMount(){this.checkOverflow(),window.addEventListener(`resize`,this.checkOverflow)}componentDidUpdate({rows:e,children:t}){!this.expanded&&(t!==this.props.children||e!==this.props.rows)&&this.checkOverflow()}componentWillUnmount(){window.removeEventListener(`resize`,this.checkOverflow)}render(){let e=this.props,{children:t,rows:n=3,expandText:r=`⏬`,collapseText:i=`⏫`}=e,a=(0,l._)(e,[`children`,`rows`,`expandText`,`collapseText`]),{expanded:o,overflowed:s}=this,d={overflow:`hidden`,display:`-webkit-box`,WebkitBoxOrient:`vertical`,WebkitLineClamp:n};return(0,u.jsxs)(`div`,(0,p._)((0,c._)({},a),{children:[(0,u.jsx)(`p`,{ref:this.contentRef,style:o?void 0:d,children:t}),(s||o)&&(0,u.jsx)(`button`,{type:`button`,className:`bg-transparent border-0 p-0`,"aria-expanded":o,onClick:this.toggle,children:o?i:r})]}))}constructor(...e){super(...e),(0,y._)(this,q,{writable:!0,value:(Lt(this),Ft(this,!1))}),(0,y._)(this,J,{writable:!0,value:It(this,!1)}),(0,f._)(this,`contentRef`,(0,m.createRef)()),(0,f._)(this,`checkOverflow`,()=>{let{current:e}=this.contentRef;e&&(this.overflowed=e.scrollHeight>e.clientHeight)}),(0,f._)(this,`toggle`,()=>{this.expanded=!this.expanded,this.expanded||requestAnimationFrame(this.checkOverflow)})}},{e:[Ft,It,Lt],c:[Rt,Nt]}=(0,_._)(Y,[[S.observable,1,`expanded`],[S.observable,1,`overflowed`]],[C.observer],Pt),Y),Mt=class extends x._{constructor(){super(Rt),(0,f._)(this,`displayName`,`TextTruncate`),Nt()}},(0,f._)(Mt,jt,void 0),Mt);let zt;var X,Bt,Vt,Ht,Ut,Wt=(0,w.reaction)(({observedProps:{dateTime:e,format:t}})=>e+t),Gt,Kt;let Z;new(zt=(X=new WeakMap,Bt=class extends (Ut=w.ObservedComponent){updateText(){let{dateTime:e,format:t}=this.props;return(0,T.formatDate)(e,t)}get timeText(){return(0,v._)(this,X)}set timeText(e){(0,b._)(this,X,e)}componentDidMount(){super.componentDidMount(),this.timeText=this.updateText()}render(){let e=this.props,{dateTime:t}=e,n=(0,l._)(e,[`dateTime`]);return(0,u.jsx)(`time`,(0,p._)((0,c._)({dateTime:new Date(t).toJSON()},n),{children:this.timeText}))}constructor(...e){super(...e),(0,y._)(this,X,{writable:!0,value:(Kt(this),Gt(this,this.updateText()))})}},{e:[Gt,Kt],c:[Z,Ht]}=(0,_._)(Bt,[[Wt,2,`updateText`],[S.observable,1,`timeText`]],[C.observer],Ut),Bt),Vt=class extends x._{constructor(){super(Z),(0,f._)(this,`displayName`,`Time`),Ht()}},(0,f._)(Vt,zt,void 0),Vt);const qt={ms:`millisecond(s)`,s:`second(s)`,m:`minute(s)`,H:`hour(s)`,D:`day(s)`,W:`week(s)`,M:`month(s)`,Y:`year(s)`},Jt=e=>{let{date:t,unitWords:n=qt,beforeWord:r=` before`,afterWord:i=` after`}=e,a=(0,l._)(e,[`date`,`unitWords`,`beforeWord`,`afterWord`]);t=new Date(t);let{distance:o,unit:s}=(0,T.diffTime)(t);return(0,u.jsxs)(`time`,(0,p._)((0,c._)({},a),{dateTime:t.toJSON(),title:t.toLocaleString(),children:[Math.abs(o),` `,n[s],o<0?r:i]}))};Jt.displayName=`TimeDistance`;const Yt=e=>{let{className:t,events:n,timeFormat:r}=e,i=(0,l._)(e,[`className`,`events`,`timeFormat`]);return(0,u.jsx)(`ol`,(0,p._)((0,c._)({className:`list-unstyled hsu__a_timeline ${t}`},i),{children:n.map(({title:e,summary:t,time:n,link:i,people:a})=>(0,u.jsx)(`li`,{className:`position-relative hsu__a_timelineItem hsu__a_right`,children:(0,u.jsx)(O.Card,{children:(0,u.jsxs)(O.Card.Body,{className:`p-4 d-flex flex-column gap-3 align-items-center`,children:[(0,u.jsx)(`h3`,{className:`h5 m-0`,children:(0,u.jsx)(`a`,{className:`text-decoration-none stretched-link`,href:i,children:e})}),(0,u.jsxs)(`div`,{className:`small text-muted d-flex gap-2`,children:[`⏲️`,(0,u.jsx)(Z,{dateTime:n[0],format:r}),n[1]&&`~`,n[1]&&(0,u.jsx)(Z,{dateTime:n[1],format:r})]}),(0,u.jsx)(`ul`,{className:`list-unstyled m-0 d-flex gap-2 flex-wrap justify-content-around`,children:a==null?void 0:a.map(e=>(0,u.jsx)(`li`,{children:(0,u.jsx)(z,(0,c._)({},e))},e.name))}),(0,u.jsx)(`p`,{className:`m-0`,children:t})]})})},e))}))};Yt.displayName=`Timeline`;var Xt,Zt;const Qt=new Set([`warning`,`info`,`light`]);var Q=new WeakMap,$t=class{get messages(){return(0,v._)(this,Q)}set messages(e){(0,b._)(this,Q,e)}open(e){let t=(0,T.uniqueID)(),n=Date.now(),{promise:r,resolve:i}=Promise.withResolvers();return this.messages=[...this.messages,(0,p._)((0,c._)({id:t},e),{openedAt:n,resolve:i})],r}close(e){let t=this.messages.find(t=>t.id===e)||{},{resolve:n}=t,r=(0,l._)(t,[`resolve`]);n==null||n((0,p._)((0,c._)({},r),{closedAt:Date.now()})),this.messages=this.messages.filter(t=>t.id!==e)}constructor(e=T.Timestamp){(0,f._)(this,`TimeScalar`,void 0),(0,y._)(this,Q,{writable:!0,value:void 0}),(0,f._)(this,`Component`,void 0),(0,f._)(this,`renderMessage`,void 0),this.TimeScalar=e,(0,b._)(this,Q,(Zt(this),Xt(this,[]))),this.Component=(0,C.observer)(({position:e=`top-end`})=>(0,u.jsx)(O.ToastContainer,{position:e,className:`position-fixed p-3`,children:this.messages.map(this.renderMessage)})),this.renderMessage=({id:e,openedAt:t,title:n,body:r,variant:i,delay:a=3e3})=>{let o=i&&!Qt.has(i)?`text-white`:void 0,s=!!n||a===0,c=this.TimeScalar.distanceOf(Date.now(),t).toShortString();return(0,u.jsxs)(O.Toast,{bg:i,delay:a,autohide:a!==0,onClose:()=>this.close(e),children:[s&&(0,u.jsxs)(O.Toast.Header,{children:[(0,u.jsx)(`strong`,{className:`me-auto`,children:n}),(0,u.jsx)(`small`,{children:c})]}),(0,u.jsx)(O.Toast.Body,{className:o,children:r})]},e)},this.Component.displayName=`ToastComponent`}};({e:[Xt,Zt]}=(0,_._)($t,[[S.observable,1,`messages`]],[]));let en;var $,tn,nn,rn,an,on,sn;let cn;new(en=($=new WeakMap,tn=class extends (an=m.Component){get echoed(){return(0,v._)(this,$)}set echoed(e){(0,b._)(this,$,e)}render(){let e=this.props,{className:t,text:n}=e,r=(0,l._)(e,[`className`,`text`]),{echoed:i}=this;return(0,u.jsx)(`pre`,(0,p._)((0,c._)({},r),{ref:this.init,className:(0,d.default)(`text-wrap`,t),children:i+(i===n?``:`_`)}))}constructor(...e){var t;super(...e),t=this,(0,y._)(this,$,{writable:!0,value:(sn(this),on(this,``))}),(0,f._)(this,`init`,e=>e&&new IntersectionObserver(([{isIntersecting:e}],n)=>(0,E._)(function*(){if(!e)return;n.disconnect();let{text:r,intervals:i=150}=t.props;for(let e of r)yield(0,T.sleep)(i/1e3),t.echoed+=e})()).observe(e))}},{e:[on,sn],c:[cn,rn]}=(0,_._)(tn,[[S.observable,1,`echoed`]],[C.observer],an),tn),nn=class extends x._{constructor(){super(cn),(0,f._)(this,`displayName`,`TypeEcho`),rn()}},(0,f._)(nn,en,void 0),nn);const ln=({email:e,website:t})=>(0,u.jsxs)(`address`,{className:`mb-0 d-flex justify-content-around gap-2`,children:[e&&(0,u.jsx)(`a`,{rel:`noreferrer`,target:`_blank`,href:`mailto:`+e,children:(0,u.jsx)(M,{name:`envelope`})}),t&&(0,u.jsx)(`a`,{rel:`noreferrer`,target:`_blank`,href:t,children:(0,u.jsx)(M,{name:`globe2`})})]}),un=`X5DLia_image`;var dn=class extends m.PureComponent{render(){let e=this.props,{className:t=``,title:n,rank:r=[],linkOf:i}=e,a=(0,l._)(e,[`className`,`title`,`rank`,`linkOf`]);return(0,u.jsxs)(O.Row,(0,p._)((0,c._)({className:`X5DLia_rankBox ${t}`},a),{children:[(0,u.jsxs)(O.Col,{sm:12,xs:12,lg:7,children:[(0,u.jsxs)(`div`,{className:`shadow rounded-3 X5DLia_title`,children:[(0,u.jsxs)(`div`,{className:`X5DLia_medal`,children:[(0,u.jsx)(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),(0,u.jsx)(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),(0,u.jsx)(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`})]}),(0,u.jsx)(`h3`,{"data-text":n,className:`position-relative m-auto mb-0 fw-bold text-center`,children:n})]}),(0,u.jsx)(O.Row,{as:`ul`,className:`mt-2 g-0 align-items-end text-center ps-0 pt-2 list-unstyled X5DLia_topUsers`,children:r.slice(0,3).map(this.renderMedal)})]}),(0,u.jsx)(O.Col,{xs:12,sm:12,lg:5,children:(0,u.jsx)(O.Table,{className:`my-3 pt-2 X5DLia_restUsers`,responsive:!0,children:(0,u.jsx)(`tbody`,{children:r.slice(3,10).map(this.renderRow)})})})]}))}constructor(...e){super(...e),(0,f._)(this,`renderMedal`,e=>{var t,n;return(0,u.jsxs)(O.Col,{as:`li`,children:[(0,u.jsx)(`div`,{className:`shadow-lg overflow-hidden rounded-circle m-auto ${un}`,children:(0,u.jsx)(O.Image,{src:e.avatar,alt:e.name,loading:`lazy`,fluid:!0})}),(0,u.jsxs)(`div`,{className:`position-relative overflow-hidden X5DLia_topUser`,children:[(0,u.jsxs)(`div`,{className:`position-relative`,children:[(0,u.jsx)(`i`,{className:`d-block overflow-hidden m-auto mb-1 rounded-circle`}),(0,u.jsx)(`a`,{className:`d-block mb-0 stretched-link`,href:((t=(n=this.props).linkOf)==null?void 0:t.call(n,e))||`#`,children:e.name}),(0,u.jsx)(`strong`,{children:e.score})]}),(0,u.jsx)(ln,(0,c._)({},e))]})]},e.id)}),(0,f._)(this,`renderRow`,(e,t,{length:n})=>{var r,i;return(0,u.jsxs)(`tr`,{className:`position-relative`,children:[(0,u.jsx)(`td`,{className:`align-middle`,children:(0,u.jsx)(O.Badge,{className:`fw-bold fst-italic`,children:(t+4+``).padStart((n+``).length,`0`)})}),(0,u.jsxs)(`td`,{className:`position-relative mw-50 text-truncate X5DLia_name`,children:[(0,u.jsx)(`div`,{className:`d-inline-block overflow-hidden align-middle rounded-circle ${un}`,children:(0,u.jsx)(O.Image,{src:e.avatar,alt:e.name,loading:`lazy`,fluid:!0})}),(0,u.jsx)(`a`,{className:`ms-2 d-inline-block align-middle stretched-link`,style:{color:`rgb(248, ${(t+2)*15}, ${(t+2)*35})`},href:((r=(i=this.props).linkOf)==null?void 0:r.call(i,e))||`#`,children:e.name})]}),(0,u.jsx)(`td`,{className:`align-middle`,children:e.score}),(0,u.jsx)(`td`,{className:`align-middle`,children:(0,u.jsx)(ln,(0,c._)({},e))})]},e.id)})}};(0,f._)(dn,`displayName`,`UserRankView`);const fn=e=>{let{className:t=``,children:n,duration:r}=e,i=(0,l._)(e,[`className`,`children`,`duration`]);return(0,u.jsx)(`div`,(0,p._)((0,c._)({className:`overflow-hidden ${t}`},i),{children:(0,u.jsx)(`div`,{className:`d-inline-block mw-100 mh-100 QBd6SG_scrollWrap`,style:{"--duration":r},children:(0,u.jsx)(`div`,{className:`d-inline-block QBd6SG_scrollItem`,children:n})})}))};fn.displayName=`VerticalMarquee`;const pn=[`🐵`,`🐔`,`🐶`,`🐷`,`🐭`,`🐮`,`🐯`,`🐰`,`🐲`,`🐍`,`🐴`,`🐐`],mn=e=>{let t=e<0?e+1:e;return pn[(t%12+12)%12]},hn=e=>{let{className:t=``,itemClassName:n=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,startYear:r,endYear:i=new Date().getFullYear(),itemOf:a}=e,o=(0,l._)(e,[`className`,`itemClassName`,`startYear`,`endYear`,`itemOf`]);return(0,u.jsx)(`ol`,(0,p._)((0,c._)({className:`list-unstyled m-0 d-flex flex-wrap justify-content-center gap-3 ${t}`},o),{children:Array.from({length:i-r+1},(e,t)=>{let r=i-t;if(r===0)return null;let o=mn(r),{link:s=`#`,title:c}=(a==null?void 0:a(r,o))||{};return(0,u.jsx)(`li`,{className:n,children:(0,u.jsxs)(`a`,{className:`d-inline-block p-3 text-decoration-none text-center`,href:s,children:[(0,u.jsx)(`div`,{className:`fs-1`,children:o}),c]})},r)})}))};hn.displayName=`ZodiacBar`,exports.Avatar=de,exports.ClickBoundary=fe,exports.CodeBlock=me,Object.defineProperty(exports,"Countdown",{enumerable:!0,get:function(){return Te}}),exports.Dialog=Me,exports.DialogClose=ke,Object.defineProperty(exports,"Editor",{enumerable:!0,get:function(){return Ve}}),exports.EditorHTML=Ue,exports.HorizontalMarquee=j,exports.HorizontalMarqueeBox=We,exports.Icon=M,exports.LiveTSX=Ge,exports.Loading=N,Object.defineProperty(exports,"MonthCalendar",{enumerable:!0,get:function(){return R}}),exports.Nameplate=z,exports.Option=_t,exports.OverlayBox=P,Object.defineProperty(exports,"PageNav",{enumerable:!0,get:function(){return ot}}),Object.defineProperty(exports,"ScrollNav",{enumerable:!0,get:function(){return gt}}),exports.Select=vt,Object.defineProperty(exports,"ShareBox",{enumerable:!0,get:function(){return Ot}}),exports.SpinnerButton=kt,exports.TableSpinner=At,Object.defineProperty(exports,"TextTruncate",{enumerable:!0,get:function(){return Rt}}),Object.defineProperty(exports,"Time",{enumerable:!0,get:function(){return Z}}),exports.TimeDistance=Jt,exports.Timeline=Yt,exports.Toast=$t,Object.defineProperty(exports,"TypeEcho",{enumerable:!0,get:function(){return cn}}),exports.UserRankView=dn,exports.VariantColors=he,exports.VerticalMarquee=fn,exports.ZodiacBar=hn,exports.ZodiacSigns=pn,exports.animate=ue,exports.elementToImage=Dt,exports.parser=He,exports.text2color=ge,exports.zodiacOf=mn;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));let l=require("@swc/helpers/_/_object_spread"),u=require("@swc/helpers/_/_object_without_properties"),d=require("react/jsx-runtime"),f=require("classnames");f=c(f);let p=require("@swc/helpers/_/_define_property"),m=require("@swc/helpers/_/_object_spread_props"),h=require("react");h=c(h);let g=require("@shikijs/langs/javascript");g=c(g);let _=require("@shikijs/langs/jsx");_=c(_);let v=require("@shikijs/langs/tsx");v=c(v);let y=require("@shikijs/langs/typescript");y=c(y);let b=require("@shikijs/themes/github-light");b=c(b);let x=require("shiki/core"),ee=require("shiki/engine/javascript"),S=require("@swc/helpers/_/_apply_decs_2203_r"),C=require("@swc/helpers/_/_class_private_field_get"),w=require("@swc/helpers/_/_class_private_field_init"),T=require("@swc/helpers/_/_class_private_field_set"),E=require("@swc/helpers/_/_identity"),D=require("mobx"),O=require("mobx-react"),k=require("mobx-react-helper"),A=require("web-utility"),te=require("iterable-observer"),j=require("@swc/helpers/_/_async_to_generator"),ne=require("react-editor-js"),M=require("editorjs-html");M=c(M);let N=require("react-live"),P=require("react-bootstrap"),re=require("html2canvas");re=c(re);function ie(e){return t=>t&&new IntersectionObserver(([{isIntersecting:t,target:n}],r)=>{if(!t)return;let i=[`animate__animated`,`animate__${e}`];n.classList.add(...i),n.addEventListener(`animationend`,()=>n.classList.remove(...i),{once:!0}),r.disconnect()}).observe(t)}const ae=e=>{let{className:t,style:n,size:r=3}=e,i=(0,u._)(e,[`className`,`style`,`size`]);return(0,d.jsx)(`img`,(0,l._)({className:(0,f.default)(`object-fit-cover rounded-circle`,t),style:(0,l._)({width:`${r}rem`,height:`${r}rem`},n)},i))};ae.displayName=`Avatar`;var oe=class extends h.PureComponent{componentDidMount(){window.addEventListener(`click`,this.switchClick,!0)}componentWillUnmount(){window.removeEventListener(`click`,this.switchClick,!0)}render(){let e=this.props,{children:t,onInnerClick:n,onOuterClick:r}=e,i=(0,u._)(e,[`children`,`onInnerClick`,`onOuterClick`]);return(0,d.jsx)(`div`,(0,m._)((0,l._)({ref:this.root},i),{children:t}))}constructor(...e){super(...e),(0,p._)(this,`root`,(0,h.createRef)()),(0,p._)(this,`switchClick`,e=>{var t;let{onInnerClick:n,onOuterClick:r}=this.props;(t=this.root.current)!=null&&t.contains(e.target)?n==null||n(e):r==null||r(e)})}};
2
+ /*!
3
+ * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
4
+ *
5
+ * Copyright (c) 2014-2017, Jon Schlinkert.
6
+ * Released under the MIT License.
7
+ */
8
+ function se(e){return Object.prototype.toString.call(e)===`[object Object]`}function ce(e){var t,n;return se(e)!==!1&&(t=e.constructor,t===void 0||(n=t.prototype,se(n)!==!1&&n.hasOwnProperty(`isPrototypeOf`)!==!1))}var le=o((e=>{var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)},n=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.prettyPrint=void 0;var r=[];function i(e){var t=typeof e;return e!==null&&(t===`object`||t===`function`)}function a(e){return Object.prototype.toString.call(e)===`[object RegExp]`}function o(e){return Object.getOwnPropertySymbols(e).filter(function(t){return Object.prototype.propertyIsEnumerable.call(e,t)})}function s(e,c,l){l===void 0&&(l=``);var u=t(t({},{indent:` `,singleQuotes:!0}),c),d=u.inlineCharacterLimit===void 0?{newLine:`
9
+ `,newLineOrSpace:`
10
+ `,pad:l,indent:l+u.indent}:{newLine:`@@__PRETTY_PRINT_NEW_LINE__@@`,newLineOrSpace:`@@__PRETTY_PRINT_NEW_LINE_OR_SPACE__@@`,pad:`@@__PRETTY_PRINT_PAD__@@`,indent:`@@__PRETTY_PRINT_INDENT__@@`},f=function(e){if(u.inlineCharacterLimit===void 0)return e;var t=e.replace(new RegExp(d.newLine,`g`),``).replace(new RegExp(d.newLineOrSpace,`g`),` `).replace(RegExp(d.pad+`|`+d.indent,`g`),``);return t.length<=u.inlineCharacterLimit?t:e.replace(RegExp(d.newLine+`|`+d.newLineOrSpace,`g`),`
11
+ `).replace(new RegExp(d.pad,`g`),l).replace(new RegExp(d.indent,`g`),l+u.indent)};if(r.indexOf(e)!==-1)return`"[Circular]"`;if(e==null||typeof e==`number`||typeof e==`boolean`||typeof e==`function`||typeof e==`symbol`||a(e))return String(e);if(e instanceof Date)return`new Date('${e.toISOString()}')`;if(Array.isArray(e)){if(e.length===0)return`[]`;r.push(e);var p=`[`+d.newLine+e.map(function(t,n){var r=e.length-1===n?d.newLine:`,`+d.newLineOrSpace,i=s(t,u,l+u.indent);return u.transform&&(i=u.transform(e,n,i)),d.indent+i+r}).join(``)+d.pad+`]`;return r.pop(),f(p)}if(i(e)){var m=n(n([],Object.keys(e),!0),o(e),!0);if(u.filter&&(m=m.filter(function(t){return u.filter&&u.filter(e,t)})),m.length===0)return`{}`;r.push(e);var p=`{`+d.newLine+m.map(function(t,n){var r=m.length-1===n?d.newLine:`,`+d.newLineOrSpace,i=typeof t==`symbol`,a=!i&&/^[a-z$_][a-z$_0-9]*$/i.test(t.toString()),o=i||a?t:s(t,u),c=s(e[t],u,l+u.indent);return u.transform&&(c=u.transform(e,t,c)),d.indent+String(o)+`: `+c+r}).join(``)+d.pad+`}`;return r.pop(),f(p)}return e=String(e).replace(/[\r\n]/g,function(e){return e===`
12
+ `?`\\n`:`\\r`}),u.singleQuotes?(e=e.replace(/\\?'/g,`\\'`),`'${e}'`):(e=e.replace(/"/g,`\\"`),`"${e}"`)}e.prettyPrint=s})),ue=o((e=>{
13
+ /** @license React v16.13.1
14
+ * react-is.production.min.js
15
+ *
16
+ * Copyright (c) Facebook, Inc. and its affiliates.
17
+ *
18
+ * This source code is licensed under the MIT license found in the
19
+ * LICENSE file in the root directory of this source tree.
20
+ */
21
+ var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e=e&&e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),de=o((e=>{
22
+ /** @license React v16.13.1
23
+ * react-is.development.js
24
+ *
25
+ * Copyright (c) Facebook, Inc. and its affiliates.
26
+ *
27
+ * This source code is licensed under the MIT license found in the
28
+ * LICENSE file in the root directory of this source tree.
29
+ */
30
+ process.env.NODE_ENV!==`production`&&(function(){"use strict";var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)}function x(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:var p=e.type;switch(p){case l:case u:case i:case o:case a:case f:return p;default:var g=p&&p.$$typeof;switch(g){case c:case d:case h:case m:case s:return g;default:return t}}case r:return t}}}var ee=l,S=u,C=c,w=s,T=n,E=d,D=i,O=h,k=m,A=r,te=o,j=a,ne=f,M=!1;function N(e){return M||(M=!0,console.warn(`The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.`)),P(e)||x(e)===l}function P(e){return x(e)===u}function re(e){return x(e)===c}function ie(e){return x(e)===s}function ae(e){return typeof e==`object`&&!!e&&e.$$typeof===n}function oe(e){return x(e)===d}function se(e){return x(e)===i}function ce(e){return x(e)===h}function le(e){return x(e)===m}function ue(e){return x(e)===r}function de(e){return x(e)===o}function fe(e){return x(e)===a}function pe(e){return x(e)===f}e.AsyncMode=ee,e.ConcurrentMode=S,e.ContextConsumer=C,e.ContextProvider=w,e.Element=T,e.ForwardRef=E,e.Fragment=D,e.Lazy=O,e.Memo=k,e.Portal=A,e.Profiler=te,e.StrictMode=j,e.Suspense=ne,e.isAsyncMode=N,e.isConcurrentMode=P,e.isContextConsumer=re,e.isContextProvider=ie,e.isElement=ae,e.isForwardRef=oe,e.isFragment=se,e.isLazy=ce,e.isMemo=le,e.isPortal=ue,e.isProfiler=de,e.isStrictMode=fe,e.isSuspense=pe,e.isValidElementType=b,e.typeOf=x})()})),fe=o(((e,t)=>{t.exports=process.env.NODE_ENV===`production`?ue():de()})),pe=le(),F=fe(),I=(function(e,t){return e===0?``:Array(e*t).fill(` `).join(``)});function me(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function he(e){if(Array.isArray(e))return me(e)}function ge(e,t,n){return(t=Ce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _e(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function ve(){throw TypeError(`Invalid attempt to spread non-iterable instance.
31
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ye(Object(n),!0).forEach(function(t){ge(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xe(e){return he(e)||_e(e)||we(e)||ve()}function Se(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Ce(e){var t=Se(e,`string`);return typeof t==`symbol`?t:t+``}function L(e){"@babel/helpers - typeof";return L=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},L(e)}function we(e,t){if(e){if(typeof e==`string`)return me(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?me(e,t):void 0}}function Te(e,t){if(e===null||L(e)!==`object`||e instanceof Date||e instanceof RegExp)return e;if(h.isValidElement(e)){var n=be({},e);return delete n._owner,n}return t.add(e),Array.isArray(e)?e.map(function(e){return Te(e,t)}):Object.keys(e).sort().reduce(function(n,r){return n[r]=r===`current`||t.has(e[r])?`[Circular]`:Te(e[r],t),n},{})}function Ee(e){return Te(e,new WeakSet)}var De=function(e){return{type:`string`,value:e}},Oe=function(e){return{type:`number`,value:e}},ke=function(e,t,n,r){return{type:`ReactElement`,displayName:e,props:t,defaultProps:n,childrens:r}},Ae=function(e,t){return{type:`ReactFragment`,key:e,childrens:t}},je=!!h.Fragment,Me=function(e){return!e.name||e.name===`_default`?`No Display Name`:e.name},Ne=function(e){switch(!0){case!!e.displayName:return e.displayName;case e.$$typeof===F.Memo:return Ne(e.type);case e.$$typeof===F.ForwardRef:return Ne(e.render);default:return Me(e)}},Pe=function(e){switch(!0){case typeof e.type==`string`:return e.type;case typeof e.type==`function`:return e.type.displayName?e.type.displayName:Me(e.type);case(0,F.isForwardRef)(e):case(0,F.isMemo)(e):return Ne(e.type);case(0,F.isContextConsumer)(e):return`${e.type._context.displayName||`Context`}.Consumer`;case(0,F.isContextProvider)(e):return`${e.type.displayName||`Context`}.Provider`;case(0,F.isLazy)(e):return`Lazy`;case(0,F.isProfiler)(e):return`Profiler`;case(0,F.isStrictMode)(e):return`StrictMode`;case(0,F.isSuspense)(e):return`Suspense`;default:return`UnknownElementType`}},Fe=function(e,t){return t!==`children`},Ie=function(e){return e!==!0&&e!==!1&&e!==null&&e!==``},Le=function(e,t){var n={};return Object.keys(e).filter(function(n){return t(e[n],n)}).forEach(function(t){return n[t]=e[t]}),n},R=function(e,t){var n=t.displayName,r=n===void 0?Pe:n;if(typeof e==`string`)return De(e);if(typeof e==`number`)return Oe(e);if(!h.default.isValidElement(e))throw Error(`react-element-to-jsx-string: Expected a React.Element, got \`${L(e)}\``);var i=r(e),a=Le(e.props,Fe),o=e.key;typeof o==`string`&&o.search(/^\./)&&(a.key=o);var s=Le(e.type.defaultProps||{},Fe),c=h.default.Children.toArray(e.props.children).filter(Ie).map(function(e){return R(e,t)});return je&&e.type===h.Fragment?Ae(o,c):ke(i,a,s,c)};function Re(){}var ze=function(e){return e.toString().split(`
32
+ `).map(function(e){return e.trim()}).join(``)},Be=(function(e,t){var n=t.functionValue,r=n===void 0?ze:n;return!t.showFunctions&&r===ze?r(Re):r(e)}),Ve=(function(e,t,n,r){var i=Ee(e),a=(0,pe.prettyPrint)(i,{transform:function(e,t,i){var a=e[t];return a&&(0,h.isValidElement)(a)?z(R(a,r),!0,n,r):typeof a==`function`?Be(a,r):i}});return t?a.replace(/\s+/g,` `).replace(/{ /g,`{`).replace(/ }/g,`}`).replace(/\[ /g,`[`).replace(/ ]/g,`]`):a.replace(/\t/g,I(1,r.tabStop)).replace(/\n([^$])/g,`
33
+ ${I(n+1,r.tabStop)}\$1`)}),He=function(e){return e.replace(/"/g,`&quot;`)},Ue=function(e,t,n,r){if(typeof e==`number`)return`{${String(e)}}`;if(typeof e==`string`)return`"${He(e)}"`;if(L(e)===`symbol`){var i=e.valueOf().toString().replace(/Symbol\((.*)\)/,`$1`);return i?`{Symbol('${i}')}`:`{Symbol()}`}return typeof e==`function`?`{${Be(e,r)}}`:(0,h.isValidElement)(e)?`{${z(R(e,r),!0,n,r)}}`:e instanceof Date?isNaN(e.valueOf())?`{new Date(NaN)}`:`{new Date("${e.toISOString()}")}`:ce(e)||Array.isArray(e)?`{${Ve(e,t,n,r)}}`:`{${String(e)}}`},We=(function(e,t,n,r,i,a,o,s){if(!t&&!r)throw Error(`The prop "${e}" has no value and no default: could not be formatted`);var c=t?n:i,l=s.useBooleanShorthandSyntax,u=s.tabStop,d=Ue(c,a,o,s),f=` `,p=`
34
+ ${I(o+1,u)}`,m=d.includes(`
35
+ `);return l&&d===`{false}`&&!r?(f=``,p=``):l&&d===`{true}`?(f+=`${e}`,p+=`${e}`):(f+=`${e}=${d}`,p+=`${e}=${d}`),{attributeFormattedInline:f,attributeFormattedMultiline:p,isMultilineAttribute:m}}),Ge=(function(e,t){var n=e.slice(0,e.length>0?e.length-1:0),r=e[e.length-1];return r&&(t.type===`string`||t.type===`number`)&&(r.type===`string`||r.type===`number`)?n.push(De(String(r.value)+String(t.value))):(r&&n.push(r),n.push(t)),n}),Ke=function(e){return[`key`,`ref`].includes(e)},qe=(function(e){return function(t){var n=t.includes(`key`),r=t.includes(`ref`),i=t.filter(function(e){return!Ke(e)}),a=xe(e?i.sort():i);return r&&a.unshift(`ref`),n&&a.unshift(`key`),a}});function Je(e,t){return Array.isArray(t)?function(e){return t.indexOf(e)===-1}:function(n){return t(e[n],n)}}var Ye=function(e,t,n,r,i){var a=i.tabStop;return e.type===`string`?t.split(`
36
+ `).map(function(e,t){return t===0?e:`${I(r,a)}${e}`}).join(`
37
+ `):t},Xe=function(e,t,n){return function(r){return Ye(r,z(r,e,t,n),e,t,n)}},Ze=function(e,t){return function(n){var r=Object.keys(e).includes(n);return!r||r&&e[n]!==t[n]}},Qe=function(e,t,n,r,i){return i?I(n,r).length+t.length>i:e.length>1},$e=function(e,t,n,r,i,a,o){return(Qe(e,t,i,a,o)||n)&&!r},et=(function(e,t,n,r){var i=e.type,a=e.displayName,o=a===void 0?``:a,s=e.childrens,c=e.props,l=c===void 0?{}:c,u=e.defaultProps,d=u===void 0?{}:u;if(i!==`ReactElement`)throw Error(`The "formatReactElementNode" function could only format node of type "ReactElement". Given: ${i}`);var f=r.filterProps,p=r.maxInlineAttributesLineLength,m=r.showDefaultProps,h=r.sortProps,g=r.tabStop,_=`<${o}`,v=_,y=_,b=!1,x=[],ee=Je(l,f);Object.keys(l).filter(ee).filter(Ze(d,l)).forEach(function(e){return x.push(e)}),Object.keys(d).filter(ee).filter(function(){return m}).filter(function(e){return!x.includes(e)}).forEach(function(e){return x.push(e)});var S=qe(h)(x);if(S.forEach(function(e){var i=We(e,Object.keys(l).includes(e),l[e],Object.keys(d).includes(e),d[e],t,n,r),a=i.attributeFormattedInline,o=i.attributeFormattedMultiline;i.isMultilineAttribute&&(b=!0),v+=a,y+=o}),y+=`
38
+ ${I(n,g)}`,_=$e(S,v,b,t,n,g,p)?y:v,s&&s.length>0){var C=n+1;_+=`>`,t||(_+=`
39
+ `,_+=I(C,g)),_+=s.reduce(Ge,[]).map(Xe(t,C,r)).join(t?``:`
40
+ ${I(C,g)}`),t||(_+=`
41
+ `,_+=I(C-1,g)),_+=`</${o}>`}else Qe(S,v,n,g,p)||(_+=` `),_+=`/>`;return _}),tt=``,nt=`React.Fragment`,rt=function(e,t,n){var r={};return t&&(r={key:t}),{type:`ReactElement`,displayName:e,props:r,defaultProps:{},childrens:n}},it=function(e){return!!e.key},at=function(e){return e.childrens.length===0},ot=(function(e,t,n,r){var i=e.type,a=e.key,o=e.childrens;if(i!==`ReactFragment`)throw Error(`The "formatReactFragmentNode" function could only format node of type "ReactFragment". Given: ${i}`);return et(rt(r.useFragmentShortSyntax?at(e)||it(e)?nt:tt:nt,a,o),t,n,r)}),st=[`<`,`>`,`{`,`}`],ct=function(e){return st.some(function(t){return e.includes(t)})},lt=function(e){return ct(e)?`{\`${e}\`}`:e},ut=function(e){var t=e;return t.endsWith(` `)&&(t=t.replace(/^(.*?)(\s+)$/,`$1{'$2'}`)),t.startsWith(` `)&&(t=t.replace(/^(\s+)(.*)$/,`{'$1'}$2`)),t},z=(function(e,t,n,r){if(e.type===`number`)return String(e.value);if(e.type===`string`)return e.value?`${ut(lt(String(e.value)))}`:``;if(e.type===`ReactElement`)return et(e,t,n,r);if(e.type===`ReactFragment`)return ot(e,t,n,r);throw TypeError(`Unknow format type "${e.type}"`)}),dt=(function(e,t){return z(e,!1,0,t)}),ft=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.filterProps,r=n===void 0?[]:n,i=t.showDefaultProps,a=i===void 0||i,o=t.showFunctions,s=o!==void 0&&o,c=t.functionValue,l=t.tabStop,u=l===void 0?2:l,d=t.useBooleanShorthandSyntax,f=d===void 0||d,p=t.useFragmentShortSyntax,m=p===void 0||p,h=t.sortProps,g=h===void 0||h,_=t.maxInlineAttributesLineLength,v=t.displayName;if(!e)throw Error(`react-element-to-jsx-string: Expected a ReactElement`);var y={filterProps:r,showDefaultProps:a,showFunctions:s,functionValue:c,tabStop:u,useBooleanShorthandSyntax:f,useFragmentShortSyntax:m,sortProps:g,maxInlineAttributesLineLength:_,displayName:v};return dt(R(e,y),y)};const pt=(0,x.createHighlighterCoreSync)({themes:[b.default],langs:[g.default,_.default,y.default,v.default],engine:(0,ee.createJavaScriptRegexEngine)()}),mt=e=>{let{className:t=``,language:n,children:r}=e,i=(0,u._)(e,[`className`,`language`,`children`]),a=typeof r==`string`?r:ft((0,h.isValidElement)(r)?r:(0,d.jsx)(d.Fragment,{children:r})),o=pt.codeToHtml(a,{lang:n,theme:`github-light`,structure:`inline`});return(0,d.jsx)(`pre`,(0,m._)((0,l._)({className:`m-0 language-${n} ${t}`},i),{children:(0,d.jsx)(`code`,{dangerouslySetInnerHTML:{__html:o},className:`language-${n}`})}))},ht=[`primary`,`secondary`,`success`,`danger`,`warning`,`info`,`dark`,`light`];function gt(e,t=[]){let n=t[0]?ht.filter(e=>!t.find(t=>t===e)):ht;return n[[...e].reduce((e,t)=>e+t.charCodeAt(0),0)%n.length]}let _t;var B,vt,yt,bt,xt,St=(0,k.reaction)(e=>e.observedProps.endTime),Ct,wt;let Tt;new(_t=(B=new WeakMap,vt=class extends (xt=k.ObservedComponent){get rest(){return(0,C._)(this,B)}set rest(e){(0,T._)(this,B,e)}get endTimestamp(){return+new Date(this.props.endTime||Date.now())}get timeSections(){let{units:e}=this.observedProps,{rest:t}=this;return e.reduce((n,{label:r},i)=>{let a=e.slice(i).map(({scale:e})=>e).reduce((e,t)=>e*t,1),o=~~(t/a);return t-=o*a,n.push({value:o,label:r}),n},[])}stop(){this.timer&&(window.clearInterval(this.timer),this.timer=0)}componentDidMount(){super.componentDidMount(),this.initTimer()}initTimer(){this.stop(),this.tick(),this.timer=window.setInterval(this.tick,A.Second)}componentWillUnmount(){super.componentWillUnmount(),this.stop()}render(){let e=this.props,{className:t=``,itemClassName:n=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,units:r,endTime:i,onEnd:a}=e,o=(0,u._)(e,[`className`,`itemClassName`,`units`,`endTime`,`onEnd`]),{timeSections:s}=this;return(0,d.jsx)(`ol`,(0,m._)((0,l._)({className:`list-unstyled m-0 ${t}`},o),{children:s.map(({value:e,label:t})=>(0,d.jsxs)(`li`,{className:n,children:[(0,d.jsx)(`strong`,{children:(e+``).padStart(2,`0`)}),(0,d.jsx)(`span`,{children:t})]},t))}))}constructor(...e){super(...e),(0,w._)(this,B,{writable:!0,value:(wt(this),Ct(this,0))}),(0,p._)(this,`timer`,0),(0,p._)(this,`tick`,()=>{let{onEnd:e,endTime:t}=this.props,n=this.endTimestamp-Date.now();n>0?this.rest=n:(this.rest=0,this.stop(),e==null||e(t))})}},{e:[Ct,wt],c:[Tt,bt]}=(0,S._)(vt,[[D.observable,1,`rest`],[D.computed,3,`timeSections`],[St,2,`initTimer`]],[O.observer],xt),vt),yt=class extends E._{constructor(){super(Tt),(0,p._)(this,`displayName`,`Countdown`),bt()}},(0,p._)(yt,_t,void 0),yt);var Et,Dt,Ot,kt=class extends Error{constructor(e=`Dialog closed`){super(e)}},At=new WeakMap,jt=new WeakMap,Mt=class{get input(){return(0,C._)(this,At)}set input(e){(0,T._)(this,At,e)}get defer(){return(0,C._)(this,jt)}set defer(e){(0,T._)(this,jt,e)}open(e){return e&&(this.input=e),this.defer=new te.Defer,this.defer.promise.finally(()=>this.defer=void 0),this.defer.promise}constructor(e){(0,w._)(this,At,{writable:!0,value:(Ot(this),Et(this,{}))}),(0,w._)(this,jt,{writable:!0,value:Dt(this)}),(0,p._)(this,`Component`,void 0),this.Component=(0,O.observer)(t=>(0,d.jsx)(e,(0,m._)((0,l._)({},t,this.input),{defer:this.defer}))),this.Component.displayName=`DialogComponent`}};({e:[Et,Dt,Ot]}=(0,S._)(Mt,[[D.observable,1,`input`],[D.observable,1,`defer`]],[]));let Nt;var V,Pt,Ft,It,Lt,Rt,zt;const Bt=(0,ne.createReactEditorJS)();let Vt;new(Nt=(V=new WeakMap,Pt=class extends (Lt=h.Component){get innerValue(){return(0,C._)(this,V)}set innerValue(e){(0,T._)(this,V,e)}render(){let e=this.props,{name:t,required:n,children:r}=e,i=(0,u._)(e,[`name`,`required`,`children`]),{innerValue:a}=this;return(0,d.jsxs)(`div`,{className:`form-control`,tabIndex:-1,onBlur:this.save,children:[(0,d.jsx)(`input`,{hidden:!0,name:t,required:n,value:JSON.stringify(a)}),(0,d.jsx)(Bt,(0,m._)((0,l._)({},i),{onInitialize:e=>{var t;this.core=e,(t=i.onInitialize)==null||t.call(i,e)}}))]})}constructor(...e){var t;super(...e),t=this,(0,p._)(this,`core`,void 0),(0,w._)(this,V,{writable:!0,value:(zt(this),Rt(this,this.props.defaultValue))}),(0,p._)(this,`save`,()=>(0,j._)(function*(){return t.core&&(t.innerValue=yield t.core.save())})())}},{e:[Rt,zt],c:[Vt,It]}=(0,S._)(Pt,[[D.observable,1,`innerValue`]],[O.observer],Lt),Pt),Ft=class extends E._{constructor(){super(Vt),(0,p._)(this,`displayName`,`Editor`),It()}},(0,p._)(Ft,Nt,void 0),Ft);const Ht=(0,M.default)({link:({data:{link:e}})=>`<a href="${e}">${e}</a>`}),Ut=e=>{let{data:t}=e,n=(0,u._)(e,[`data`]);return(0,d.jsx)(`article`,(0,m._)((0,l._)({},n),{dangerouslySetInnerHTML:{__html:Ht.parse(t)}}))};Ut.displayName=`EditorHTML`;const H=e=>{let{className:t=``,children:n,maxWidth:r=`100%`,duration:i,height:a}=e,o=(0,u._)(e,[`className`,`children`,`maxWidth`,`duration`,`height`]);return(0,d.jsx)(`div`,(0,m._)((0,l._)({className:`overflow-hidden mw-100 ${t}`},o),{children:(0,d.jsx)(`div`,{className:`d-inline-block align-top text-nowrap lRDfma_scrollWrap`,style:{maxWidth:r,animationDuration:i,height:a,lineHeight:a},children:(0,d.jsx)(`div`,{className:`d-inline-block lRDfma_scrollItem`,style:{animationDuration:i},children:n})})}))},Wt=({children:e,maxWidth:t,duration:n,height:r})=>r?(0,d.jsx)(`div`,{className:`overflow-hidden lRDfma_scrollHeightWrap`,style:{maxWidth:t,"--scroll-height":r},children:(0,d.jsxs)(`div`,{className:`d-inline-block overflow-hidden mw-100 lRDfma_scrollContainer`,children:[(0,d.jsx)(`div`,{className:`d-block overflow-hidden text-wrap text-break lRDfma_unScrollItem`,children:e}),(0,d.jsx)(H,{duration:n,children:e})]})}):(0,d.jsx)(H,{maxWidth:t,duration:n,height:r,children:e});H.displayName=`HorizontalMarquee`;const U=e=>{let{className:t,style:n,name:r,size:i}=e,a=(0,u._)(e,[`className`,`style`,`name`,`size`]);return(0,d.jsx)(`span`,(0,l._)({className:(0,f.default)(`bi-${r}`,t),style:(0,l._)({fontSize:i&&`${i}rem`},n)},a))};U.displayName=`Icon`;const Gt=({scope:e,children:t})=>{let n=typeof t==`string`?t:ft((0,h.isValidElement)(t)?t:(0,d.jsx)(d.Fragment,{children:t}));return(0,d.jsxs)(N.LiveProvider,{code:n,scope:e,language:`tsx`,children:[(0,d.jsx)(N.LivePreview,{className:`mb-3`}),(0,d.jsx)(N.LiveEditor,{}),(0,d.jsx)(N.LiveError,{className:`text-danger small p-2`})]})},Kt=e=>{let{className:t=``,children:n=`Loading...`}=e,r=(0,u._)(e,[`className`,`children`]);return(0,d.jsxs)(`div`,(0,m._)((0,l._)({className:`fixed-top h-100 w-100 d-flex justify-content-center align-items-center opacity-25 bg-black ${t}`},r),{children:[(0,d.jsx)(P.Spinner,{animation:`border`,variant:`success`}),(0,d.jsx)(`span`,{className:`ml-3 text-white`,children:n})]}))};Kt.displayName=`Loading`;const qt=e=>{let{title:t,detail:n,children:r}=e,i=(0,u._)(e,[`title`,`detail`,`children`]);return(0,d.jsx)(P.OverlayTrigger,(0,m._)((0,l._)({},i),{overlay:n?(0,d.jsxs)(P.Popover,{children:[(0,d.jsx)(P.Popover.Header,{children:t}),(0,d.jsx)(P.Popover.Body,{children:n})]}):(0,d.jsx)(P.Tooltip,{children:t}),children:r}))};qt.displayName=`OverlayBox`;let Jt;var W,Yt,Xt,Zt,Qt,$t,en;let tn;new(Jt=(W=new WeakMap,Yt=class extends (Qt=k.ObservedComponent){get weekFormatter(){var e;let{locale:t=(e=globalThis.navigator)==null?void 0:e.language}=this.observedProps;return new Intl.DateTimeFormat(t,{weekday:`long`})}get currentDate(){return(0,C._)(this,W)}set currentDate(e){(0,T._)(this,W,e)}get dateGrid(){let e=new Date(this.currentDate);e.setDate(1),e=new Date(+e-e.getDay()*A.Day);let t=Array.from(Array(42),(t,n)=>new Date(+e+n*A.Day));return(0,A.splitArray)(t,7)}changeMonth(e){var t,n;this.currentDate=(0,A.changeMonth)(this.currentDate,e),(t=(n=this.props).onChange)==null||t.call(n,this.currentDate)}render(){let{weekFormatter:e,currentDate:t,dateGrid:n}=this,r=this.observedProps,{style:i,variant:a=`primary`,onChange:o,onSelect:s}=r,c=(0,u._)(r,[`style`,`variant`,`onChange`,`onSelect`]);return(0,d.jsxs)(P.Table,(0,m._)((0,l._)({},c),{style:(0,l._)({tableLayout:`fixed`},i),children:[(0,d.jsx)(`caption`,{children:(0,d.jsxs)(`div`,{className:`d-flex justify-content-between align-items-center`,children:[(0,d.jsx)(P.Button,{variant:a,onClick:()=>this.changeMonth(-1),children:`<`}),(0,A.formatDate)(t,`YYYY-MM`),(0,d.jsx)(P.Button,{variant:a,onClick:()=>this.changeMonth(1),children:`>`})]})}),(0,d.jsx)(`thead`,{children:(0,d.jsx)(`tr`,{children:n[0].map((t,n,{length:r})=>(0,d.jsx)(`td`,{className:`bg-${a} text-white`,style:{width:`calc(100% / ${r})`},children:e.format(t)},n))})}),(0,d.jsx)(`tbody`,{children:n.map(e=>(0,d.jsx)(`tr`,{children:e.map(this.renderDate)},e[0]+``))})]}))}constructor(...e){super(...e),(0,w._)(this,W,{writable:!0,value:(en(this),$t(this,new Date))}),(0,p._)(this,`renderDate`,e=>{let{variant:t=`primary`,value:n,onSelect:r}=this.observedProps,i=(0,A.formatDate)(e,`YYYY-MM-DD`),a=n==null?void 0:n.filter(({date:e})=>(0,A.formatDate)(e,`YYYY-MM-DD`)===i);return(0,d.jsxs)(`td`,{className:(0,f.default)({"opacity-50":e.getMonth()!==this.currentDate.getMonth(),"fw-bold":i===(0,A.formatDate)(new Date,`YYYY-MM-DD`)}),children:[(0,d.jsx)(`time`,{className:`d-block`,dateTime:e.toJSON(),children:e.getDate()}),a==null?void 0:a.map(e=>typeof e.content==`object`?e.content:(0,d.jsx)(qt,{title:e.content,children:(0,d.jsx)(P.Badge,{as:`a`,className:`d-inline-block text-decoration-none w-100 text-truncate`,bg:gt(e.content+``,[`light`]),href:e.link,onClick:()=>r==null?void 0:r(e),children:e.content})},e.date+``))]},e+``)})}},{e:[$t,en],c:[tn,Zt]}=(0,S._)(Yt,[[D.computed,3,`weekFormatter`],[D.observable,1,`currentDate`],[D.computed,3,`dateGrid`]],[O.observer],Qt),Yt),Xt=class extends E._{constructor(){super(tn),(0,p._)(this,`displayName`,`MonthCalendar`),Zt()}},(0,p._)(Xt,Jt,void 0),Xt);const nn=({avatar:e,name:t})=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ae,{size:2,style:{marginRight:`0.5rem`},src:e}),(0,d.jsx)(`span`,{className:`align-middle`,children:t})]});nn.displayName=`Nameplate`;let rn;var G,K,an,on,sn,cn,ln,un,dn;const fn=Array.from([,,,,,,],(e,t)=>`h${++t}`)+``;let pn;new(rn=(G=new WeakMap,K=new WeakMap,an=class extends (cn=h.Component){get list(){return(0,C._)(this,G)}set list(e){(0,T._)(this,G,e)}get scrollY(){return(0,C._)(this,K)}set scrollY(e){(0,T._)(this,K,e)}get currentActiveId(){var e;let{list:t,scrollY:n}=this;return(e=t[t.findIndex(({top:e})=>e>n)-1])==null?void 0:e.id}componentDidMount(){globalThis.document&&(window.addEventListener(`scroll`,this.updateScrollY),this.list=Array.from(document.querySelectorAll(fn),e=>{var t;(t=e).id||(t.id=(0,A.uniqueID)());let{id:n,tagName:r,textContent:i,offsetTop:a}=e;return{id:n,level:+r[1],text:i.trim(),top:a}}))}componentWillUnmount(){var e,t;(e=(t=globalThis).removeEventListener)==null||e.call(t,`scroll`,this.updateScrollY)}render(){let{list:e}=this,t=this.props,{style:n,variant:r=`underline`}=t,i=(0,u._)(t,[`style`,`variant`]);return(0,d.jsx)(P.Nav,(0,m._)((0,l._)({},i),{variant:r,style:(0,l._)({flexDirection:`column`},n),children:e.map(this.renderLink)}))}constructor(...e){super(...e),(0,w._)(this,G,{writable:!0,value:(dn(this),ln(this,[]))}),(0,w._)(this,K,{writable:!0,value:un(this,0)}),(0,p._)(this,`updateScrollY`,()=>this.scrollY=window.scrollY),(0,p._)(this,`scrollTo`,e=>()=>{var t,n;setTimeout(()=>(0,A.scrollTo)(`[id="${e.id}"]`)),(t=(n=this.props).onItemClick)==null||t.call(n,e)}),(0,p._)(this,`renderLink`,({id:e,level:t,text:n,top:r})=>{let{currentActiveId:i}=this,{depth:a=1/0}=this.props;return t<=a&&(0,d.jsx)(P.Nav.Item,{style:{textIndent:`${t-1}rem`},children:(0,d.jsx)(P.Nav.Link,{href:`#${e}`,active:i===e,onClick:this.scrollTo({id:e,level:t,text:n,top:r}),children:n})},e)})}},{e:[ln,un,dn],c:[pn,sn]}=(0,S._)(an,[[D.observable,1,`list`],[D.observable,1,`scrollY`],[D.computed,3,`currentActiveId`]],[O.observer],cn),an),on=class extends E._{constructor(){super(pn),(0,p._)(this,`displayName`,`PageNav`),sn()}},(0,p._)(on,rn,void 0),on);let mn;var q,J,Y,hn,gn,_n,vn,yn,bn,xn,Sn;let Cn;new(mn=(q=new WeakMap,J=new WeakMap,Y=new WeakMap,hn=class extends (vn=h.Component){get scrollLeft(){return(0,C._)(this,q)}set scrollLeft(e){(0,T._)(this,q,e)}get scrollWidth(){return(0,C._)(this,J)}set scrollWidth(e){(0,T._)(this,J,e)}get clientWidth(){return(0,C._)(this,Y)}set clientWidth(e){(0,T._)(this,Y,e)}get canScrollLeft(){return this.scrollLeft>0}get canScrollRight(){return this.scrollLeft+this.clientWidth<this.scrollWidth}componentDidMount(){let e=this.updateScroll();e&&(e.addEventListener(`scroll`,this.updateScroll),this.resizeObserver=new ResizeObserver(this.updateScroll),this.resizeObserver.observe(e))}componentWillUnmount(){var e,t;(e=this.resizeObserver)==null||e.disconnect(),(t=this.scrollerRef.current)==null||t.removeEventListener(`scroll`,this.updateScroll)}render(){let{canScrollLeft:e,canScrollRight:t}=this,n=this.props,{className:r=``,children:i}=n,a=(0,u._)(n,[`className`,`children`]);return(0,d.jsxs)(`div`,{className:`position-relative overflow-y-hidden ${r}`,children:[e&&(0,d.jsx)(`button`,{type:`button`,className:`position-absolute top-0 bottom-0 start-0 z-1 border-0 px-2 aEvBXq_scrollButtonLeft`,"aria-label":`Scroll left`,onClick:this.scrollBy(-1),children:(0,d.jsx)(U,{name:`caret-left-fill`})}),(0,d.jsx)(`div`,{ref:this.scrollerRef,className:`overflow-x-auto aEvBXq_scrollerInner`,children:(0,d.jsx)(P.Nav,(0,m._)((0,l._)({},a),{className:`flex-nowrap`,children:i}))}),t&&(0,d.jsx)(`button`,{type:`button`,className:`position-absolute top-0 bottom-0 end-0 z-1 border-0 px-2 aEvBXq_scrollButtonRight`,"aria-label":`Scroll right`,onClick:this.scrollBy(1),children:(0,d.jsx)(U,{name:`caret-right-fill`})})]})}constructor(...e){super(...e),(0,p._)(this,`scrollerRef`,(Sn(this),(0,h.createRef)())),(0,w._)(this,q,{writable:!0,value:yn(this,0)}),(0,w._)(this,J,{writable:!0,value:bn(this,0)}),(0,w._)(this,Y,{writable:!0,value:xn(this,0)}),(0,p._)(this,`updateScroll`,()=>{let e=this.scrollerRef.current;return e&&(this.scrollLeft=e.scrollLeft,this.scrollWidth=e.scrollWidth,this.clientWidth=e.clientWidth),e}),(0,p._)(this,`resizeObserver`,void 0),(0,p._)(this,`scrollBy`,e=>()=>{let t=this.scrollerRef.current;t&&t.scrollBy({left:e*t.clientWidth*.8,behavior:`smooth`})})}},{e:[yn,bn,xn,Sn],c:[Cn,_n]}=(0,S._)(hn,[[D.observable,1,`scrollLeft`],[D.observable,1,`scrollWidth`],[D.observable,1,`clientWidth`],[D.computed,3,`canScrollLeft`],[D.computed,3,`canScrollRight`]],[O.observer],vn),hn),gn=class extends E._{constructor(){super(Cn),(0,p._)(this,`displayName`,`ScrollNav`),_n()}},(0,p._)(gn,mn,void 0),gn);const wn=e=>{let{value:t,children:n}=e,r=(0,u._)(e,[`value`,`children`]);return(0,d.jsx)(P.Dropdown.Item,(0,m._)((0,l._)({},r),{"data-value":t,children:n}))};wn.displayName=`Option`;const Tn=({className:e,style:t,variant:n,menuVariant:r,children:i,value:a,onChange:o,valueRender:s})=>{let c=(0,A.makeArray)(i).flat(1/0).find(e=>(0,h.isValidElement)(e)&&e.type===wn&&e.props.value===a);return(0,d.jsxs)(P.Dropdown,{onClick:({target:e})=>{let t=e.closest(`.dropdown-item`);if(!t)return;let{value:n}=t.dataset;o==null||o(n)},children:[(0,d.jsx)(P.Dropdown.Toggle,{className:(0,f.default)(`w-100`,`d-flex`,`justify-content-between`,`align-items-center`,!n&&`bg-white text-dark`,e),style:t,variant:n,children:(s==null?void 0:s(a))||(0,d.jsx)(`div`,{className:c==null?void 0:c.props.className,children:c==null?void 0:c.props.children})}),(0,d.jsx)(P.Dropdown.Menu,{variant:r,children:i})]})};Tn.displayName=`Select`;let En;var X,Dn,On,kn,An,jn,Mn,Nn,Pn;function Fn(e,t,n){return(0,j._)(function*(){let r=yield(0,re.default)(e,{useCORS:!0});return new Promise((e,i)=>r.toBlob(t=>t?e(URL.createObjectURL(t)):i(),t,n))})()}let In;new(En=(X=new WeakMap,Dn=new WeakMap,On=class extends (jn=h.Component){get loading(){return(0,C._)(this,X)}set loading(e){(0,T._)(this,X,e)}get imageURI(){return(0,C._)(this,Dn)}set imageURI(e){(0,T._)(this,Dn,e)}componentDidMount(){var e,t;(e=(t=globalThis).addEventListener)==null||e.call(t,`resize`,this.generateImage)}componentWillUnmount(){var e,t;(e=(t=globalThis).removeEventListener)==null||e.call(t,`resize`,this.generateImage)}render(){let e=this.props,{className:t=``,children:n}=e,r=(0,u._)(e,[`className`,`children`]),{loading:i,imageURI:a}=this;return(0,d.jsxs)(d.Fragment,{children:[i&&(0,d.jsx)(Kt,{}),(0,d.jsxs)(`div`,(0,m._)((0,l._)({},r),{ref:this.root,className:`position-relative ${t}`,onMouseEnter:a?void 0:this.generateImage,onTouchStart:a?void 0:this.generateImage,children:[n,a&&(0,d.jsx)(P.Image,{className:`position-absolute start-0 top-0 w-100 h-100`,src:a,alt:`Share Image`,fluid:!0,onClick:this.share})]}))]})}constructor(...e){var t;super(...e),t=this,(0,p._)(this,`root`,(Pn(this),(0,h.createRef)())),(0,w._)(this,X,{writable:!0,value:Mn(this,!1)}),(0,w._)(this,Dn,{writable:!0,value:Nn(this,``)}),(0,p._)(this,`generateImage`,()=>(0,j._)(function*(){t.imageURI&&(URL.revokeObjectURL(t.imageURI),t.imageURI=``),t.loading=!0,t.imageURI=yield Fn(t.root.current),t.loading=!1})()),(0,p._)(this,`share`,e=>(0,j._)(function*(){var n,r;e.stopPropagation();let i=yield(0,A.blobOf)(t.imageURI),a=new File([i],`${t.props.title}.png`,{type:i.type});yield(n=(r=navigator).share)==null?void 0:n.call(r,(0,l._)({files:[a]},t.props))})())}},{e:[Mn,Nn,Pn],c:[In,An]}=(0,S._)(On,[[D.observable,1,`loading`],[D.observable,1,`imageURI`]],[O.observer],jn),On),kn=class extends E._{constructor(){super(In),(0,p._)(this,`displayName`,`ShareBox`),An()}},(0,p._)(kn,En,void 0),kn);const Ln=e=>{let{animation:t,loading:n,disabled:r,children:i}=e,a=(0,u._)(e,[`animation`,`loading`,`disabled`,`children`]);return(0,d.jsxs)(P.Button,(0,m._)((0,l._)({},a),{disabled:n||r,children:[n&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(P.Spinner,{as:`span`,className:i?`me-2`:``,size:`sm`,animation:t,role:`status`,"aria-hidden":`true`}),!i&&(0,d.jsx)(`span`,{className:`visually-hidden`,children:`Loading...`})]}),i]}))};Ln.displayName=`SpinnerButton`;const Rn=e=>{let{animation:t=`border`,variant:n=`primary`,size:r,colSpan:i}=e,a=(0,u._)(e,[`animation`,`variant`,`size`,`colSpan`]);return(0,d.jsx)(`tr`,(0,m._)((0,l._)({},a),{children:(0,d.jsx)(`td`,{className:`text-center p-4`,colSpan:i,children:(0,d.jsx)(P.Spinner,{animation:t,variant:n,size:r})})}))};Rn.displayName=`TableSpinner`;let zn;var Bn,Vn,Hn,Un,Wn,Gn,Kn,qn,Jn;let Yn;new(zn=(Bn=new WeakMap,Vn=new WeakMap,Hn=class extends (Gn=h.Component){get expanded(){return(0,C._)(this,Bn)}set expanded(e){(0,T._)(this,Bn,e)}get overflowed(){return(0,C._)(this,Vn)}set overflowed(e){(0,T._)(this,Vn,e)}componentDidMount(){this.checkOverflow(),window.addEventListener(`resize`,this.checkOverflow)}componentDidUpdate({rows:e,children:t}){!this.expanded&&(t!==this.props.children||e!==this.props.rows)&&this.checkOverflow()}componentWillUnmount(){window.removeEventListener(`resize`,this.checkOverflow)}render(){let e=this.props,{children:t,rows:n=3,expandText:r=`⏬`,collapseText:i=`⏫`}=e,a=(0,u._)(e,[`children`,`rows`,`expandText`,`collapseText`]),{expanded:o,overflowed:s}=this,c={overflow:`hidden`,display:`-webkit-box`,WebkitBoxOrient:`vertical`,WebkitLineClamp:n};return(0,d.jsxs)(`div`,(0,m._)((0,l._)({},a),{children:[(0,d.jsx)(`p`,{ref:this.contentRef,style:o?void 0:c,children:t}),(s||o)&&(0,d.jsx)(`button`,{type:`button`,className:`bg-transparent border-0 p-0`,"aria-expanded":o,onClick:this.toggle,children:o?i:r})]}))}constructor(...e){super(...e),(0,w._)(this,Bn,{writable:!0,value:(Jn(this),Kn(this,!1))}),(0,w._)(this,Vn,{writable:!0,value:qn(this,!1)}),(0,p._)(this,`contentRef`,(0,h.createRef)()),(0,p._)(this,`checkOverflow`,()=>{let{current:e}=this.contentRef;e&&(this.overflowed=e.scrollHeight>e.clientHeight)}),(0,p._)(this,`toggle`,()=>{this.expanded=!this.expanded,this.expanded||requestAnimationFrame(this.checkOverflow)})}},{e:[Kn,qn,Jn],c:[Yn,Wn]}=(0,S._)(Hn,[[D.observable,1,`expanded`],[D.observable,1,`overflowed`]],[O.observer],Gn),Hn),Un=class extends E._{constructor(){super(Yn),(0,p._)(this,`displayName`,`TextTruncate`),Wn()}},(0,p._)(Un,zn,void 0),Un);let Xn;var Z,Zn,Qn,$n,er,tr=(0,k.reaction)(({observedProps:{dateTime:e,format:t}})=>e+t),nr,rr;let Q;new(Xn=(Z=new WeakMap,Zn=class extends (er=k.ObservedComponent){updateText(){let{dateTime:e,format:t}=this.props;return(0,A.formatDate)(e,t)}get timeText(){return(0,C._)(this,Z)}set timeText(e){(0,T._)(this,Z,e)}componentDidMount(){super.componentDidMount(),this.timeText=this.updateText()}render(){let e=this.props,{dateTime:t}=e,n=(0,u._)(e,[`dateTime`]);return(0,d.jsx)(`time`,(0,m._)((0,l._)({dateTime:new Date(t).toJSON()},n),{children:this.timeText}))}constructor(...e){super(...e),(0,w._)(this,Z,{writable:!0,value:(rr(this),nr(this,this.updateText()))})}},{e:[nr,rr],c:[Q,$n]}=(0,S._)(Zn,[[tr,2,`updateText`],[D.observable,1,`timeText`]],[O.observer],er),Zn),Qn=class extends E._{constructor(){super(Q),(0,p._)(this,`displayName`,`Time`),$n()}},(0,p._)(Qn,Xn,void 0),Qn);const ir={ms:`millisecond(s)`,s:`second(s)`,m:`minute(s)`,H:`hour(s)`,D:`day(s)`,W:`week(s)`,M:`month(s)`,Y:`year(s)`},ar=e=>{let{date:t,unitWords:n=ir,beforeWord:r=` before`,afterWord:i=` after`}=e,a=(0,u._)(e,[`date`,`unitWords`,`beforeWord`,`afterWord`]);t=new Date(t);let{distance:o,unit:s}=(0,A.diffTime)(t);return(0,d.jsxs)(`time`,(0,m._)((0,l._)({},a),{dateTime:t.toJSON(),title:t.toLocaleString(),children:[Math.abs(o),` `,n[s],o<0?r:i]}))};ar.displayName=`TimeDistance`;const or=e=>{let{className:t,events:n,timeFormat:r}=e,i=(0,u._)(e,[`className`,`events`,`timeFormat`]);return(0,d.jsx)(`ol`,(0,m._)((0,l._)({className:`list-unstyled hsu__a_timeline ${t}`},i),{children:n.map(({title:e,summary:t,time:n,link:i,people:a})=>(0,d.jsx)(`li`,{className:`position-relative hsu__a_timelineItem hsu__a_right`,children:(0,d.jsx)(P.Card,{children:(0,d.jsxs)(P.Card.Body,{className:`p-4 d-flex flex-column gap-3 align-items-center`,children:[(0,d.jsx)(`h3`,{className:`h5 m-0`,children:(0,d.jsx)(`a`,{className:`text-decoration-none stretched-link`,href:i,children:e})}),(0,d.jsxs)(`div`,{className:`small text-muted d-flex gap-2`,children:[`⏲️`,(0,d.jsx)(Q,{dateTime:n[0],format:r}),n[1]&&`~`,n[1]&&(0,d.jsx)(Q,{dateTime:n[1],format:r})]}),(0,d.jsx)(`ul`,{className:`list-unstyled m-0 d-flex gap-2 flex-wrap justify-content-around`,children:a==null?void 0:a.map(e=>(0,d.jsx)(`li`,{children:(0,d.jsx)(nn,(0,l._)({},e))},e.name))}),(0,d.jsx)(`p`,{className:`m-0`,children:t})]})})},e))}))};or.displayName=`Timeline`;var sr,cr;const lr=new Set([`warning`,`info`,`light`]);var ur=new WeakMap,dr=class{get messages(){return(0,C._)(this,ur)}set messages(e){(0,T._)(this,ur,e)}open(e){let t=(0,A.uniqueID)(),n=Date.now(),{promise:r,resolve:i}=Promise.withResolvers();return this.messages=[...this.messages,(0,m._)((0,l._)({id:t},e),{openedAt:n,resolve:i})],r}close(e){let t=this.messages.find(t=>t.id===e)||{},{resolve:n}=t,r=(0,u._)(t,[`resolve`]);n==null||n((0,m._)((0,l._)({},r),{closedAt:Date.now()})),this.messages=this.messages.filter(t=>t.id!==e)}constructor(e=A.Timestamp){(0,p._)(this,`TimeScalar`,void 0),(0,w._)(this,ur,{writable:!0,value:void 0}),(0,p._)(this,`Component`,void 0),(0,p._)(this,`renderMessage`,void 0),this.TimeScalar=e,(0,T._)(this,ur,(cr(this),sr(this,[]))),this.Component=(0,O.observer)(({position:e=`top-end`})=>(0,d.jsx)(P.ToastContainer,{position:e,className:`position-fixed p-3`,children:this.messages.map(this.renderMessage)})),this.renderMessage=({id:e,openedAt:t,title:n,body:r,variant:i,delay:a=3e3})=>{let o=i&&!lr.has(i)?`text-white`:void 0,s=!!n||a===0,c=this.TimeScalar.distanceOf(Date.now(),t).toShortString();return(0,d.jsxs)(P.Toast,{bg:i,delay:a,autohide:a!==0,onClose:()=>this.close(e),children:[s&&(0,d.jsxs)(P.Toast.Header,{children:[(0,d.jsx)(`strong`,{className:`me-auto`,children:n}),(0,d.jsx)(`small`,{children:c})]}),(0,d.jsx)(P.Toast.Body,{className:o,children:r})]},e)},this.Component.displayName=`ToastComponent`}};({e:[sr,cr]}=(0,S._)(dr,[[D.observable,1,`messages`]],[]));let fr;var $,pr,mr,hr,gr,_r,vr;let yr;new(fr=($=new WeakMap,pr=class extends (gr=h.Component){get echoed(){return(0,C._)(this,$)}set echoed(e){(0,T._)(this,$,e)}render(){let e=this.props,{className:t,text:n}=e,r=(0,u._)(e,[`className`,`text`]),{echoed:i}=this;return(0,d.jsx)(`pre`,(0,m._)((0,l._)({},r),{ref:this.init,className:(0,f.default)(`text-wrap`,t),children:i+(i===n?``:`_`)}))}constructor(...e){var t;super(...e),t=this,(0,w._)(this,$,{writable:!0,value:(vr(this),_r(this,``))}),(0,p._)(this,`init`,e=>e&&new IntersectionObserver(([{isIntersecting:e}],n)=>(0,j._)(function*(){if(!e)return;n.disconnect();let{text:r,intervals:i=150}=t.props;for(let e of r)yield(0,A.sleep)(i/1e3),t.echoed+=e})()).observe(e))}},{e:[_r,vr],c:[yr,hr]}=(0,S._)(pr,[[D.observable,1,`echoed`]],[O.observer],gr),pr),mr=class extends E._{constructor(){super(yr),(0,p._)(this,`displayName`,`TypeEcho`),hr()}},(0,p._)(mr,fr,void 0),mr);const br=({email:e,website:t})=>(0,d.jsxs)(`address`,{className:`mb-0 d-flex justify-content-around gap-2`,children:[e&&(0,d.jsx)(`a`,{rel:`noreferrer`,target:`_blank`,href:`mailto:`+e,children:(0,d.jsx)(U,{name:`envelope`})}),t&&(0,d.jsx)(`a`,{rel:`noreferrer`,target:`_blank`,href:t,children:(0,d.jsx)(U,{name:`globe2`})})]}),xr=`X5DLia_image`;var Sr=class extends h.PureComponent{render(){let e=this.props,{className:t=``,title:n,rank:r=[],linkOf:i}=e,a=(0,u._)(e,[`className`,`title`,`rank`,`linkOf`]);return(0,d.jsxs)(P.Row,(0,m._)((0,l._)({className:`X5DLia_rankBox ${t}`},a),{children:[(0,d.jsxs)(P.Col,{sm:12,xs:12,lg:7,children:[(0,d.jsxs)(`div`,{className:`shadow rounded-3 X5DLia_title`,children:[(0,d.jsxs)(`div`,{className:`X5DLia_medal`,children:[(0,d.jsx)(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),(0,d.jsx)(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),(0,d.jsx)(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`})]}),(0,d.jsx)(`h3`,{"data-text":n,className:`position-relative m-auto mb-0 fw-bold text-center`,children:n})]}),(0,d.jsx)(P.Row,{as:`ul`,className:`mt-2 g-0 align-items-end text-center ps-0 pt-2 list-unstyled X5DLia_topUsers`,children:r.slice(0,3).map(this.renderMedal)})]}),(0,d.jsx)(P.Col,{xs:12,sm:12,lg:5,children:(0,d.jsx)(P.Table,{className:`my-3 pt-2 X5DLia_restUsers`,responsive:!0,children:(0,d.jsx)(`tbody`,{children:r.slice(3,10).map(this.renderRow)})})})]}))}constructor(...e){super(...e),(0,p._)(this,`renderMedal`,e=>{var t,n;return(0,d.jsxs)(P.Col,{as:`li`,children:[(0,d.jsx)(`div`,{className:`shadow-lg overflow-hidden rounded-circle m-auto ${xr}`,children:(0,d.jsx)(P.Image,{src:e.avatar,alt:e.name,loading:`lazy`,fluid:!0})}),(0,d.jsxs)(`div`,{className:`position-relative overflow-hidden X5DLia_topUser`,children:[(0,d.jsxs)(`div`,{className:`position-relative`,children:[(0,d.jsx)(`i`,{className:`d-block overflow-hidden m-auto mb-1 rounded-circle`}),(0,d.jsx)(`a`,{className:`d-block mb-0 stretched-link`,href:((t=(n=this.props).linkOf)==null?void 0:t.call(n,e))||`#`,children:e.name}),(0,d.jsx)(`strong`,{children:e.score})]}),(0,d.jsx)(br,(0,l._)({},e))]})]},e.id)}),(0,p._)(this,`renderRow`,(e,t,{length:n})=>{var r,i;return(0,d.jsxs)(`tr`,{className:`position-relative`,children:[(0,d.jsx)(`td`,{className:`align-middle`,children:(0,d.jsx)(P.Badge,{className:`fw-bold fst-italic`,children:(t+4+``).padStart((n+``).length,`0`)})}),(0,d.jsxs)(`td`,{className:`position-relative mw-50 text-truncate X5DLia_name`,children:[(0,d.jsx)(`div`,{className:`d-inline-block overflow-hidden align-middle rounded-circle ${xr}`,children:(0,d.jsx)(P.Image,{src:e.avatar,alt:e.name,loading:`lazy`,fluid:!0})}),(0,d.jsx)(`a`,{className:`ms-2 d-inline-block align-middle stretched-link`,style:{color:`rgb(248, ${(t+2)*15}, ${(t+2)*35})`},href:((r=(i=this.props).linkOf)==null?void 0:r.call(i,e))||`#`,children:e.name})]}),(0,d.jsx)(`td`,{className:`align-middle`,children:e.score}),(0,d.jsx)(`td`,{className:`align-middle`,children:(0,d.jsx)(br,(0,l._)({},e))})]},e.id)})}};(0,p._)(Sr,`displayName`,`UserRankView`);const Cr=e=>{let{className:t=``,children:n,duration:r}=e,i=(0,u._)(e,[`className`,`children`,`duration`]);return(0,d.jsx)(`div`,(0,m._)((0,l._)({className:`overflow-hidden ${t}`},i),{children:(0,d.jsx)(`div`,{className:`d-inline-block mw-100 mh-100 QBd6SG_scrollWrap`,style:{"--duration":r},children:(0,d.jsx)(`div`,{className:`d-inline-block QBd6SG_scrollItem`,children:n})})}))};Cr.displayName=`VerticalMarquee`;const wr=[`🐵`,`🐔`,`🐶`,`🐷`,`🐭`,`🐮`,`🐯`,`🐰`,`🐲`,`🐍`,`🐴`,`🐐`],Tr=e=>{let t=e<0?e+1:e;return wr[(t%12+12)%12]},Er=e=>{let{className:t=``,itemClassName:n=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,startYear:r,endYear:i=new Date().getFullYear(),itemOf:a}=e,o=(0,u._)(e,[`className`,`itemClassName`,`startYear`,`endYear`,`itemOf`]);return(0,d.jsx)(`ol`,(0,m._)((0,l._)({className:`list-unstyled m-0 d-flex flex-wrap justify-content-center gap-3 ${t}`},o),{children:Array.from({length:i-r+1},(e,t)=>{let r=i-t;if(r===0)return null;let o=Tr(r),{link:s=`#`,title:c}=(a==null?void 0:a(r,o))||{};return(0,d.jsx)(`li`,{className:n,children:(0,d.jsxs)(`a`,{className:`d-inline-block p-3 text-decoration-none text-center`,href:s,children:[(0,d.jsx)(`div`,{className:`fs-1`,children:o}),c]})},r)})}))};Er.displayName=`ZodiacBar`,exports.Avatar=ae,exports.ClickBoundary=oe,exports.CodeBlock=mt,Object.defineProperty(exports,"Countdown",{enumerable:!0,get:function(){return Tt}}),exports.Dialog=Mt,exports.DialogClose=kt,Object.defineProperty(exports,"Editor",{enumerable:!0,get:function(){return Vt}}),exports.EditorHTML=Ut,exports.HorizontalMarquee=H,exports.HorizontalMarqueeBox=Wt,exports.Icon=U,exports.LiveTSX=Gt,exports.Loading=Kt,Object.defineProperty(exports,"MonthCalendar",{enumerable:!0,get:function(){return tn}}),exports.Nameplate=nn,exports.Option=wn,exports.OverlayBox=qt,Object.defineProperty(exports,"PageNav",{enumerable:!0,get:function(){return pn}}),Object.defineProperty(exports,"ScrollNav",{enumerable:!0,get:function(){return Cn}}),exports.Select=Tn,Object.defineProperty(exports,"ShareBox",{enumerable:!0,get:function(){return In}}),exports.SpinnerButton=Ln,exports.TableSpinner=Rn,Object.defineProperty(exports,"TextTruncate",{enumerable:!0,get:function(){return Yn}}),Object.defineProperty(exports,"Time",{enumerable:!0,get:function(){return Q}}),exports.TimeDistance=ar,exports.Timeline=or,exports.Toast=dr,Object.defineProperty(exports,"TypeEcho",{enumerable:!0,get:function(){return yr}}),exports.UserRankView=Sr,exports.VariantColors=ht,exports.VerticalMarquee=Cr,exports.ZodiacBar=Er,exports.ZodiacSigns=wr,exports.animate=ie,exports.elementToImage=Fn,exports.parser=Ht,exports.text2color=gt,exports.zodiacOf=Tr;
package/dist/index.mjs CHANGED
@@ -1 +1,32 @@
1
- import{_ as e}from"@swc/helpers/_/_object_spread";import{_ as t}from"@swc/helpers/_/_object_without_properties";import{Fragment as n,jsx as r,jsxs as i}from"react/jsx-runtime";import a from"classnames";import{_ as o}from"@swc/helpers/_/_define_property";import{_ as s}from"@swc/helpers/_/_object_spread_props";import{Component as c,PureComponent as l,createRef as u,isValidElement as d}from"react";import f from"@shikijs/langs/javascript";import ee from"@shikijs/langs/jsx";import te from"@shikijs/langs/tsx";import ne from"@shikijs/langs/typescript";import re from"@shikijs/themes/github-light";import*as ie from"react-element-to-jsx-string";import ae from"react-element-to-jsx-string";import{createHighlighterCoreSync as oe}from"shiki/core";import{createJavaScriptRegexEngine as se}from"shiki/engine/javascript";import{_ as p}from"@swc/helpers/_/_apply_decs_2203_r";import{_ as m}from"@swc/helpers/_/_class_private_field_get";import{_ as h}from"@swc/helpers/_/_class_private_field_init";import{_ as g}from"@swc/helpers/_/_class_private_field_set";import{_}from"@swc/helpers/_/_identity";import{computed as v,observable as y}from"mobx";import{observer as b}from"mobx-react";import{ObservedComponent as ce,reaction as le}from"mobx-react-helper";import{Day as ue,Second as de,Timestamp as fe,blobOf as pe,changeMonth as me,diffTime as he,formatDate as x,makeArray as ge,scrollTo as _e,sleep as ve,splitArray as ye,uniqueID as be}from"web-utility";import{Defer as xe}from"iterable-observer";import{_ as S}from"@swc/helpers/_/_async_to_generator";import{createReactEditorJS as Se}from"react-editor-js";import Ce from"editorjs-html";import{LiveEditor as we,LiveError as Te,LivePreview as Ee,LiveProvider as De}from"react-live";import{Badge as Oe,Button as C,Card as ke,Col as w,Dropdown as T,Image as E,Nav as D,OverlayTrigger as Ae,Popover as O,Row as je,Spinner as k,Table as Me,Toast as A,ToastContainer as Ne,Tooltip as Pe}from"react-bootstrap";import Fe from"html2canvas";function Ie(e){return t=>t&&new IntersectionObserver(([{isIntersecting:t,target:n}],r)=>{if(!t)return;let i=[`animate__animated`,`animate__${e}`];n.classList.add(...i),n.addEventListener(`animationend`,()=>n.classList.remove(...i),{once:!0}),r.disconnect()}).observe(t)}const j=n=>{let{className:i,style:o,size:s=3}=n,c=t(n,[`className`,`style`,`size`]);return r(`img`,e({className:a(`object-fit-cover rounded-circle`,i),style:e({width:`${s}rem`,height:`${s}rem`},o)},c))};j.displayName=`Avatar`;var Le=class extends l{componentDidMount(){window.addEventListener(`click`,this.switchClick,!0)}componentWillUnmount(){window.removeEventListener(`click`,this.switchClick,!0)}render(){let n=this.props,{children:i,onInnerClick:a,onOuterClick:o}=n,c=t(n,[`children`,`onInnerClick`,`onOuterClick`]);return r(`div`,s(e({ref:this.root},c),{children:i}))}constructor(...e){super(...e),o(this,`root`,u()),o(this,`switchClick`,e=>{var t;let{onInnerClick:n,onOuterClick:r}=this.props;(t=this.root.current)!=null&&t.contains(e.target)?n==null||n(e):r==null||r(e)})}};const Re=oe({themes:[re],langs:[f,ee,ne,te],engine:se()}),ze=i=>{let{className:a=``,language:o,children:c}=i,l=t(i,[`className`,`language`,`children`]),u=typeof c==`string`?c:ie.default(d(c)?c:r(n,{children:c})),f=Re.codeToHtml(u,{lang:o,theme:`github-light`,structure:`inline`});return r(`pre`,s(e({className:`m-0 language-${o} ${a}`},l),{children:r(`code`,{dangerouslySetInnerHTML:{__html:f},className:`language-${o}`})}))},M=[`primary`,`secondary`,`success`,`danger`,`warning`,`info`,`dark`,`light`];function Be(e,t=[]){let n=t[0]?M.filter(e=>!t.find(t=>t===e)):M;return n[[...e].reduce((e,t)=>e+t.charCodeAt(0),0)%n.length]}let Ve;var N,P,F,He,Ue,We=le(e=>e.observedProps.endTime),Ge,Ke;let qe;new(Ve=(N=new WeakMap,P=class extends (Ue=ce){get rest(){return m(this,N)}set rest(e){g(this,N,e)}get endTimestamp(){return+new Date(this.props.endTime||Date.now())}get timeSections(){let{units:e}=this.observedProps,{rest:t}=this;return e.reduce((n,{label:r},i)=>{let a=e.slice(i).map(({scale:e})=>e).reduce((e,t)=>e*t,1),o=~~(t/a);return t-=o*a,n.push({value:o,label:r}),n},[])}stop(){this.timer&&(window.clearInterval(this.timer),this.timer=0)}componentDidMount(){super.componentDidMount(),this.initTimer()}initTimer(){this.stop(),this.tick(),this.timer=window.setInterval(this.tick,de)}componentWillUnmount(){super.componentWillUnmount(),this.stop()}render(){let n=this.props,{className:a=``,itemClassName:o=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,units:c,endTime:l,onEnd:u}=n,d=t(n,[`className`,`itemClassName`,`units`,`endTime`,`onEnd`]),{timeSections:f}=this;return r(`ol`,s(e({className:`list-unstyled m-0 ${a}`},d),{children:f.map(({value:e,label:t})=>i(`li`,{className:o,children:[r(`strong`,{children:(e+``).padStart(2,`0`)}),r(`span`,{children:t})]},t))}))}constructor(...e){super(...e),h(this,N,{writable:!0,value:(Ke(this),Ge(this,0))}),o(this,`timer`,0),o(this,`tick`,()=>{let{onEnd:e,endTime:t}=this.props,n=this.endTimestamp-Date.now();n>0?this.rest=n:(this.rest=0,this.stop(),e==null||e(t))})}},{e:[Ge,Ke],c:[qe,He]}=p(P,[[y,1,`rest`],[v,3,`timeSections`],[We,2,`initTimer`]],[b],Ue),P),F=class extends _{constructor(){super(qe),o(this,`displayName`,`Countdown`),He()}},o(F,Ve,void 0),F);var Je,Ye,Xe,Ze=class extends Error{constructor(e=`Dialog closed`){super(e)}},Qe=new WeakMap,$e=new WeakMap,et=class{get input(){return m(this,Qe)}set input(e){g(this,Qe,e)}get defer(){return m(this,$e)}set defer(e){g(this,$e,e)}open(e){return e&&(this.input=e),this.defer=new xe,this.defer.promise.finally(()=>this.defer=void 0),this.defer.promise}constructor(t){h(this,Qe,{writable:!0,value:(Xe(this),Je(this,{}))}),h(this,$e,{writable:!0,value:Ye(this)}),o(this,`Component`,void 0),this.Component=b(n=>r(t,s(e({},n,this.input),{defer:this.defer}))),this.Component.displayName=`DialogComponent`}};({e:[Je,Ye,Xe]}=p(et,[[y,1,`input`],[y,1,`defer`]],[]));let tt;var I,nt,rt,it,at,ot,st;const ct=Se();let lt;new(tt=(I=new WeakMap,nt=class extends (at=c){get innerValue(){return m(this,I)}set innerValue(e){g(this,I,e)}render(){let n=this.props,{name:a,required:o,children:c}=n,l=t(n,[`name`,`required`,`children`]),{innerValue:u}=this;return i(`div`,{className:`form-control`,tabIndex:-1,onBlur:this.save,children:[r(`input`,{hidden:!0,name:a,required:o,value:JSON.stringify(u)}),r(ct,s(e({},l),{onInitialize:e=>{var t;this.core=e,(t=l.onInitialize)==null||t.call(l,e)}}))]})}constructor(...e){var t;super(...e),t=this,o(this,`core`,void 0),h(this,I,{writable:!0,value:(st(this),ot(this,this.props.defaultValue))}),o(this,`save`,()=>S(function*(){return t.core&&(t.innerValue=yield t.core.save())})())}},{e:[ot,st],c:[lt,it]}=p(nt,[[y,1,`innerValue`]],[b],at),nt),rt=class extends _{constructor(){super(lt),o(this,`displayName`,`Editor`),it()}},o(rt,tt,void 0),rt);const ut=Ce({link:({data:{link:e}})=>`<a href="${e}">${e}</a>`}),dt=n=>{let{data:i}=n,a=t(n,[`data`]);return r(`article`,s(e({},a),{dangerouslySetInnerHTML:{__html:ut.parse(i)}}))};dt.displayName=`EditorHTML`;const L=n=>{let{className:i=``,children:a,maxWidth:o=`100%`,duration:c,height:l}=n,u=t(n,[`className`,`children`,`maxWidth`,`duration`,`height`]);return r(`div`,s(e({className:`overflow-hidden mw-100 ${i}`},u),{children:r(`div`,{className:`d-inline-block align-top text-nowrap lRDfma_scrollWrap`,style:{maxWidth:o,animationDuration:c,height:l,lineHeight:l},children:r(`div`,{className:`d-inline-block lRDfma_scrollItem`,style:{animationDuration:c},children:a})})}))},ft=({children:e,maxWidth:t,duration:n,height:a})=>a?r(`div`,{className:`overflow-hidden lRDfma_scrollHeightWrap`,style:{maxWidth:t,"--scroll-height":a},children:i(`div`,{className:`d-inline-block overflow-hidden mw-100 lRDfma_scrollContainer`,children:[r(`div`,{className:`d-block overflow-hidden text-wrap text-break lRDfma_unScrollItem`,children:e}),r(L,{duration:n,children:e})]})}):r(L,{maxWidth:t,duration:n,height:a,children:e});L.displayName=`HorizontalMarquee`;const R=n=>{let{className:i,style:o,name:s,size:c}=n,l=t(n,[`className`,`style`,`name`,`size`]);return r(`span`,e({className:a(`bi-${s}`,i),style:e({fontSize:c&&`${c}rem`},o)},l))};R.displayName=`Icon`;const pt=({scope:e,children:t})=>{let a=typeof t==`string`?t:ae(d(t)?t:r(n,{children:t}));return i(De,{code:a,scope:e,language:`tsx`,children:[r(Ee,{className:`mb-3`}),r(we,{}),r(Te,{className:`text-danger small p-2`})]})},mt=n=>{let{className:a=``,children:o=`Loading...`}=n,c=t(n,[`className`,`children`]);return i(`div`,s(e({className:`fixed-top h-100 w-100 d-flex justify-content-center align-items-center opacity-25 bg-black ${a}`},c),{children:[r(k,{animation:`border`,variant:`success`}),r(`span`,{className:`ml-3 text-white`,children:o})]}))};mt.displayName=`Loading`;const ht=n=>{let{title:a,detail:o,children:c}=n,l=t(n,[`title`,`detail`,`children`]);return r(Ae,s(e({},l),{overlay:o?i(O,{children:[r(O.Header,{children:a}),r(O.Body,{children:o})]}):r(Pe,{children:a}),children:c}))};ht.displayName=`OverlayBox`;let gt;var z,_t,B,vt,yt,bt,xt;let St;new(gt=(z=new WeakMap,_t=class extends (yt=ce){get weekFormatter(){var e;let{locale:t=(e=globalThis.navigator)==null?void 0:e.language}=this.observedProps;return new Intl.DateTimeFormat(t,{weekday:`long`})}get currentDate(){return m(this,z)}set currentDate(e){g(this,z,e)}get dateGrid(){let e=new Date(this.currentDate);e.setDate(1),e=new Date(+e-e.getDay()*ue);let t=Array.from(Array(42),(t,n)=>new Date(+e+n*ue));return ye(t,7)}changeMonth(e){var t,n;this.currentDate=me(this.currentDate,e),(t=(n=this.props).onChange)==null||t.call(n,this.currentDate)}render(){let{weekFormatter:n,currentDate:a,dateGrid:o}=this,c=this.observedProps,{style:l,variant:u=`primary`,onChange:d,onSelect:f}=c,ee=t(c,[`style`,`variant`,`onChange`,`onSelect`]);return i(Me,s(e({},ee),{style:e({tableLayout:`fixed`},l),children:[r(`caption`,{children:i(`div`,{className:`d-flex justify-content-between align-items-center`,children:[r(C,{variant:u,onClick:()=>this.changeMonth(-1),children:`<`}),x(a,`YYYY-MM`),r(C,{variant:u,onClick:()=>this.changeMonth(1),children:`>`})]})}),r(`thead`,{children:r(`tr`,{children:o[0].map((e,t,{length:i})=>r(`td`,{className:`bg-${u} text-white`,style:{width:`calc(100% / ${i})`},children:n.format(e)},t))})}),r(`tbody`,{children:o.map(e=>r(`tr`,{children:e.map(this.renderDate)},e[0]+``))})]}))}constructor(...e){super(...e),h(this,z,{writable:!0,value:(xt(this),bt(this,new Date))}),o(this,`renderDate`,e=>{let{variant:t=`primary`,value:n,onSelect:o}=this.observedProps,s=x(e,`YYYY-MM-DD`),c=n==null?void 0:n.filter(({date:e})=>x(e,`YYYY-MM-DD`)===s);return i(`td`,{className:a({"opacity-50":e.getMonth()!==this.currentDate.getMonth(),"fw-bold":s===x(new Date,`YYYY-MM-DD`)}),children:[r(`time`,{className:`d-block`,dateTime:e.toJSON(),children:e.getDate()}),c==null?void 0:c.map(e=>typeof e.content==`object`?e.content:r(ht,{title:e.content,children:r(Oe,{as:`a`,className:`d-inline-block text-decoration-none w-100 text-truncate`,bg:Be(e.content+``,[`light`]),href:e.link,onClick:()=>o==null?void 0:o(e),children:e.content})},e.date+``))]},e+``)})}},{e:[bt,xt],c:[St,vt]}=p(_t,[[v,3,`weekFormatter`],[y,1,`currentDate`],[v,3,`dateGrid`]],[b],yt),_t),B=class extends _{constructor(){super(St),o(this,`displayName`,`MonthCalendar`),vt()}},o(B,gt,void 0),B);const Ct=({avatar:e,name:t})=>i(n,{children:[r(j,{size:2,style:{marginRight:`0.5rem`},src:e}),r(`span`,{className:`align-middle`,children:t})]});Ct.displayName=`Nameplate`;let wt;var V,H,Tt,Et,Dt,Ot,kt,At,jt;const Mt=Array.from([,,,,,,],(e,t)=>`h${++t}`)+``;let Nt;new(wt=(V=new WeakMap,H=new WeakMap,Tt=class extends (Ot=c){get list(){return m(this,V)}set list(e){g(this,V,e)}get scrollY(){return m(this,H)}set scrollY(e){g(this,H,e)}get currentActiveId(){var e;let{list:t,scrollY:n}=this;return(e=t[t.findIndex(({top:e})=>e>n)-1])==null?void 0:e.id}componentDidMount(){globalThis.document&&(window.addEventListener(`scroll`,this.updateScrollY),this.list=Array.from(document.querySelectorAll(Mt),e=>{var t;(t=e).id||(t.id=be());let{id:n,tagName:r,textContent:i,offsetTop:a}=e;return{id:n,level:+r[1],text:i.trim(),top:a}}))}componentWillUnmount(){var e,t;(e=(t=globalThis).removeEventListener)==null||e.call(t,`scroll`,this.updateScrollY)}render(){let{list:n}=this,i=this.props,{style:a,variant:o=`underline`}=i,c=t(i,[`style`,`variant`]);return r(D,s(e({},c),{variant:o,style:e({flexDirection:`column`},a),children:n.map(this.renderLink)}))}constructor(...e){super(...e),h(this,V,{writable:!0,value:(jt(this),kt(this,[]))}),h(this,H,{writable:!0,value:At(this,0)}),o(this,`updateScrollY`,()=>this.scrollY=window.scrollY),o(this,`scrollTo`,e=>()=>{var t,n;setTimeout(()=>_e(`[id="${e.id}"]`)),(t=(n=this.props).onItemClick)==null||t.call(n,e)}),o(this,`renderLink`,({id:e,level:t,text:n,top:i})=>{let{currentActiveId:a}=this,{depth:o=1/0}=this.props;return t<=o&&r(D.Item,{style:{textIndent:`${t-1}rem`},children:r(D.Link,{href:`#${e}`,active:a===e,onClick:this.scrollTo({id:e,level:t,text:n,top:i}),children:n})},e)})}},{e:[kt,At,jt],c:[Nt,Dt]}=p(Tt,[[y,1,`list`],[y,1,`scrollY`],[v,3,`currentActiveId`]],[b],Ot),Tt),Et=class extends _{constructor(){super(Nt),o(this,`displayName`,`PageNav`),Dt()}},o(Et,wt,void 0),Et);let Pt;var U,W,G,Ft,It,Lt,Rt,zt,Bt,Vt,Ht;let Ut;new(Pt=(U=new WeakMap,W=new WeakMap,G=new WeakMap,Ft=class extends (Rt=c){get scrollLeft(){return m(this,U)}set scrollLeft(e){g(this,U,e)}get scrollWidth(){return m(this,W)}set scrollWidth(e){g(this,W,e)}get clientWidth(){return m(this,G)}set clientWidth(e){g(this,G,e)}get canScrollLeft(){return this.scrollLeft>0}get canScrollRight(){return this.scrollLeft+this.clientWidth<this.scrollWidth}componentDidMount(){let e=this.updateScroll();e&&(e.addEventListener(`scroll`,this.updateScroll),this.resizeObserver=new ResizeObserver(this.updateScroll),this.resizeObserver.observe(e))}componentWillUnmount(){var e,t;(e=this.resizeObserver)==null||e.disconnect(),(t=this.scrollerRef.current)==null||t.removeEventListener(`scroll`,this.updateScroll)}render(){let{canScrollLeft:n,canScrollRight:a}=this,o=this.props,{className:c=``,children:l}=o,u=t(o,[`className`,`children`]);return i(`div`,{className:`position-relative overflow-y-hidden ${c}`,children:[n&&r(`button`,{type:`button`,className:`position-absolute top-0 bottom-0 start-0 z-1 border-0 px-2 aEvBXq_scrollButtonLeft`,"aria-label":`Scroll left`,onClick:this.scrollBy(-1),children:r(R,{name:`caret-left-fill`})}),r(`div`,{ref:this.scrollerRef,className:`overflow-x-auto aEvBXq_scrollerInner`,children:r(D,s(e({},u),{className:`flex-nowrap`,children:l}))}),a&&r(`button`,{type:`button`,className:`position-absolute top-0 bottom-0 end-0 z-1 border-0 px-2 aEvBXq_scrollButtonRight`,"aria-label":`Scroll right`,onClick:this.scrollBy(1),children:r(R,{name:`caret-right-fill`})})]})}constructor(...e){super(...e),o(this,`scrollerRef`,(Ht(this),u())),h(this,U,{writable:!0,value:zt(this,0)}),h(this,W,{writable:!0,value:Bt(this,0)}),h(this,G,{writable:!0,value:Vt(this,0)}),o(this,`updateScroll`,()=>{let e=this.scrollerRef.current;return e&&(this.scrollLeft=e.scrollLeft,this.scrollWidth=e.scrollWidth,this.clientWidth=e.clientWidth),e}),o(this,`resizeObserver`,void 0),o(this,`scrollBy`,e=>()=>{let t=this.scrollerRef.current;t&&t.scrollBy({left:e*t.clientWidth*.8,behavior:`smooth`})})}},{e:[zt,Bt,Vt,Ht],c:[Ut,Lt]}=p(Ft,[[y,1,`scrollLeft`],[y,1,`scrollWidth`],[y,1,`clientWidth`],[v,3,`canScrollLeft`],[v,3,`canScrollRight`]],[b],Rt),Ft),It=class extends _{constructor(){super(Ut),o(this,`displayName`,`ScrollNav`),Lt()}},o(It,Pt,void 0),It);const Wt=n=>{let{value:i,children:a}=n,o=t(n,[`value`,`children`]);return r(T.Item,s(e({},o),{"data-value":i,children:a}))};Wt.displayName=`Option`;const Gt=({className:e,style:t,variant:n,menuVariant:o,children:s,value:c,onChange:l,valueRender:u})=>{let f=ge(s).flat(1/0).find(e=>d(e)&&e.type===Wt&&e.props.value===c);return i(T,{onClick:({target:e})=>{let t=e.closest(`.dropdown-item`);if(!t)return;let{value:n}=t.dataset;l==null||l(n)},children:[r(T.Toggle,{className:a(`w-100`,`d-flex`,`justify-content-between`,`align-items-center`,!n&&`bg-white text-dark`,e),style:t,variant:n,children:(u==null?void 0:u(c))||r(`div`,{className:f==null?void 0:f.props.className,children:f==null?void 0:f.props.children})}),r(T.Menu,{variant:o,children:s})]})};Gt.displayName=`Select`;let Kt;var K,q,qt,Jt,Yt,Xt,Zt,Qt,$t;function en(e,t,n){return S(function*(){let r=yield Fe(e,{useCORS:!0});return new Promise((e,i)=>r.toBlob(t=>t?e(URL.createObjectURL(t)):i(),t,n))})()}let tn;new(Kt=(K=new WeakMap,q=new WeakMap,qt=class extends (Xt=c){get loading(){return m(this,K)}set loading(e){g(this,K,e)}get imageURI(){return m(this,q)}set imageURI(e){g(this,q,e)}componentDidMount(){var e,t;(e=(t=globalThis).addEventListener)==null||e.call(t,`resize`,this.generateImage)}componentWillUnmount(){var e,t;(e=(t=globalThis).removeEventListener)==null||e.call(t,`resize`,this.generateImage)}render(){let a=this.props,{className:o=``,children:c}=a,l=t(a,[`className`,`children`]),{loading:u,imageURI:d}=this;return i(n,{children:[u&&r(mt,{}),i(`div`,s(e({},l),{ref:this.root,className:`position-relative ${o}`,onMouseEnter:d?void 0:this.generateImage,onTouchStart:d?void 0:this.generateImage,children:[c,d&&r(E,{className:`position-absolute start-0 top-0 w-100 h-100`,src:d,alt:`Share Image`,fluid:!0,onClick:this.share})]}))]})}constructor(...t){var n;super(...t),n=this,o(this,`root`,($t(this),u())),h(this,K,{writable:!0,value:Zt(this,!1)}),h(this,q,{writable:!0,value:Qt(this,``)}),o(this,`generateImage`,()=>S(function*(){n.imageURI&&(URL.revokeObjectURL(n.imageURI),n.imageURI=``),n.loading=!0,n.imageURI=yield en(n.root.current),n.loading=!1})()),o(this,`share`,t=>S(function*(){var r,i;t.stopPropagation();let a=yield pe(n.imageURI),o=new File([a],`${n.props.title}.png`,{type:a.type});yield(r=(i=navigator).share)==null?void 0:r.call(i,e({files:[o]},n.props))})())}},{e:[Zt,Qt,$t],c:[tn,Yt]}=p(qt,[[y,1,`loading`],[y,1,`imageURI`]],[b],Xt),qt),Jt=class extends _{constructor(){super(tn),o(this,`displayName`,`ShareBox`),Yt()}},o(Jt,Kt,void 0),Jt);const nn=a=>{let{animation:o,loading:c,disabled:l,children:u}=a,d=t(a,[`animation`,`loading`,`disabled`,`children`]);return i(C,s(e({},d),{disabled:c||l,children:[c&&i(n,{children:[r(k,{as:`span`,className:u?`me-2`:``,size:`sm`,animation:o,role:`status`,"aria-hidden":`true`}),!u&&r(`span`,{className:`visually-hidden`,children:`Loading...`})]}),u]}))};nn.displayName=`SpinnerButton`;const rn=n=>{let{animation:i=`border`,variant:a=`primary`,size:o,colSpan:c}=n,l=t(n,[`animation`,`variant`,`size`,`colSpan`]);return r(`tr`,s(e({},l),{children:r(`td`,{className:`text-center p-4`,colSpan:c,children:r(k,{animation:i,variant:a,size:o})})}))};rn.displayName=`TableSpinner`;let an;var J,Y,on,sn,cn,ln,un,dn,fn;let pn;new(an=(J=new WeakMap,Y=new WeakMap,on=class extends (ln=c){get expanded(){return m(this,J)}set expanded(e){g(this,J,e)}get overflowed(){return m(this,Y)}set overflowed(e){g(this,Y,e)}componentDidMount(){this.checkOverflow(),window.addEventListener(`resize`,this.checkOverflow)}componentDidUpdate({rows:e,children:t}){!this.expanded&&(t!==this.props.children||e!==this.props.rows)&&this.checkOverflow()}componentWillUnmount(){window.removeEventListener(`resize`,this.checkOverflow)}render(){let n=this.props,{children:a,rows:o=3,expandText:c=`⏬`,collapseText:l=`⏫`}=n,u=t(n,[`children`,`rows`,`expandText`,`collapseText`]),{expanded:d,overflowed:f}=this,ee={overflow:`hidden`,display:`-webkit-box`,WebkitBoxOrient:`vertical`,WebkitLineClamp:o};return i(`div`,s(e({},u),{children:[r(`p`,{ref:this.contentRef,style:d?void 0:ee,children:a}),(f||d)&&r(`button`,{type:`button`,className:`bg-transparent border-0 p-0`,"aria-expanded":d,onClick:this.toggle,children:d?l:c})]}))}constructor(...e){super(...e),h(this,J,{writable:!0,value:(fn(this),un(this,!1))}),h(this,Y,{writable:!0,value:dn(this,!1)}),o(this,`contentRef`,u()),o(this,`checkOverflow`,()=>{let{current:e}=this.contentRef;e&&(this.overflowed=e.scrollHeight>e.clientHeight)}),o(this,`toggle`,()=>{this.expanded=!this.expanded,this.expanded||requestAnimationFrame(this.checkOverflow)})}},{e:[un,dn,fn],c:[pn,cn]}=p(on,[[y,1,`expanded`],[y,1,`overflowed`]],[b],ln),on),sn=class extends _{constructor(){super(pn),o(this,`displayName`,`TextTruncate`),cn()}},o(sn,an,void 0),sn);let mn;var X,hn,gn,_n,vn,yn=le(({observedProps:{dateTime:e,format:t}})=>e+t),bn,xn;let Z;new(mn=(X=new WeakMap,hn=class extends (vn=ce){updateText(){let{dateTime:e,format:t}=this.props;return x(e,t)}get timeText(){return m(this,X)}set timeText(e){g(this,X,e)}componentDidMount(){super.componentDidMount(),this.timeText=this.updateText()}render(){let n=this.props,{dateTime:i}=n,a=t(n,[`dateTime`]);return r(`time`,s(e({dateTime:new Date(i).toJSON()},a),{children:this.timeText}))}constructor(...e){super(...e),h(this,X,{writable:!0,value:(xn(this),bn(this,this.updateText()))})}},{e:[bn,xn],c:[Z,_n]}=p(hn,[[yn,2,`updateText`],[y,1,`timeText`]],[b],vn),hn),gn=class extends _{constructor(){super(Z),o(this,`displayName`,`Time`),_n()}},o(gn,mn,void 0),gn);const Sn={ms:`millisecond(s)`,s:`second(s)`,m:`minute(s)`,H:`hour(s)`,D:`day(s)`,W:`week(s)`,M:`month(s)`,Y:`year(s)`},Cn=n=>{let{date:r,unitWords:a=Sn,beforeWord:o=` before`,afterWord:c=` after`}=n,l=t(n,[`date`,`unitWords`,`beforeWord`,`afterWord`]);r=new Date(r);let{distance:u,unit:d}=he(r);return i(`time`,s(e({},l),{dateTime:r.toJSON(),title:r.toLocaleString(),children:[Math.abs(u),` `,a[d],u<0?o:c]}))};Cn.displayName=`TimeDistance`;const wn=n=>{let{className:a,events:o,timeFormat:c}=n,l=t(n,[`className`,`events`,`timeFormat`]);return r(`ol`,s(e({className:`list-unstyled hsu__a_timeline ${a}`},l),{children:o.map(({title:t,summary:n,time:a,link:o,people:s})=>r(`li`,{className:`position-relative hsu__a_timelineItem hsu__a_right`,children:r(ke,{children:i(ke.Body,{className:`p-4 d-flex flex-column gap-3 align-items-center`,children:[r(`h3`,{className:`h5 m-0`,children:r(`a`,{className:`text-decoration-none stretched-link`,href:o,children:t})}),i(`div`,{className:`small text-muted d-flex gap-2`,children:[`⏲️`,r(Z,{dateTime:a[0],format:c}),a[1]&&`~`,a[1]&&r(Z,{dateTime:a[1],format:c})]}),r(`ul`,{className:`list-unstyled m-0 d-flex gap-2 flex-wrap justify-content-around`,children:s==null?void 0:s.map(t=>r(`li`,{children:r(Ct,e({},t))},t.name))}),r(`p`,{className:`m-0`,children:n})]})})},t))}))};wn.displayName=`Timeline`;var Tn,En;const Dn=new Set([`warning`,`info`,`light`]);var Q=new WeakMap,On=class{get messages(){return m(this,Q)}set messages(e){g(this,Q,e)}open(t){let n=be(),r=Date.now(),{promise:i,resolve:a}=Promise.withResolvers();return this.messages=[...this.messages,s(e({id:n},t),{openedAt:r,resolve:a})],i}close(n){let r=this.messages.find(e=>e.id===n)||{},{resolve:i}=r,a=t(r,[`resolve`]);i==null||i(s(e({},a),{closedAt:Date.now()})),this.messages=this.messages.filter(e=>e.id!==n)}constructor(e=fe){o(this,`TimeScalar`,void 0),h(this,Q,{writable:!0,value:void 0}),o(this,`Component`,void 0),o(this,`renderMessage`,void 0),this.TimeScalar=e,g(this,Q,(En(this),Tn(this,[]))),this.Component=b(({position:e=`top-end`})=>r(Ne,{position:e,className:`position-fixed p-3`,children:this.messages.map(this.renderMessage)})),this.renderMessage=({id:e,openedAt:t,title:n,body:a,variant:o,delay:s=3e3})=>{let c=o&&!Dn.has(o)?`text-white`:void 0,l=!!n||s===0,u=this.TimeScalar.distanceOf(Date.now(),t).toShortString();return i(A,{bg:o,delay:s,autohide:s!==0,onClose:()=>this.close(e),children:[l&&i(A.Header,{children:[r(`strong`,{className:`me-auto`,children:n}),r(`small`,{children:u})]}),r(A.Body,{className:c,children:a})]},e)},this.Component.displayName=`ToastComponent`}};({e:[Tn,En]}=p(On,[[y,1,`messages`]],[]));let kn;var $,An,jn,Mn,Nn,Pn,Fn;let In;new(kn=($=new WeakMap,An=class extends (Nn=c){get echoed(){return m(this,$)}set echoed(e){g(this,$,e)}render(){let n=this.props,{className:i,text:o}=n,c=t(n,[`className`,`text`]),{echoed:l}=this;return r(`pre`,s(e({},c),{ref:this.init,className:a(`text-wrap`,i),children:l+(l===o?``:`_`)}))}constructor(...e){var t;super(...e),t=this,h(this,$,{writable:!0,value:(Fn(this),Pn(this,``))}),o(this,`init`,e=>e&&new IntersectionObserver(([{isIntersecting:e}],n)=>S(function*(){if(!e)return;n.disconnect();let{text:r,intervals:i=150}=t.props;for(let e of r)yield ve(i/1e3),t.echoed+=e})()).observe(e))}},{e:[Pn,Fn],c:[In,Mn]}=p(An,[[y,1,`echoed`]],[b],Nn),An),jn=class extends _{constructor(){super(In),o(this,`displayName`,`TypeEcho`),Mn()}},o(jn,kn,void 0),jn);const Ln=({email:e,website:t})=>i(`address`,{className:`mb-0 d-flex justify-content-around gap-2`,children:[e&&r(`a`,{rel:`noreferrer`,target:`_blank`,href:`mailto:`+e,children:r(R,{name:`envelope`})}),t&&r(`a`,{rel:`noreferrer`,target:`_blank`,href:t,children:r(R,{name:`globe2`})})]}),Rn=`X5DLia_image`;var zn=class extends l{render(){let n=this.props,{className:a=``,title:o,rank:c=[],linkOf:l}=n,u=t(n,[`className`,`title`,`rank`,`linkOf`]);return i(je,s(e({className:`X5DLia_rankBox ${a}`},u),{children:[i(w,{sm:12,xs:12,lg:7,children:[i(`div`,{className:`shadow rounded-3 X5DLia_title`,children:[i(`div`,{className:`X5DLia_medal`,children:[r(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),r(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),r(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`})]}),r(`h3`,{"data-text":o,className:`position-relative m-auto mb-0 fw-bold text-center`,children:o})]}),r(je,{as:`ul`,className:`mt-2 g-0 align-items-end text-center ps-0 pt-2 list-unstyled X5DLia_topUsers`,children:c.slice(0,3).map(this.renderMedal)})]}),r(w,{xs:12,sm:12,lg:5,children:r(Me,{className:`my-3 pt-2 X5DLia_restUsers`,responsive:!0,children:r(`tbody`,{children:c.slice(3,10).map(this.renderRow)})})})]}))}constructor(...t){super(...t),o(this,`renderMedal`,t=>{var n,a;return i(w,{as:`li`,children:[r(`div`,{className:`shadow-lg overflow-hidden rounded-circle m-auto ${Rn}`,children:r(E,{src:t.avatar,alt:t.name,loading:`lazy`,fluid:!0})}),i(`div`,{className:`position-relative overflow-hidden X5DLia_topUser`,children:[i(`div`,{className:`position-relative`,children:[r(`i`,{className:`d-block overflow-hidden m-auto mb-1 rounded-circle`}),r(`a`,{className:`d-block mb-0 stretched-link`,href:((n=(a=this.props).linkOf)==null?void 0:n.call(a,t))||`#`,children:t.name}),r(`strong`,{children:t.score})]}),r(Ln,e({},t))]})]},t.id)}),o(this,`renderRow`,(t,n,{length:a})=>{var o,s;return i(`tr`,{className:`position-relative`,children:[r(`td`,{className:`align-middle`,children:r(Oe,{className:`fw-bold fst-italic`,children:(n+4+``).padStart((a+``).length,`0`)})}),i(`td`,{className:`position-relative mw-50 text-truncate X5DLia_name`,children:[r(`div`,{className:`d-inline-block overflow-hidden align-middle rounded-circle ${Rn}`,children:r(E,{src:t.avatar,alt:t.name,loading:`lazy`,fluid:!0})}),r(`a`,{className:`ms-2 d-inline-block align-middle stretched-link`,style:{color:`rgb(248, ${(n+2)*15}, ${(n+2)*35})`},href:((o=(s=this.props).linkOf)==null?void 0:o.call(s,t))||`#`,children:t.name})]}),r(`td`,{className:`align-middle`,children:t.score}),r(`td`,{className:`align-middle`,children:r(Ln,e({},t))})]},t.id)})}};o(zn,`displayName`,`UserRankView`);const Bn=n=>{let{className:i=``,children:a,duration:o}=n,c=t(n,[`className`,`children`,`duration`]);return r(`div`,s(e({className:`overflow-hidden ${i}`},c),{children:r(`div`,{className:`d-inline-block mw-100 mh-100 QBd6SG_scrollWrap`,style:{"--duration":o},children:r(`div`,{className:`d-inline-block QBd6SG_scrollItem`,children:a})})}))};Bn.displayName=`VerticalMarquee`;const Vn=[`🐵`,`🐔`,`🐶`,`🐷`,`🐭`,`🐮`,`🐯`,`🐰`,`🐲`,`🐍`,`🐴`,`🐐`],Hn=e=>{let t=e<0?e+1:e;return Vn[(t%12+12)%12]},Un=n=>{let{className:a=``,itemClassName:o=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,startYear:c,endYear:l=new Date().getFullYear(),itemOf:u}=n,d=t(n,[`className`,`itemClassName`,`startYear`,`endYear`,`itemOf`]);return r(`ol`,s(e({className:`list-unstyled m-0 d-flex flex-wrap justify-content-center gap-3 ${a}`},d),{children:Array.from({length:l-c+1},(e,t)=>{let n=l-t;if(n===0)return null;let a=Hn(n),{link:s=`#`,title:c}=(u==null?void 0:u(n,a))||{};return r(`li`,{className:o,children:i(`a`,{className:`d-inline-block p-3 text-decoration-none text-center`,href:s,children:[r(`div`,{className:`fs-1`,children:a}),c]})},n)})}))};Un.displayName=`ZodiacBar`;export{j as Avatar,Le as ClickBoundary,ze as CodeBlock,qe as Countdown,et as Dialog,Ze as DialogClose,lt as Editor,dt as EditorHTML,L as HorizontalMarquee,ft as HorizontalMarqueeBox,R as Icon,pt as LiveTSX,mt as Loading,St as MonthCalendar,Ct as Nameplate,Wt as Option,ht as OverlayBox,Nt as PageNav,Ut as ScrollNav,Gt as Select,tn as ShareBox,nn as SpinnerButton,rn as TableSpinner,pn as TextTruncate,Z as Time,Cn as TimeDistance,wn as Timeline,On as Toast,In as TypeEcho,zn as UserRankView,M as VariantColors,Bn as VerticalMarquee,Un as ZodiacBar,Vn as ZodiacSigns,Ie as animate,en as elementToImage,ut as parser,Be as text2color,Hn as zodiacOf};
1
+ import{_ as e}from"@swc/helpers/_/_object_spread";import{_ as t}from"@swc/helpers/_/_object_without_properties";import{Fragment as n,jsx as r,jsxs as i}from"react/jsx-runtime";import a from"classnames";import{_ as o}from"@swc/helpers/_/_define_property";import{_ as s}from"@swc/helpers/_/_object_spread_props";import*as c from"react";import l,{Component as u,Fragment as d,PureComponent as f,createRef as p,isValidElement as m}from"react";import h from"@shikijs/langs/javascript";import g from"@shikijs/langs/jsx";import _ from"@shikijs/langs/tsx";import v from"@shikijs/langs/typescript";import y from"@shikijs/themes/github-light";import{createHighlighterCoreSync as ee}from"shiki/core";import{createJavaScriptRegexEngine as b}from"shiki/engine/javascript";import{_ as x}from"@swc/helpers/_/_apply_decs_2203_r";import{_ as S}from"@swc/helpers/_/_class_private_field_get";import{_ as C}from"@swc/helpers/_/_class_private_field_init";import{_ as w}from"@swc/helpers/_/_class_private_field_set";import{_ as T}from"@swc/helpers/_/_identity";import{computed as E,observable as D}from"mobx";import{observer as O}from"mobx-react";import{ObservedComponent as te,reaction as ne}from"mobx-react-helper";import{Day as re,Second as ie,Timestamp as ae,blobOf as oe,changeMonth as se,diffTime as ce,formatDate as k,makeArray as le,scrollTo as ue,sleep as de,splitArray as fe,uniqueID as pe}from"web-utility";import{Defer as me}from"iterable-observer";import{_ as A}from"@swc/helpers/_/_async_to_generator";import{createReactEditorJS as he}from"react-editor-js";import ge from"editorjs-html";import{LiveEditor as _e,LiveError as ve,LivePreview as ye,LiveProvider as be}from"react-live";import{Badge as xe,Button as Se,Card as Ce,Col as we,Dropdown as j,Image as Te,Nav as Ee,OverlayTrigger as De,Popover as Oe,Row as ke,Spinner as Ae,Table as je,Toast as Me,ToastContainer as Ne,Tooltip as Pe}from"react-bootstrap";import Fe from"html2canvas";var Ie=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);function Le(e){return t=>t&&new IntersectionObserver(([{isIntersecting:t,target:n}],r)=>{if(!t)return;let i=[`animate__animated`,`animate__${e}`];n.classList.add(...i),n.addEventListener(`animationend`,()=>n.classList.remove(...i),{once:!0}),r.disconnect()}).observe(t)}const Re=n=>{let{className:i,style:o,size:s=3}=n,c=t(n,[`className`,`style`,`size`]);return r(`img`,e({className:a(`object-fit-cover rounded-circle`,i),style:e({width:`${s}rem`,height:`${s}rem`},o)},c))};Re.displayName=`Avatar`;var ze=class extends f{componentDidMount(){window.addEventListener(`click`,this.switchClick,!0)}componentWillUnmount(){window.removeEventListener(`click`,this.switchClick,!0)}render(){let n=this.props,{children:i,onInnerClick:a,onOuterClick:o}=n,c=t(n,[`children`,`onInnerClick`,`onOuterClick`]);return r(`div`,s(e({ref:this.root},c),{children:i}))}constructor(...e){super(...e),o(this,`root`,p()),o(this,`switchClick`,e=>{var t;let{onInnerClick:n,onOuterClick:r}=this.props;(t=this.root.current)!=null&&t.contains(e.target)?n==null||n(e):r==null||r(e)})}};
2
+ /*!
3
+ * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
4
+ *
5
+ * Copyright (c) 2014-2017, Jon Schlinkert.
6
+ * Released under the MIT License.
7
+ */
8
+ function Be(e){return Object.prototype.toString.call(e)===`[object Object]`}function Ve(e){var t,n;return Be(e)!==!1&&(t=e.constructor,t===void 0||(n=t.prototype,Be(n)!==!1&&n.hasOwnProperty(`isPrototypeOf`)!==!1))}var He=Ie((e=>{var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)},n=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.prettyPrint=void 0;var r=[];function i(e){var t=typeof e;return e!==null&&(t===`object`||t===`function`)}function a(e){return Object.prototype.toString.call(e)===`[object RegExp]`}function o(e){return Object.getOwnPropertySymbols(e).filter(function(t){return Object.prototype.propertyIsEnumerable.call(e,t)})}function s(e,c,l){l===void 0&&(l=``);var u=t(t({},{indent:` `,singleQuotes:!0}),c),d=u.inlineCharacterLimit===void 0?{newLine:`
9
+ `,newLineOrSpace:`
10
+ `,pad:l,indent:l+u.indent}:{newLine:`@@__PRETTY_PRINT_NEW_LINE__@@`,newLineOrSpace:`@@__PRETTY_PRINT_NEW_LINE_OR_SPACE__@@`,pad:`@@__PRETTY_PRINT_PAD__@@`,indent:`@@__PRETTY_PRINT_INDENT__@@`},f=function(e){if(u.inlineCharacterLimit===void 0)return e;var t=e.replace(new RegExp(d.newLine,`g`),``).replace(new RegExp(d.newLineOrSpace,`g`),` `).replace(RegExp(d.pad+`|`+d.indent,`g`),``);return t.length<=u.inlineCharacterLimit?t:e.replace(RegExp(d.newLine+`|`+d.newLineOrSpace,`g`),`
11
+ `).replace(new RegExp(d.pad,`g`),l).replace(new RegExp(d.indent,`g`),l+u.indent)};if(r.indexOf(e)!==-1)return`"[Circular]"`;if(e==null||typeof e==`number`||typeof e==`boolean`||typeof e==`function`||typeof e==`symbol`||a(e))return String(e);if(e instanceof Date)return`new Date('${e.toISOString()}')`;if(Array.isArray(e)){if(e.length===0)return`[]`;r.push(e);var p=`[`+d.newLine+e.map(function(t,n){var r=e.length-1===n?d.newLine:`,`+d.newLineOrSpace,i=s(t,u,l+u.indent);return u.transform&&(i=u.transform(e,n,i)),d.indent+i+r}).join(``)+d.pad+`]`;return r.pop(),f(p)}if(i(e)){var m=n(n([],Object.keys(e),!0),o(e),!0);if(u.filter&&(m=m.filter(function(t){return u.filter&&u.filter(e,t)})),m.length===0)return`{}`;r.push(e);var p=`{`+d.newLine+m.map(function(t,n){var r=m.length-1===n?d.newLine:`,`+d.newLineOrSpace,i=typeof t==`symbol`,a=!i&&/^[a-z$_][a-z$_0-9]*$/i.test(t.toString()),o=i||a?t:s(t,u),c=s(e[t],u,l+u.indent);return u.transform&&(c=u.transform(e,t,c)),d.indent+String(o)+`: `+c+r}).join(``)+d.pad+`}`;return r.pop(),f(p)}return e=String(e).replace(/[\r\n]/g,function(e){return e===`
12
+ `?`\\n`:`\\r`}),u.singleQuotes?(e=e.replace(/\\?'/g,`\\'`),`'${e}'`):(e=e.replace(/"/g,`\\"`),`"${e}"`)}e.prettyPrint=s})),Ue=Ie((e=>{
13
+ /** @license React v16.13.1
14
+ * react-is.production.min.js
15
+ *
16
+ * Copyright (c) Facebook, Inc. and its affiliates.
17
+ *
18
+ * This source code is licensed under the MIT license found in the
19
+ * LICENSE file in the root directory of this source tree.
20
+ */
21
+ var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.memo`):60115,m=t?Symbol.for(`react.lazy`):60116;function h(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e=e&&e.$$typeof,e){case c:case d:case m:case p:case s:return e;default:return t}}case r:return t}}}e.ForwardRef=d,e.Memo=p,e.isContextConsumer=function(e){return h(e)===c},e.isContextProvider=function(e){return h(e)===s},e.isForwardRef=function(e){return h(e)===d},e.isLazy=function(e){return h(e)===m},e.isMemo=function(e){return h(e)===p},e.isProfiler=function(e){return h(e)===o},e.isStrictMode=function(e){return h(e)===a},e.isSuspense=function(e){return h(e)===f}})),We=Ie(((e,t)=>{t.exports=Ue()})),Ge=He(),M=We(),N=(function(e,t){return e===0?``:Array(e*t).fill(` `).join(``)});function Ke(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function qe(e){if(Array.isArray(e))return Ke(e)}function Je(e,t,n){return(t=tt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ye(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Xe(){throw TypeError(`Invalid attempt to spread non-iterable instance.
22
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ze(Object(n),!0).forEach(function(t){Je(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ze(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $e(e){return qe(e)||Ye(e)||nt(e)||Xe()}function et(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function tt(e){var t=et(e,`string`);return typeof t==`symbol`?t:t+``}function P(e){"@babel/helpers - typeof";return P=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},P(e)}function nt(e,t){if(e){if(typeof e==`string`)return Ke(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ke(e,t):void 0}}function rt(e,t){if(e===null||P(e)!==`object`||e instanceof Date||e instanceof RegExp)return e;if(c.isValidElement(e)){var n=Qe({},e);return delete n._owner,n}return t.add(e),Array.isArray(e)?e.map(function(e){return rt(e,t)}):Object.keys(e).sort().reduce(function(n,r){return n[r]=r===`current`||t.has(e[r])?`[Circular]`:rt(e[r],t),n},{})}function it(e){return rt(e,new WeakSet)}var at=function(e){return{type:`string`,value:e}},ot=function(e){return{type:`number`,value:e}},st=function(e,t,n,r){return{type:`ReactElement`,displayName:e,props:t,defaultProps:n,childrens:r}},ct=function(e,t){return{type:`ReactFragment`,key:e,childrens:t}},lt=!!d,ut=function(e){return!e.name||e.name===`_default`?`No Display Name`:e.name},dt=function(e){switch(!0){case!!e.displayName:return e.displayName;case e.$$typeof===M.Memo:return dt(e.type);case e.$$typeof===M.ForwardRef:return dt(e.render);default:return ut(e)}},ft=function(e){switch(!0){case typeof e.type==`string`:return e.type;case typeof e.type==`function`:return e.type.displayName?e.type.displayName:ut(e.type);case(0,M.isForwardRef)(e):case(0,M.isMemo)(e):return dt(e.type);case(0,M.isContextConsumer)(e):return`${e.type._context.displayName||`Context`}.Consumer`;case(0,M.isContextProvider)(e):return`${e.type.displayName||`Context`}.Provider`;case(0,M.isLazy)(e):return`Lazy`;case(0,M.isProfiler)(e):return`Profiler`;case(0,M.isStrictMode)(e):return`StrictMode`;case(0,M.isSuspense)(e):return`Suspense`;default:return`UnknownElementType`}},pt=function(e,t){return t!==`children`},mt=function(e){return e!==!0&&e!==!1&&e!==null&&e!==``},ht=function(e,t){var n={};return Object.keys(e).filter(function(n){return t(e[n],n)}).forEach(function(t){return n[t]=e[t]}),n},F=function(e,t){var n=t.displayName,r=n===void 0?ft:n;if(typeof e==`string`)return at(e);if(typeof e==`number`)return ot(e);if(!l.isValidElement(e))throw Error(`react-element-to-jsx-string: Expected a React.Element, got \`${P(e)}\``);var i=r(e),a=ht(e.props,pt),o=e.key;typeof o==`string`&&o.search(/^\./)&&(a.key=o);var s=ht(e.type.defaultProps||{},pt),c=l.Children.toArray(e.props.children).filter(mt).map(function(e){return F(e,t)});return lt&&e.type===d?ct(o,c):st(i,a,s,c)};function gt(){}var _t=function(e){return e.toString().split(`
23
+ `).map(function(e){return e.trim()}).join(``)},vt=(function(e,t){var n=t.functionValue,r=n===void 0?_t:n;return!t.showFunctions&&r===_t?r(gt):r(e)}),yt=(function(e,t,n,r){var i=it(e),a=(0,Ge.prettyPrint)(i,{transform:function(e,t,i){var a=e[t];return a&&m(a)?I(F(a,r),!0,n,r):typeof a==`function`?vt(a,r):i}});return t?a.replace(/\s+/g,` `).replace(/{ /g,`{`).replace(/ }/g,`}`).replace(/\[ /g,`[`).replace(/ ]/g,`]`):a.replace(/\t/g,N(1,r.tabStop)).replace(/\n([^$])/g,`
24
+ ${N(n+1,r.tabStop)}\$1`)}),bt=function(e){return e.replace(/"/g,`&quot;`)},xt=function(e,t,n,r){if(typeof e==`number`)return`{${String(e)}}`;if(typeof e==`string`)return`"${bt(e)}"`;if(P(e)===`symbol`){var i=e.valueOf().toString().replace(/Symbol\((.*)\)/,`$1`);return i?`{Symbol('${i}')}`:`{Symbol()}`}return typeof e==`function`?`{${vt(e,r)}}`:m(e)?`{${I(F(e,r),!0,n,r)}}`:e instanceof Date?isNaN(e.valueOf())?`{new Date(NaN)}`:`{new Date("${e.toISOString()}")}`:Ve(e)||Array.isArray(e)?`{${yt(e,t,n,r)}}`:`{${String(e)}}`},St=(function(e,t,n,r,i,a,o,s){if(!t&&!r)throw Error(`The prop "${e}" has no value and no default: could not be formatted`);var c=t?n:i,l=s.useBooleanShorthandSyntax,u=s.tabStop,d=xt(c,a,o,s),f=` `,p=`
25
+ ${N(o+1,u)}`,m=d.includes(`
26
+ `);return l&&d===`{false}`&&!r?(f=``,p=``):l&&d===`{true}`?(f+=`${e}`,p+=`${e}`):(f+=`${e}=${d}`,p+=`${e}=${d}`),{attributeFormattedInline:f,attributeFormattedMultiline:p,isMultilineAttribute:m}}),Ct=(function(e,t){var n=e.slice(0,e.length>0?e.length-1:0),r=e[e.length-1];return r&&(t.type===`string`||t.type===`number`)&&(r.type===`string`||r.type===`number`)?n.push(at(String(r.value)+String(t.value))):(r&&n.push(r),n.push(t)),n}),wt=function(e){return[`key`,`ref`].includes(e)},Tt=(function(e){return function(t){var n=t.includes(`key`),r=t.includes(`ref`),i=t.filter(function(e){return!wt(e)}),a=$e(e?i.sort():i);return r&&a.unshift(`ref`),n&&a.unshift(`key`),a}});function Et(e,t){return Array.isArray(t)?function(e){return t.indexOf(e)===-1}:function(n){return t(e[n],n)}}var Dt=function(e,t,n,r,i){var a=i.tabStop;return e.type===`string`?t.split(`
27
+ `).map(function(e,t){return t===0?e:`${N(r,a)}${e}`}).join(`
28
+ `):t},Ot=function(e,t,n){return function(r){return Dt(r,I(r,e,t,n),e,t,n)}},kt=function(e,t){return function(n){var r=Object.keys(e).includes(n);return!r||r&&e[n]!==t[n]}},At=function(e,t,n,r,i){return i?N(n,r).length+t.length>i:e.length>1},jt=function(e,t,n,r,i,a,o){return(At(e,t,i,a,o)||n)&&!r},Mt=(function(e,t,n,r){var i=e.type,a=e.displayName,o=a===void 0?``:a,s=e.childrens,c=e.props,l=c===void 0?{}:c,u=e.defaultProps,d=u===void 0?{}:u;if(i!==`ReactElement`)throw Error(`The "formatReactElementNode" function could only format node of type "ReactElement". Given: ${i}`);var f=r.filterProps,p=r.maxInlineAttributesLineLength,m=r.showDefaultProps,h=r.sortProps,g=r.tabStop,_=`<${o}`,v=_,y=_,ee=!1,b=[],x=Et(l,f);Object.keys(l).filter(x).filter(kt(d,l)).forEach(function(e){return b.push(e)}),Object.keys(d).filter(x).filter(function(){return m}).filter(function(e){return!b.includes(e)}).forEach(function(e){return b.push(e)});var S=Tt(h)(b);if(S.forEach(function(e){var i=St(e,Object.keys(l).includes(e),l[e],Object.keys(d).includes(e),d[e],t,n,r),a=i.attributeFormattedInline,o=i.attributeFormattedMultiline;i.isMultilineAttribute&&(ee=!0),v+=a,y+=o}),y+=`
29
+ ${N(n,g)}`,_=jt(S,v,ee,t,n,g,p)?y:v,s&&s.length>0){var C=n+1;_+=`>`,t||(_+=`
30
+ `,_+=N(C,g)),_+=s.reduce(Ct,[]).map(Ot(t,C,r)).join(t?``:`
31
+ ${N(C,g)}`),t||(_+=`
32
+ `,_+=N(C-1,g)),_+=`</${o}>`}else At(S,v,n,g,p)||(_+=` `),_+=`/>`;return _}),Nt=``,Pt=`React.Fragment`,Ft=function(e,t,n){var r={};return t&&(r={key:t}),{type:`ReactElement`,displayName:e,props:r,defaultProps:{},childrens:n}},It=function(e){return!!e.key},Lt=function(e){return e.childrens.length===0},Rt=(function(e,t,n,r){var i=e.type,a=e.key,o=e.childrens;if(i!==`ReactFragment`)throw Error(`The "formatReactFragmentNode" function could only format node of type "ReactFragment". Given: ${i}`);return Mt(Ft(r.useFragmentShortSyntax?Lt(e)||It(e)?Pt:Nt:Pt,a,o),t,n,r)}),zt=[`<`,`>`,`{`,`}`],Bt=function(e){return zt.some(function(t){return e.includes(t)})},Vt=function(e){return Bt(e)?`{\`${e}\`}`:e},Ht=function(e){var t=e;return t.endsWith(` `)&&(t=t.replace(/^(.*?)(\s+)$/,`$1{'$2'}`)),t.startsWith(` `)&&(t=t.replace(/^(\s+)(.*)$/,`{'$1'}$2`)),t},I=(function(e,t,n,r){if(e.type===`number`)return String(e.value);if(e.type===`string`)return e.value?`${Ht(Vt(String(e.value)))}`:``;if(e.type===`ReactElement`)return Mt(e,t,n,r);if(e.type===`ReactFragment`)return Rt(e,t,n,r);throw TypeError(`Unknow format type "${e.type}"`)}),Ut=(function(e,t){return I(e,!1,0,t)}),Wt=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.filterProps,r=n===void 0?[]:n,i=t.showDefaultProps,a=i===void 0||i,o=t.showFunctions,s=o!==void 0&&o,c=t.functionValue,l=t.tabStop,u=l===void 0?2:l,d=t.useBooleanShorthandSyntax,f=d===void 0||d,p=t.useFragmentShortSyntax,m=p===void 0||p,h=t.sortProps,g=h===void 0||h,_=t.maxInlineAttributesLineLength,v=t.displayName;if(!e)throw Error(`react-element-to-jsx-string: Expected a ReactElement`);var y={filterProps:r,showDefaultProps:a,showFunctions:s,functionValue:c,tabStop:u,useBooleanShorthandSyntax:f,useFragmentShortSyntax:m,sortProps:g,maxInlineAttributesLineLength:_,displayName:v};return Ut(F(e,y),y)};const Gt=ee({themes:[y],langs:[h,g,v,_],engine:b()}),Kt=i=>{let{className:a=``,language:o,children:c}=i,l=t(i,[`className`,`language`,`children`]),u=typeof c==`string`?c:Wt(m(c)?c:r(n,{children:c})),d=Gt.codeToHtml(u,{lang:o,theme:`github-light`,structure:`inline`});return r(`pre`,s(e({className:`m-0 language-${o} ${a}`},l),{children:r(`code`,{dangerouslySetInnerHTML:{__html:d},className:`language-${o}`})}))},qt=[`primary`,`secondary`,`success`,`danger`,`warning`,`info`,`dark`,`light`];function Jt(e,t=[]){let n=t[0]?qt.filter(e=>!t.find(t=>t===e)):qt;return n[[...e].reduce((e,t)=>e+t.charCodeAt(0),0)%n.length]}let Yt;var L,Xt,Zt,Qt,$t,en=ne(e=>e.observedProps.endTime),tn,nn;let rn;new(Yt=(L=new WeakMap,Xt=class extends ($t=te){get rest(){return S(this,L)}set rest(e){w(this,L,e)}get endTimestamp(){return+new Date(this.props.endTime||Date.now())}get timeSections(){let{units:e}=this.observedProps,{rest:t}=this;return e.reduce((n,{label:r},i)=>{let a=e.slice(i).map(({scale:e})=>e).reduce((e,t)=>e*t,1),o=~~(t/a);return t-=o*a,n.push({value:o,label:r}),n},[])}stop(){this.timer&&(window.clearInterval(this.timer),this.timer=0)}componentDidMount(){super.componentDidMount(),this.initTimer()}initTimer(){this.stop(),this.tick(),this.timer=window.setInterval(this.tick,ie)}componentWillUnmount(){super.componentWillUnmount(),this.stop()}render(){let n=this.props,{className:a=``,itemClassName:o=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,units:c,endTime:l,onEnd:u}=n,d=t(n,[`className`,`itemClassName`,`units`,`endTime`,`onEnd`]),{timeSections:f}=this;return r(`ol`,s(e({className:`list-unstyled m-0 ${a}`},d),{children:f.map(({value:e,label:t})=>i(`li`,{className:o,children:[r(`strong`,{children:(e+``).padStart(2,`0`)}),r(`span`,{children:t})]},t))}))}constructor(...e){super(...e),C(this,L,{writable:!0,value:(nn(this),tn(this,0))}),o(this,`timer`,0),o(this,`tick`,()=>{let{onEnd:e,endTime:t}=this.props,n=this.endTimestamp-Date.now();n>0?this.rest=n:(this.rest=0,this.stop(),e==null||e(t))})}},{e:[tn,nn],c:[rn,Qt]}=x(Xt,[[D,1,`rest`],[E,3,`timeSections`],[en,2,`initTimer`]],[O],$t),Xt),Zt=class extends T{constructor(){super(rn),o(this,`displayName`,`Countdown`),Qt()}},o(Zt,Yt,void 0),Zt);var an,on,sn,cn=class extends Error{constructor(e=`Dialog closed`){super(e)}},ln=new WeakMap,un=new WeakMap,dn=class{get input(){return S(this,ln)}set input(e){w(this,ln,e)}get defer(){return S(this,un)}set defer(e){w(this,un,e)}open(e){return e&&(this.input=e),this.defer=new me,this.defer.promise.finally(()=>this.defer=void 0),this.defer.promise}constructor(t){C(this,ln,{writable:!0,value:(sn(this),an(this,{}))}),C(this,un,{writable:!0,value:on(this)}),o(this,`Component`,void 0),this.Component=O(n=>r(t,s(e({},n,this.input),{defer:this.defer}))),this.Component.displayName=`DialogComponent`}};({e:[an,on,sn]}=x(dn,[[D,1,`input`],[D,1,`defer`]],[]));let fn;var R,pn,mn,hn,gn,_n,vn;const yn=he();let bn;new(fn=(R=new WeakMap,pn=class extends (gn=u){get innerValue(){return S(this,R)}set innerValue(e){w(this,R,e)}render(){let n=this.props,{name:a,required:o,children:c}=n,l=t(n,[`name`,`required`,`children`]),{innerValue:u}=this;return i(`div`,{className:`form-control`,tabIndex:-1,onBlur:this.save,children:[r(`input`,{hidden:!0,name:a,required:o,value:JSON.stringify(u)}),r(yn,s(e({},l),{onInitialize:e=>{var t;this.core=e,(t=l.onInitialize)==null||t.call(l,e)}}))]})}constructor(...e){var t;super(...e),t=this,o(this,`core`,void 0),C(this,R,{writable:!0,value:(vn(this),_n(this,this.props.defaultValue))}),o(this,`save`,()=>A(function*(){return t.core&&(t.innerValue=yield t.core.save())})())}},{e:[_n,vn],c:[bn,hn]}=x(pn,[[D,1,`innerValue`]],[O],gn),pn),mn=class extends T{constructor(){super(bn),o(this,`displayName`,`Editor`),hn()}},o(mn,fn,void 0),mn);const xn=ge({link:({data:{link:e}})=>`<a href="${e}">${e}</a>`}),Sn=n=>{let{data:i}=n,a=t(n,[`data`]);return r(`article`,s(e({},a),{dangerouslySetInnerHTML:{__html:xn.parse(i)}}))};Sn.displayName=`EditorHTML`;const z=n=>{let{className:i=``,children:a,maxWidth:o=`100%`,duration:c,height:l}=n,u=t(n,[`className`,`children`,`maxWidth`,`duration`,`height`]);return r(`div`,s(e({className:`overflow-hidden mw-100 ${i}`},u),{children:r(`div`,{className:`d-inline-block align-top text-nowrap lRDfma_scrollWrap`,style:{maxWidth:o,animationDuration:c,height:l,lineHeight:l},children:r(`div`,{className:`d-inline-block lRDfma_scrollItem`,style:{animationDuration:c},children:a})})}))},Cn=({children:e,maxWidth:t,duration:n,height:a})=>a?r(`div`,{className:`overflow-hidden lRDfma_scrollHeightWrap`,style:{maxWidth:t,"--scroll-height":a},children:i(`div`,{className:`d-inline-block overflow-hidden mw-100 lRDfma_scrollContainer`,children:[r(`div`,{className:`d-block overflow-hidden text-wrap text-break lRDfma_unScrollItem`,children:e}),r(z,{duration:n,children:e})]})}):r(z,{maxWidth:t,duration:n,height:a,children:e});z.displayName=`HorizontalMarquee`;const B=n=>{let{className:i,style:o,name:s,size:c}=n,l=t(n,[`className`,`style`,`name`,`size`]);return r(`span`,e({className:a(`bi-${s}`,i),style:e({fontSize:c&&`${c}rem`},o)},l))};B.displayName=`Icon`;const wn=({scope:e,children:t})=>{let a=typeof t==`string`?t:Wt(m(t)?t:r(n,{children:t}));return i(be,{code:a,scope:e,language:`tsx`,children:[r(ye,{className:`mb-3`}),r(_e,{}),r(ve,{className:`text-danger small p-2`})]})},Tn=n=>{let{className:a=``,children:o=`Loading...`}=n,c=t(n,[`className`,`children`]);return i(`div`,s(e({className:`fixed-top h-100 w-100 d-flex justify-content-center align-items-center opacity-25 bg-black ${a}`},c),{children:[r(Ae,{animation:`border`,variant:`success`}),r(`span`,{className:`ml-3 text-white`,children:o})]}))};Tn.displayName=`Loading`;const En=n=>{let{title:a,detail:o,children:c}=n,l=t(n,[`title`,`detail`,`children`]);return r(De,s(e({},l),{overlay:o?i(Oe,{children:[r(Oe.Header,{children:a}),r(Oe.Body,{children:o})]}):r(Pe,{children:a}),children:c}))};En.displayName=`OverlayBox`;let Dn;var V,On,kn,An,jn,Mn,Nn;let Pn;new(Dn=(V=new WeakMap,On=class extends (jn=te){get weekFormatter(){var e;let{locale:t=(e=globalThis.navigator)==null?void 0:e.language}=this.observedProps;return new Intl.DateTimeFormat(t,{weekday:`long`})}get currentDate(){return S(this,V)}set currentDate(e){w(this,V,e)}get dateGrid(){let e=new Date(this.currentDate);e.setDate(1),e=new Date(+e-e.getDay()*re);let t=Array.from(Array(42),(t,n)=>new Date(+e+n*re));return fe(t,7)}changeMonth(e){var t,n;this.currentDate=se(this.currentDate,e),(t=(n=this.props).onChange)==null||t.call(n,this.currentDate)}render(){let{weekFormatter:n,currentDate:a,dateGrid:o}=this,c=this.observedProps,{style:l,variant:u=`primary`,onChange:d,onSelect:f}=c,p=t(c,[`style`,`variant`,`onChange`,`onSelect`]);return i(je,s(e({},p),{style:e({tableLayout:`fixed`},l),children:[r(`caption`,{children:i(`div`,{className:`d-flex justify-content-between align-items-center`,children:[r(Se,{variant:u,onClick:()=>this.changeMonth(-1),children:`<`}),k(a,`YYYY-MM`),r(Se,{variant:u,onClick:()=>this.changeMonth(1),children:`>`})]})}),r(`thead`,{children:r(`tr`,{children:o[0].map((e,t,{length:i})=>r(`td`,{className:`bg-${u} text-white`,style:{width:`calc(100% / ${i})`},children:n.format(e)},t))})}),r(`tbody`,{children:o.map(e=>r(`tr`,{children:e.map(this.renderDate)},e[0]+``))})]}))}constructor(...e){super(...e),C(this,V,{writable:!0,value:(Nn(this),Mn(this,new Date))}),o(this,`renderDate`,e=>{let{variant:t=`primary`,value:n,onSelect:o}=this.observedProps,s=k(e,`YYYY-MM-DD`),c=n==null?void 0:n.filter(({date:e})=>k(e,`YYYY-MM-DD`)===s);return i(`td`,{className:a({"opacity-50":e.getMonth()!==this.currentDate.getMonth(),"fw-bold":s===k(new Date,`YYYY-MM-DD`)}),children:[r(`time`,{className:`d-block`,dateTime:e.toJSON(),children:e.getDate()}),c==null?void 0:c.map(e=>typeof e.content==`object`?e.content:r(En,{title:e.content,children:r(xe,{as:`a`,className:`d-inline-block text-decoration-none w-100 text-truncate`,bg:Jt(e.content+``,[`light`]),href:e.link,onClick:()=>o==null?void 0:o(e),children:e.content})},e.date+``))]},e+``)})}},{e:[Mn,Nn],c:[Pn,An]}=x(On,[[E,3,`weekFormatter`],[D,1,`currentDate`],[E,3,`dateGrid`]],[O],jn),On),kn=class extends T{constructor(){super(Pn),o(this,`displayName`,`MonthCalendar`),An()}},o(kn,Dn,void 0),kn);const Fn=({avatar:e,name:t})=>i(n,{children:[r(Re,{size:2,style:{marginRight:`0.5rem`},src:e}),r(`span`,{className:`align-middle`,children:t})]});Fn.displayName=`Nameplate`;let In;var H,U,Ln,Rn,zn,Bn,Vn,Hn,Un;const Wn=Array.from([,,,,,,],(e,t)=>`h${++t}`)+``;let Gn;new(In=(H=new WeakMap,U=new WeakMap,Ln=class extends (Bn=u){get list(){return S(this,H)}set list(e){w(this,H,e)}get scrollY(){return S(this,U)}set scrollY(e){w(this,U,e)}get currentActiveId(){var e;let{list:t,scrollY:n}=this;return(e=t[t.findIndex(({top:e})=>e>n)-1])==null?void 0:e.id}componentDidMount(){globalThis.document&&(window.addEventListener(`scroll`,this.updateScrollY),this.list=Array.from(document.querySelectorAll(Wn),e=>{var t;(t=e).id||(t.id=pe());let{id:n,tagName:r,textContent:i,offsetTop:a}=e;return{id:n,level:+r[1],text:i.trim(),top:a}}))}componentWillUnmount(){var e,t;(e=(t=globalThis).removeEventListener)==null||e.call(t,`scroll`,this.updateScrollY)}render(){let{list:n}=this,i=this.props,{style:a,variant:o=`underline`}=i,c=t(i,[`style`,`variant`]);return r(Ee,s(e({},c),{variant:o,style:e({flexDirection:`column`},a),children:n.map(this.renderLink)}))}constructor(...e){super(...e),C(this,H,{writable:!0,value:(Un(this),Vn(this,[]))}),C(this,U,{writable:!0,value:Hn(this,0)}),o(this,`updateScrollY`,()=>this.scrollY=window.scrollY),o(this,`scrollTo`,e=>()=>{var t,n;setTimeout(()=>ue(`[id="${e.id}"]`)),(t=(n=this.props).onItemClick)==null||t.call(n,e)}),o(this,`renderLink`,({id:e,level:t,text:n,top:i})=>{let{currentActiveId:a}=this,{depth:o=1/0}=this.props;return t<=o&&r(Ee.Item,{style:{textIndent:`${t-1}rem`},children:r(Ee.Link,{href:`#${e}`,active:a===e,onClick:this.scrollTo({id:e,level:t,text:n,top:i}),children:n})},e)})}},{e:[Vn,Hn,Un],c:[Gn,zn]}=x(Ln,[[D,1,`list`],[D,1,`scrollY`],[E,3,`currentActiveId`]],[O],Bn),Ln),Rn=class extends T{constructor(){super(Gn),o(this,`displayName`,`PageNav`),zn()}},o(Rn,In,void 0),Rn);let Kn;var W,G,K,qn,Jn,Yn,Xn,Zn,Qn,$n,er;let tr;new(Kn=(W=new WeakMap,G=new WeakMap,K=new WeakMap,qn=class extends (Xn=u){get scrollLeft(){return S(this,W)}set scrollLeft(e){w(this,W,e)}get scrollWidth(){return S(this,G)}set scrollWidth(e){w(this,G,e)}get clientWidth(){return S(this,K)}set clientWidth(e){w(this,K,e)}get canScrollLeft(){return this.scrollLeft>0}get canScrollRight(){return this.scrollLeft+this.clientWidth<this.scrollWidth}componentDidMount(){let e=this.updateScroll();e&&(e.addEventListener(`scroll`,this.updateScroll),this.resizeObserver=new ResizeObserver(this.updateScroll),this.resizeObserver.observe(e))}componentWillUnmount(){var e,t;(e=this.resizeObserver)==null||e.disconnect(),(t=this.scrollerRef.current)==null||t.removeEventListener(`scroll`,this.updateScroll)}render(){let{canScrollLeft:n,canScrollRight:a}=this,o=this.props,{className:c=``,children:l}=o,u=t(o,[`className`,`children`]);return i(`div`,{className:`position-relative overflow-y-hidden ${c}`,children:[n&&r(`button`,{type:`button`,className:`position-absolute top-0 bottom-0 start-0 z-1 border-0 px-2 aEvBXq_scrollButtonLeft`,"aria-label":`Scroll left`,onClick:this.scrollBy(-1),children:r(B,{name:`caret-left-fill`})}),r(`div`,{ref:this.scrollerRef,className:`overflow-x-auto aEvBXq_scrollerInner`,children:r(Ee,s(e({},u),{className:`flex-nowrap`,children:l}))}),a&&r(`button`,{type:`button`,className:`position-absolute top-0 bottom-0 end-0 z-1 border-0 px-2 aEvBXq_scrollButtonRight`,"aria-label":`Scroll right`,onClick:this.scrollBy(1),children:r(B,{name:`caret-right-fill`})})]})}constructor(...e){super(...e),o(this,`scrollerRef`,(er(this),p())),C(this,W,{writable:!0,value:Zn(this,0)}),C(this,G,{writable:!0,value:Qn(this,0)}),C(this,K,{writable:!0,value:$n(this,0)}),o(this,`updateScroll`,()=>{let e=this.scrollerRef.current;return e&&(this.scrollLeft=e.scrollLeft,this.scrollWidth=e.scrollWidth,this.clientWidth=e.clientWidth),e}),o(this,`resizeObserver`,void 0),o(this,`scrollBy`,e=>()=>{let t=this.scrollerRef.current;t&&t.scrollBy({left:e*t.clientWidth*.8,behavior:`smooth`})})}},{e:[Zn,Qn,$n,er],c:[tr,Yn]}=x(qn,[[D,1,`scrollLeft`],[D,1,`scrollWidth`],[D,1,`clientWidth`],[E,3,`canScrollLeft`],[E,3,`canScrollRight`]],[O],Xn),qn),Jn=class extends T{constructor(){super(tr),o(this,`displayName`,`ScrollNav`),Yn()}},o(Jn,Kn,void 0),Jn);const nr=n=>{let{value:i,children:a}=n,o=t(n,[`value`,`children`]);return r(j.Item,s(e({},o),{"data-value":i,children:a}))};nr.displayName=`Option`;const rr=({className:e,style:t,variant:n,menuVariant:o,children:s,value:c,onChange:l,valueRender:u})=>{let d=le(s).flat(1/0).find(e=>m(e)&&e.type===nr&&e.props.value===c);return i(j,{onClick:({target:e})=>{let t=e.closest(`.dropdown-item`);if(!t)return;let{value:n}=t.dataset;l==null||l(n)},children:[r(j.Toggle,{className:a(`w-100`,`d-flex`,`justify-content-between`,`align-items-center`,!n&&`bg-white text-dark`,e),style:t,variant:n,children:(u==null?void 0:u(c))||r(`div`,{className:d==null?void 0:d.props.className,children:d==null?void 0:d.props.children})}),r(j.Menu,{variant:o,children:s})]})};rr.displayName=`Select`;let ir;var q,J,ar,or,sr,cr,lr,ur,dr;function fr(e,t,n){return A(function*(){let r=yield Fe(e,{useCORS:!0});return new Promise((e,i)=>r.toBlob(t=>t?e(URL.createObjectURL(t)):i(),t,n))})()}let pr;new(ir=(q=new WeakMap,J=new WeakMap,ar=class extends (cr=u){get loading(){return S(this,q)}set loading(e){w(this,q,e)}get imageURI(){return S(this,J)}set imageURI(e){w(this,J,e)}componentDidMount(){var e,t;(e=(t=globalThis).addEventListener)==null||e.call(t,`resize`,this.generateImage)}componentWillUnmount(){var e,t;(e=(t=globalThis).removeEventListener)==null||e.call(t,`resize`,this.generateImage)}render(){let a=this.props,{className:o=``,children:c}=a,l=t(a,[`className`,`children`]),{loading:u,imageURI:d}=this;return i(n,{children:[u&&r(Tn,{}),i(`div`,s(e({},l),{ref:this.root,className:`position-relative ${o}`,onMouseEnter:d?void 0:this.generateImage,onTouchStart:d?void 0:this.generateImage,children:[c,d&&r(Te,{className:`position-absolute start-0 top-0 w-100 h-100`,src:d,alt:`Share Image`,fluid:!0,onClick:this.share})]}))]})}constructor(...t){var n;super(...t),n=this,o(this,`root`,(dr(this),p())),C(this,q,{writable:!0,value:lr(this,!1)}),C(this,J,{writable:!0,value:ur(this,``)}),o(this,`generateImage`,()=>A(function*(){n.imageURI&&(URL.revokeObjectURL(n.imageURI),n.imageURI=``),n.loading=!0,n.imageURI=yield fr(n.root.current),n.loading=!1})()),o(this,`share`,t=>A(function*(){var r,i;t.stopPropagation();let a=yield oe(n.imageURI),o=new File([a],`${n.props.title}.png`,{type:a.type});yield(r=(i=navigator).share)==null?void 0:r.call(i,e({files:[o]},n.props))})())}},{e:[lr,ur,dr],c:[pr,sr]}=x(ar,[[D,1,`loading`],[D,1,`imageURI`]],[O],cr),ar),or=class extends T{constructor(){super(pr),o(this,`displayName`,`ShareBox`),sr()}},o(or,ir,void 0),or);const mr=a=>{let{animation:o,loading:c,disabled:l,children:u}=a,d=t(a,[`animation`,`loading`,`disabled`,`children`]);return i(Se,s(e({},d),{disabled:c||l,children:[c&&i(n,{children:[r(Ae,{as:`span`,className:u?`me-2`:``,size:`sm`,animation:o,role:`status`,"aria-hidden":`true`}),!u&&r(`span`,{className:`visually-hidden`,children:`Loading...`})]}),u]}))};mr.displayName=`SpinnerButton`;const hr=n=>{let{animation:i=`border`,variant:a=`primary`,size:o,colSpan:c}=n,l=t(n,[`animation`,`variant`,`size`,`colSpan`]);return r(`tr`,s(e({},l),{children:r(`td`,{className:`text-center p-4`,colSpan:c,children:r(Ae,{animation:i,variant:a,size:o})})}))};hr.displayName=`TableSpinner`;let gr;var Y,X,_r,vr,yr,br,xr,Sr,Cr;let wr;new(gr=(Y=new WeakMap,X=new WeakMap,_r=class extends (br=u){get expanded(){return S(this,Y)}set expanded(e){w(this,Y,e)}get overflowed(){return S(this,X)}set overflowed(e){w(this,X,e)}componentDidMount(){this.checkOverflow(),window.addEventListener(`resize`,this.checkOverflow)}componentDidUpdate({rows:e,children:t}){!this.expanded&&(t!==this.props.children||e!==this.props.rows)&&this.checkOverflow()}componentWillUnmount(){window.removeEventListener(`resize`,this.checkOverflow)}render(){let n=this.props,{children:a,rows:o=3,expandText:c=`⏬`,collapseText:l=`⏫`}=n,u=t(n,[`children`,`rows`,`expandText`,`collapseText`]),{expanded:d,overflowed:f}=this,p={overflow:`hidden`,display:`-webkit-box`,WebkitBoxOrient:`vertical`,WebkitLineClamp:o};return i(`div`,s(e({},u),{children:[r(`p`,{ref:this.contentRef,style:d?void 0:p,children:a}),(f||d)&&r(`button`,{type:`button`,className:`bg-transparent border-0 p-0`,"aria-expanded":d,onClick:this.toggle,children:d?l:c})]}))}constructor(...e){super(...e),C(this,Y,{writable:!0,value:(Cr(this),xr(this,!1))}),C(this,X,{writable:!0,value:Sr(this,!1)}),o(this,`contentRef`,p()),o(this,`checkOverflow`,()=>{let{current:e}=this.contentRef;e&&(this.overflowed=e.scrollHeight>e.clientHeight)}),o(this,`toggle`,()=>{this.expanded=!this.expanded,this.expanded||requestAnimationFrame(this.checkOverflow)})}},{e:[xr,Sr,Cr],c:[wr,yr]}=x(_r,[[D,1,`expanded`],[D,1,`overflowed`]],[O],br),_r),vr=class extends T{constructor(){super(wr),o(this,`displayName`,`TextTruncate`),yr()}},o(vr,gr,void 0),vr);let Tr;var Z,Er,Dr,Or,kr,Ar=ne(({observedProps:{dateTime:e,format:t}})=>e+t),jr,Mr;let Q;new(Tr=(Z=new WeakMap,Er=class extends (kr=te){updateText(){let{dateTime:e,format:t}=this.props;return k(e,t)}get timeText(){return S(this,Z)}set timeText(e){w(this,Z,e)}componentDidMount(){super.componentDidMount(),this.timeText=this.updateText()}render(){let n=this.props,{dateTime:i}=n,a=t(n,[`dateTime`]);return r(`time`,s(e({dateTime:new Date(i).toJSON()},a),{children:this.timeText}))}constructor(...e){super(...e),C(this,Z,{writable:!0,value:(Mr(this),jr(this,this.updateText()))})}},{e:[jr,Mr],c:[Q,Or]}=x(Er,[[Ar,2,`updateText`],[D,1,`timeText`]],[O],kr),Er),Dr=class extends T{constructor(){super(Q),o(this,`displayName`,`Time`),Or()}},o(Dr,Tr,void 0),Dr);const Nr={ms:`millisecond(s)`,s:`second(s)`,m:`minute(s)`,H:`hour(s)`,D:`day(s)`,W:`week(s)`,M:`month(s)`,Y:`year(s)`},Pr=n=>{let{date:r,unitWords:a=Nr,beforeWord:o=` before`,afterWord:c=` after`}=n,l=t(n,[`date`,`unitWords`,`beforeWord`,`afterWord`]);r=new Date(r);let{distance:u,unit:d}=ce(r);return i(`time`,s(e({},l),{dateTime:r.toJSON(),title:r.toLocaleString(),children:[Math.abs(u),` `,a[d],u<0?o:c]}))};Pr.displayName=`TimeDistance`;const Fr=n=>{let{className:a,events:o,timeFormat:c}=n,l=t(n,[`className`,`events`,`timeFormat`]);return r(`ol`,s(e({className:`list-unstyled hsu__a_timeline ${a}`},l),{children:o.map(({title:t,summary:n,time:a,link:o,people:s})=>r(`li`,{className:`position-relative hsu__a_timelineItem hsu__a_right`,children:r(Ce,{children:i(Ce.Body,{className:`p-4 d-flex flex-column gap-3 align-items-center`,children:[r(`h3`,{className:`h5 m-0`,children:r(`a`,{className:`text-decoration-none stretched-link`,href:o,children:t})}),i(`div`,{className:`small text-muted d-flex gap-2`,children:[`⏲️`,r(Q,{dateTime:a[0],format:c}),a[1]&&`~`,a[1]&&r(Q,{dateTime:a[1],format:c})]}),r(`ul`,{className:`list-unstyled m-0 d-flex gap-2 flex-wrap justify-content-around`,children:s==null?void 0:s.map(t=>r(`li`,{children:r(Fn,e({},t))},t.name))}),r(`p`,{className:`m-0`,children:n})]})})},t))}))};Fr.displayName=`Timeline`;var Ir,Lr;const Rr=new Set([`warning`,`info`,`light`]);var zr=new WeakMap,Br=class{get messages(){return S(this,zr)}set messages(e){w(this,zr,e)}open(t){let n=pe(),r=Date.now(),{promise:i,resolve:a}=Promise.withResolvers();return this.messages=[...this.messages,s(e({id:n},t),{openedAt:r,resolve:a})],i}close(n){let r=this.messages.find(e=>e.id===n)||{},{resolve:i}=r,a=t(r,[`resolve`]);i==null||i(s(e({},a),{closedAt:Date.now()})),this.messages=this.messages.filter(e=>e.id!==n)}constructor(e=ae){o(this,`TimeScalar`,void 0),C(this,zr,{writable:!0,value:void 0}),o(this,`Component`,void 0),o(this,`renderMessage`,void 0),this.TimeScalar=e,w(this,zr,(Lr(this),Ir(this,[]))),this.Component=O(({position:e=`top-end`})=>r(Ne,{position:e,className:`position-fixed p-3`,children:this.messages.map(this.renderMessage)})),this.renderMessage=({id:e,openedAt:t,title:n,body:a,variant:o,delay:s=3e3})=>{let c=o&&!Rr.has(o)?`text-white`:void 0,l=!!n||s===0,u=this.TimeScalar.distanceOf(Date.now(),t).toShortString();return i(Me,{bg:o,delay:s,autohide:s!==0,onClose:()=>this.close(e),children:[l&&i(Me.Header,{children:[r(`strong`,{className:`me-auto`,children:n}),r(`small`,{children:u})]}),r(Me.Body,{className:c,children:a})]},e)},this.Component.displayName=`ToastComponent`}};({e:[Ir,Lr]}=x(Br,[[D,1,`messages`]],[]));let Vr;var $,Hr,Ur,Wr,Gr,Kr,qr;let Jr;new(Vr=($=new WeakMap,Hr=class extends (Gr=u){get echoed(){return S(this,$)}set echoed(e){w(this,$,e)}render(){let n=this.props,{className:i,text:o}=n,c=t(n,[`className`,`text`]),{echoed:l}=this;return r(`pre`,s(e({},c),{ref:this.init,className:a(`text-wrap`,i),children:l+(l===o?``:`_`)}))}constructor(...e){var t;super(...e),t=this,C(this,$,{writable:!0,value:(qr(this),Kr(this,``))}),o(this,`init`,e=>e&&new IntersectionObserver(([{isIntersecting:e}],n)=>A(function*(){if(!e)return;n.disconnect();let{text:r,intervals:i=150}=t.props;for(let e of r)yield de(i/1e3),t.echoed+=e})()).observe(e))}},{e:[Kr,qr],c:[Jr,Wr]}=x(Hr,[[D,1,`echoed`]],[O],Gr),Hr),Ur=class extends T{constructor(){super(Jr),o(this,`displayName`,`TypeEcho`),Wr()}},o(Ur,Vr,void 0),Ur);const Yr=({email:e,website:t})=>i(`address`,{className:`mb-0 d-flex justify-content-around gap-2`,children:[e&&r(`a`,{rel:`noreferrer`,target:`_blank`,href:`mailto:`+e,children:r(B,{name:`envelope`})}),t&&r(`a`,{rel:`noreferrer`,target:`_blank`,href:t,children:r(B,{name:`globe2`})})]}),Xr=`X5DLia_image`;var Zr=class extends f{render(){let n=this.props,{className:a=``,title:o,rank:c=[],linkOf:l}=n,u=t(n,[`className`,`title`,`rank`,`linkOf`]);return i(ke,s(e({className:`X5DLia_rankBox ${a}`},u),{children:[i(we,{sm:12,xs:12,lg:7,children:[i(`div`,{className:`shadow rounded-3 X5DLia_title`,children:[i(`div`,{className:`X5DLia_medal`,children:[r(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),r(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),r(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`})]}),r(`h3`,{"data-text":o,className:`position-relative m-auto mb-0 fw-bold text-center`,children:o})]}),r(ke,{as:`ul`,className:`mt-2 g-0 align-items-end text-center ps-0 pt-2 list-unstyled X5DLia_topUsers`,children:c.slice(0,3).map(this.renderMedal)})]}),r(we,{xs:12,sm:12,lg:5,children:r(je,{className:`my-3 pt-2 X5DLia_restUsers`,responsive:!0,children:r(`tbody`,{children:c.slice(3,10).map(this.renderRow)})})})]}))}constructor(...t){super(...t),o(this,`renderMedal`,t=>{var n,a;return i(we,{as:`li`,children:[r(`div`,{className:`shadow-lg overflow-hidden rounded-circle m-auto ${Xr}`,children:r(Te,{src:t.avatar,alt:t.name,loading:`lazy`,fluid:!0})}),i(`div`,{className:`position-relative overflow-hidden X5DLia_topUser`,children:[i(`div`,{className:`position-relative`,children:[r(`i`,{className:`d-block overflow-hidden m-auto mb-1 rounded-circle`}),r(`a`,{className:`d-block mb-0 stretched-link`,href:((n=(a=this.props).linkOf)==null?void 0:n.call(a,t))||`#`,children:t.name}),r(`strong`,{children:t.score})]}),r(Yr,e({},t))]})]},t.id)}),o(this,`renderRow`,(t,n,{length:a})=>{var o,s;return i(`tr`,{className:`position-relative`,children:[r(`td`,{className:`align-middle`,children:r(xe,{className:`fw-bold fst-italic`,children:(n+4+``).padStart((a+``).length,`0`)})}),i(`td`,{className:`position-relative mw-50 text-truncate X5DLia_name`,children:[r(`div`,{className:`d-inline-block overflow-hidden align-middle rounded-circle ${Xr}`,children:r(Te,{src:t.avatar,alt:t.name,loading:`lazy`,fluid:!0})}),r(`a`,{className:`ms-2 d-inline-block align-middle stretched-link`,style:{color:`rgb(248, ${(n+2)*15}, ${(n+2)*35})`},href:((o=(s=this.props).linkOf)==null?void 0:o.call(s,t))||`#`,children:t.name})]}),r(`td`,{className:`align-middle`,children:t.score}),r(`td`,{className:`align-middle`,children:r(Yr,e({},t))})]},t.id)})}};o(Zr,`displayName`,`UserRankView`);const Qr=n=>{let{className:i=``,children:a,duration:o}=n,c=t(n,[`className`,`children`,`duration`]);return r(`div`,s(e({className:`overflow-hidden ${i}`},c),{children:r(`div`,{className:`d-inline-block mw-100 mh-100 QBd6SG_scrollWrap`,style:{"--duration":o},children:r(`div`,{className:`d-inline-block QBd6SG_scrollItem`,children:a})})}))};Qr.displayName=`VerticalMarquee`;const $r=[`🐵`,`🐔`,`🐶`,`🐷`,`🐭`,`🐮`,`🐯`,`🐰`,`🐲`,`🐍`,`🐴`,`🐐`],ei=e=>{let t=e<0?e+1:e;return $r[(t%12+12)%12]},ti=n=>{let{className:a=``,itemClassName:o=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,startYear:c,endYear:l=new Date().getFullYear(),itemOf:u}=n,d=t(n,[`className`,`itemClassName`,`startYear`,`endYear`,`itemOf`]);return r(`ol`,s(e({className:`list-unstyled m-0 d-flex flex-wrap justify-content-center gap-3 ${a}`},d),{children:Array.from({length:l-c+1},(e,t)=>{let n=l-t;if(n===0)return null;let a=ei(n),{link:s=`#`,title:c}=(u==null?void 0:u(n,a))||{};return r(`li`,{className:o,children:i(`a`,{className:`d-inline-block p-3 text-decoration-none text-center`,href:s,children:[r(`div`,{className:`fs-1`,children:a}),c]})},n)})}))};ti.displayName=`ZodiacBar`;export{Re as Avatar,ze as ClickBoundary,Kt as CodeBlock,rn as Countdown,dn as Dialog,cn as DialogClose,bn as Editor,Sn as EditorHTML,z as HorizontalMarquee,Cn as HorizontalMarqueeBox,B as Icon,wn as LiveTSX,Tn as Loading,Pn as MonthCalendar,Fn as Nameplate,nr as Option,En as OverlayBox,Gn as PageNav,tr as ScrollNav,rr as Select,pr as ShareBox,mr as SpinnerButton,hr as TableSpinner,wr as TextTruncate,Q as Time,Pr as TimeDistance,Fr as Timeline,Br as Toast,Jr as TypeEcho,Zr as UserRankView,qt as VariantColors,Qr as VerticalMarquee,ti as ZodiacBar,$r as ZodiacSigns,Le as animate,fr as elementToImage,xn as parser,Jt as text2color,ei as zodiacOf};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "idea-react",
3
- "version": "2.3.3",
3
+ "version": "2.3.5",
4
4
  "license": "LGPL-3.0-or-later",
5
5
  "author": "shiy2008@gmail.com",
6
6
  "description": "A React advanced components library based on TypeScript & Bootstrap, built by idea2app remote developers team.",
@@ -4,7 +4,7 @@ import tsx from '@shikijs/langs/tsx';
4
4
  import ts from '@shikijs/langs/typescript';
5
5
  import githubLight from '@shikijs/themes/github-light';
6
6
  import { FC, HTMLAttributes, isValidElement } from 'react';
7
- import * as reactElementToJSXString from 'react-element-to-jsx-string';
7
+ import reactElementToJSXString from 'react-element-to-jsx-string';
8
8
  import { createHighlighterCoreSync } from 'shiki/core';
9
9
  import { createJavaScriptRegexEngine } from 'shiki/engine/javascript';
10
10
 
@@ -22,9 +22,8 @@ export const CodeBlock: FC<CodeBlockProps> = ({ className = '', language, childr
22
22
  const sourceCode =
23
23
  typeof children === 'string'
24
24
  ? children
25
- : reactElementToJSXString.default(
26
- isValidElement(children) ? children : <>{children}</>
27
- );
25
+ : reactElementToJSXString(isValidElement(children) ? children : <>{children}</>);
26
+
28
27
  const __html = highlighter.codeToHtml(sourceCode, {
29
28
  lang: language,
30
29
  theme: 'github-light',
package/tsdown.config.mts DELETED
@@ -1,34 +0,0 @@
1
- import swc from 'unplugin-swc';
2
- import { defineConfig } from 'tsdown';
3
-
4
- const SWC = swc.rolldown({
5
- tsconfigFile: 'tsconfig.json',
6
- jsc: {
7
- target: 'es2015',
8
- externalHelpers: true,
9
- parser: {
10
- syntax: 'typescript',
11
- tsx: true,
12
- decorators: true
13
- },
14
- transform: {
15
- decoratorVersion: '2022-03',
16
- useDefineForClassFields: true,
17
- react: {
18
- runtime: 'automatic'
19
- }
20
- }
21
- }
22
- });
23
-
24
- export default defineConfig({
25
- entry: 'source/index.ts',
26
- format: ['cjs', 'esm'],
27
- target: 'es2015',
28
- platform: 'browser',
29
- minify: true,
30
- dts: true,
31
- clean: true,
32
- logLevel: 'error',
33
- plugins: [SWC]
34
- });