idea-react 3.0.0-alpha.0 → 3.0.0-beta.0
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/AGENTS.md +31 -10
- package/ReadMe.md +75 -41
- package/dist/index.d.mts +451 -100
- package/dist/index.d.ts +451 -100
- package/dist/index.js +16 -16
- package/dist/index.mjs +15 -15
- package/dist/style.css +5 -5
- package/package.json +7 -8
- package/source/Avatar.tsx +65 -12
- package/source/Button.tsx +13 -4
- package/source/ButtonGroup.tsx +28 -0
- package/source/Card.tsx +34 -0
- package/source/ClickBoundary.tsx +6 -5
- package/source/CloseButton.tsx +23 -0
- package/source/CodeBlock.tsx +5 -3
- package/source/Countdown.tsx +2 -0
- package/source/Drawer.tsx +62 -0
- package/source/Editor.tsx +5 -8
- package/source/Form/Adorn.tsx +38 -0
- package/source/Form/Checkbox.tsx +73 -0
- package/source/Form/Chips.tsx +51 -0
- package/source/Form/Combobox.tsx +109 -0
- package/source/Form/Control.tsx +59 -0
- package/source/Form/DatePicker.tsx +89 -0
- package/source/Form/Feedback.tsx +29 -0
- package/source/Form/FloatingLabel.tsx +15 -0
- package/source/Form/InputGroup.tsx +23 -0
- package/source/Form/OTP.tsx +48 -0
- package/source/Form/PasswordStrength.tsx +157 -0
- package/source/Form/Primitives.tsx +46 -0
- package/source/Form/Radio.tsx +51 -0
- package/source/Form/Range.tsx +65 -0
- package/source/Form/Switch.tsx +35 -0
- package/source/Form/index.ts +15 -0
- package/source/Grid.tsx +92 -0
- package/source/HorizontalMarquee/index.tsx +4 -10
- package/source/Image.tsx +15 -0
- package/source/ListGroup.tsx +103 -0
- package/source/LiveTSX.tsx +1 -1
- package/source/Loading.tsx +4 -3
- package/source/Menu.tsx +99 -1
- package/source/MonthCalendar.tsx +60 -22
- package/source/NativeDialog/index.tsx +37 -1
- package/source/Nav.tsx +52 -0
- package/source/Navbar.tsx +58 -1
- package/source/Overlay.ts +22 -0
- package/source/OverlayBox.tsx +200 -32
- package/source/PageNav.tsx +56 -32
- package/source/Popover.tsx +36 -0
- package/source/ScrollNav/Scroller.tsx +107 -0
- package/source/ScrollNav/index.tsx +12 -99
- package/source/Select.tsx +66 -55
- package/source/ShareBox.tsx +5 -11
- package/source/Spinner.tsx +30 -0
- package/source/SpinnerButton.tsx +8 -10
- package/source/Table.tsx +59 -0
- package/source/TableSpinner.tsx +7 -5
- package/source/{TextTruncate.tsx → TextTruncate/Content.tsx} +24 -20
- package/source/TextTruncate/index.tsx +25 -0
- package/source/Time.tsx +7 -33
- package/source/TimeDistance.tsx +1 -1
- package/source/Timeline/index.tsx +7 -7
- package/source/Toast.tsx +120 -29
- package/source/ToggleButton.tsx +47 -0
- package/source/Tooltip.tsx +32 -0
- package/source/TypeEcho/Content.tsx +58 -0
- package/source/TypeEcho/index.tsx +14 -0
- package/source/UserRank/index.module.less +9 -20
- package/source/UserRank/index.tsx +35 -32
- package/source/VerticalMarquee/index.module.less +0 -1
- package/source/VerticalMarquee/index.tsx +3 -5
- package/source/ZodiacBar.tsx +1 -1
- package/source/animate.ts +4 -2
- package/source/color.ts +3 -5
- package/source/index.ts +14 -0
- package/source/TypeEcho.tsx +0 -49
package/dist/index.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{_ as e}from"@swc/helpers/_/_object_spread";import{_ as t}from"@swc/helpers/_/_object_without_properties";import{Fragment as
|
|
1
|
+
import{_ as e}from"@swc/helpers/_/_object_spread";import{_ as t}from"@swc/helpers/_/_object_spread_props";import{_ as n}from"@swc/helpers/_/_object_without_properties";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";import o from"classnames";import{_ as s}from"@swc/helpers/_/_define_property";import*as c from"react";import l,{Children as u,Component as d,Fragment as f,PureComponent as p,cloneElement as m,createRef as h,forwardRef as g,isValidElement as _}from"react";import v from"@shikijs/langs/javascript";import y from"@shikijs/langs/jsx";import b from"@shikijs/langs/tsx";import x from"@shikijs/langs/typescript";import S from"@shikijs/themes/github-dark";import C from"@shikijs/themes/github-light";import{createHighlighterCoreSync as w}from"shiki/core";import{createJavaScriptRegexEngine as ee}from"shiki/engine/javascript";import{_ as T}from"@swc/helpers/_/_apply_decs_2203_r";import{_ as E}from"@swc/helpers/_/_class_private_field_get";import{_ as D}from"@swc/helpers/_/_class_private_field_init";import{_ as O}from"@swc/helpers/_/_class_private_field_set";import{_ as k}from"@swc/helpers/_/_identity";import{action as A,computed as j,observable as M}from"mobx";import{observer as N}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 P,scrollTo as le,sleep as ue,splitArray as de,uniqueID as fe}from"web-utility";import{Defer as pe}from"iterable-observer";import{_ as F}from"@swc/helpers/_/_async_to_generator";import{createReactEditorJS as me}from"react-editor-js";import he from"editorjs-html";import{LiveEditor as ge,LiveError as _e,LivePreview as ve,LiveProvider as ye}from"react-live";import be from"html2canvas";var xe=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports);function Se(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 Ce=r=>{let{className:s,style:c,size:l,theme:u,subtle:d,src:f,alt:p,status:m,statusLabel:h=m,children:g}=r,_=n(r,[`className`,`style`,`size`,`theme`,`subtle`,`src`,`alt`,`status`,`statusLabel`,`children`]);return/*#__PURE__*/ a(`span`,t(e({className:o(`avatar`,typeof l==`string`&&`avatar-${l}`,u&&`theme-${u}`,d&&`avatar-subtle`,s),style:typeof l==`number`?e({"--bs-avatar-size":`${l}rem`},c):c},_),{children:[f?/*#__PURE__*/ i(`img`,{className:`avatar-img`,src:f,alt:p}):g,m&&/*#__PURE__*/ i(`span`,{className:`avatar-status status-${m}`,role:`img`,"aria-label":h})]}))};Ce.displayName=`Avatar`;const we=r=>{let{className:a,size:s,children:c}=r,l=n(r,[`className`,`size`,`children`]);return/*#__PURE__*/ i(`div`,t(e({className:o(`avatar-stack`,s&&`avatar-stack-${s}`,a)},l),{children:c}))};we.displayName=`AvatarStack`;const Te=e=>typeof e.href==`string`,Ee=r=>{let{variant:a=`solid`,theme:s,pill:c,className:l}=r,u=n(r,[`variant`,`theme`,`pill`,`className`]),d=o(`badge`,a!==`solid`&&`badge-${a}`,s&&`theme-${s}`,{"rounded-pill":c},l);return Te(u)?/*#__PURE__*/ i(`a`,t(e({},u),{className:d})):/*#__PURE__*/ i(`span`,t(e({},u),{className:d}))},De=e=>typeof e.href==`string`,Oe=e=>e.preventDefault(),I=r=>{let{variant:a,theme:s,size:c,icon:l,styled:u,disabled:d,className:f}=r,p=n(r,[`variant`,`theme`,`size`,`icon`,`styled`,`disabled`,`className`]),m=o(a?`btn-${a}`:l?void 0:`btn`,s&&`theme-${s}`,c&&`btn-${c}`,{"btn-icon":l,"btn-styled":u,disabled:d},f);return De(p)?/*#__PURE__*/ i(`a`,t(e({},p),{className:m,href:d?void 0:p.href,"aria-disabled":d||void 0,tabIndex:d?-1:p.tabIndex,onClick:d?Oe:p.onClick})):/*#__PURE__*/ i(`button`,t(e({},p),{type:p.type||`button`,className:m,disabled:d}))},ke=r=>{let{vertical:a,role:s=`group`,className:c}=r,l=n(r,[`vertical`,`role`,`className`]);return/*#__PURE__*/ i(`div`,t(e({role:s},l),{className:o(a?`btn-group-vertical`:`btn-group`,c)}))};ke.displayName=`ButtonGroup`;const Ae=r=>{let{className:a,role:s=`toolbar`}=r,c=n(r,[`className`,`role`]);return/*#__PURE__*/ i(`div`,t(e({role:s},c),{className:o(`btn-toolbar`,a)}))};Ae.displayName=`ButtonToolbar`;const je=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`card`,a)}))},Me=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`card-group`,a)}))},Ne=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`card-img-overlay`,a)}))},Pe=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`card-header`,a)}))},Fe=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`card-body`,a)}))},Ie=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`card-footer`,a)}))},Le=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`h3`,t(e({},s),{className:o(`card-title`,a)}))},Re=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`p`,t(e({},s),{className:o(`card-text`,a)}))};var ze=class extends p{componentDidMount(){window.addEventListener(`click`,this.switchClick,!0)}componentWillUnmount(){window.removeEventListener(`click`,this.switchClick,!0)}render(){let r=this.props,{children:a,onInnerClick:o,onOuterClick:s}=r,c=n(r,[`children`,`onInnerClick`,`onOuterClick`]);return/*#__PURE__*/ i(`div`,t(e({ref:this.root},c),{children:a}))}constructor(...e){super(...e),s(this,`root`,/*#__PURE__*/ h()),s(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 Be=r=>{let{dismiss:a,className:s,type:c=`button`,"aria-label":l=`Close`}=r,u=n(r,[`dismiss`,`className`,`type`,`aria-label`]);return/*#__PURE__*/ i(`button`,t(e({},u),{type:c,className:o(`btn-close`,s),"data-bs-dismiss":a,"aria-label":l}))};Be.displayName=`CloseButton`;
|
|
2
2
|
/*!
|
|
3
3
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
6
6
|
* Released under the MIT License.
|
|
7
7
|
*/
|
|
8
|
-
function
|
|
8
|
+
function Ve(e){return Object.prototype.toString.call(e)===`[object Object]`}function He(e){var t,n;return Ve(e)!==!1&&(t=e.constructor,t===void 0||(n=t.prototype,Ve(n)!==!1&&n.hasOwnProperty(`isPrototypeOf`)!==!1))}var Ue=/* @__PURE__ */ xe(((e,t,n)=>{var r=n&&n.__assign||function(){return r=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},r.apply(this,arguments)},i=n&&n.__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 a=[];function o(e){var t=typeof e;return e!==null&&(t===`object`||t===`function`)}function s(e){return Object.prototype.toString.call(e)===`[object RegExp]`}function c(e){return Object.getOwnPropertySymbols(e).filter(function(t){return Object.prototype.propertyIsEnumerable.call(e,t)})}function l(e,t,n){n===void 0&&(n=``);var u=r(r({},{indent:` `,singleQuotes:!0}),t),d=u.inlineCharacterLimit===void 0?{newLine:`
|
|
9
9
|
`,newLineOrSpace:`
|
|
10
10
|
`,pad:n,indent:n+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
11
|
`).replace(new RegExp(d.pad,`g`),n).replace(new RegExp(d.indent,`g`),n+u.indent)};if(a.indexOf(e)!==-1)return`"[Circular]"`;if(e==null||typeof e==`number`||typeof e==`boolean`||typeof e==`function`||typeof e==`symbol`||s(e))return String(e);if(e instanceof Date)return`new Date('${e.toISOString()}')`;if(Array.isArray(e)){if(e.length===0)return`[]`;a.push(e);var p=`[`+d.newLine+e.map(function(t,r){var i=e.length-1===r?d.newLine:`,`+d.newLineOrSpace,a=l(t,u,n+u.indent);return u.transform&&(a=u.transform(e,r,a)),d.indent+a+i}).join(``)+d.pad+`]`;return a.pop(),f(p)}if(o(e)){var m=i(i([],Object.keys(e),!0),c(e),!0);if(u.filter&&(m=m.filter(function(t){return u.filter&&u.filter(e,t)})),m.length===0)return`{}`;a.push(e);var p=`{`+d.newLine+m.map(function(t,r){var i=m.length-1===r?d.newLine:`,`+d.newLineOrSpace,a=typeof t==`symbol`,o=!a&&/^[a-z$_][a-z$_0-9]*$/i.test(t.toString()),s=a||o?t:l(t,u),c=l(e[t],u,n+u.indent);return u.transform&&(c=u.transform(e,t,c)),d.indent+String(s)+`: `+c+i}).join(``)+d.pad+`}`;return a.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=l})),
|
|
12
|
+
`?`\\n`:`\\r`}),u.singleQuotes?(e=e.replace(/\\?'/g,`\\'`),`'${e}'`):(e=e.replace(/"/g,`\\"`),`"${e}"`)}e.prettyPrint=l})),We=/* @__PURE__ */ xe((e=>{
|
|
13
13
|
/** @license React v16.13.1
|
|
14
14
|
* react-is.production.min.js
|
|
15
15
|
*
|
|
@@ -18,15 +18,15 @@ function Ge(e){return Object.prototype.toString.call(e)===`[object Object]`}func
|
|
|
18
18
|
* This source code is licensed under the MIT license found in the
|
|
19
19
|
* LICENSE file in the root directory of this source tree.
|
|
20
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}})),
|
|
22
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
23
|
-
`).map(function(e){return e.trim()}).join(``)},
|
|
24
|
-
${
|
|
25
|
-
${
|
|
26
|
-
`);return l&&d===`{true}`?(f+=`${e}`,p+=`${e}`):(f+=`${e}=${d}`,p+=`${e}=${d}`),{attributeFormattedInline:f,attributeFormattedMultiline:p,isMultilineAttribute:m}}),
|
|
27
|
-
`).map(function(e,t){return t===0?e:`${
|
|
28
|
-
`):t},
|
|
29
|
-
${
|
|
30
|
-
`,_+=
|
|
31
|
-
${
|
|
32
|
-
`,_+=P(C-1,g)),_+=`</${o}>`}else Ft(S,v,n,g,p)||(_+=` `),_+=`/>`;return _}),Rt=``,zt=`React.Fragment`,Bt=function(e,t,n){var r={};return t&&(r={key:t}),{type:`ReactElement`,displayName:e,props:r,defaultProps:{},childrens:n}},Vt=function(e){return!!e.key},Ht=function(e){return e.childrens.length===0},Ut=(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 Lt(Bt(r.useFragmentShortSyntax?Ht(e)||Vt(e)?zt:Rt:zt,a,o),t,n,r)}),Wt=[`<`,`>`,`{`,`}`],Gt=function(e){return Wt.some(function(t){return e.includes(t)})},Kt=function(e){return Gt(e)?`{\`${e}\`}`:e},qt=function(e){var t=e;return t.endsWith(` `)&&(t=t.replace(/^(.*?)(\s+)$/,`$1{'$2'}`)),t.startsWith(` `)&&(t=t.replace(/^(\s+)(.*)$/,`{'$1'}$2`)),t},L=(function(e,t,n,r){if(e.type===`number`)return String(e.value);if(e.type===`string`)return e.value?`${qt(Kt(String(e.value)))}`:``;if(e.type===`ReactElement`)return Lt(e,t,n,r);if(e.type===`ReactFragment`)return Ut(e,t,n,r);throw TypeError(`Unknow format type "${e.type}"`)}),Jt=(function(e,t){return L(e,!1,0,t)}),Yt=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 Jt(I(e,y),y)};const Xt=ee({themes:[y],langs:[h,g,v,_],engine:b()}),Zt=i=>{let{className:a=``,language:s,children:c}=i,l=t(i,[`className`,`language`,`children`]),u=typeof c==`string`?c:Yt(/*#__PURE__*/ m(c)?c:/*#__PURE__*/ r(n,{children:c})),d=Xt.codeToHtml(u,{lang:s,theme:`github-light`,structure:`inline`});return/*#__PURE__*/ r(`pre`,o(e({className:`m-0 language-${s} ${a}`},l),{children:/*#__PURE__*/ r(`code`,{dangerouslySetInnerHTML:{__html:d},className:`language-${s}`})}))},Qt=[`primary`,`secondary`,`success`,`danger`,`warning`,`info`,`dark`,`light`];function $t(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 en;var R,tn,nn,rn,an,on=re(e=>e.observedProps.endTime),sn,cn;let ln;new(en=(R=/*#__PURE__*/ new WeakMap,tn=class extends (an=ne){get rest(){return S(this,R)}set rest(e){w(this,R,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,ae)}componentWillUnmount(){super.componentWillUnmount(),this.stop()}render(){let n=this.props,{className:a=``,itemClassName:s=`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/*#__PURE__*/ r(`ol`,o(e({className:`list-unstyled m-0 ${a}`},d),{children:f.map(({value:e,label:t})=>/*#__PURE__*/ i(`li`,{className:s,children:[/*#__PURE__*/ r(`strong`,{children:(e+``).padStart(2,`0`)}),/*#__PURE__*/ r(`span`,{children:t})]},t))}))}constructor(...e){super(...e),C(this,R,{writable:!0,value:(cn(this),sn(this,0))}),s(this,`timer`,0),s(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:[sn,cn],c:[ln,rn]}=x(tn,[[D,1,`rest`],[E,3,`timeSections`],[on,2,`initTimer`]],[O],an),tn),nn=class extends T{constructor(){super(ln),s(this,`displayName`,`Countdown`),rn()}},s(nn,en,void 0),nn);var un,dn,fn,pn=class extends Error{constructor(e=`Dialog closed`){super(e)}},mn=/*#__PURE__*/ new WeakMap,hn=/*#__PURE__*/ new WeakMap,gn=class{get input(){return S(this,mn)}set input(e){w(this,mn,e)}get defer(){return S(this,hn)}set defer(e){w(this,hn,e)}open(e){return e&&(this.input=e),this.defer=new he,this.defer.promise.finally(()=>this.defer=void 0),this.defer.promise}constructor(t){C(this,mn,{writable:!0,value:(fn(this),un(this,{}))}),C(this,hn,{writable:!0,value:dn(this)}),s(this,`Component`,void 0),this.Component=O(n=>/*#__PURE__*/ r(t,o(e({},n,this.input),{defer:this.defer}))),this.Component.displayName=`DialogComponent`}};({e:[un,dn,fn]}=x(gn,[[D,1,`input`],[D,1,`defer`]],[]));let _n;var z,vn,yn,bn,xn,Sn,Cn;const wn=ge();let Tn;new(_n=(z=/*#__PURE__*/ new WeakMap,vn=class extends (xn=u){get innerValue(){return S(this,z)}set innerValue(e){w(this,z,e)}render(){let n=this.props,{name:a,required:s,children:c}=n,l=t(n,[`name`,`required`,`children`]),{innerValue:u}=this;return/*#__PURE__*/ i(`div`,{className:`form-control`,tabIndex:-1,onBlur:this.save,children:[/*#__PURE__*/ r(`input`,{hidden:!0,name:a,required:s,value:JSON.stringify(u)}),/*#__PURE__*/ r(wn,o(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,s(this,`core`,void 0),C(this,z,{writable:!0,value:(Cn(this),Sn(this,this.props.defaultValue))}),s(this,`save`,()=>A(function*(){return t.core&&(t.innerValue=yield t.core.save())})())}},{e:[Sn,Cn],c:[Tn,bn]}=x(vn,[[D,1,`innerValue`]],[O],xn),vn),yn=class extends T{constructor(){super(Tn),s(this,`displayName`,`Editor`),bn()}},s(yn,_n,void 0),yn);const En=_e({link:({data:{link:e}})=>`<a href="${e}">${e}</a>`}),Dn=n=>{let{data:i}=n,a=t(n,[`data`]);return/*#__PURE__*/ r(`article`,o(e({},a),{dangerouslySetInnerHTML:{__html:En.parse(i)}}))};Dn.displayName=`EditorHTML`;const B=n=>{let{className:i=``,children:a,maxWidth:s=`100%`,duration:c,height:l}=n,u=t(n,[`className`,`children`,`maxWidth`,`duration`,`height`]);return/*#__PURE__*/ r(`div`,o(e({className:`overflow-hidden mw-100 ${i}`},u),{children:/*#__PURE__*/ r(`div`,{className:`d-inline-block align-top text-nowrap lRDfma_scrollWrap`,style:{maxWidth:s,animationDuration:c,height:l,lineHeight:l},children:/*#__PURE__*/ r(`div`,{className:`d-inline-block lRDfma_scrollItem`,style:{animationDuration:c},children:a})})}))},On=({children:e,maxWidth:t,duration:n,height:a})=>a?/*#__PURE__*/ r(`div`,{className:`overflow-hidden lRDfma_scrollHeightWrap`,style:{maxWidth:t,"--scroll-height":a},children:/*#__PURE__*/ i(`div`,{className:`d-inline-block overflow-hidden mw-100 lRDfma_scrollContainer`,children:[/*#__PURE__*/ r(`div`,{className:`d-block overflow-hidden text-wrap text-break lRDfma_unScrollItem`,children:e}),/*#__PURE__*/ r(B,{duration:n,children:e})]})}):/*#__PURE__*/ r(B,{maxWidth:t,duration:n,height:a,children:e});B.displayName=`HorizontalMarquee`;const V=n=>{let{className:i,style:o,name:s,size:c}=n,l=t(n,[`className`,`style`,`name`,`size`]);return/*#__PURE__*/ r(`span`,e({className:a(`bi-${s}`,i),style:e({fontSize:c&&`${c}rem`},o)},l))};V.displayName=`Icon`;const kn=({scope:e,children:t})=>{let a=typeof t==`string`?t:Yt(/*#__PURE__*/ m(t)?t:/*#__PURE__*/ r(n,{children:t}));return/*#__PURE__*/ i(xe,{code:a,scope:e,language:`tsx`,children:[/*#__PURE__*/ r(be,{className:`mb-3`}),/*#__PURE__*/ r(ve,{}),/*#__PURE__*/ r(ye,{className:`text-danger small p-2`})]})},An=n=>{let{className:a=``,children:s=`Loading...`}=n,c=t(n,[`className`,`children`]);return/*#__PURE__*/ i(`div`,o(e({className:`fixed-top h-100 w-100 d-flex justify-content-center align-items-center opacity-25 bg-black ${a}`},c),{children:[/*#__PURE__*/ r(Ae,{animation:`border`,variant:`success`}),/*#__PURE__*/ r(`span`,{className:`ml-3 text-white`,children:s})]}))};An.displayName=`Loading`;var jn,Mn,Nn,Pn,Fn;const In=n=>{let{className:i}=n,s=t(n,[`className`]);return/*#__PURE__*/ r(Ue,o(e({},s),{className:a(`menu-item`,i)}))};let Ln;var Rn=/*#__PURE__*/ new WeakMap,zn=class extends (Mn=u){get open(){return S(this,Rn)}set open(e){w(this,Rn,e)}componentDidMount(){document.addEventListener(`pointerdown`,this.handleOutside)}componentWillUnmount(){document.removeEventListener(`pointerdown`,this.handleOutside)}items(){var e,t;return[...(e=(t=this.panel.current)==null?void 0:t.querySelectorAll(`a[href]:not([aria-disabled="true"]), button:not(:disabled):not([aria-disabled="true"])`))==null?[]:e].filter(e=>!e.closest(`[hidden]`))}render(){let n=this.props,{label:s,autoClose:c,align:l=`end`,menuClassName:u,toggleProps:d,onOpenChange:f,onKeyDown:p,onBlur:m,children:h,className:g,id:_}=n,v=t(n,[`label`,`autoClose`,`align`,`menuClassName`,`toggleProps`,`onOpenChange`,`onKeyDown`,`onBlur`,`children`,`className`,`id`]),{open:y}=this;return/*#__PURE__*/ i(`div`,o(e({},v),{ref:this.root,id:_,className:a(`position-relative`,g),onKeyDown:this.handleKeyDown,onBlur:this.handleBlur,children:[/*#__PURE__*/ r(Ue,o(e({},d),{ref:this.trigger,"aria-expanded":y,"aria-controls":_?`${_}-menu`:void 0,onClick:this.handleToggle,children:s})),/*#__PURE__*/ r(`div`,{ref:this.panel,id:_?`${_}-menu`:void 0,className:a(`menu top-100`,l===`end`?`end-0`:`start-0`,{show:y},u),hidden:!y,onClick:this.handleSelect,children:h})]}))}constructor(...e){super(...e),C(this,Rn,{writable:!0,value:(Fn(this),Nn(this,!1))}),s(this,`root`,/*#__PURE__*/ p()),s(this,`trigger`,/*#__PURE__*/ p()),s(this,`panel`,/*#__PURE__*/ p()),s(this,`setOpen`,Pn(this,e=>{var t,n;this.open!==e&&(this.open=e,(t=(n=this.props).onOpenChange)==null||t.call(n,e))})),s(this,`handleOutside`,({target:e})=>{var t;let{autoClose:n=!0}=this.props;n!==!1&&n!==`inside`&&e instanceof Node&&!((t=this.root.current)!=null&&t.contains(e))&&this.setOpen(!1)}),s(this,`handleKeyDown`,e=>{var t,n;(t=(n=this.props).onKeyDown)==null||t.call(n,e);let{key:r,defaultPrevented:i}=e;if(!i){if(r===`Escape`&&this.open){var a;return e.preventDefault(),this.setOpen(!1),(a=this.trigger.current)==null?void 0:a.focus()}if(r===`Tab`)return this.setOpen(!1);[`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(r)&&(e.preventDefault(),this.setOpen(!0),queueMicrotask(()=>{var e;let t=this.items(),n=t.findIndex(e=>e===document.activeElement),i=r===`Home`?0:t.length-1;r===`ArrowDown`&&(i=(n+1)%t.length),r===`ArrowUp`&&(i=n<=0?t.length-1:n-1),(e=t[i])==null||e.focus()}))}}),s(this,`handleBlur`,e=>{let{onBlur:t,autoClose:n=!0}=this.props;t==null||t(e);let{defaultPrevented:r,currentTarget:i,relatedTarget:a}=e;!r&&n!==!1&&n!==`inside`&&!i.contains(a)&&this.setOpen(!1)}),s(this,`handleToggle`,()=>this.setOpen(!this.open)),s(this,`handleSelect`,({target:e})=>{let{autoClose:t=!0}=this.props;t&&t!==`outside`&&e instanceof Element&&e.closest(`a[href], button:not(:disabled)`)&&this.setOpen(!1)})}};({e:[Nn,Pn,Fn],c:[Ln,jn]}=x(zn,[[D,1,`open`],[te,0,`setOpen`]],[O],Mn)),jn();const Bn=n=>{let{title:a,detail:s,children:c}=n,l=t(n,[`title`,`detail`,`children`]);return/*#__PURE__*/ r(De,o(e({},l),{overlay:s?/*#__PURE__*/ i(Oe,{children:[/*#__PURE__*/ r(Oe.Header,{children:a}),/*#__PURE__*/ r(Oe.Body,{children:s})]}):/*#__PURE__*/ r(Pe,{children:a}),children:c}))};Bn.displayName=`OverlayBox`;let Vn;var H,Hn,Un,Wn,Gn,Kn,qn;let Jn;new(Vn=(H=/*#__PURE__*/ new WeakMap,Hn=class extends (Gn=ne){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,H)}set currentDate(e){w(this,H,e)}get dateGrid(){let e=new Date(this.currentDate);e.setDate(1),e=/* @__PURE__ */ new Date(+e-e.getDay()*ie);let t=Array.from(Array(42),(t,n)=>new Date(+e+n*ie));return pe(t,7)}changeMonth(e){var t,n;this.currentDate=ce(this.currentDate,e),(t=(n=this.props).onChange)==null||t.call(n,this.currentDate)}render(){let{weekFormatter:n,currentDate:a,dateGrid:s}=this,c=this.observedProps,{style:l,variant:u=`primary`,onChange:d,onSelect:f}=c,p=t(c,[`style`,`variant`,`onChange`,`onSelect`]);return/*#__PURE__*/ i(je,o(e({},p),{style:e({tableLayout:`fixed`},l),children:[/*#__PURE__*/ r(`caption`,{children:/*#__PURE__*/ i(`div`,{className:`d-flex justify-content-between align-items-center`,children:[/*#__PURE__*/ r(Ce,{variant:u,onClick:()=>this.changeMonth(-1),children:`<`}),k(a,`YYYY-MM`),/*#__PURE__*/ r(Ce,{variant:u,onClick:()=>this.changeMonth(1),children:`>`})]})}),/*#__PURE__*/ r(`thead`,{children:/*#__PURE__*/ r(`tr`,{children:s[0].map((e,t,{length:i})=>/*#__PURE__*/ r(`td`,{className:`bg-${u} text-white`,style:{width:`calc(100% / ${i})`},children:n.format(e)},t))})}),/*#__PURE__*/ r(`tbody`,{children:s.map(e=>/*#__PURE__*/ r(`tr`,{children:e.map(this.renderDate)},e[0]+``))})]}))}constructor(...e){super(...e),C(this,H,{writable:!0,value:(qn(this),Kn(this,/* @__PURE__ */ new Date))}),s(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/*#__PURE__*/ i(`td`,{className:a({"opacity-50":e.getMonth()!==this.currentDate.getMonth(),"fw-bold":s===k(/* @__PURE__ */ new Date,`YYYY-MM-DD`)}),children:[/*#__PURE__*/ r(`time`,{className:`d-block`,dateTime:e.toJSON(),children:e.getDate()}),c==null?void 0:c.map(e=>typeof e.content==`object`?e.content:/*#__PURE__*/ r(Bn,{title:e.content,children:/*#__PURE__*/ r(Se,{as:`a`,className:`d-inline-block text-decoration-none w-100 text-truncate`,bg:$t(e.content+``,[`light`]),href:e.link,onClick:()=>o==null?void 0:o(e),children:e.content})},e.date+``))]},e+``)})}},{e:[Kn,qn],c:[Jn,Wn]}=x(Hn,[[E,3,`weekFormatter`],[D,1,`currentDate`],[E,3,`dateGrid`]],[O],Gn),Hn),Un=class extends T{constructor(){super(Jn),s(this,`displayName`,`MonthCalendar`),Wn()}},s(Un,Vn,void 0),Un);const Yn=({avatar:e,name:t})=>/*#__PURE__*/ i(n,{children:[/*#__PURE__*/ r(Re,{size:2,style:{marginRight:`0.5rem`},src:e}),/*#__PURE__*/ r(`span`,{className:`align-middle`,children:t})]});Yn.displayName=`Nameplate`;var Xn={hiddenBackdrop:`Ocw1GG_hiddenBackdrop`},Zn=class extends u{get open(){var e,t;return(e=(t=this.element.current)==null?void 0:t.open)!=null&&e}componentWillUnmount(){this.close()}render(){let n=this.props,{modal:i,keyboard:s,backdrop:c=!0,className:l,onCancel:u,onClick:d,onKeyDown:f}=n,p=t(n,[`modal`,`keyboard`,`backdrop`,`className`,`onCancel`,`onClick`,`onKeyDown`]);return/*#__PURE__*/ r(`dialog`,o(e({},p),{ref:this.element,className:a(`dialog`,c===!1&&Xn.hiddenBackdrop,l),"data-backdrop":c===!1?`false`:void 0,onCancel:this.handleCancel,onKeyDown:this.handleKeyDown,onClick:this.handleClick}))}constructor(...e){super(...e),s(this,`element`,/*#__PURE__*/ p()),s(this,`returnFocus`,void 0),s(this,`show`,()=>{if(this.open)return;let e=this.element.current;e&&(document.activeElement instanceof HTMLElement&&(this.returnFocus=document.activeElement),this.props.modal===!1?e.show():e.showModal())}),s(this,`close`,()=>{var e,t;this.open&&((e=this.element.current)==null||e.close(),(t=this.returnFocus)==null||t.focus())}),s(this,`handleCancel`,e=>{let{onCancel:t,keyboard:n=!0}=this.props;t==null||t(e);let{defaultPrevented:r}=e;e.preventDefault(),n&&!r&&this.close()}),s(this,`handleKeyDown`,e=>{let{onKeyDown:t,keyboard:n=!0}=this.props;t==null||t(e);let{key:r,defaultPrevented:i}=e;r===`Escape`&&n&&!i&&(e.preventDefault(),this.close())}),s(this,`handleClick`,e=>{let{onClick:t,backdrop:n=!0}=this.props;t==null||t(e);let{defaultPrevented:r,target:i,currentTarget:a,clientX:o,clientY:s}=e;if(n!==!0||r||i!==a)return;let{left:c,right:l,top:u,bottom:d}=a.getBoundingClientRect();(o<c||o>l||s<u||s>d)&&this.close()})}};const Qn=n=>{let{expand:i,className:s}=n,c=t(n,[`expand`,`className`]);return/*#__PURE__*/ r(`nav`,o(e({},c),{className:a(`navbar`,i&&(i===!0?`navbar-expand`:`${i}:navbar-expand`),s)}))};let $n;var U,W,er,tr,nr,rr,ir,ar,or;const sr=Array.from([,,,,,,],(e,t)=>`h${++t}`)+``;let cr;new($n=(U=/*#__PURE__*/ new WeakMap,W=/*#__PURE__*/ new WeakMap,er=class extends (rr=u){get list(){return S(this,U)}set list(e){w(this,U,e)}get scrollY(){return S(this,W)}set scrollY(e){w(this,W,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(sr),e=>{var t;(t=e).id||(t.id=me());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:s=`underline`}=i,c=t(i,[`style`,`variant`]);return/*#__PURE__*/ r(M,o(e({},c),{variant:s,style:e({flexDirection:`column`},a),children:n.map(this.renderLink)}))}constructor(...e){super(...e),C(this,U,{writable:!0,value:(or(this),ir(this,[]))}),C(this,W,{writable:!0,value:ar(this,0)}),s(this,`updateScrollY`,()=>this.scrollY=window.scrollY),s(this,`scrollTo`,e=>()=>{var t,n;setTimeout(()=>de(`[id="${e.id}"]`)),(t=(n=this.props).onItemClick)==null||t.call(n,e)}),s(this,`renderLink`,({id:e,level:t,text:n,top:i})=>{let{currentActiveId:a}=this,{depth:o=1/0}=this.props;return t<=o&&/*#__PURE__*/ r(M.Item,{style:{textIndent:`${t-1}rem`},children:/*#__PURE__*/ r(M.Link,{href:`#${e}`,active:a===e,onClick:this.scrollTo({id:e,level:t,text:n,top:i}),children:n})},e)})}},{e:[ir,ar,or],c:[cr,nr]}=x(er,[[D,1,`list`],[D,1,`scrollY`],[E,3,`currentActiveId`]],[O],rr),er),tr=class extends T{constructor(){super(cr),s(this,`displayName`,`PageNav`),nr()}},s(tr,$n,void 0),tr);let lr;var G,K,q,ur,dr,fr,pr,mr,hr,gr,_r;let vr;new(lr=(G=/*#__PURE__*/ new WeakMap,K=/*#__PURE__*/ new WeakMap,q=/*#__PURE__*/ new WeakMap,ur=class extends (pr=u){get scrollLeft(){return S(this,G)}set scrollLeft(e){w(this,G,e)}get scrollWidth(){return S(this,K)}set scrollWidth(e){w(this,K,e)}get clientWidth(){return S(this,q)}set clientWidth(e){w(this,q,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,s=this.props,{className:c=``,children:l}=s,u=t(s,[`className`,`children`]);return/*#__PURE__*/ i(`div`,{className:`position-relative overflow-y-hidden ${c}`,children:[n&&/*#__PURE__*/ 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:/*#__PURE__*/ r(V,{name:`caret-left-fill`})}),/*#__PURE__*/ r(`div`,{ref:this.scrollerRef,className:`overflow-x-auto aEvBXq_scrollerInner`,children:/*#__PURE__*/ r(M,o(e({},u),{className:`flex-nowrap`,children:l}))}),a&&/*#__PURE__*/ 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:/*#__PURE__*/ r(V,{name:`caret-right-fill`})})]})}constructor(...e){super(...e),s(this,`scrollerRef`,(_r(this),/*#__PURE__*/ p())),C(this,G,{writable:!0,value:mr(this,0)}),C(this,K,{writable:!0,value:hr(this,0)}),C(this,q,{writable:!0,value:gr(this,0)}),s(this,`updateScroll`,()=>{let e=this.scrollerRef.current;return e&&(this.scrollLeft=e.scrollLeft,this.scrollWidth=e.scrollWidth,this.clientWidth=e.clientWidth),e}),s(this,`resizeObserver`,void 0),s(this,`scrollBy`,e=>()=>{let t=this.scrollerRef.current;t&&t.scrollBy({left:e*t.clientWidth*.8,behavior:`smooth`})})}},{e:[mr,hr,gr,_r],c:[vr,fr]}=x(ur,[[D,1,`scrollLeft`],[D,1,`scrollWidth`],[D,1,`clientWidth`],[E,3,`canScrollLeft`],[E,3,`canScrollRight`]],[O],pr),ur),dr=class extends T{constructor(){super(vr),s(this,`displayName`,`ScrollNav`),fr()}},s(dr,lr,void 0),dr);const yr=n=>{let{value:i,children:a}=n,s=t(n,[`value`,`children`]);return/*#__PURE__*/ r(j.Item,o(e({},s),{"data-value":i,children:a}))};yr.displayName=`Option`;const br=({className:e,style:t,variant:n,menuVariant:o,children:s,value:c,onChange:l,valueRender:u})=>{let d=ue(s).flat(1/0).find(e=>/*#__PURE__*/ m(e)&&e.type===yr&&e.props.value===c);return/*#__PURE__*/ i(j,{onClick:({target:e})=>{let t=e.closest(`.dropdown-item`);if(!t)return;let{value:n}=t.dataset;l==null||l(n)},children:[/*#__PURE__*/ 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))||/*#__PURE__*/ r(`div`,{className:d==null?void 0:d.props.className,children:d==null?void 0:d.props.children})}),/*#__PURE__*/ r(j.Menu,{variant:o,children:s})]})};br.displayName=`Select`;let xr;var J,Y,Sr,Cr,wr,Tr,Er,Dr,Or;function kr(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 Ar;new(xr=(J=/*#__PURE__*/ new WeakMap,Y=/*#__PURE__*/ new WeakMap,Sr=class extends (Tr=u){get loading(){return S(this,J)}set loading(e){w(this,J,e)}get imageURI(){return S(this,Y)}set imageURI(e){w(this,Y,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:s=``,children:c}=a,l=t(a,[`className`,`children`]),{loading:u,imageURI:d}=this;return/*#__PURE__*/ i(n,{children:[u&&/*#__PURE__*/ r(An,{}),/*#__PURE__*/ i(`div`,o(e({},l),{ref:this.root,className:`position-relative ${s}`,onMouseEnter:d?void 0:this.generateImage,onTouchStart:d?void 0:this.generateImage,children:[c,d&&/*#__PURE__*/ r(Ee,{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,s(this,`root`,(Or(this),/*#__PURE__*/ p())),C(this,J,{writable:!0,value:Er(this,!1)}),C(this,Y,{writable:!0,value:Dr(this,``)}),s(this,`generateImage`,()=>A(function*(){n.imageURI&&(URL.revokeObjectURL(n.imageURI),n.imageURI=``),n.loading=!0,n.imageURI=yield kr(n.root.current),n.loading=!1})()),s(this,`share`,t=>A(function*(){var r,i;t.stopPropagation();let a=yield se(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:[Er,Dr,Or],c:[Ar,wr]}=x(Sr,[[D,1,`loading`],[D,1,`imageURI`]],[O],Tr),Sr),Cr=class extends T{constructor(){super(Ar),s(this,`displayName`,`ShareBox`),wr()}},s(Cr,xr,void 0),Cr);const jr=a=>{let{animation:s,loading:c,disabled:l,children:u}=a,d=t(a,[`animation`,`loading`,`disabled`,`children`]);return/*#__PURE__*/ i(Ce,o(e({},d),{disabled:c||l,children:[c&&/*#__PURE__*/ i(n,{children:[/*#__PURE__*/ r(Ae,{as:`span`,className:u?`me-2`:``,size:`sm`,animation:s,role:`status`,"aria-hidden":`true`}),!u&&/*#__PURE__*/ r(`span`,{className:`visually-hidden`,children:`Loading...`})]}),u]}))};jr.displayName=`SpinnerButton`;const Mr=n=>{let{animation:i=`border`,variant:a=`primary`,size:s,colSpan:c}=n,l=t(n,[`animation`,`variant`,`size`,`colSpan`]);return/*#__PURE__*/ r(`tr`,o(e({},l),{children:/*#__PURE__*/ r(`td`,{className:`text-center p-4`,colSpan:c,children:/*#__PURE__*/ r(Ae,{animation:i,variant:a,size:s})})}))};Mr.displayName=`TableSpinner`;let Nr;var X,Z,Pr,Fr,Ir,Lr,Rr,zr,Br;let Vr;new(Nr=(X=/*#__PURE__*/ new WeakMap,Z=/*#__PURE__*/ new WeakMap,Pr=class extends (Lr=u){get expanded(){return S(this,X)}set expanded(e){w(this,X,e)}get overflowed(){return S(this,Z)}set overflowed(e){w(this,Z,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:s=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:s};return/*#__PURE__*/ i(`div`,o(e({},u),{children:[/*#__PURE__*/ r(`p`,{ref:this.contentRef,style:d?void 0:p,children:a}),(f||d)&&/*#__PURE__*/ 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,X,{writable:!0,value:(Br(this),Rr(this,!1))}),C(this,Z,{writable:!0,value:zr(this,!1)}),s(this,`contentRef`,/*#__PURE__*/ p()),s(this,`checkOverflow`,()=>{let{current:e}=this.contentRef;e&&(this.overflowed=e.scrollHeight>e.clientHeight)}),s(this,`toggle`,()=>{this.expanded=!this.expanded,this.expanded||requestAnimationFrame(this.checkOverflow)})}},{e:[Rr,zr,Br],c:[Vr,Ir]}=x(Pr,[[D,1,`expanded`],[D,1,`overflowed`]],[O],Lr),Pr),Fr=class extends T{constructor(){super(Vr),s(this,`displayName`,`TextTruncate`),Ir()}},s(Fr,Nr,void 0),Fr);let Hr;var Q,Ur,Wr,Gr,Kr,qr=re(({observedProps:{dateTime:e,format:t}})=>e+t),Jr,Yr;let $;new(Hr=(Q=/*#__PURE__*/ new WeakMap,Ur=class extends (Kr=ne){updateText(){let{dateTime:e,format:t}=this.props;return k(e,t)}get timeText(){return S(this,Q)}set timeText(e){w(this,Q,e)}componentDidMount(){super.componentDidMount(),this.timeText=this.updateText()}render(){let n=this.props,{dateTime:i}=n,a=t(n,[`dateTime`]);return/*#__PURE__*/ r(`time`,o(e({dateTime:new Date(i).toJSON()},a),{children:this.timeText}))}constructor(...e){super(...e),C(this,Q,{writable:!0,value:(Yr(this),Jr(this,this.updateText()))})}},{e:[Jr,Yr],c:[$,Gr]}=x(Ur,[[qr,2,`updateText`],[D,1,`timeText`]],[O],Kr),Ur),Wr=class extends T{constructor(){super($),s(this,`displayName`,`Time`),Gr()}},s(Wr,Hr,void 0),Wr);const Xr={ms:`millisecond(s)`,s:`second(s)`,m:`minute(s)`,H:`hour(s)`,D:`day(s)`,W:`week(s)`,M:`month(s)`,Y:`year(s)`},Zr=n=>{let{date:r,unitWords:a=Xr,beforeWord:s=` before`,afterWord:c=` after`}=n,l=t(n,[`date`,`unitWords`,`beforeWord`,`afterWord`]);r=new Date(r);let{distance:u,unit:d}=le(r);return/*#__PURE__*/ i(`time`,o(e({},l),{dateTime:r.toJSON(),title:r.toLocaleString(),children:[Math.abs(u),` `,a[d],u<0?s:c]}))};Zr.displayName=`TimeDistance`;const Qr=n=>{let{className:a,events:s,timeFormat:c}=n,l=t(n,[`className`,`events`,`timeFormat`]);return/*#__PURE__*/ r(`ol`,o(e({className:`list-unstyled hsu__a_timeline ${a}`},l),{children:s.map(({title:t,summary:n,time:a,link:o,people:s})=>/*#__PURE__*/ r(`li`,{className:`position-relative hsu__a_timelineItem hsu__a_right`,children:/*#__PURE__*/ r(we,{children:/*#__PURE__*/ i(we.Body,{className:`p-4 d-flex flex-column gap-3 align-items-center`,children:[/*#__PURE__*/ r(`h3`,{className:`h5 m-0`,children:/*#__PURE__*/ r(`a`,{className:`text-decoration-none stretched-link`,href:o,children:t})}),/*#__PURE__*/ i(`div`,{className:`small text-muted d-flex gap-2`,children:[`⏲️`,/*#__PURE__*/ r($,{dateTime:a[0],format:c}),a[1]&&`~`,a[1]&&/*#__PURE__*/ r($,{dateTime:a[1],format:c})]}),/*#__PURE__*/ r(`ul`,{className:`list-unstyled m-0 d-flex gap-2 flex-wrap justify-content-around`,children:s==null?void 0:s.map(t=>/*#__PURE__*/ r(`li`,{children:/*#__PURE__*/ r(Yn,e({},t))},t.name))}),/*#__PURE__*/ r(`p`,{className:`m-0`,children:n})]})})},t))}))};Qr.displayName=`Timeline`;var $r,ei;const ti=/* @__PURE__ */ new Set([`warning`,`info`,`light`]);var ni=/*#__PURE__*/ new WeakMap,ri=class{get messages(){return S(this,ni)}set messages(e){w(this,ni,e)}open(t){let n=me(),r=Date.now(),{promise:i,resolve:a}=Promise.withResolvers();return this.messages=[...this.messages,o(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(o(e({},a),{closedAt:Date.now()})),this.messages=this.messages.filter(e=>e.id!==n)}constructor(e=oe){s(this,`TimeScalar`,void 0),C(this,ni,{writable:!0,value:void 0}),s(this,`Component`,void 0),s(this,`renderMessage`,void 0),this.TimeScalar=e,w(this,ni,(ei(this),$r(this,[]))),this.Component=O(({position:e=`top-end`})=>/*#__PURE__*/ 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&&!ti.has(o)?`text-white`:void 0,l=!!n||s===0,u=this.TimeScalar.distanceOf(Date.now(),t).toShortString();return/*#__PURE__*/ i(Me,{bg:o,delay:s,autohide:s!==0,onClose:()=>this.close(e),children:[l&&/*#__PURE__*/ i(Me.Header,{children:[/*#__PURE__*/ r(`strong`,{className:`me-auto`,children:n}),/*#__PURE__*/ r(`small`,{children:u})]}),/*#__PURE__*/ r(Me.Body,{className:c,children:a})]},e)},this.Component.displayName=`ToastComponent`}};({e:[$r,ei]}=x(ri,[[D,1,`messages`]],[]));let ii;var ai,oi,si,ci,li,ui,di;let fi;new(ii=(ai=/*#__PURE__*/ new WeakMap,oi=class extends (li=u){get echoed(){return S(this,ai)}set echoed(e){w(this,ai,e)}render(){let n=this.props,{className:i,text:s}=n,c=t(n,[`className`,`text`]),{echoed:l}=this;return/*#__PURE__*/ r(`pre`,o(e({},c),{ref:this.init,className:a(`text-wrap`,i),children:l+(l===s?``:`_`)}))}constructor(...e){var t;super(...e),t=this,C(this,ai,{writable:!0,value:(di(this),ui(this,``))}),s(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 fe(i/1e3),t.echoed+=e})()).observe(e))}},{e:[ui,di],c:[fi,ci]}=x(oi,[[D,1,`echoed`]],[O],li),oi),si=class extends T{constructor(){super(fi),s(this,`displayName`,`TypeEcho`),ci()}},s(si,ii,void 0),si);const pi=({email:e,website:t})=>/*#__PURE__*/ i(`address`,{className:`mb-0 d-flex justify-content-around gap-2`,children:[e&&/*#__PURE__*/ r(`a`,{rel:`noreferrer`,target:`_blank`,href:`mailto:`+e,children:/*#__PURE__*/ r(V,{name:`envelope`})}),t&&/*#__PURE__*/ r(`a`,{rel:`noreferrer`,target:`_blank`,href:t,children:/*#__PURE__*/ r(V,{name:`globe2`})})]}),mi=`X5DLia_image`;var hi=class extends f{render(){let n=this.props,{className:a=``,title:s,rank:c=[],linkOf:l}=n,u=t(n,[`className`,`title`,`rank`,`linkOf`]);return/*#__PURE__*/ i(ke,o(e({className:`X5DLia_rankBox ${a}`},u),{children:[/*#__PURE__*/ i(Te,{sm:12,xs:12,lg:7,children:[/*#__PURE__*/ i(`div`,{className:`shadow rounded-3 X5DLia_title`,children:[/*#__PURE__*/ i(`div`,{className:`X5DLia_medal`,children:[/*#__PURE__*/ r(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),/*#__PURE__*/ r(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),/*#__PURE__*/ r(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`})]}),/*#__PURE__*/ r(`h3`,{"data-text":s,className:`position-relative m-auto mb-0 fw-bold text-center`,children:s})]}),/*#__PURE__*/ 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)})]}),/*#__PURE__*/ r(Te,{xs:12,sm:12,lg:5,children:/*#__PURE__*/ r(je,{className:`my-3 pt-2 X5DLia_restUsers`,responsive:!0,children:/*#__PURE__*/ r(`tbody`,{children:c.slice(3,10).map(this.renderRow)})})})]}))}constructor(...t){super(...t),s(this,`renderMedal`,t=>{var n,a;return/*#__PURE__*/ i(Te,{as:`li`,children:[/*#__PURE__*/ r(`div`,{className:`shadow-lg overflow-hidden rounded-circle m-auto ${mi}`,children:/*#__PURE__*/ r(Ee,{src:t.avatar,alt:t.name,loading:`lazy`,fluid:!0})}),/*#__PURE__*/ i(`div`,{className:`position-relative overflow-hidden X5DLia_topUser`,children:[/*#__PURE__*/ i(`div`,{className:`position-relative`,children:[/*#__PURE__*/ r(`i`,{className:`d-block overflow-hidden m-auto mb-1 rounded-circle`}),/*#__PURE__*/ 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}),/*#__PURE__*/ r(`strong`,{children:t.score})]}),/*#__PURE__*/ r(pi,e({},t))]})]},t.id)}),s(this,`renderRow`,(t,n,{length:a})=>{var o,s;return/*#__PURE__*/ i(`tr`,{className:`position-relative`,children:[/*#__PURE__*/ r(`td`,{className:`align-middle`,children:/*#__PURE__*/ r(Se,{className:`fw-bold fst-italic`,children:(n+4+``).padStart((a+``).length,`0`)})}),/*#__PURE__*/ i(`td`,{className:`position-relative mw-50 text-truncate X5DLia_name`,children:[/*#__PURE__*/ r(`div`,{className:`d-inline-block overflow-hidden align-middle rounded-circle ${mi}`,children:/*#__PURE__*/ r(Ee,{src:t.avatar,alt:t.name,loading:`lazy`,fluid:!0})}),/*#__PURE__*/ 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})]}),/*#__PURE__*/ r(`td`,{className:`align-middle`,children:t.score}),/*#__PURE__*/ r(`td`,{className:`align-middle`,children:/*#__PURE__*/ r(pi,e({},t))})]},t.id)})}};s(hi,`displayName`,`UserRankView`);const gi=n=>{let{className:i=``,children:a,duration:s}=n,c=t(n,[`className`,`children`,`duration`]);return/*#__PURE__*/ r(`div`,o(e({className:`overflow-hidden ${i}`},c),{children:/*#__PURE__*/ r(`div`,{className:`d-inline-block mw-100 mh-100 QBd6SG_scrollWrap`,style:{"--duration":s},children:/*#__PURE__*/ r(`div`,{className:`d-inline-block QBd6SG_scrollItem`,children:a})})}))};gi.displayName=`VerticalMarquee`;const _i=[`🐵`,`🐔`,`🐶`,`🐷`,`🐭`,`🐮`,`🐯`,`🐰`,`🐲`,`🐍`,`🐴`,`🐐`],vi=e=>{let t=e<0?e+1:e;return _i[(t%12+12)%12]},yi=n=>{let{className:a=``,itemClassName:s=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,startYear:c,endYear:l=(/* @__PURE__ */ new Date()).getFullYear(),itemOf:u}=n,d=t(n,[`className`,`itemClassName`,`startYear`,`endYear`,`itemOf`]);return/*#__PURE__*/ r(`ol`,o(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=vi(n),{link:o=`#`,title:c}=(u==null?void 0:u(n,a))||{};return/*#__PURE__*/ r(`li`,{className:s,children:/*#__PURE__*/ i(`a`,{className:`d-inline-block p-3 text-decoration-none text-center`,href:o,children:[/*#__PURE__*/ r(`div`,{className:`fs-1`,children:a}),c]})},n)})}))};yi.displayName=`ZodiacBar`;export{Re as Avatar,Be as Badge,Ue as Button,We as ClickBoundary,Zt as CodeBlock,ln as Countdown,gn as Dialog,pn as DialogClose,Tn as Editor,Dn as EditorHTML,B as HorizontalMarquee,On as HorizontalMarqueeBox,V as Icon,kn as LiveTSX,An as Loading,Ln as Menu,In as MenuItem,Jn as MonthCalendar,Yn as Nameplate,Zn as NativeDialog,Qn as Navbar,yr as Option,Bn as OverlayBox,cr as PageNav,vr as ScrollNav,br as Select,Ar as ShareBox,jr as SpinnerButton,Mr as TableSpinner,Vr as TextTruncate,$ as Time,Zr as TimeDistance,Qr as Timeline,ri as Toast,fi as TypeEcho,hi as UserRankView,Qt as VariantColors,gi as VerticalMarquee,yi as ZodiacBar,_i as ZodiacSigns,Le as animate,kr as elementToImage,En as parser,$t as text2color,vi as zodiacOf};
|
|
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}})),Ge=/* @__PURE__ */ xe(((e,t)=>{t.exports=We()})),Ke=Ue(),L=Ge(),R=(function(e,t){return e===0?``:Array(e*t).fill(` `).join(``)});function qe(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 Je(e){if(Array.isArray(e))return qe(e)}function Ye(e,t,n){return(t=nt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xe(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Ze(){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 Qe(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 $e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Qe(Object(n),!0).forEach(function(t){Ye(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function et(e){return Je(e)||Xe(e)||rt(e)||Ze()}function tt(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 nt(e){var t=tt(e,`string`);return typeof t==`symbol`?t:t+``}function z(e){"@babel/helpers - typeof";return z=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},z(e)}function rt(e,t){if(e){if(typeof e==`string`)return qe(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)?qe(e,t):void 0}}function it(e,t){if(e===null||z(e)!==`object`||e instanceof Date||e instanceof RegExp)return e;if(/*#__PURE__*/ c.isValidElement(e)){var n=$e({},e);return delete n._owner,n}return t.add(e),Array.isArray(e)?e.map(function(e){return it(e,t)}):Object.keys(e).sort().reduce(function(n,r){return n[r]=r===`current`||t.has(e[r])?`[Circular]`:it(e[r],t),n},{})}function at(e){return it(e,/* @__PURE__ */ new WeakSet)}var ot=function(e){return{type:`string`,value:e}},st=function(e){return{type:`number`,value:e}},ct=function(e,t,n,r){return{type:`ReactElement`,displayName:e,props:t,defaultProps:n,childrens:r}},lt=function(e,t){return{type:`ReactFragment`,key:e,childrens:t}},ut=!!f,dt=function(e){return!e.name||e.name===`_default`?`No Display Name`:e.name},ft=function(e){switch(!0){case!!e.displayName:return e.displayName;case e.$$typeof===L.Memo:return ft(e.type);case e.$$typeof===L.ForwardRef:return ft(e.render);default:return dt(e)}},pt=function(e){switch(!0){case typeof e.type==`string`:return e.type;case typeof e.type==`function`:return e.type.displayName?e.type.displayName:dt(e.type);case(0,L.isForwardRef)(e):case(0,L.isMemo)(e):return ft(e.type);case(0,L.isContextConsumer)(e):return`${e.type._context.displayName||`Context`}.Consumer`;case(0,L.isContextProvider)(e):return`${e.type.displayName||`Context`}.Provider`;case(0,L.isLazy)(e):return`Lazy`;case(0,L.isProfiler)(e):return`Profiler`;case(0,L.isStrictMode)(e):return`StrictMode`;case(0,L.isSuspense)(e):return`Suspense`;default:return`UnknownElementType`}},mt=function(e,t){return t!==`children`},ht=function(e){return e!==!0&&e!==!1&&e!==null&&e!==``},gt=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},B=function(e,t){var n=t.displayName,r=n===void 0?pt:n;if(typeof e==`string`)return ot(e);if(typeof e==`number`)return st(e);if(!/*#__PURE__*/ l.isValidElement(e))throw Error(`react-element-to-jsx-string: Expected a React.Element, got \`${z(e)}\``);var i=r(e),a=gt(e.props,mt),o=e.key;typeof o==`string`&&o.search(/^\./)&&(a.key=o);var s=gt(e.type.defaultProps||{},mt),c=l.Children.toArray(e.props.children).filter(ht).map(function(e){return B(e,t)});return ut&&e.type===f?lt(o,c):ct(i,a,s,c)};function _t(){}var vt=function(e){return e.toString().split(`
|
|
23
|
+
`).map(function(e){return e.trim()}).join(``)},yt=(function(e,t){var n=t.functionValue,r=n===void 0?vt:n;return!t.showFunctions&&r===vt?r(_t):r(e)}),bt=(function(e,t,n,r){var i=at(e),a=(0,Ke.prettyPrint)(i,{transform:function(e,t,i){var a=e[t];return a&&/*#__PURE__*/ _(a)?V(B(a,r),!0,n,r):typeof a==`function`?yt(a,r):i}});return t?a.replace(/\s+/g,` `).replace(/{ /g,`{`).replace(/ }/g,`}`).replace(/\[ /g,`[`).replace(/ ]/g,`]`):a.replace(/\t/g,R(1,r.tabStop)).replace(/\n([^$])/g,`
|
|
24
|
+
${R(n+1,r.tabStop)}$1`)}),xt=function(e){return e.replace(/"/g,`"`)},St=function(e,t,n,r){if(typeof e==`number`)return`{${String(e)}}`;if(typeof e==`string`)return`"${xt(e)}"`;if(z(e)===`symbol`){var i=e.valueOf().toString().replace(/Symbol\((.*)\)/,`$1`);return i?`{Symbol('${i}')}`:`{Symbol()}`}return typeof e==`function`?`{${yt(e,r)}}`:/*#__PURE__*/ _(e)?`{${V(B(e,r),!0,n,r)}}`:e instanceof Date?isNaN(e.valueOf())?`{new Date(NaN)}`:`{new Date("${e.toISOString()}")}`:He(e)||Array.isArray(e)?`{${bt(e,t,n,r)}}`:`{${String(e)}}`},Ct=(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=St(c,a,o,s),f=` `,p=`
|
|
25
|
+
${R(o+1,u)}`,m=d.includes(`
|
|
26
|
+
`);return l&&d===`{true}`?(f+=`${e}`,p+=`${e}`):(f+=`${e}=${d}`,p+=`${e}=${d}`),{attributeFormattedInline:f,attributeFormattedMultiline:p,isMultilineAttribute:m}}),wt=(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(ot(String(r.value)+String(t.value))):(r&&n.push(r),n.push(t)),n}),Tt=function(e){return[`key`,`ref`].includes(e)},Et=(function(e){return function(t){var n=t.includes(`key`),r=t.includes(`ref`),i=t.filter(function(e){return!Tt(e)}),a=et(e?i.sort():i);return r&&a.unshift(`ref`),n&&a.unshift(`key`),a}});function Dt(e,t){return Array.isArray(t)?function(e){return t.indexOf(e)===-1}:function(n){return t(e[n],n)}}var Ot=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:`${R(r,a)}${e}`}).join(`
|
|
28
|
+
`):t},kt=function(e,t,n){return function(r){return Ot(r,V(r,e,t,n),e,t,n)}},At=function(e,t){return function(n){var r=Object.keys(e).includes(n);return!r||r&&e[n]!==t[n]}},jt=function(e,t,n,r,i){return i?R(n,r).length+t.length>i:e.length>1},Mt=function(e,t,n,r,i,a,o){return(jt(e,t,i,a,o)||n)&&!r},Nt=(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=[],S=Dt(l,f);Object.keys(l).filter(S).filter(At(d,l)).forEach(function(e){return x.push(e)}),Object.keys(d).filter(S).filter(function(){return m}).filter(function(e){return!x.includes(e)}).forEach(function(e){return x.push(e)});var C=Et(h)(x);if(C.forEach(function(e){var i=Ct(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+=`
|
|
29
|
+
${R(n,g)}`,_=Mt(C,v,b,t,n,g,p)?y:v,s&&s.length>0){var w=n+1;_+=`>`,t||(_+=`
|
|
30
|
+
`,_+=R(w,g)),_+=s.reduce(wt,[]).map(kt(t,w,r)).join(t?``:`
|
|
31
|
+
${R(w,g)}`),t||(_+=`
|
|
32
|
+
`,_+=R(w-1,g)),_+=`</${o}>`}else jt(C,v,n,g,p)||(_+=` `),_+=`/>`;return _}),Pt=``,Ft=`React.Fragment`,It=function(e,t,n){var r={};return t&&(r={key:t}),{type:`ReactElement`,displayName:e,props:r,defaultProps:{},childrens:n}},Lt=function(e){return!!e.key},Rt=function(e){return e.childrens.length===0},zt=(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 Nt(It(r.useFragmentShortSyntax?Rt(e)||Lt(e)?Ft:Pt:Ft,a,o),t,n,r)}),Bt=[`<`,`>`,`{`,`}`],Vt=function(e){return Bt.some(function(t){return e.includes(t)})},Ht=function(e){return Vt(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},V=(function(e,t,n,r){if(e.type===`number`)return String(e.value);if(e.type===`string`)return e.value?`${Ut(Ht(String(e.value)))}`:``;if(e.type===`ReactElement`)return Nt(e,t,n,r);if(e.type===`ReactFragment`)return zt(e,t,n,r);throw TypeError(`Unknow format type "${e.type}"`)}),Wt=(function(e,t){return V(e,!1,0,t)}),Gt=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 Wt(B(e,y),y)};const Kt=w({themes:[C,S],langs:[v,y,x,b],engine:ee()}),qt=a=>{let{className:o=``,language:s,children:c}=a,l=n(a,[`className`,`language`,`children`]),u=typeof c==`string`?c:Gt(/*#__PURE__*/ _(c)?c:/*#__PURE__*/ i(r,{children:c})),d=Kt.codeToHtml(u,{lang:s,themes:{light:`github-light`,dark:`github-dark`},defaultColor:`light`,structure:`inline`});return/*#__PURE__*/ i(`pre`,t(e({className:`m-0 shiki language-${s} ${o}`},l),{children:/*#__PURE__*/ i(`code`,{dangerouslySetInnerHTML:{__html:d},className:`language-${s}`})}))},Jt=[`primary`,`secondary`,`success`,`danger`,`warning`,`info`,`dark`,`light`];function Yt(e,t=[]){let n=t[0]?Jt.filter(e=>!t.find(t=>t===e)):Jt;return n[[...e].reduce((e,t)=>e+t.charCodeAt(0),0)%n.length]}let Xt;var H,Zt,Qt,$t,en,tn=ne(e=>e.observedProps.endTime),nn,rn;let an;new(Xt=(H=/*#__PURE__*/ new WeakMap,Zt=class extends (en=te){get rest(){return E(this,H)}set rest(e){O(this,H,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 r=this.props,{className:o=``,itemClassName:s=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,units:c,endTime:l,onEnd:u}=r,d=n(r,[`className`,`itemClassName`,`units`,`endTime`,`onEnd`]),{timeSections:f}=this;return/*#__PURE__*/ i(`ol`,t(e({className:`list-unstyled m-0 ${o}`},d),{children:f.map(({value:e,label:t})=>/*#__PURE__*/ a(`li`,{className:s,children:[/*#__PURE__*/ i(`strong`,{children:(e+``).padStart(2,`0`)}),/*#__PURE__*/ i(`span`,{children:t})]},t))}))}constructor(...e){super(...e),D(this,H,{writable:!0,value:(rn(this),nn(this,0))}),s(this,`timer`,0),s(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:[nn,rn],c:[an,$t]}=T(Zt,[[M,1,`rest`],[j,3,`timeSections`],[tn,2,`initTimer`]],[N],en),Zt),Qt=class extends k{constructor(){super(an),s(this,`displayName`,`Countdown`),$t()}},s(Qt,Xt,void 0),Qt);var on,sn,cn,ln=class extends Error{constructor(e=`Dialog closed`){super(e)}},un=/*#__PURE__*/ new WeakMap,dn=/*#__PURE__*/ new WeakMap,fn=class{get input(){return E(this,un)}set input(e){O(this,un,e)}get defer(){return E(this,dn)}set defer(e){O(this,dn,e)}open(e){return e&&(this.input=e),this.defer=new pe,this.defer.promise.finally(()=>this.defer=void 0),this.defer.promise}constructor(n){D(this,un,{writable:!0,value:(cn(this),on(this,{}))}),D(this,dn,{writable:!0,value:sn(this)}),s(this,`Component`,void 0),this.Component=N(r=>/*#__PURE__*/ i(n,t(e({},r,this.input),{defer:this.defer}))),this.Component.displayName=`DialogComponent`}};({e:[on,sn,cn]}=T(fn,[[M,1,`input`],[M,1,`defer`]],[]));var pn={hiddenBackdrop:`Ocw1GG_hiddenBackdrop`};const mn=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`dialog-header`,a)}))},hn=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`h1`,t(e({},s),{className:o(`dialog-title`,a)}))},gn=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`dialog-body`,a)}))},_n=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`dialog-footer`,a)}))};var vn=class extends d{get open(){var e,t;return(e=(t=this.element.current)==null?void 0:t.open)!=null&&e}componentDidMount(){this.props.open&&this.show()}componentDidUpdate({open:e}){this.props.open!==e&&(this.props.open?this.show():this.close())}componentWillUnmount(){this.close()}render(){let r=this.props,{open:a,modal:s,keyboard:c,backdrop:l=!0,theme:u,dialog:d=!0,className:f,onCancel:p,onClick:m,onKeyDown:h}=r,g=n(r,[`open`,`modal`,`keyboard`,`backdrop`,`theme`,`dialog`,`className`,`onCancel`,`onClick`,`onKeyDown`]);return/*#__PURE__*/ i(`dialog`,t(e({},g),{ref:this.element,className:o(d&&`dialog`,l===!1&&pn.hiddenBackdrop,f),"data-backdrop":l===!1?`false`:void 0,"data-bs-theme":u,onCancel:this.handleCancel,onKeyDown:this.handleKeyDown,onClick:this.handleClick}))}constructor(...e){super(...e),s(this,`element`,/*#__PURE__*/ h()),s(this,`returnFocus`,void 0),s(this,`show`,()=>{if(this.open)return;let e=this.element.current;e&&(document.activeElement instanceof HTMLElement&&(this.returnFocus=document.activeElement),this.props.modal===!1?e.show():e.showModal())}),s(this,`close`,()=>{var e,t;this.open&&((e=this.element.current)==null||e.close(),(t=this.returnFocus)==null||t.focus())}),s(this,`handleCancel`,e=>{let{onCancel:t,keyboard:n=!0}=this.props;t==null||t(e);let{defaultPrevented:r}=e;e.preventDefault(),n&&!r&&this.close()}),s(this,`handleKeyDown`,e=>{let{onKeyDown:t,keyboard:n=!0}=this.props;t==null||t(e);let{key:r,defaultPrevented:i}=e;r===`Escape`&&n&&!i&&(e.preventDefault(),this.close())}),s(this,`handleClick`,e=>{let{onClick:t,backdrop:n=!0}=this.props;t==null||t(e);let{defaultPrevented:r,target:i,currentTarget:a,clientX:o,clientY:s}=e;if(n!==!0||r||i!==a)return;let{left:c,right:l,top:u,bottom:d}=a.getBoundingClientRect();(o<c||o>l||s<u||s>d)&&this.close()})}};const yn=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`drawer-header`,a)}))},bn=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`h5`,t(e({},s),{className:o(`drawer-title`,a)}))},xn=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`drawer-body`,a)}))},Sn=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`drawer-footer`,a)}))},Cn=r=>{let{title:s,placement:c=`end`,footer:l,bodyClassName:u,onDismiss:d,className:f,children:p}=r,m=n(r,[`title`,`placement`,`footer`,`bodyClassName`,`onDismiss`,`className`,`children`]);return/*#__PURE__*/ a(vn,t(e({},m),{dialog:!1,tabIndex:-1,"aria-label":typeof s==`string`?s:m[`aria-label`],className:o(`drawer`,`drawer-${c}`,f),onClose:d,children:[/*#__PURE__*/ a(yn,{children:[/*#__PURE__*/ i(bn,{children:s}),/*#__PURE__*/ i(Be,{onClick:d})]}),/*#__PURE__*/ i(xn,{className:u,children:p}),l&&/*#__PURE__*/ i(Sn,{children:l})]}))};Cn.displayName=`Drawer`;let wn;var Tn,En,Dn,On,kn,An,jn;const Mn=me();let Nn;new(wn=(Tn=/*#__PURE__*/ new WeakMap,En=class extends (kn=d){get innerValue(){return E(this,Tn)}set innerValue(e){O(this,Tn,e)}render(){let r=this.props,{name:o,required:s,children:c}=r,l=n(r,[`name`,`required`,`children`]),{innerValue:u}=this;return/*#__PURE__*/ a(`div`,{className:`form-control`,tabIndex:-1,onBlur:this.save,children:[/*#__PURE__*/ i(`input`,{hidden:!0,name:o,required:s,value:JSON.stringify(u)}),/*#__PURE__*/ i(Mn,t(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,s(this,`core`,void 0),D(this,Tn,{writable:!0,value:(jn(this),An(this,this.props.defaultValue))}),s(this,`save`,()=>F(function*(){return t.core&&(t.innerValue=yield t.core.save())})())}},{e:[An,jn],c:[Nn,On]}=T(En,[[M,1,`innerValue`]],[N],kn),En),Dn=class extends k{constructor(){super(Nn),s(this,`displayName`,`Editor`),On()}},s(Dn,wn,void 0),Dn);const Pn=he({link:({data:{link:e}})=>`<a href="${e}">${e}</a>`}),Fn=r=>{let{data:a}=r,o=n(r,[`data`]);return/*#__PURE__*/ i(`article`,t(e({},o),{dangerouslySetInnerHTML:{__html:Pn.parse(a)}}))};Fn.displayName=`EditorHTML`;const In=r=>{let{className:a,end:s,size:c}=r,l=n(r,[`className`,`end`,`size`]);return/*#__PURE__*/ i(`label`,t(e({},l),{className:o(`form-control form-adorn`,s&&`form-adorn-end`,c&&`form-adorn-${c}`,a)}))};In.displayName=`FormAdornment`;const Ln=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`span`,t(e({},s),{className:o(`form-adorn-text`,a)}))};Ln.displayName=`FormAdornmentText`;const Rn=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`input`,t(e({},s),{className:o(`form-ghost`,a)}))};Rn.displayName=`FormGhost`;var zn=class extends d{componentDidMount(){this.setIndeterminate()}componentDidUpdate(){this.setIndeterminate()}render(){let r=this.props,{className:a,size:s,theme:c,indeterminate:l,forwardedRef:u}=r,d=n(r,[`className`,`size`,`theme`,`indeterminate`,`forwardedRef`]);return/*#__PURE__*/ i(`input`,t(e({},d),{ref:this.setInputRef,type:`checkbox`,"aria-checked":l?`mixed`:void 0,className:o(`check`,s&&`check-${s}`,c&&`theme-${c}`,a)}))}constructor(...e){super(...e),s(this,`input`,void 0),s(this,`setIndeterminate`,()=>{this.input&&(this.input.indeterminate=this.props.indeterminate||!1)}),s(this,`setInputRef`,e=>{this.input=e||void 0;let{forwardedRef:t}=this.props;typeof t==`function`?t(e):t&&(t.current=e)})}};const Bn=/*#__PURE__*/ g((n,r)=>/*#__PURE__*/ i(zn,t(e({},n),{forwardedRef:r})));Bn.displayName=`Checkbox`;const Vn=r=>{let{className:a,active:s,disabled:c,theme:l}=r,u=n(r,[`className`,`active`,`disabled`,`theme`]);return/*#__PURE__*/ i(`button`,t(e({},u),{className:o(`chip`,s&&`active`,l&&`theme-${l}`,a),type:`button`,"aria-pressed":s,disabled:c}))};Vn.displayName=`Chip`;const Hn=r=>{let{className:a,theme:s,separator:c,allowDuplicates:l,maxChips:u,createOnBlur:d}=r,f=n(r,[`className`,`theme`,`separator`,`allowDuplicates`,`maxChips`,`createOnBlur`]);return/*#__PURE__*/ i(`div`,t(e({},f),{className:o(`chip-input`,s&&`theme-${s}`,a),"data-bs-chips":``,"data-bs-separator":c,"data-bs-allow-duplicates":l,"data-bs-max-chips":u,"data-bs-create-on-blur":d}))};Hn.displayName=`ChipInput`;var Un,Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn;const $n=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(I,t(e({},s),{className:o(`menu-item`,a)}))},er=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`menu`,a)}))},tr=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`span`,t(e({},s),{className:o(`menu-text`,a)}))},nr=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`h6`,t(e({},s),{className:o(`menu-header`,a)}))},rr=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`hr`,t(e({},s),{className:o(`menu-divider`,a)}))},ir=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`span`,t(e({},s),{className:o(`menu-item-content`,a)}))},ar=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`small`,t(e({},s),{className:o(`menu-item-description`,a)}))};let or;var sr=/*#__PURE__*/ new WeakMap,cr=class extends (Wn=d){get open(){return E(this,sr)}set open(e){O(this,sr,e)}render(){let{label:e,className:t,children:n}=this.props,{open:r}=this;return/*#__PURE__*/ a(`div`,{className:o(`submenu`,{show:r},t),onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onKeyDown:this.handleKeyDown,children:[/*#__PURE__*/ i(I,{className:`menu-item`,"aria-haspopup":`true`,"aria-expanded":r,onClick:this.handleClick,children:e}),/*#__PURE__*/ i(`div`,{ref:this.panel,className:o(`menu start-100 top-0`,{show:r}),hidden:!r,children:n})]})}constructor(...e){super(...e),D(this,sr,{writable:!0,value:(qn(this),Gn(this,!1))}),s(this,`panel`,/*#__PURE__*/ h()),s(this,`setOpen`,Kn(this,e=>{this.open=e})),s(this,`handleClick`,()=>this.setOpen(!this.open)),s(this,`handleMouseEnter`,()=>this.setOpen(!0)),s(this,`handleMouseLeave`,()=>this.setOpen(!1)),s(this,`handleKeyDown`,e=>{let{key:t}=e;t===`ArrowRight`&&(e.preventDefault(),this.setOpen(!0),queueMicrotask(()=>{var e,t;return(t=this.panel.current)==null||(e=t.querySelector(`a[href], button:not(:disabled)`))==null?void 0:e.focus()})),t===`ArrowLeft`&&this.open&&(e.preventDefault(),this.setOpen(!1))})}};({e:[Gn,Kn,qn],c:[or,Un]}=T(cr,[[M,1,`open`],[A,0,`setOpen`]],[N],Wn)),Un();let lr;var ur=/*#__PURE__*/ new WeakMap,dr=class extends (Yn=d){get open(){return E(this,ur)}set open(e){O(this,ur,e)}componentDidMount(){document.addEventListener(`pointerdown`,this.handleOutside)}componentWillUnmount(){document.removeEventListener(`pointerdown`,this.handleOutside)}items(){var e,t;return[...(e=(t=this.panel.current)==null?void 0:t.querySelectorAll(`a[href]:not([aria-disabled="true"]), button:not(:disabled):not([aria-disabled="true"])`))==null?[]:e].filter(e=>!e.closest(`[hidden]`))}render(){let r=this.props,{label:s,autoClose:c,align:l=`end`,menuClassName:u,toggleProps:d,onOpenChange:f,onKeyDown:p,onBlur:m,children:h,className:g,id:_}=r,v=n(r,[`label`,`autoClose`,`align`,`menuClassName`,`toggleProps`,`onOpenChange`,`onKeyDown`,`onBlur`,`children`,`className`,`id`]),{open:y}=this;return/*#__PURE__*/ a(`div`,t(e({},v),{ref:this.root,id:_,className:o(`d-inline-block position-relative`,g),onKeyDown:this.handleKeyDown,onBlur:this.handleBlur,children:[/*#__PURE__*/ i(I,t(e({},d),{ref:this.trigger,"aria-expanded":y,"aria-controls":_?`${_}-menu`:void 0,onClick:this.handleToggle,children:s})),/*#__PURE__*/ i(`div`,{ref:this.panel,id:_?`${_}-menu`:void 0,className:o(`menu top-100`,l===`end`?`end-0`:`start-0`,{show:y},u),hidden:!y,onClick:this.handleSelect,children:h})]}))}constructor(...e){super(...e),D(this,ur,{writable:!0,value:(Qn(this),Xn(this,!1))}),s(this,`root`,/*#__PURE__*/ h()),s(this,`trigger`,/*#__PURE__*/ h()),s(this,`panel`,/*#__PURE__*/ h()),s(this,`setOpen`,Zn(this,e=>{var t,n;this.open!==e&&(this.open=e,(t=(n=this.props).onOpenChange)==null||t.call(n,e))})),s(this,`handleOutside`,({target:e})=>{var t;let{autoClose:n=!0}=this.props;n!==!1&&n!==`inside`&&e instanceof Node&&!((t=this.root.current)!=null&&t.contains(e))&&this.setOpen(!1)}),s(this,`handleKeyDown`,e=>{var t,n;(t=(n=this.props).onKeyDown)==null||t.call(n,e);let{key:r,defaultPrevented:i}=e;if(!i){if(r===`Escape`&&this.open){var a;return e.preventDefault(),this.setOpen(!1),(a=this.trigger.current)==null?void 0:a.focus()}if(r===`Tab`)return this.setOpen(!1);[`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(r)&&(e.preventDefault(),this.setOpen(!0),queueMicrotask(()=>{var e;let t=this.items(),n=t.findIndex(e=>e===document.activeElement),i=r===`Home`?0:t.length-1;r===`ArrowDown`&&(i=(n+1)%t.length),r===`ArrowUp`&&(i=n<=0?t.length-1:n-1),(e=t[i])==null||e.focus()}))}}),s(this,`handleBlur`,e=>{let{onBlur:t,autoClose:n=!0}=this.props;t==null||t(e);let{defaultPrevented:r,currentTarget:i,relatedTarget:a}=e;!r&&n!==!1&&n!==`inside`&&!i.contains(a)&&this.setOpen(!1)}),s(this,`handleToggle`,()=>this.setOpen(!this.open)),s(this,`handleSelect`,({target:e})=>{let{autoClose:t=!0}=this.props;t&&t!==`outside`&&e instanceof Element&&!e.closest(`.submenu > .menu-item`)&&e.closest(`a[href], button:not(:disabled)`)&&this.setOpen(!1)})}};({e:[Xn,Zn,Qn],c:[lr,Jn]}=T(dr,[[M,1,`open`],[A,0,`setOpen`]],[N],Yn)),Jn();const fr=r=>{let{className:a,value:s}=r,c=n(r,[`className`,`value`]);return/*#__PURE__*/ i(`button`,t(e({},c),{type:`button`,className:o(`menu-item`,a),"data-bs-value":s}))};fr.displayName=`ComboboxOption`;const pr=r=>{let{className:s,name:c,value:l,placeholder:d=`Select an item…`,disabled:f,multiple:p,onChange:h,menuClassName:g,children:v}=r,y=n(r,[`className`,`name`,`value`,`placeholder`,`disabled`,`multiple`,`onChange`,`menuClassName`,`children`]),b=Array.isArray(l)?l:l?[l]:[],x=u.toArray(v).filter(e=>/*#__PURE__*/ _(e)),S=x.filter(e=>b.includes(e.props.value)),C=S.length>0;return/*#__PURE__*/ a(`div`,t(e({},y),{className:o(`combobox`,s),children:[/*#__PURE__*/ i(lr,{label:/*#__PURE__*/ i(`span`,{className:o(`combobox-value`,!C&&`combobox-placeholder`),children:C?S.map(e=>e.props.children):d}),toggleProps:{className:`form-control combobox-toggle`,variant:`text`,disabled:f,"aria-haspopup":`listbox`,"aria-label":d},autoClose:!p,menuClassName:o(g,`combobox-menu`),onClick:({target:e})=>{if(!(e instanceof Element))return;let t=e.closest(`[data-bs-value]`);if(!t||!h)return;let n=t.dataset.bsValue||``,r=p?b.includes(n)?b.filter(e=>e!==n):[...b,n]:n;h(r)},children:x.map(e=>{let t=b.includes(e.props.value);return/*#__PURE__*/ m(e,{className:o(e.props.className,t&&`selected`),"aria-selected":t})})}),b.map(e=>/*#__PURE__*/ i(`input`,{type:`hidden`,name:c,value:e},e))]}))};pr.displayName=`Combobox`;const mr={sm:`form-control-sm`,lg:`form-control-lg`},hr=r=>{let{className:a,plaintext:s,ghost:c,caret:l,color:u,controlSize:d}=r,f=n(r,[`className`,`plaintext`,`ghost`,`caret`,`color`,`controlSize`]);return/*#__PURE__*/ i(`input`,t(e({},f),{className:o(c?`form-ghost`:s?`form-control-plaintext`:`form-control`,!c&&l&&`form-control-caret`,!c&&!s&&u&&`form-control-color`,!c&&!s&&d&&mr[d],a)}))};hr.displayName=`FormControl`;const gr=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`textarea`,t(e({},s),{className:o(`form-control`,a)}))};gr.displayName=`FormTextArea`;const _r=r=>{let{className:a,controlSize:s}=r,c=n(r,[`className`,`controlSize`]);return/*#__PURE__*/ i(`select`,t(e({},c),{className:o(`form-control`,s&&mr[s],a)}))};_r.displayName=`FormSelect`;var vr=class extends d{componentDidMount(){this.mounted=!0,this.initialize()}componentWillUnmount(){this.mounted=!1;let{instance:e}=this;this.instance=void 0,queueMicrotask(()=>e==null?void 0:e.dispose())}render(){let r=this.props,{className:a,enhanced:s,inline:c,selectionMode:l,min:u,max:d,forwardedRef:f}=r,p=n(r,[`className`,`enhanced`,`inline`,`selectionMode`,`min`,`max`,`forwardedRef`]);return/*#__PURE__*/ i(`input`,t(e({},p),{ref:this.setInputRef,className:o(`form-control`,a),type:s?`text`:`date`,min:u,max:d,"data-bs-toggle":s?`datepicker`:void 0,"data-bs-date-min":s?u:void 0,"data-bs-date-max":s?d:void 0,"data-bs-inline":s&&c||void 0,"data-bs-selection-mode":s?l:void 0}))}constructor(...e){var t;super(...e),t=this,s(this,`input`,void 0),s(this,`instance`,void 0),s(this,`mounted`,!1),s(this,`initialize`,()=>F(function*(){if(!t.props.enhanced)return;let{default:e}=yield import(`bootstrap/js/src/datepicker.js`);t.mounted&&t.input&&(t.instance=e.getOrCreateInstance(t.input))})()),s(this,`setInputRef`,e=>{this.input=e||void 0;let{forwardedRef:t}=this.props;typeof t==`function`?t(e):t&&(t.current=e)})}};const yr=/*#__PURE__*/ g((n,r)=>/*#__PURE__*/ i(vr,t(e({},n),{forwardedRef:r})));yr.displayName=`DatePicker`;const br=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`small`,t(e({},s),{className:o(`form-text`,a)}))};br.displayName=`FormText`;const xr=r=>{let{className:a,type:s=`invalid`,tooltip:c}=r,l=n(r,[`className`,`type`,`tooltip`]);return/*#__PURE__*/ i(`div`,t(e({},l),{className:o(c?`${s}-tooltip`:`${s}-feedback`,a)}))};xr.displayName=`FormFeedback`;const Sr=r=>{let{className:a,always:s}=r,c=n(r,[`className`,`always`]);return/*#__PURE__*/ i(`div`,t(e({},c),{className:o(`form-floating`,s&&`form-floating-always`,a)}))};Sr.displayName=`FormFloatingLabel`;const Cr=r=>{let{className:a,size:s}=r,c=n(r,[`className`,`size`]);return/*#__PURE__*/ i(`div`,t(e({},c),{className:o(`input-group`,s&&`input-group-${s}`,a)}))};Cr.displayName=`InputGroup`;const wr=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`span`,t(e({},s),{className:o(`input-group-text`,a)}))};wr.displayName=`InputGroupText`;const Tr=r=>{let{className:a,length:s,type:c=`numeric`,mask:l,groups:u,separator:d,connected:f,size:p}=r,m=n(r,[`className`,`length`,`type`,`mask`,`groups`,`separator`,`connected`,`size`]);return/*#__PURE__*/ i(`div`,{className:o(`otp`,f&&`otp-connected`,p&&`otp-${p}`),"data-bs-otp":``,"data-bs-length":s,"data-bs-type":c,"data-bs-mask":l||void 0,"data-bs-groups":u?JSON.stringify(u):void 0,"data-bs-separator":d,children:/*#__PURE__*/ i(`input`,t(e({},m),{type:`text`,maxLength:s,autoComplete:m.autoComplete||`one-time-code`,inputMode:c===`numeric`?`numeric`:`text`,pattern:c===`numeric`?`[0-9]*`:c===`alpha`?`[a-zA-Z]*`:`[a-zA-Z0-9]*`,className:o(`otp-input`,a)}))})};Tr.displayName=`OTPInput`;const Er=[`weak`,`fair`,`good`,`strong`];var Dr=class extends d{componentDidMount(){this.mounted=!0,this.initialize()}componentDidUpdate(e){(e.input!==this.props.input||e.minLength!==this.props.minLength||e.messages!==this.props.messages||e.weights!==this.props.weights||e.thresholds!==this.props.thresholds||e.scorer!==this.props.scorer||e.variant!==this.props.variant)&&(this.dispose(),this.initialize())}componentWillUnmount(){this.mounted=!1,this.dispose()}render(){let r=this.props,{className:s,input:c,minLength:l,messages:u,weights:d,thresholds:f,scorer:p,forwardedRef:m,variant:h=`segments`}=r,g=n(r,[`className`,`input`,`minLength`,`messages`,`weights`,`thresholds`,`scorer`,`forwardedRef`,`variant`]),_=h===`bar`;return/*#__PURE__*/ a(`div`,t(e({},g),{ref:this.setMeterRef,className:o(_?`strength-bar`:`strength`,s),role:`meter`,"aria-valuemin":0,"aria-valuemax":Er.length,"aria-valuenow":0,"aria-valuetext":`Empty`,children:[!_&&Er.map(e=>/*#__PURE__*/ i(`div`,{className:`strength-segment`},e)),!_&&/*#__PURE__*/ i(`span`,{className:`strength-text`})]}))}constructor(...t){var n;super(...t),n=this,s(this,`meter`,void 0),s(this,`instance`,void 0),s(this,`instanceElement`,void 0),s(this,`passwordInput`,void 0),s(this,`mounted`,!1),s(this,`initialize`,()=>F(function*(){var t,r,i;let a=n.meter;if(!a)return;let{default:o}=yield import(`bootstrap/js/src/strength.js`),{input:s,minLength:c,messages:l,weights:u,thresholds:d,scorer:f}=n.props,p=e({},s!==void 0&&{input:s},c!==void 0&&{minLength:c},l!==void 0&&{messages:e({},o.Default.messages,l)},u!==void 0&&{weights:u},d!==void 0&&{thresholds:d},f!==void 0&&{scorer:f});n.mounted&&n.meter===a&&(n.instanceElement=a,n.instance=o.getOrCreateInstance(a,p),n.passwordInput=typeof s==`string`?document.querySelector(s)||void 0:s||((t=a.parentElement)==null?void 0:t.querySelector(`input[type="password"]`))||void 0,(r=n.passwordInput)==null||r.addEventListener(`input`,n.handleInput),(i=n.passwordInput)==null||i.addEventListener(`change`,n.handleInput),n.handleInput())})()),s(this,`handleInput`,()=>{var e;let t=(e=this.instance)==null?void 0:e.getStrength(),n=t?Er.indexOf(t)+1:0,r=this.instanceElement;r==null||r.setAttribute(`aria-valuenow`,String(n)),r==null||r.setAttribute(`aria-valuetext`,t||`Empty`)}),s(this,`dispose`,()=>{var e,t,n;(e=this.passwordInput)==null||e.removeEventListener(`input`,this.handleInput),(t=this.passwordInput)==null||t.removeEventListener(`change`,this.handleInput),(n=this.instance)==null||n.dispose(),this.instance=void 0,this.instanceElement=void 0,this.passwordInput=void 0}),s(this,`setMeterRef`,e=>{this.meter=e||void 0;let{forwardedRef:t}=this.props;typeof t==`function`?t(e):t&&(t.current=e)})}};const Or=/*#__PURE__*/ g((n,r)=>/*#__PURE__*/ i(Dr,t(e({},n),{forwardedRef:r})));Or.displayName=`PasswordStrength`;const kr=t=>/*#__PURE__*/ i(`form`,e({},t));kr.displayName=`Form`;const Ar=t=>/*#__PURE__*/ i(`fieldset`,e({},t));Ar.displayName=`FormFieldset`;const jr=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`form-field`,a)}))};jr.displayName=`FormField`;const Mr=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`form-group`,a)}))};Mr.displayName=`FormGroup`;const Nr=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`form-field-content`,a)}))};Nr.displayName=`FormFieldContent`;const Pr=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`label`,t(e({},s),{className:o(`form-label`,a)}))};Pr.displayName=`FormLabel`;const Fr=r=>{let{className:a,size:s,theme:c}=r,l=n(r,[`className`,`size`,`theme`]);return/*#__PURE__*/ i(`input`,t(e({},l),{type:`radio`,className:o(`radio`,s&&`radio-${s}`,c&&`theme-${c}`,a)}))};Fr.displayName=`Radio`;const Ir=r=>{let{className:a,type:s=`checkbox`,size:c,theme:l}=r,u=n(r,[`className`,`type`,`size`,`theme`]);return/*#__PURE__*/ i(`input`,t(e({},u),{type:s,className:o(s===`checkbox`?`check`:`radio`,c&&`${s===`checkbox`?`check`:`radio`}-${c}`,l&&`theme-${l}`,a)}))};Ir.displayName=`FormCheck`;const Lr=r=>{let{className:a,min:s=0,max:c=100,value:l,defaultValue:u,bubble:d,theme:f,onInput:p,style:m}=r,h=n(r,[`className`,`min`,`max`,`value`,`defaultValue`,`bubble`,`theme`,`onInput`,`style`]);var g;let _=Number((g=l==null?u:l)==null?s:g),v=Number(c)<=Number(s)?0:Math.max(0,Math.min(1,(_-Number(s))/(Number(c)-Number(s))));return/*#__PURE__*/ i(`div`,{className:o(`form-range`,f&&`theme-${f}`),"data-bs-bubble":d||void 0,style:{"--range-fill":v},children:/*#__PURE__*/ i(`input`,t(e({},h),{type:`range`,min:s,max:c,value:l,defaultValue:u,className:o(`form-range-input`,a),style:m,onInput:e=>{var t;let n=e.currentTarget,r=Number(n.value),i=Number(c)<=Number(s)?0:Math.max(0,Math.min(1,(r-Number(s))/(Number(c)-Number(s))));(t=n.parentElement)==null||t.style.setProperty(`--range-fill`,i+``),p==null||p(e)}}))})};Lr.displayName=`FormRange`;const Rr=r=>{let{className:s,inputProps:c,size:l,theme:u,children:d}=r,f=n(r,[`className`,`inputProps`,`size`,`theme`,`children`]);return/*#__PURE__*/ a(`label`,t(e({},f),{className:o(`switch`,l&&`switch-${l}`,u&&`theme-${u}`,s),children:[/*#__PURE__*/ i(`input`,t(e({},c),{type:`checkbox`})),d]}))};Rr.displayName=`FormSwitch`;const zr=r=>{let{fluid:a,breakpoint:s,className:c}=r,l=n(r,[`fluid`,`breakpoint`,`className`]);return/*#__PURE__*/ i(`div`,t(e({},l),{className:o(s?`${s}:container`:a?`container-fluid`:`container`,c)}))},Br=r=>{let{cols:a,sm:s,md:c,lg:l,xl:u,"2xl":d,className:f}=r,p=n(r,[`cols`,`sm`,`md`,`lg`,`xl`,`2xl`,`className`]),m=[[`sm`,s],[`md`,c],[`lg`,l],[`xl`,u],[`2xl`,d]];return/*#__PURE__*/ i(`div`,t(e({},p),{className:o(`row`,a!==void 0&&`row-cols-${a}`,m.map(([e,t])=>t!==void 0&&`${e}:row-cols-${t}`),f)}))},Vr=r=>{let{span:a,sm:s,md:c,lg:l,xl:u,"2xl":d,className:f}=r,p=n(r,[`span`,`sm`,`md`,`lg`,`xl`,`2xl`,`className`]),m=[[`sm`,s],[`md`,c],[`lg`,l],[`xl`,u],[`2xl`,d]],h=m.some(([,e])=>e!==void 0);return/*#__PURE__*/ i(`div`,t(e({},p),{className:o(!a&&!h&&`col`,a!==void 0&&`col-${a}`,m.map(([e,t])=>t!==void 0&&(t===!0?`${e}:col`:`${e}:col-${t}`)),f)}))},U=r=>{let{className:a=``,children:o,maxWidth:s=`100%`,duration:c,height:l}=r,u=n(r,[`className`,`children`,`maxWidth`,`duration`,`height`]);return/*#__PURE__*/ i(`div`,t(e({className:`overflow-hidden max-w-100 ${a}`},u),{children:/*#__PURE__*/ i(`div`,{className:`d-inline-block align-top text-nowrap lRDfma_scrollWrap`,style:{maxWidth:s,animationDuration:c,height:l,lineHeight:l},children:/*#__PURE__*/ i(`div`,{className:`d-inline-block lRDfma_scrollItem`,style:{animationDuration:c},children:o})})}))},Hr=({children:e,maxWidth:t,duration:n,height:r})=>r?/*#__PURE__*/ i(`div`,{className:`overflow-hidden lRDfma_scrollHeightWrap`,style:{maxWidth:t,"--scroll-height":r},children:/*#__PURE__*/ a(`div`,{className:`d-inline-block overflow-hidden max-w-100 lRDfma_scrollContainer`,children:[/*#__PURE__*/ i(`div`,{className:`d-block overflow-hidden text-wrap text-break lRDfma_unScrollItem`,children:e}),/*#__PURE__*/ i(U,{duration:n,children:e})]})}):/*#__PURE__*/ i(U,{maxWidth:t,duration:n,height:r,children:e});U.displayName=`HorizontalMarquee`;const W=t=>{let{className:r,style:a,name:s,size:c}=t,l=n(t,[`className`,`style`,`name`,`size`]);return/*#__PURE__*/ i(`span`,e({className:o(`bi-${s}`,r),style:e({fontSize:c&&`${c}rem`},a)},l))};W.displayName=`Icon`;const G=r=>{let{fluid:a,thumbnail:s,className:c}=r,l=n(r,[`fluid`,`thumbnail`,`className`]);return/*#__PURE__*/ i(`img`,t(e({},l),{className:o({"img-fluid":a,"img-thumbnail":s},c)}))};G.displayName=`Image`;const Ur=r=>{let{flush:a,numbered:s,horizontal:c,className:l}=r,u=n(r,[`flush`,`numbered`,`horizontal`,`className`]);return/*#__PURE__*/ i(`ul`,t(e({},u),{className:o(`list-group`,{"list-group-flush":a,"list-group-numbered":s},c&&(c===!0?`list-group-horizontal`:`${c}:list-group-horizontal`),l)}))},Wr=e=>typeof e.href==`string`,Gr=e=>typeof e.type==`string`,Kr=r=>{let{theme:a,action:s,active:c,disabled:l,className:u}=r,d=n(r,[`theme`,`action`,`active`,`disabled`,`className`]),f=o(`list-group-item`,a&&`theme-${a}`,s&&`list-group-item-action`,{active:c,disabled:l},l&&`pe-none`,u);return Wr(d)?/*#__PURE__*/ i(`a`,t(e({},d),{className:f,href:l?void 0:d.href,"aria-current":c?`true`:void 0,"aria-disabled":l||void 0,tabIndex:l?-1:d.tabIndex,onClick:l?void 0:d.onClick})):Gr(d)?/*#__PURE__*/ i(`button`,t(e({},d),{type:d.type||`button`,className:f,"aria-current":c?`true`:void 0,disabled:l})):/*#__PURE__*/ i(`li`,t(e({},d),{className:f,"aria-current":c?`true`:void 0,"aria-disabled":l||void 0}))};Ur.displayName=`ListGroup`,Kr.displayName=`ListGroupItem`;const qr=({scope:e,children:t})=>{let n=typeof t==`string`?t:Gt(/*#__PURE__*/ _(t)?t:/*#__PURE__*/ i(r,{children:t}));return/*#__PURE__*/ a(ye,{code:n,scope:e,language:`tsx`,children:[/*#__PURE__*/ i(ve,{className:`mb-3`}),/*#__PURE__*/ i(ge,{}),/*#__PURE__*/ i(_e,{className:`fg-danger small p-2`})]})},K=r=>{let{animation:a=`border`,size:s,theme:c,className:l}=r,u=n(r,[`animation`,`size`,`theme`,`className`]);return/*#__PURE__*/ i(`span`,t(e({},u),{className:o(`spinner-${a}`,s&&`spinner-${s}`,c&&`theme-${c}`,l)}))},Jr=r=>{let{className:o=``,children:s=`Loading...`}=r,c=n(r,[`className`,`children`]);return/*#__PURE__*/ a(`div`,t(e({className:`fixed-top h-100 w-100 d-flex justify-content-center align-items-center opacity-25 bg-black ${o}`},c),{children:[/*#__PURE__*/ i(K,{theme:`success`}),/*#__PURE__*/ i(`span`,{className:`ms-3 fg-white`,children:s})]}))};Jr.displayName=`Loading`;const Yr={top:`top`,right:`end`,bottom:`bottom`,left:`start`},Xr={top:`position-absolute start-50 translate-middle-x`,right:`position-absolute top-50 translate-middle-y`,bottom:`position-absolute start-50 translate-middle-x`,left:`position-absolute top-50 translate-middle-y`},Zr=r=>{let{title:s,placement:c=`top`,show:l=!0,role:u=`tooltip`,className:d,children:f}=r,p=n(r,[`title`,`placement`,`show`,`role`,`className`,`children`]);return/*#__PURE__*/ a(`div`,t(e({},p),{className:o(`popover`,{show:l},`bs-popover-${Yr[c]}`,d),role:u,"data-bs-placement":c,children:[/*#__PURE__*/ i(`div`,{className:o(`popover-arrow`,Xr[c])}),/*#__PURE__*/ i(`h3`,{className:`popover-header`,children:s}),/*#__PURE__*/ i(`div`,{className:`popover-body`,children:f})]}))};Zr.displayName=`Popover`;const Qr=r=>{let{placement:s=`top`,show:c=!0,role:l=`tooltip`,className:u,children:d}=r,f=n(r,[`placement`,`show`,`role`,`className`,`children`]);return/*#__PURE__*/ a(`div`,t(e({},f),{className:o(`tooltip`,{show:c},`bs-tooltip-${Yr[s]}`,u),role:l,"data-bs-placement":s,children:[/*#__PURE__*/ i(`div`,{className:o(`tooltip-arrow`,Xr[s])}),/*#__PURE__*/ i(`div`,{className:`tooltip-inner`,children:d})]}))};Qr.displayName=`Tooltip`;let $r;var q,ei,ti,ni,ri,ii,ai,oi;const si={top:`bottom-100 start-50 translate-middle-x`,right:`top-50 start-100 translate-middle-y`,bottom:`top-100 start-50 translate-middle-x`,left:`top-50 end-100 translate-middle-y`},ci={top:{popover:`mb-3`,tooltip:`mb-2`},right:{popover:`ms-3`,tooltip:`ms-2`},bottom:{popover:`mt-3`,tooltip:`mt-2`},left:{popover:`me-3`,tooltip:`me-2`}};let J;new($r=(q=/*#__PURE__*/ new WeakMap,ei=class extends (ri=d){get open(){return E(this,q)}set open(e){O(this,q,e)}componentWillUnmount(){document.removeEventListener(`pointerdown`,this.handleOutside),clearTimeout(this.timer)}componentDidMount(){document.addEventListener(`pointerdown`,this.handleOutside)}render(){let r=this.props,{title:s,detail:c,placement:l=`top`,trigger:u,delay:d,overlayClassName:f,children:p,className:h=``,onMouseEnter:g,onMouseLeave:v,onFocus:y,onBlur:b,onClick:x,onKeyDown:S}=r,C=n(r,[`title`,`detail`,`placement`,`trigger`,`delay`,`overlayClassName`,`children`,`className`,`onMouseEnter`,`onMouseLeave`,`onFocus`,`onBlur`,`onClick`,`onKeyDown`]),w=this.open?this.id:void 0,ee=si[l],T=ci[l][c?`popover`:`tooltip`],E=o(`position-absolute w-max`,ee,T,f),D=/*#__PURE__*/ _(p)?/*#__PURE__*/ m(p,{"aria-describedby":[p.props[`aria-describedby`],w].filter(Boolean).join(` `)||void 0}):p;return/*#__PURE__*/ a(`span`,t(e({},C),{ref:this.root,className:`position-relative d-inline-block ${h}`,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick,onKeyDown:this.handleKeyDown,children:[D,this.open&&(c?/*#__PURE__*/ i(Zr,{id:w,className:E,title:s,placement:l,children:c}):/*#__PURE__*/ i(Qr,{id:w,className:E,placement:l,children:s}))]}))}constructor(...e){super(...e),D(this,q,{writable:!0,value:(oi(this),ii(this,!1))}),s(this,`id`,fe()),s(this,`root`,/*#__PURE__*/ h()),s(this,`timer`,void 0),s(this,`setOpen`,ai(this,e=>this.open=e)),s(this,`hide`,()=>{clearTimeout(this.timer),this.setOpen(!1)}),s(this,`setOpenAfterDelay`,e=>{clearTimeout(this.timer);let{delay:t}=this.props,n=typeof t==`number`?t:t==null?void 0:t[e?`show`:`hide`];if(!n)return this.setOpen(e);this.timer=setTimeout(()=>this.setOpen(e),n)}),s(this,`hasTrigger`,e=>(this.props.trigger?Array.isArray(this.props.trigger)?this.props.trigger:[this.props.trigger]:[`hover`,`focus`]).includes(e)),s(this,`handleMouseEnter`,e=>{var t,n;(t=(n=this.props).onMouseEnter)==null||t.call(n,e),this.hasTrigger(`hover`)&&this.setOpenAfterDelay(!0)}),s(this,`handleMouseLeave`,e=>{var t,n,r;(t=(n=this.props).onMouseLeave)==null||t.call(n,e),this.hasTrigger(`hover`)&&!((r=this.root.current)!=null&&r.contains(document.activeElement))&&this.setOpenAfterDelay(!1)}),s(this,`handleFocus`,e=>{var t,n;(t=(n=this.props).onFocus)==null||t.call(n,e),this.hasTrigger(`focus`)&&this.setOpenAfterDelay(!0)}),s(this,`handleBlur`,e=>{var t,n;(t=(n=this.props).onBlur)==null||t.call(n,e),this.hasTrigger(`focus`)&&!e.currentTarget.contains(e.relatedTarget)&&this.setOpenAfterDelay(!1)}),s(this,`handleClick`,e=>{var t,n;(t=(n=this.props).onClick)==null||t.call(n,e),!e.defaultPrevented&&this.hasTrigger(`click`)&&this.setOpenAfterDelay(!this.open)}),s(this,`handleOutside`,({target:e})=>{var t;e instanceof Node&&!((t=this.root.current)!=null&&t.contains(e))&&this.hide()}),s(this,`handleKeyDown`,e=>{var t,n;(t=(n=this.props).onKeyDown)==null||t.call(n,e),e.key===`Escape`&&this.open&&(e.preventDefault(),this.hide())})}},{e:[ii,ai,oi],c:[J,ni]}=T(ei,[[M,1,`open`],[A,0,`setOpen`]],[N],ri),ei),ti=class extends k{constructor(){super(J),s(this,`displayName`,`OverlayBox`),ni()}},s(ti,$r,void 0),ti);let li;var Y,ui,di,fi,pi,mi,hi;let gi;new(li=(Y=/*#__PURE__*/ new WeakMap,ui=class extends (pi=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 E(this,Y)}set currentDate(e){O(this,Y,e)}get dateGrid(){let e=new Date(this.currentDate);e.setDate(1),e=/* @__PURE__ */ new Date(+e-e.getDay()*re);let t=Array.from(Array(42),(t,n)=>new Date(+e+n*re));return de(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:r,currentDate:o,dateGrid:s}=this,c=this.observedProps,{className:l=``,style:u,theme:d=`primary`,onChange:f,onSelect:p}=c,m=n(c,[`className`,`style`,`theme`,`onChange`,`onSelect`]);return/*#__PURE__*/ a(`table`,t(e({},m),{className:`table ${l}`,style:e({tableLayout:`fixed`},u),children:[/*#__PURE__*/ i(`caption`,{children:/*#__PURE__*/ a(`div`,{className:`d-flex justify-content-between align-items-center`,children:[/*#__PURE__*/ i(I,{theme:d,onClick:this.changePreviousMonth,children:`<`}),P(o,`YYYY-MM`),/*#__PURE__*/ i(I,{theme:d,onClick:this.changeNextMonth,children:`>`})]})}),/*#__PURE__*/ i(`thead`,{children:/*#__PURE__*/ i(`tr`,{children:s[0].map((e,t,{length:n})=>/*#__PURE__*/ i(`th`,{className:`theme-${d} theme-contrast`,style:{width:`calc(100% / ${n})`},scope:`col`,children:r.format(e)},t))})}),/*#__PURE__*/ i(`tbody`,{children:s.map(e=>/*#__PURE__*/ i(`tr`,{children:e.map(this.renderDate)},e[0]+``))})]}))}constructor(...e){super(...e),D(this,Y,{writable:!0,value:(hi(this),mi(this,/* @__PURE__ */ new Date))}),s(this,`changePreviousMonth`,()=>this.changeMonth(-1)),s(this,`changeNextMonth`,()=>this.changeMonth(1)),s(this,`handleCellClick`,({target:e,currentTarget:t})=>{var n,r,i;if(!(e instanceof Element))return;let a=e.closest(`[data-calendar-index]`);if(!a||!t.contains(a))return;let o=a.dataset.calendarDate,s=Number(a.dataset.calendarIndex),c=(n=this.props.value)==null?void 0:n.filter(({date:e})=>P(e,`YYYY-MM-DD`)===o),l=c==null?void 0:c[s];l&&((r=(i=this.props).onSelect)==null||r.call(i,l))}),s(this,`renderDate`,e=>{let{value:t}=this.observedProps,n=P(e,`YYYY-MM-DD`),r=t==null?void 0:t.filter(({date:e})=>P(e,`YYYY-MM-DD`)===n);return/*#__PURE__*/ a(`td`,{className:o({"opacity-50":e.getMonth()!==this.currentDate.getMonth(),"fw-bold":n===P(/* @__PURE__ */ new Date,`YYYY-MM-DD`)}),onClick:this.handleCellClick,children:[/*#__PURE__*/ i(`time`,{className:`d-block`,dateTime:e.toJSON(),children:e.getDate()}),r==null?void 0:r.map((e,t)=>typeof e.content==`object`?e.content:/*#__PURE__*/ i(J,{title:e.content,children:/*#__PURE__*/ i(Ee,{className:`d-inline-block text-decoration-none w-100 text-truncate`,theme:Yt(e.content+``,[`light`]),"data-calendar-date":n,"data-calendar-index":t,href:e.link,children:e.content})},`${n}-${t}`))]},e+``)})}},{e:[mi,hi],c:[gi,fi]}=T(ui,[[j,3,`weekFormatter`],[M,1,`currentDate`],[j,3,`dateGrid`],[A,2,`changeMonth`]],[N],pi),ui),di=class extends k{constructor(){super(gi),s(this,`displayName`,`MonthCalendar`),fi()}},s(di,li,void 0),di);const _i=({avatar:e,name:t})=>/*#__PURE__*/ a(r,{children:[/*#__PURE__*/ i(Ce,{size:2,style:{marginRight:`0.5rem`},src:e}),/*#__PURE__*/ i(`span`,{className:`align-middle`,children:t})]});_i.displayName=`Nameplate`;const X=r=>{let{variant:a,vertical:s,fill:c,justified:l,className:u}=r,d=n(r,[`variant`,`vertical`,`fill`,`justified`,`className`]);return/*#__PURE__*/ i(`nav`,t(e({},d),{className:o(`nav`,a&&`nav-${a}`,s&&(a===`pills`?`nav-pills-vertical`:`flex-column`),{"nav-fill":c,"nav-justified":l},u)}))},vi=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`li`,t(e({},s),{className:o(`nav-item`,a)}))},yi=r=>{let{disabled:a,className:s,href:c,onClick:l,tabIndex:u}=r,d=n(r,[`disabled`,`className`,`href`,`onClick`,`tabIndex`]);return/*#__PURE__*/ i(`a`,t(e({},d),{href:a?void 0:c,tabIndex:a?-1:u,"aria-disabled":a||void 0,className:o(`nav-link`,{disabled:a,"pe-none":a},s),onClick:a?void 0:l}))};X.displayName=`Nav`,vi.displayName=`NavItem`,yi.displayName=`NavLink`;const bi=r=>{let{expand:a,theme:s,className:c}=r,l=n(r,[`expand`,`theme`,`className`]);return/*#__PURE__*/ i(`nav`,t(e({},l),{className:o(`navbar`,a&&(a===!0?`navbar-expand`:`${a}:navbar-expand`),c),"data-bs-theme":s}))},xi=r=>{if(r.as===`span`){let{as:a,className:s}=r,c=n(r,[`as`,`className`]);return/*#__PURE__*/ i(`span`,t(e({},c),{className:o(`navbar-brand`,s)}))}let{as:a,className:s}=r,c=n(r,[`as`,`className`]);return/*#__PURE__*/ i(`a`,t(e({},c),{className:o(`navbar-brand`,s)}))},Si=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`ul`,t(e({},s),{className:o(`navbar-nav`,a)}))},Ci=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`span`,t(e({},s),{className:o(`navbar-text`,a)}))},wi=r=>{let{expanded:a,className:s,"aria-label":c=`Toggle navigation`}=r,l=n(r,[`expanded`,`className`,`aria-label`]);return/*#__PURE__*/ i(I,t(e({},l),{type:`button`,className:o(`navbar-toggler`,s),"aria-label":c,"aria-expanded":a,icon:!0,children:/*#__PURE__*/ i(`span`,{className:`navbar-toggler-icon`,"aria-hidden":`true`})}))};bi.displayName=`Navbar`,xi.displayName=`NavbarBrand`,Si.displayName=`NavbarNav`,Ci.displayName=`NavbarText`,wi.displayName=`NavbarToggler`;let Ti;var Z,Q,Ei,Di,Oi,ki,Ai,ji,Mi;const Ni=Array.from({length:6},(e,t)=>`h${t+1}`).join(`,`);let $;new(Ti=(Z=/*#__PURE__*/ new WeakMap,Q=/*#__PURE__*/ new WeakMap,Ei=class extends (ki=d){get list(){return E(this,Z)}set list(e){O(this,Z,e)}get scrollY(){return E(this,Q)}set scrollY(e){O(this,Q,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.initList())}static slugOf(e){let t=e.toLowerCase().replace(/\W+/g,`-`).replace(/^-+|-+$/g,``);return!t||document.getElementById(t)?fe():t}initList(){let{rootSelector:e}=this.props,t=e?document.querySelector(e):document;t&&(this.list=Array.from(t.querySelectorAll(Ni),e=>{var t;let n=e.textContent.trim();(t=e).id||(t.id=$.slugOf(n));let{id:r,tagName:i,offsetTop:a}=e;return{id:r,level:+i[1],text:n,top:a}}))}componentWillUnmount(){var e,t;(e=(t=globalThis).removeEventListener)==null||e.call(t,`scroll`,this.updateScrollY)}render(){let{list:r}=this,a=this.props,{depth:o,minDepth:s,rootSelector:c,onItemClick:l}=a,u=n(a,[`depth`,`minDepth`,`rootSelector`,`onItemClick`]);return/*#__PURE__*/ i(X,t(e({},u),{variant:`underline`,vertical:!0,children:r.map(this.renderLink)}))}constructor(...e){super(...e),D(this,Z,{writable:!0,value:(Mi(this),Ai(this,[]))}),D(this,Q,{writable:!0,value:ji(this,0)}),s(this,`updateScrollY`,A(()=>this.scrollY=window.scrollY)),s(this,`scrollTo`,e=>()=>{var t,n;setTimeout(()=>le(`[id="${e.id}"]`)),(t=(n=this.props).onItemClick)==null||t.call(n,e)}),s(this,`renderLink`,({id:e,level:t,text:n,top:r})=>{let{currentActiveId:a}=this,{depth:o=1/0,minDepth:s=1}=this.props;return s<=t&&t<=o&&/*#__PURE__*/ i(yi,{className:a===e?` active`:``,style:{textIndent:`${t-s}rem`},href:`#${e}`,"aria-current":a===e?`location`:void 0,onClick:this.scrollTo({id:e,level:t,text:n,top:r}),children:n},e)})}},{e:[Ai,ji,Mi],c:[$,Oi]}=T(Ei,[[M,1,`list`],[M,1,`scrollY`],[j,3,`currentActiveId`],[A,2,`initList`]],[N],ki),Ei),Di=class extends k{constructor(){super($),s(this,`displayName`,`PageNav`),Oi()}},s(Di,Ti,void 0),Di);var Pi,Fi,Ii,Li,Ri,zi,Bi;let Vi;var Hi=/*#__PURE__*/ new WeakMap,Ui=/*#__PURE__*/ new WeakMap,Wi=/*#__PURE__*/ new WeakMap,Gi=class extends (Fi=d){get scrollLeft(){return E(this,Hi)}set scrollLeft(e){O(this,Hi,e)}get scrollWidth(){return E(this,Ui)}set scrollWidth(e){O(this,Ui,e)}get clientWidth(){return E(this,Wi)}set clientWidth(e){O(this,Wi,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,{className:n=``,children:r}=this.props;return/*#__PURE__*/ a(`div`,{className:`position-relative overflow-y-hidden ${n}`,children:[e&&/*#__PURE__*/ i(`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.scrollBackward,children:/*#__PURE__*/ i(W,{name:`caret-left-fill`})}),/*#__PURE__*/ i(`div`,{ref:this.scrollerRef,className:`overflow-x-auto aEvBXq_scrollerInner`,children:r}),t&&/*#__PURE__*/ i(`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.scrollForward,children:/*#__PURE__*/ i(W,{name:`caret-right-fill`})})]})}constructor(...e){super(...e),s(this,`scrollerRef`,(Bi(this),/*#__PURE__*/ h())),D(this,Hi,{writable:!0,value:Ii(this,0)}),D(this,Ui,{writable:!0,value:Li(this,0)}),D(this,Wi,{writable:!0,value:Ri(this,0)}),s(this,`updateScroll`,zi(this,()=>{let e=this.scrollerRef.current;return e&&(this.scrollLeft=e.scrollLeft,this.scrollWidth=e.scrollWidth,this.clientWidth=e.clientWidth),e})),s(this,`resizeObserver`,void 0),s(this,`scrollBy`,e=>{let t=this.scrollerRef.current;t==null||t.scrollBy({left:e*t.clientWidth*.8,behavior:`smooth`})}),s(this,`scrollBackward`,()=>this.scrollBy(-1)),s(this,`scrollForward`,()=>this.scrollBy(1))}};({e:[Ii,Li,Ri,zi,Bi],c:[Vi,Pi]}=T(Gi,[[M,1,`scrollLeft`],[M,1,`scrollWidth`],[M,1,`clientWidth`],[j,3,`canScrollLeft`],[j,3,`canScrollRight`],[A,0,`updateScroll`]],[N],Fi)),Pi();const Ki=r=>{let{className:a=``,children:o}=r,s=n(r,[`className`,`children`]);return/*#__PURE__*/ i(Vi,{className:a,children:/*#__PURE__*/ i(X,t(e({},s),{className:`flex-nowrap`,children:o}))})};Ki.displayName=`ScrollNav`;const qi=r=>{let{value:a,className:s,children:c}=r,l=n(r,[`value`,`className`,`children`]);return/*#__PURE__*/ i(`button`,t(e({},l),{type:`button`,className:o(`menu-item`,s),"data-value":a,children:c}))};qi.displayName=`Option`;const Ji=({align:e,className:t,menuClassName:n,children:r,theme:a=`primary`,variant:s=`solid`,size:c,disabled:l,style:d,value:f,onChange:p,valueRender:m})=>{var h;let g=u.toArray(r).find(e=>/*#__PURE__*/ _(e)&&e.type===qi&&e.props.value===f);return/*#__PURE__*/ i(lr,{align:e,className:`w-100`,menuClassName:n,label:(h=m==null?void 0:m(f==null?``:f))==null?g==null?void 0:g.props.children:h,toggleProps:{className:o(`w-100 d-flex justify-content-between align-items-center`,t),theme:a,variant:s,size:c,disabled:l,style:d},onClick:({target:e})=>{if(!(e instanceof Element))return;let t=e.closest(`[data-value]`);t&&(p==null||p(t.dataset.value||``))},children:r})};Ji.displayName=`Select`;let Yi;var Xi,Zi,Qi,$i,ea,ta,na,ra,ia;function aa(e,t,n){return F(function*(){let r=yield be(e,{useCORS:!0});return new Promise((e,i)=>r.toBlob(t=>t?e(URL.createObjectURL(t)):i(),t,n))})()}let oa;new(Yi=(Xi=/*#__PURE__*/ new WeakMap,Zi=/*#__PURE__*/ new WeakMap,Qi=class extends (ta=d){get loading(){return E(this,Xi)}set loading(e){O(this,Xi,e)}get imageURI(){return E(this,Zi)}set imageURI(e){O(this,Zi,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 o=this.props,{className:s=``,children:c}=o,l=n(o,[`className`,`children`]),{loading:u,imageURI:d}=this;return/*#__PURE__*/ a(r,{children:[u&&/*#__PURE__*/ i(Jr,{}),/*#__PURE__*/ a(`div`,t(e({},l),{ref:this.root,className:`position-relative ${s}`,onMouseEnter:d?void 0:this.generateImage,onTouchStart:d?void 0:this.generateImage,children:[c,d&&/*#__PURE__*/ i(G,{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,s(this,`root`,(ia(this),/*#__PURE__*/ h())),D(this,Xi,{writable:!0,value:na(this,!1)}),D(this,Zi,{writable:!0,value:ra(this,``)}),s(this,`generateImage`,()=>F(function*(){n.imageURI&&(URL.revokeObjectURL(n.imageURI),n.imageURI=``),n.loading=!0,n.imageURI=yield aa(n.root.current),n.loading=!1})()),s(this,`share`,t=>F(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:[na,ra,ia],c:[oa,ea]}=T(Qi,[[M,1,`loading`],[M,1,`imageURI`]],[N],ta),Qi),$i=class extends k{constructor(){super(oa),s(this,`displayName`,`ShareBox`),ea()}},s($i,Yi,void 0),$i);const sa=o=>{let{animation:s,loading:c,disabled:l,children:u}=o,d=n(o,[`animation`,`loading`,`disabled`,`children`]);return/*#__PURE__*/ a(I,t(e({},d),{disabled:c||l,children:[c&&/*#__PURE__*/ a(r,{children:[/*#__PURE__*/ i(K,{className:u?`me-2`:``,size:`sm`,animation:s,role:`status`,"aria-hidden":`true`}),!u&&/*#__PURE__*/ i(`span`,{className:`visually-hidden`,children:`Loading...`})]}),u]}))};sa.displayName=`SpinnerButton`;const ca=r=>{let{striped:a,stripedColumns:s,hover:c,bordered:l,borderless:u,small:d,responsive:f,className:p}=r,m=n(r,[`striped`,`stripedColumns`,`hover`,`bordered`,`borderless`,`small`,`responsive`,`className`]),h=/*#__PURE__*/ i(`table`,t(e({},m),{className:o(`table`,{"table-striped":a,"table-striped-columns":s,"table-hover":c,"table-bordered":l,"table-borderless":u,"table-sm":d},p)}));return f?/*#__PURE__*/ i(`div`,{className:o(`table-responsive`,f!==!0&&`${f}:table-responsive`),children:h}):h};ca.displayName=`Table`;const la=r=>{let{animation:a=`border`,theme:o=`primary`,size:s,colSpan:c}=r,l=n(r,[`animation`,`theme`,`size`,`colSpan`]);return/*#__PURE__*/ i(`tr`,t(e({},l),{children:/*#__PURE__*/ i(`td`,{className:`text-center p-4`,colSpan:c,children:/*#__PURE__*/ i(K,{animation:a,theme:o,size:s,role:`status`,"aria-label":`Loading`})})}))};la.displayName=`TableSpinner`;let ua;var da,fa,pa,ma,ha,ga,_a,va,ya;let ba;new(ua=(da=/*#__PURE__*/ new WeakMap,fa=/*#__PURE__*/ new WeakMap,pa=class extends (ga=d){get expanded(){return E(this,da)}set expanded(e){O(this,da,e)}get overflowed(){return E(this,fa)}set overflowed(e){O(this,fa,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{children:e,rows:t=3,expandText:n=`⏬`,collapseText:o}=this.props,{expanded:s,overflowed:c}=this,l={overflow:`hidden`,display:`-webkit-box`,WebkitBoxOrient:`vertical`,WebkitLineClamp:t};return/*#__PURE__*/ a(r,{children:[/*#__PURE__*/ i(`div`,{ref:this.contentRef,style:s?void 0:l,children:e}),(c||s)&&/*#__PURE__*/ i(`button`,{type:`button`,className:`bg-transparent border-0 p-0`,"aria-expanded":s,onClick:this.toggle,children:s?o:n})]})}constructor(...e){super(...e),D(this,da,{writable:!0,value:(ya(this),_a(this,!1))}),D(this,fa,{writable:!0,value:va(this,!1)}),s(this,`contentRef`,/*#__PURE__*/ h()),s(this,`checkOverflow`,A(()=>{let{current:e}=this.contentRef;e&&(this.overflowed=e.scrollHeight>e.clientHeight)})),s(this,`toggle`,A(()=>{this.expanded=!this.expanded,this.expanded||requestAnimationFrame(this.checkOverflow)}))}},{e:[_a,va,ya],c:[ba,ha]}=T(pa,[[M,1,`expanded`],[M,1,`overflowed`]],[N],ga),pa),ma=class extends k{constructor(){super(ba),s(this,`displayName`,`TextTruncateContent`),ha()}},s(ma,ua,void 0),ma);const xa=r=>{let{rows:a=3,expandText:o=`⏬`,collapseText:s=`⏫`,children:c}=r,l=n(r,[`rows`,`expandText`,`collapseText`,`children`]);return/*#__PURE__*/ i(`div`,t(e({},l),{children:/*#__PURE__*/ i(ba,{rows:a,expandText:o,collapseText:s,children:c})}))};xa.displayName=`TextTruncate`;const Sa=r=>{let{dateTime:a,format:o}=r,s=n(r,[`dateTime`,`format`]);return/*#__PURE__*/ i(`time`,t(e({dateTime:new Date(a).toJSON()},s),{children:P(a,o)}))};Sa.displayName=`Time`;const Ca={ms:`millisecond(s)`,s:`second(s)`,m:`minute(s)`,H:`hour(s)`,D:`day(s)`,W:`week(s)`,M:`month(s)`,Y:`year(s)`},wa=r=>{let{date:i,unitWords:o=Ca,beforeWord:s=` before`,afterWord:c=` after`}=r,l=n(r,[`date`,`unitWords`,`beforeWord`,`afterWord`]);i=new Date(i);let{distance:u,unit:d}=ce(i);return/*#__PURE__*/ a(`time`,t(e({},l),{dateTime:i.toJSON(),title:i.toLocaleString(),children:[Math.abs(u),` `,o[d],u<0?s:c]}))};wa.displayName=`TimeDistance`;const Ta=r=>{let{className:o,events:s,timeFormat:c}=r,l=n(r,[`className`,`events`,`timeFormat`]);return/*#__PURE__*/ i(`ol`,t(e({className:`list-unstyled hsu__a_timeline ${o}`},l),{children:s.map(({title:t,summary:n,time:r,link:o,people:s})=>/*#__PURE__*/ i(`li`,{className:`position-relative hsu__a_timelineItem hsu__a_right`,children:/*#__PURE__*/ i(je,{children:/*#__PURE__*/ a(Fe,{className:`p-4 d-flex flex-column gap-3 align-items-center`,children:[/*#__PURE__*/ i(Le,{className:`h5 m-0`,children:/*#__PURE__*/ i(`a`,{className:`text-decoration-none stretched-link`,href:o,children:t})}),/*#__PURE__*/ a(`div`,{className:`small fg-3 d-flex gap-2`,children:[`⏲️`,/*#__PURE__*/ i(Sa,{dateTime:r[0],format:c}),r[1]&&`~`,r[1]&&/*#__PURE__*/ i(Sa,{dateTime:r[1],format:c})]}),/*#__PURE__*/ i(`ul`,{className:`list-unstyled m-0 d-flex gap-2 flex-wrap justify-content-around`,children:s==null?void 0:s.map(t=>/*#__PURE__*/ i(`li`,{children:/*#__PURE__*/ i(_i,e({},t))},t.name))}),/*#__PURE__*/ i(Re,{className:`m-0`,children:n})]})})},t))}))};Ta.displayName=`Timeline`;var Ea,Da;const Oa={"top-start":`top-0 start-0`,"top-center":`top-0 start-50 translate-middle-x`,"top-end":`top-0 end-0`,"middle-start":`top-50 start-0 translate-middle-y`,"middle-center":`top-50 start-50 translate-middle`,"middle-end":`top-50 end-0 translate-middle-y`,"bottom-start":`bottom-0 start-0`,"bottom-center":`bottom-0 start-50 translate-middle-x`,"bottom-end":`bottom-0 end-0`},ka=r=>{let{position:a=`top-end`,className:s,"aria-live":c=`polite`,"aria-atomic":l=!0}=r,u=n(r,[`position`,`className`,`aria-live`,`aria-atomic`]),d=a===`static`;return/*#__PURE__*/ i(`div`,t(e({},u),{className:o(`toast-container`,!d&&`position-fixed`,!d&&`p-3`,d?`position-static`:Oa[a],s),"aria-live":c,"aria-atomic":l}))},Aa=r=>{let{theme:a,role:s=`status`,className:c}=r,l=n(r,[`theme`,`role`,`className`]);return/*#__PURE__*/ i(`div`,t(e({},l),{className:o(`toast show`,a&&`theme-${a}`,c),role:s}))},ja=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`toast-header`,a)}))},Ma=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`toast-body`,a)}))};var Na=/*#__PURE__*/ new WeakMap,Pa=class{get messages(){return E(this,Na)}set messages(e){O(this,Na,e)}open(n){var r;let i=fe(),a=Date.now(),{promise:o,resolve:s}=Promise.withResolvers(),c=n.delay===0?void 0:setTimeout(()=>this.close(i),(r=n.delay)==null?3e3:r),l=t(e({id:i},n),{openedAt:a,resolve:s,timer:c});return this.messages=[...this.messages,l],o}close(r){let i=this.messages.find(e=>e.id===r);if(!i)return;let{resolve:a,timer:o}=i,s=n(i,[`resolve`,`timer`]);clearTimeout(o),a==null||a(t(e({},s),{closedAt:Date.now()})),this.messages=this.messages.filter(e=>e.id!==r)}constructor(e=ae){s(this,`TimeScalar`,void 0),D(this,Na,{writable:!0,value:void 0}),s(this,`Component`,void 0),s(this,`renderMessage`,void 0),s(this,`handleDismiss`,void 0),this.TimeScalar=e,O(this,Na,(Da(this),Ea(this,[]))),this.Component=N(({position:e})=>/*#__PURE__*/ i(ka,{position:e,onClick:this.handleDismiss,children:this.messages.map(this.renderMessage)})),this.renderMessage=({id:e,openedAt:t,title:n,body:r,theme:o,delay:s=3e3})=>{let c=!!n||s===0,l=this.TimeScalar.distanceOf(Date.now(),t).toShortString();return/*#__PURE__*/ a(Aa,{theme:o,children:[c&&/*#__PURE__*/ a(ja,{children:[/*#__PURE__*/ i(`strong`,{className:`me-auto`,children:n}),/*#__PURE__*/ i(`small`,{children:l}),/*#__PURE__*/ i(`button`,{type:`button`,className:`btn-close`,"aria-label":`Close`,"data-toast-dismiss":e})]}),/*#__PURE__*/ i(Ma,{children:r})]},e)},this.handleDismiss=({target:e})=>{var t;if(!(e instanceof Element))return;let n=(t=e.closest(`[data-toast-dismiss]`))==null?void 0:t.dataset.toastDismiss;n&&this.close(n)},this.Component.displayName=`ToastComponent`}};({e:[Ea,Da]}=T(Pa,[[M,1,`messages`],[A,2,`open`],[A,2,`close`]],[]));const Fa=r=>{let{type:s=`checkbox`,variant:c=`solid`,theme:l,name:u,value:d,checked:f,defaultChecked:p,disabled:m,className:h,children:g}=r,_=n(r,[`type`,`variant`,`theme`,`name`,`value`,`checked`,`defaultChecked`,`disabled`,`className`,`children`]);return/*#__PURE__*/ a(`label`,t(e({},_),{className:o(`btn-check`,`btn-${c}`,l&&`theme-${l}`,h),children:[/*#__PURE__*/ i(`input`,{type:s,name:u,value:d,checked:f,defaultChecked:p,disabled:m,autoComplete:`off`}),g]}))};Fa.displayName=`ToggleButton`;var Ia,La,Ra,za,Ba;let Va;var Ha=/*#__PURE__*/ new WeakMap,Ua=/*#__PURE__*/ new WeakMap,Wa=class extends (La=d){get echoed(){return E(this,Ha)}set echoed(e){O(this,Ha,e)}get started(){return E(this,Ua)}set started(e){O(this,Ua,e)}componentDidMount(){this.start()}render(){let r=this.props,{className:a,text:s,intervals:c}=r,l=n(r,[`className`,`text`,`intervals`]),{started:u,echoed:d}=this;return/*#__PURE__*/ i(`pre`,t(e({},l),{ref:this.init,className:o(`text-wrap`,a),children:u?d+(d===s?``:`_`):s}))}constructor(...e){var t;super(...e),t=this,D(this,Ha,{writable:!0,value:(Ba(this),Ra(this,``))}),D(this,Ua,{writable:!0,value:za(this,!1)}),s(this,`start`,A(()=>this.started=!0)),s(this,`echo`,A(e=>this.echoed+=e)),s(this,`init`,e=>{e&&new IntersectionObserver(([{isIntersecting:e}],n)=>F(function*(){if(!e)return;n.disconnect();let{text:r,intervals:i=150}=t.props;for(let e of r)yield ue(i/1e3),t.echo(e)})()).observe(e)})}};({e:[Ra,za,Ba],c:[Va,Ia]}=T(Wa,[[M,1,`echoed`],[M,1,`started`]],[N],La)),Ia();const Ga=r=>{let{text:a,intervals:o}=r,s=n(r,[`text`,`intervals`]);return/*#__PURE__*/ i(Va,t(e({},s),{text:a,intervals:o}))};Ga.displayName=`TypeEcho`;const Ka=({email:e,website:t})=>/*#__PURE__*/ a(`address`,{className:`mb-0 d-flex justify-content-around gap-2`,children:[e&&/*#__PURE__*/ i(`a`,{rel:`noreferrer`,target:`_blank`,href:`mailto:`+e,children:/*#__PURE__*/ i(W,{name:`envelope`})}),t&&/*#__PURE__*/ i(`a`,{rel:`noreferrer`,target:`_blank`,href:t,children:/*#__PURE__*/ i(W,{name:`globe2`})})]}),qa=`X5DLia_image`,Ja=r=>{let{className:o=``,title:s,rank:c=[],linkOf:l}=r,u=n(r,[`className`,`title`,`rank`,`linkOf`]);return/*#__PURE__*/ i(zr,t(e({className:o},u),{children:/*#__PURE__*/ a(Br,{className:`X5DLia_rankBox`,children:[/*#__PURE__*/ a(Vr,{span:12,lg:7,children:[/*#__PURE__*/ a(`div`,{className:`shadow rounded-3 X5DLia_title`,children:[/*#__PURE__*/ a(`div`,{className:`X5DLia_medal`,children:[/*#__PURE__*/ i(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),/*#__PURE__*/ i(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),/*#__PURE__*/ i(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`})]}),/*#__PURE__*/ i(`h3`,{"data-text":s,className:`position-relative m-auto mb-0 fw-bold text-center`,children:s})]}),/*#__PURE__*/ i(`ul`,{className:`row mt-2 g-0 align-items-end text-center ps-0 pt-2 list-unstyled X5DLia_topUsers`,children:c.slice(0,3).map(t=>/*#__PURE__*/ a(`li`,{className:`col`,children:[/*#__PURE__*/ i(`div`,{className:`shadow-lg overflow-hidden rounded-circle m-auto ${qa}`,children:/*#__PURE__*/ i(G,{src:t.avatar,alt:t.name,loading:`lazy`,fluid:!0})}),/*#__PURE__*/ a(`div`,{className:`position-relative overflow-hidden X5DLia_topUser`,children:[/*#__PURE__*/ a(`div`,{className:`position-relative`,children:[/*#__PURE__*/ i(`i`,{className:`d-block overflow-hidden m-auto mb-1 rounded-circle`}),/*#__PURE__*/ i(`a`,{className:`d-block mb-0 stretched-link`,href:(l==null?void 0:l(t))||`#`,children:t.name}),/*#__PURE__*/ i(`strong`,{children:t.score})]}),/*#__PURE__*/ i(Ka,e({},t))]})]},t.id))})]}),/*#__PURE__*/ i(Vr,{span:12,lg:5,children:/*#__PURE__*/ i(ca,{className:`my-3 pt-2 X5DLia_restUsers`,responsive:!0,children:/*#__PURE__*/ i(`tbody`,{children:c.slice(3,10).map((t,n,{length:r})=>/*#__PURE__*/ a(`tr`,{className:`position-relative`,children:[/*#__PURE__*/ i(`td`,{className:`align-middle`,children:/*#__PURE__*/ i(Ee,{className:`fw-bold fst-italic`,children:(n+4+``).padStart((r+``).length,`0`)})}),/*#__PURE__*/ a(`td`,{className:`position-relative text-truncate X5DLia_name`,children:[/*#__PURE__*/ i(`div`,{className:`d-inline-block overflow-hidden align-middle rounded-circle ${qa}`,children:/*#__PURE__*/ i(G,{src:t.avatar,alt:t.name,loading:`lazy`,fluid:!0})}),/*#__PURE__*/ i(`a`,{className:`ms-2 d-inline-block align-middle stretched-link`,style:{color:`rgb(248, ${(n+2)*15}, ${(n+2)*35})`},href:(l==null?void 0:l(t))||`#`,children:t.name})]}),/*#__PURE__*/ i(`td`,{className:`align-middle`,children:t.score}),/*#__PURE__*/ i(`td`,{className:`align-middle`,children:/*#__PURE__*/ i(Ka,e({},t))})]},t.id))})})})]})}))};Ja.displayName=`UserRankView`;const Ya=r=>{let{className:a=``,children:o,duration:s}=r,c=n(r,[`className`,`children`,`duration`]);return/*#__PURE__*/ i(`div`,t(e({className:`overflow-hidden h-100 ${a}`},c),{children:/*#__PURE__*/ i(`div`,{className:`d-inline-block max-w-100 max-h-100 QBd6SG_scrollWrap`,style:{"--duration":s},children:/*#__PURE__*/ i(`div`,{className:`d-inline-block QBd6SG_scrollItem`,children:o})})}))};Ya.displayName=`VerticalMarquee`;const Xa=[`🐵`,`🐔`,`🐶`,`🐷`,`🐭`,`🐮`,`🐯`,`🐰`,`🐲`,`🐍`,`🐴`,`🐐`],Za=e=>{let t=e<0?e+1:e;return Xa[(t%12+12)%12]},Qa=r=>{let{className:o=``,itemClassName:s=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,startYear:c,endYear:l=(/* @__PURE__ */ new Date()).getFullYear(),itemOf:u}=r,d=n(r,[`className`,`itemClassName`,`startYear`,`endYear`,`itemOf`]);return/*#__PURE__*/ i(`ol`,t(e({className:`list-unstyled m-0 d-flex flex-wrap justify-content-center gap-3 ${o}`},d),{children:Array.from({length:l-c+1},(e,t)=>{let n=l-t;if(n===0)return null;let r=Za(n),{link:o=`#`,title:c}=(u==null?void 0:u(n,r))||{};return/*#__PURE__*/ i(`li`,{className:s,children:/*#__PURE__*/ a(`a`,{className:`d-inline-block p-3 text-decoration-none text-center`,href:o,children:[/*#__PURE__*/ i(`div`,{className:`fs-3xl`,children:r}),c]})},n)})}))};Qa.displayName=`ZodiacBar`;export{Ce as Avatar,we as AvatarStack,Ee as Badge,I as Button,ke as ButtonGroup,Ae as ButtonToolbar,je as Card,Fe as CardBody,Ie as CardFooter,Me as CardGroup,Pe as CardHeader,Ne as CardImageOverlay,Re as CardText,Le as CardTitle,Bn as Checkbox,Vn as Chip,Hn as ChipInput,ze as ClickBoundary,Be as CloseButton,qt as CodeBlock,Vr as Col,pr as Combobox,fr as ComboboxOption,zr as Container,an as Countdown,yr as DatePicker,fn as Dialog,gn as DialogBody,ln as DialogClose,_n as DialogFooter,mn as DialogHeader,hn as DialogTitle,Cn as Drawer,xn as DrawerBody,Sn as DrawerFooter,yn as DrawerHeader,bn as DrawerTitle,Nn as Editor,Fn as EditorHTML,kr as Form,In as FormAdornment,Ln as FormAdornmentText,Ir as FormCheck,hr as FormControl,xr as FormFeedback,jr as FormField,Nr as FormFieldContent,Ar as FormFieldset,Sr as FormFloatingLabel,Rn as FormGhost,Mr as FormGroup,Pr as FormLabel,Lr as FormRange,_r as FormSelect,Rr as FormSwitch,br as FormText,gr as FormTextArea,U as HorizontalMarquee,Hr as HorizontalMarqueeBox,W as Icon,G as Image,Cr as InputGroup,wr as InputGroupText,Ur as ListGroup,Kr as ListGroupItem,qr as LiveTSX,Jr as Loading,lr as Menu,rr as MenuDivider,nr as MenuHeader,$n as MenuItem,ir as MenuItemContent,ar as MenuItemDescription,er as MenuPanel,or as MenuSubmenu,tr as MenuText,gi as MonthCalendar,_i as Nameplate,vn as NativeDialog,X as Nav,vi as NavItem,yi as NavLink,bi as Navbar,xi as NavbarBrand,Si as NavbarNav,Ci as NavbarText,wi as NavbarToggler,Tr as OTPInput,qi as Option,J as OverlayBox,$ as PageNav,Or as PasswordStrength,Zr as Popover,Fr as Radio,Br as Row,Ki as ScrollNav,Ji as Select,oa as ShareBox,K as Spinner,sa as SpinnerButton,ca as Table,la as TableSpinner,xa as TextTruncate,Sa as Time,wa as TimeDistance,Ta as Timeline,Pa as Toast,Ma as ToastBody,ka as ToastContainer,ja as ToastHeader,Aa as ToastItem,Fa as ToggleButton,Qr as Tooltip,Ga as TypeEcho,Ja as UserRankView,Jt as VariantColors,Ya as VerticalMarquee,Qa as ZodiacBar,Xa as ZodiacSigns,Se as animate,aa as elementToImage,Pn as parser,Yt as text2color,Za as zodiacOf};
|
package/dist/style.css
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
.Ocw1GG_hiddenBackdrop {
|
|
2
|
+
--bs-dialog-backdrop-bg: transparent;
|
|
3
|
+
--bs-dialog-backdrop-blur: 0;
|
|
4
|
+
}
|
|
1
5
|
@keyframes lRDfma_scrollItem {
|
|
2
6
|
0%, 10% {
|
|
3
7
|
transform: translateX(0);
|
|
@@ -49,10 +53,6 @@
|
|
|
49
53
|
height: var(--scroll-height);
|
|
50
54
|
line-height: var(--scroll-height);
|
|
51
55
|
}
|
|
52
|
-
.Ocw1GG_hiddenBackdrop {
|
|
53
|
-
--bs-dialog-backdrop-bg: transparent;
|
|
54
|
-
--bs-dialog-backdrop-blur: 0;
|
|
55
|
-
}
|
|
56
56
|
.aEvBXq_scrollerInner {
|
|
57
57
|
-webkit-overflow-scrolling: touch;
|
|
58
58
|
scrollbar-width: none;
|
|
@@ -358,6 +358,7 @@
|
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
.X5DLia_rankBox .X5DLia_restUsers td .X5DLia_name {
|
|
361
|
+
max-width: 50%;
|
|
361
362
|
font-size: 0;
|
|
362
363
|
}
|
|
363
364
|
|
|
@@ -388,7 +389,6 @@
|
|
|
388
389
|
--duration: 10s;
|
|
389
390
|
animation: QBd6SG_scrollWrap;
|
|
390
391
|
animation-duration: var(--duration);
|
|
391
|
-
font-size: 0;
|
|
392
392
|
animation-timing-function: linear;
|
|
393
393
|
animation-iteration-count: infinite;
|
|
394
394
|
animation-direction: alternate;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "idea-react",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-beta.0",
|
|
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.",
|
|
@@ -34,16 +34,17 @@
|
|
|
34
34
|
"@shikijs/langs": "^4.5.0",
|
|
35
35
|
"@shikijs/themes": "^4.5.0",
|
|
36
36
|
"@swc/helpers": "^0.5.23",
|
|
37
|
+
"bootstrap": "6.0.0-alpha.1",
|
|
37
38
|
"classnames": "^2.5.1",
|
|
38
39
|
"editorjs-html": "^4.0.5",
|
|
39
40
|
"html2canvas": "^1.4.1",
|
|
40
41
|
"iterable-observer": "^1.1.1",
|
|
41
42
|
"lodash": "^4.18.1",
|
|
42
43
|
"mobx-react-helper": "^0.5.4",
|
|
43
|
-
"react-bootstrap": "^2.10.10",
|
|
44
44
|
"react-editor-js": "^2.1.0",
|
|
45
45
|
"react-live": "^5.0.1",
|
|
46
46
|
"shiki": "^4.5.0",
|
|
47
|
+
"vanilla-calendar-pro": "3.4.0",
|
|
47
48
|
"web-utility": "^4.8.1"
|
|
48
49
|
},
|
|
49
50
|
"peerDependencies": {
|
|
@@ -131,12 +132,10 @@
|
|
|
131
132
|
},
|
|
132
133
|
"scripts": {
|
|
133
134
|
"prepare": "husky",
|
|
134
|
-
"test": "lint-staged && node --import ./test/setup.mts --test --test-timeout=10000 test
|
|
135
|
-
"pack-preview": "cd preview/ && rimraf ../.parcel-cache dist/ && parcel build --public-url=. --dist-dir=../docs/preview/ --no-source-maps",
|
|
135
|
+
"test": "lint-staged && node --import ./test/setup.mts --test --test-timeout=10000 \"test/**/*.test.tsx\"",
|
|
136
136
|
"pack-docs": "rimraf docs/ && typedoc source/",
|
|
137
|
-
"start": "npm run pack-docs &&
|
|
138
|
-
"build": "npm run pack-docs &&
|
|
139
|
-
"prepublishOnly": "npm test && npm run build"
|
|
140
|
-
"preview": "cd preview/ && rimraf ../.parcel-cache dist/ && parcel"
|
|
137
|
+
"start": "npm run pack-docs && web-server docs/ -p 8080 -o",
|
|
138
|
+
"build": "npm run pack-docs && tsdown",
|
|
139
|
+
"prepublishOnly": "npm test && npm run build"
|
|
141
140
|
}
|
|
142
141
|
}
|
package/source/Avatar.tsx
CHANGED
|
@@ -1,25 +1,78 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
|
-
import { FC,
|
|
2
|
+
import { CSSProperties, FC, HTMLAttributes } from 'react';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import type { ComponentTheme } from './Button';
|
|
5
|
+
|
|
6
|
+
export type AvatarSize = 'xs' | 'sm' | 'lg' | 'xl';
|
|
7
|
+
export type AvatarStatus = 'online' | 'offline' | 'busy' | 'away';
|
|
8
|
+
|
|
9
|
+
export interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
|
|
10
|
+
/**
|
|
11
|
+
* Official size class name suffix, or a custom size in `rem`
|
|
12
|
+
* applied through the `--bs-avatar-size` CSS variable
|
|
13
|
+
*/
|
|
14
|
+
size?: AvatarSize | number;
|
|
15
|
+
theme?: ComponentTheme;
|
|
16
|
+
subtle?: boolean;
|
|
17
|
+
src?: string;
|
|
18
|
+
alt?: string;
|
|
19
|
+
status?: AvatarStatus;
|
|
20
|
+
statusLabel?: string;
|
|
6
21
|
}
|
|
7
22
|
|
|
8
23
|
export const Avatar: FC<AvatarProps> = ({
|
|
9
24
|
className,
|
|
10
25
|
style,
|
|
11
|
-
size
|
|
26
|
+
size,
|
|
27
|
+
theme,
|
|
28
|
+
subtle,
|
|
29
|
+
src,
|
|
30
|
+
alt,
|
|
31
|
+
status,
|
|
32
|
+
statusLabel = status,
|
|
33
|
+
children,
|
|
12
34
|
...props
|
|
13
35
|
}) => (
|
|
14
|
-
<
|
|
15
|
-
className={classNames(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
36
|
+
<span
|
|
37
|
+
className={classNames(
|
|
38
|
+
'avatar',
|
|
39
|
+
typeof size === 'string' && `avatar-${size}`,
|
|
40
|
+
theme && `theme-${theme}`,
|
|
41
|
+
subtle && 'avatar-subtle',
|
|
42
|
+
className
|
|
43
|
+
)}
|
|
44
|
+
style={
|
|
45
|
+
typeof size === 'number'
|
|
46
|
+
? ({ '--bs-avatar-size': `${size}rem`, ...style } as CSSProperties)
|
|
47
|
+
: style
|
|
48
|
+
}
|
|
21
49
|
{...props}
|
|
22
|
-
|
|
50
|
+
>
|
|
51
|
+
{src ? <img className="avatar-img" src={src} alt={alt} /> : children}
|
|
52
|
+
|
|
53
|
+
{status && (
|
|
54
|
+
<span
|
|
55
|
+
className={`avatar-status status-${status}`}
|
|
56
|
+
role="img"
|
|
57
|
+
aria-label={statusLabel}
|
|
58
|
+
/>
|
|
59
|
+
)}
|
|
60
|
+
</span>
|
|
23
61
|
);
|
|
24
62
|
|
|
25
63
|
Avatar.displayName = 'Avatar';
|
|
64
|
+
|
|
65
|
+
export interface AvatarStackProps extends HTMLAttributes<HTMLDivElement> {
|
|
66
|
+
size?: AvatarSize;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export const AvatarStack: FC<AvatarStackProps> = ({ className, size, children, ...props }) => (
|
|
70
|
+
<div
|
|
71
|
+
className={classNames('avatar-stack', size && `avatar-stack-${size}`, className)}
|
|
72
|
+
{...props}
|
|
73
|
+
>
|
|
74
|
+
{children}
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
AvatarStack.displayName = 'AvatarStack';
|
package/source/Button.tsx
CHANGED
|
@@ -4,12 +4,21 @@ import classNames from 'classnames';
|
|
|
4
4
|
import { ComponentPropsWithRef, FC, MouseEvent } from 'react';
|
|
5
5
|
|
|
6
6
|
export type ComponentTheme =
|
|
7
|
-
|
|
7
|
+
| 'primary'
|
|
8
|
+
| 'accent'
|
|
9
|
+
| 'secondary'
|
|
10
|
+
| 'success'
|
|
11
|
+
| 'danger'
|
|
12
|
+
| 'warning'
|
|
13
|
+
| 'info'
|
|
14
|
+
| 'dark'
|
|
15
|
+
| 'light'
|
|
16
|
+
| 'inverse';
|
|
8
17
|
|
|
9
18
|
interface ButtonStyleProps {
|
|
10
|
-
variant?: 'solid' | 'outline' | 'subtle' | 'text';
|
|
19
|
+
variant?: 'solid' | 'outline' | 'subtle' | 'text' | 'link';
|
|
11
20
|
theme?: ComponentTheme;
|
|
12
|
-
size?: 'sm' | 'lg';
|
|
21
|
+
size?: 'xs' | 'sm' | 'lg';
|
|
13
22
|
icon?: boolean;
|
|
14
23
|
styled?: boolean;
|
|
15
24
|
disabled?: boolean;
|
|
@@ -37,7 +46,7 @@ export const Button: FC<ButtonProps> = ({
|
|
|
37
46
|
}) => {
|
|
38
47
|
const attributes: ButtonElementAttributes = props;
|
|
39
48
|
const classes = classNames(
|
|
40
|
-
variant ? `btn-${variant}` : 'btn',
|
|
49
|
+
variant ? `btn-${variant}` : icon ? undefined : 'btn',
|
|
41
50
|
theme && `theme-${theme}`,
|
|
42
51
|
size && `btn-${size}`,
|
|
43
52
|
{ 'btn-icon': icon, 'btn-styled': styled, disabled },
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import { ComponentPropsWithRef, FC } from 'react';
|
|
3
|
+
|
|
4
|
+
export interface ButtonGroupProps extends ComponentPropsWithRef<'div'> {
|
|
5
|
+
vertical?: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const ButtonGroup: FC<ButtonGroupProps> = ({
|
|
9
|
+
vertical,
|
|
10
|
+
role = 'group',
|
|
11
|
+
className,
|
|
12
|
+
...props
|
|
13
|
+
}) => (
|
|
14
|
+
<div
|
|
15
|
+
role={role}
|
|
16
|
+
{...props}
|
|
17
|
+
className={classNames(vertical ? 'btn-group-vertical' : 'btn-group', className)}
|
|
18
|
+
/>
|
|
19
|
+
);
|
|
20
|
+
ButtonGroup.displayName = 'ButtonGroup';
|
|
21
|
+
|
|
22
|
+
export const ButtonToolbar: FC<ComponentPropsWithRef<'div'>> = ({
|
|
23
|
+
className,
|
|
24
|
+
role = 'toolbar',
|
|
25
|
+
...props
|
|
26
|
+
}) => <div role={role} {...props} className={classNames('btn-toolbar', className)} />;
|
|
27
|
+
|
|
28
|
+
ButtonToolbar.displayName = 'ButtonToolbar';
|