idea-react 1.0.0-rc.31 → 2.0.0-rc.2

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/ReadMe.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  A **[React][1] advanced components library** based on [TypeScript][2] & [Bootstrap][3], built by **[idea2app][4] remote developers team**.
4
4
 
5
- [![MobX compatibility](https://img.shields.io/badge/Compatible-1?logo=mobx&label=MobX%204%2F5%2F6)][5]
5
+ [![MobX compatibility](https://img.shields.io/badge/Compatible-1?logo=mobx&label=MobX%206%2F7)][5]
6
6
  [![NPM Dependency](https://img.shields.io/librariesio/github/idea2app/Idea-React.svg)][6]
7
7
  [![CI & CD](https://github.com/idea2app/Idea-React/actions/workflows/main.yml/badge.svg)][7]
8
8
 
@@ -12,6 +12,13 @@ A **[React][1] advanced components library** based on [TypeScript][2] & [Bootstr
12
12
  - Preview site: https://idea2app.github.io/Idea-React/preview/
13
13
  - Storybook playground: https://idea-react.vercel.app/
14
14
 
15
+ ## Versions
16
+
17
+ | SemVer | status | ES decorator | MobX |
18
+ | :----: | :----------: | :----------: | :---------: |
19
+ | `>=2` | ✅developing | stage-3 | `>=6.11` |
20
+ | `<2` | ❌deprecated | stage-2 | `>=4 <6.11` |
21
+
15
22
  ## Content
16
23
 
17
24
  ### Components
@@ -31,8 +38,9 @@ A **[React][1] advanced components library** based on [TypeScript][2] & [Bootstr
31
38
  13. [Editor HTML](source/EditorHTML.tsx)
32
39
  14. [Table Spinner](source/TableSpinner.tsx)
33
40
  15. [Loading](source/Loading.tsx)
34
- 16. [Overlay Box](source/OverlayBox.tsx)
35
- 17. [Dialog](source/Dialog.tsx)
41
+ 16. [Share Box](source/ShareBox.tsx)
42
+ 17. [Overlay Box](source/OverlayBox.tsx)
43
+ 18. [Dialog](source/Dialog.tsx)
36
44
 
37
45
  #### Data components
38
46
 
@@ -59,11 +67,11 @@ Open Map component & model, have been migrated to https://github.com/idea2app/Op
59
67
  ```html
60
68
  <link
61
69
  rel="stylesheet"
62
- href="https://unpkg.com/bootstrap@5.3.1/dist/css/bootstrap.min.css"
70
+ href="https://unpkg.com/bootstrap@5.3.2/dist/css/bootstrap.min.css"
63
71
  />
64
72
  <link
65
73
  rel="stylesheet"
66
- href="https://unpkg.com/bootstrap-icons@1.10.5/font/bootstrap-icons.css"
74
+ href="https://unpkg.com/bootstrap-icons@1.11.3/font/bootstrap-icons.css"
67
75
  />
68
76
  <link
69
77
  rel="stylesheet"
@@ -75,6 +83,22 @@ Open Map component & model, have been migrated to https://github.com/idea2app/Op
75
83
  />
76
84
  ```
77
85
 
86
+ ### `tsconfig.json`
87
+
88
+ Compatible with MobX 6/7:
89
+
90
+ ```json
91
+ {
92
+ "compilerOptions": {
93
+ "target": "ES6",
94
+ "moduleResolution": "Node",
95
+ "useDefineForClassFields": true,
96
+ "experimentalDecorators": false,
97
+ "jsx": "react-jsx"
98
+ }
99
+ }
100
+ ```
101
+
78
102
  ### Dialog
79
103
 
80
104
  ```tsx
@@ -149,7 +173,7 @@ export class ExamplePage extends PureComponent {
149
173
  2. add Git tag
150
174
 
151
175
  ```shell
152
- git tag vx.xx.x # such as v0.23.0
176
+ git tag vx.xx.x # such as v2.0.0
153
177
  ```
154
178
 
155
179
  3. review tag
package/dist/index.d.ts CHANGED
@@ -11,6 +11,7 @@ import { HTMLAttributes } from 'react';
11
11
  import { ImgHTMLAttributes } from 'react';
12
12
  import { InputHTMLAttributes } from 'react';
13
13
  import { JSX as JSX_2 } from 'react/jsx-runtime';
14
+ import { MouseEvent as MouseEvent_2 } from 'react';
14
15
  import { NavProps } from 'react-bootstrap';
15
16
  import { OutputData } from '@editorjs/editorjs';
16
17
  import { OverlayTriggerProps } from 'react-bootstrap';
@@ -60,7 +61,7 @@ export declare interface DateData {
60
61
  }
61
62
 
62
63
  export declare class Dialog<T = any> {
63
- defer?: Defer<T>;
64
+ accessor defer: Defer<T> | undefined;
64
65
  Component: FC;
65
66
  constructor(Factory: FC<DialogProps<T>>);
66
67
  open(): Promise<T>;
@@ -76,9 +77,8 @@ export declare interface DialogProps<T = any> {
76
77
 
77
78
  export declare class Editor extends PureComponent<EditorProps> {
78
79
  static displayName: string;
79
- constructor(props: EditorProps);
80
80
  private core?;
81
- innerValue: OutputData;
81
+ accessor innerValue: OutputData;
82
82
  save: () => Promise<OutputData>;
83
83
  render(): JSX_2.Element;
84
84
  }
@@ -92,6 +92,8 @@ export declare type EditorHTMLProps = PropsWithoutRef<{
92
92
 
93
93
  export declare type EditorProps = PropsWithoutRef<WrapperProps & Pick<InputHTMLAttributes<HTMLInputElement>, 'name' | 'required'>>;
94
94
 
95
+ export declare function elementToImage(element: HTMLElement, type?: string, quality?: number): Promise<string>;
96
+
95
97
  declare type HeadingMeta = Record<'id' | 'text', string> & Record<'level' | 'top', number>;
96
98
 
97
99
  export declare const Icon: FC<IconProps>;
@@ -110,10 +112,9 @@ export declare type LoadingProps = PropsWithChildren<{}>;
110
112
  */
111
113
  export declare class MonthCalendar extends Component<MonthCalendarProps> {
112
114
  static displayName: string;
113
- constructor(props: MonthCalendarProps);
114
115
  observedProps: MonthCalendarProps;
115
116
  get weekFormatter(): Intl.DateTimeFormat;
116
- currentDate: Date;
117
+ accessor currentDate: Date;
117
118
  get dateGrid(): Date[][];
118
119
  changeMonth(delta: number): void;
119
120
  renderDate: (date: Date) => JSX_2.Element;
@@ -155,9 +156,8 @@ export declare interface OverlayBoxProps extends Omit<OverlayTriggerProps, 'over
155
156
 
156
157
  export declare class PageNav extends PureComponent<PageNavProps> {
157
158
  static displayName: string;
158
- constructor(props: PageNavProps);
159
- list: HeadingMeta[];
160
- scrollY: number;
159
+ accessor list: HeadingMeta[];
160
+ accessor scrollY: number;
161
161
  get currentActiveId(): string;
162
162
  updateScrollY: () => number;
163
163
  componentDidMount(): void;
@@ -181,16 +181,26 @@ export declare interface SelectProps extends OptionProps, Pick<DropdownButtonPro
181
181
  valueRender?: (value: string) => ReactNode;
182
182
  }
183
183
 
184
+ export declare class ShareBox extends PureComponent<ShareBoxProps> {
185
+ static displayName: string;
186
+ root: RefObject<HTMLDivElement>;
187
+ accessor loading: boolean;
188
+ accessor imageURI: string;
189
+ componentDidMount(): void;
190
+ componentWillUnmount(): void;
191
+ generateImage: () => Promise<void>;
192
+ share: (event: MouseEvent_2<HTMLImageElement>) => Promise<void>;
193
+ render(): JSX_2.Element;
194
+ }
195
+
196
+ export declare type ShareBoxProps = PropsWithChildren<ShareData>;
197
+
184
198
  export declare const SpinnerButton: FC<SpinnerButtonProps>;
185
199
 
186
200
  export declare interface SpinnerButtonProps extends ButtonProps, Pick<SpinnerProps, 'animation'> {
187
201
  loading?: boolean;
188
202
  }
189
203
 
190
- declare type State = {
191
- echoed: string;
192
- };
193
-
194
204
  export declare const TableSpinner: FC<TableSpinnerProps>;
195
205
 
196
206
  export declare type TableSpinnerProps = PropsWithoutRef<{
@@ -209,9 +219,9 @@ export declare type TimeDistanceProps = PropsWithoutRef<{
209
219
  afterWord?: string;
210
220
  }>;
211
221
 
212
- export declare class TypeEcho extends PureComponent<TypeEchoProps, State> {
222
+ export declare class TypeEcho extends PureComponent<TypeEchoProps> {
213
223
  static displayName: string;
214
- state: Readonly<State>;
224
+ accessor echoed: string;
215
225
  init: RefCallback<HTMLPreElement>;
216
226
  render(): JSX_2.Element;
217
227
  }
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;AAEA,wBAAwB,IAAI,EAAE,MAAM,GAAG,YAAY,OAAO,CAAC,CAiB1D;AChBD,4BAA6B,SAAQ,kBAAkB,gBAAgB,CAAC;IACpE,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,OAAO,MAAM,QAAQ,GAAG,WAAW,CAelC,CAAC;ACdF,iCAAiC,kBAC7B;IACI,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,GAAG,CAAC;IAC1C,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,GAAG,CAAC;CAC7C,GA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AC9C;AAED,OAAO,MAAM,QAAQ,GAAG,WAAW,CAqDlC,CAAC;ACnFF,mCACI,SAAQ,WAAW,EACf,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,OAAO,MAAM,eAAe,GAAG,kBAAkB,CAyBhD,CAAC;AC/BF,gCAAgC,gBAAgB;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAErE,OAAO,MAAM,cAAc,GAAG,iBAAiB,CAM9C,CAAC;ACRF,gCAAgC,gBAAgB;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AAaH,OAAO,MAAM,cAAc,GAAG,iBAAiB,CAqB9C,CAAC;ACvCF,4BAA4B,gBAAgB;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AACH,aAAa;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhC,qBAAsB,SAAQ,cAAc,aAAa,EAAE,KAAK,CAAC;IAC7D,MAAM,CAAC,WAAW,SAAc;IAEhC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAkB;IAExC,IAAI,EAAE,YAAY,cAAc,CAAC,CAcZ;IAErB,MAAM;CAUT","sources":["source/source/animate.ts","source/source/Avatar.tsx","source/source/ClickBoundary.tsx","source/source/CodeBlock.tsx","source/source/color.ts","source/source/Dialog.tsx","source/source/Editor.tsx","source/source/EditorHTML.tsx","source/source/Icon.tsx","source/source/Loading.tsx","source/source/OverlayBox.tsx","source/source/MonthCalendar.tsx","source/source/Nameplate.tsx","source/source/PageNav.tsx","source/source/Select.tsx","source/source/SpinnerButton.tsx","source/source/TableSpinner.tsx","source/source/TimeDistance.tsx","source/source/TypeEcho.tsx","source/source/index.ts","source/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"export * from './animate';\nexport * from './Avatar';\nexport * from './ClickBoundary';\nexport * from './CodeBlock';\nexport * from './color';\nexport * from './Dialog';\nexport * from './Editor';\nexport * from './EditorHTML';\nexport * from './Icon';\nexport * from './Loading';\nexport * from './MonthCalendar';\nexport * from './Nameplate';\nexport * from './OverlayBox';\nexport * from './PageNav';\nexport * from './Select';\nexport * from './SpinnerButton';\nexport * from './TableSpinner';\nexport * from './TimeDistance';\nexport * from './TypeEcho';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
1
+ {"mappings":";;;;;;;;AAEA,wBAAwB,IAAI,EAAE,MAAM,GAAG,YAAY,OAAO,CAAC,CAiB1D;AChBD,4BAA6B,SAAQ,kBAAkB,gBAAgB,CAAC;IACpE,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,OAAO,MAAM,QAAQ,GAAG,WAAW,CAelC,CAAC;ACdF,iCAAiC,kBAC7B;IACI,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,GAAG,CAAC;IAC1C,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,GAAG,CAAC;CAC7C,GAAG,kBAAkB,eAAe,cAAc,CAAC,EAAE,cAAc,CAAC,CACxE,CAAC;AAEF,0BAA2B,SAAQ,cAAc,kBAAkB,CAAC;IAChE,IAAI,4CAA+B;IAEnC,WAAW,UAAW,UAAU,UAM9B;IAEF,iBAAiB;IAIjB,oBAAoB;IAIpB,MAAM;CAST;ACvCD,6BAA6B,kBAAkB;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAErE,0BAA0B,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE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AQ,SAAM;IAEvB,iBAAiB;IAIjB,oBAAoB;IAIpB,aAAa,sBAQX;IAEF,KAAK,UAAiB,WAAW,gBAAgB,CAAC,mBAShD;IAEF,MAAM;CA6BT;AC9FD,mCACI,SAAQ,WAAW,EACf,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,OAAO,MAAM,eAAe,GAAG,kBAAkB,CAyBhD,CAAC;AC/BF,gCAAgC,gBAAgB;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAErE,OAAO,MAAM,cAAc,GAAG,iBAAiB,CAM9C,CAAC;ACRF,gCAAgC,gBAAgB;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AAaH,OAAO,MAAM,cAAc,GAAG,iBAAiB,CAqB9C,CAAC;ACrCF,4BAA4B,gBAAgB;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AAEH,qBACsB,SAAQ,cAAc,aAAa,CAAC;IACtD,MAAM,CAAC,WAAW,SAAc;IAGhC,QAAQ,CAAC,MAAM,SAAM;IAErB,IAAI,EAAE,YAAY,cAAc,CAAC,CAcZ;IAErB,MAAM;CAUT","sources":["source/source/animate.ts","source/source/Avatar.tsx","source/source/ClickBoundary.tsx","source/source/CodeBlock.tsx","source/source/color.ts","source/source/Dialog.tsx","source/source/Editor.tsx","source/source/EditorHTML.tsx","source/source/Icon.tsx","source/source/Loading.tsx","source/source/OverlayBox.tsx","source/source/MonthCalendar.tsx","source/source/Nameplate.tsx","source/source/PageNav.tsx","source/source/Select.tsx","source/source/ShareBox.tsx","source/source/SpinnerButton.tsx","source/source/TableSpinner.tsx","source/source/TimeDistance.tsx","source/source/TypeEcho.tsx","source/source/index.ts","source/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"export * from './animate';\nexport * from './Avatar';\nexport * from './ClickBoundary';\nexport * from './CodeBlock';\nexport * from './color';\nexport * from './Dialog';\nexport * from './Editor';\nexport * from './EditorHTML';\nexport * from './Icon';\nexport * from './Loading';\nexport * from './MonthCalendar';\nexport * from './Nameplate';\nexport * from './OverlayBox';\nexport * from './PageNav';\nexport * from './Select';\nexport * from './ShareBox';\nexport * from './SpinnerButton';\nexport * from './TableSpinner';\nexport * from './TimeDistance';\nexport * from './TypeEcho';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- var e,r,t,n=require("@swc/helpers/cjs/_sliced_to_array.cjs"),a=require("@swc/helpers/cjs/_to_consumable_array.cjs"),i=require("@swc/helpers/cjs/_object_spread.cjs"),o=require("@swc/helpers/cjs/_object_without_properties.cjs"),s=require("react/jsx-runtime"),l=require("classnames"),c=require("@swc/helpers/cjs/_class_call_check.cjs"),u=require("@swc/helpers/cjs/_create_class.cjs"),d=require("@swc/helpers/cjs/_inherits.cjs"),v=require("@swc/helpers/cjs/_object_spread_props.cjs"),p=require("@swc/helpers/cjs/_create_super.cjs"),h=require("react"),m=require("prismjs"),f=require("react-element-to-jsx-string"),_=require("@swc/helpers/cjs/_wrap_native_super.cjs"),y=require("@swc/helpers/cjs/_ts_decorate.cjs"),x=require("iterable-observer"),j=require("mobx"),g=require("mobx-react"),b=require("@swc/helpers/cjs/_assert_this_initialized.cjs"),w=require("@swc/helpers/cjs/_async_to_generator.cjs"),k=require("@swc/helpers/cjs/_ts_generator.cjs"),N=require("react-editor-js"),D=require("editorjs-html"),C=require("react-bootstrap"),q=require("mobx-react-helper"),S=require("web-utility");function M(e,r){return Object.keys(r).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}})}),e}function T(e,r,t,n){Object.defineProperty(e,r,{get:t,set:n,enumerable:!0,configurable:!0})}function Y(e){return e&&e.__esModule?e.default:e}var I={};function O(e){return function(r){return r&&new IntersectionObserver(function(r,t){var i,o,s=(0,n._)(r,1)[0],l=s.isIntersecting,c=s.target;if(l){var u=["animate__animated","animate__".concat(e)];(i=c.classList).add.apply(i,(0,a._)(u)),c.addEventListener("animationend",function(){return(o=c.classList).remove.apply(o,(0,a._)(u))},{once:!0}),t.disconnect()}}).observe(r)}}T(I,"animate",function(){return O});var L={};T(L,"Avatar",function(){return E});var E=function(e){var r=e.className,t=e.style,n=e.size,a=void 0===n?3:n,c=(0,o._)(e,["className","style","size"]);return(0,s.jsx)("img",(0,i._)({className:Y(l)("object-fit-cover rounded-circle",r),style:(0,i._)({width:"".concat(a,"rem"),height:"".concat(a,"rem")},t)},c))};E.displayName="Avatar";var P={};T(P,"ClickBoundary",function(){return A});var A=function(e){(0,d._)(t,e);var r=(0,p._)(t);function t(){var e;return(0,c._)(this,t),e=r.apply(this,arguments),e.root=(0,h.createRef)(),e.switchClick=function(r){var t,n=e.props,a=n.onInnerClick,i=n.onOuterClick;(null===(t=e.root.current)||void 0===t?void 0:t.contains(r.target))?null==a||a(r):null==i||i(r)},e}return(0,u._)(t,[{key:"componentDidMount",value:function(){window.addEventListener("click",this.switchClick,!0)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("click",this.switchClick,!0)}},{key:"render",value:function(){var e=this.props,r=e.children,t=(e.onInnerClick,e.onOuterClick,(0,o._)(e,["children","onInnerClick","onOuterClick"]));return(0,s.jsx)("div",(0,v._)((0,i._)({ref:this.root},t),{children:r}))}}]),t}(h.PureComponent),B={};function z(e){var r=e.language,t=e.children,n=(0,m.highlight)(Y(f)((0,h.isValidElement)(t)?t:(0,s.jsx)(s.Fragment,{children:t})),m.languages[r],r);return(0,s.jsx)("pre",{children:(0,s.jsx)("code",{className:"language-".concat(r),dangerouslySetInnerHTML:{__html:n}})})}T(B,"CodeBlock",function(){return z});var V={};T(V,"VariantColors",function(){return F}),T(V,"text2color",function(){return H});var F=["primary","secondary","success","danger","warning","info","dark","light"];function H(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=r[0]?F.filter(function(e){return!r.find(function(r){return r===e})}):F;return t[(0,a._)(e).reduce(function(e,r){return e+r.charCodeAt(0)},0)%t.length]}var W={};T(W,"DialogClose",function(){return J}),T(W,"Dialog",function(){return R});var J=function(e){(0,d._)(t,e);var r=(0,p._)(t);function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Dialog closed";return(0,c._)(this,t),r.call(this,e)}return t}((0,_._)(Error)),R=function(){function e(r){var t,n=this;(0,c._)(this,e),this.defer=void 0,null===(t=j.makeObservable)||void 0===t||t.call(j,this),this.Component=(0,g.observer)(function(){return(0,s.jsx)(r,{defer:n.defer})}),this.Component.displayName="DialogComponent"}return(0,u._)(e,[{key:"open",value:function(){var e=this;return this.defer=new x.Defer,this.defer.promise.finally(function(){return e.defer=void 0}),this.defer.promise}}]),e}();(0,y._)([j.observable],R.prototype,"defer",void 0);var G={};T(G,"Editor",function(){return K});var U=(0,N.createReactEditorJS)(),K=((e=function(e){(0,d._)(t,e);var r=(0,p._)(t);function t(e){(0,c._)(this,t),(n=r.call(this,e)).innerValue=n.props.defaultValue;var n,a,i=(0,b._)(n);return n.save=(0,w._)(function(){var e;return(0,k._)(this,function(r){switch(r.label){case 0:if(!(e=i.core))return[3,2];return[4,i.core.save()];case 1:e=i.innerValue=r.sent(),r.label=2;case 2:return[2,e]}})}),null===(a=j.makeObservable)||void 0===a||a.call(j,(0,b._)(n)),n}return(0,u._)(t,[{key:"render",value:function(){var e=this,r=this.props,t=r.name,n=r.required,a=(r.children,(0,o._)(r,["name","required","children"])),l=this.innerValue;return(0,s.jsxs)("div",{className:"form-control",tabIndex:-1,onBlur:this.save,children:[(0,s.jsx)("input",{hidden:!0,name:t,required:n,value:JSON.stringify(l)}),(0,s.jsx)(U,(0,v._)((0,i._)({},a),{onInitialize:function(r){var t;e.core=r,null===(t=a.onInitialize)||void 0===t||t.call(a,r)}}))]})}}]),t}(h.PureComponent)).displayName="Editor",e);(0,y._)([j.observable],K.prototype,"innerValue",void 0),K=(0,y._)([g.observer],K);var Q={};T(Q,"parser",function(){return X}),T(Q,"EditorHTML",function(){return Z});var X=Y(D)({link:function(e){var r=e.data.link;return'<a href="'.concat(r,'">').concat(r,"</a>")}}),Z=function(e){var r=e.className,t=e.data,n=X.parse(t).join("");return(0,s.jsx)("article",{className:r,dangerouslySetInnerHTML:{__html:n}})};Z.displayName="EditorHTML";var $={};T($,"Icon",function(){return ee});var ee=function(e){var r=e.className,t=e.style,n=e.name,a=e.size,c=(0,o._)(e,["className","style","name","size"]);return(0,s.jsx)("i",(0,i._)({className:Y(l)("bi-".concat(n),r),style:(0,i._)({fontSize:a&&"".concat(a,"rem")},t)},c))};ee.displayName="Icon";var er={};T(er,"Loading",function(){return et});var et=function(e){var r=e.children;return(0,s.jsxs)("div",{className:"fixed-top h-100 w-100 d-flex justify-content-center align-items-center opacity-25 bg-black",children:[(0,s.jsx)(C.Spinner,{animation:"border",variant:"success"}),(0,s.jsx)("span",{className:"ml-3 text-white",children:void 0===r?"Loading...":r})]})};et.displayName="Loading";var en={};T(en,"MonthCalendar",function(){return eo});var ea={};T(ea,"OverlayBox",function(){return ei});var ei=function(e){var r=e.title,t=e.detail,n=e.children,a=(0,o._)(e,["title","detail","children"]);return(0,s.jsx)(C.OverlayTrigger,(0,v._)((0,i._)({},a),{overlay:t?(0,s.jsxs)(C.Popover,{children:[(0,s.jsx)(C.Popover.Header,{children:r}),(0,s.jsx)(C.Popover.Body,{children:t})]}):(0,s.jsx)(C.Tooltip,{children:r}),children:n}))};ei.displayName="OverlayBox";var eo=((r=function(e){(0,d._)(t,e);var r=(0,p._)(t);function t(e){var n,a;return(0,c._)(this,t),(n=r.call(this,e)).currentDate=new Date,n.renderDate=function(e){var r=n.observedProps,t=(r.variant,r.value),a=r.onSelect,i=(0,S.formatDate)(e,"YYYY-MM-DD"),o=null==t?void 0:t.filter(function(e){var r=e.date;return(0,S.formatDate)(r,"YYYY-MM-DD")===i});return(0,s.jsxs)("td",{className:Y(l)({"opacity-50":e.getMonth()!==n.currentDate.getMonth(),"fw-bold":i===(0,S.formatDate)(new Date,"YYYY-MM-DD")}),children:[(0,s.jsx)("time",{className:"d-block",dateTime:e.toJSON(),children:e.getDate()}),null==o?void 0:o.map(function(e){return"object"==typeof e.content?e.content:(0,s.jsx)(ei,{title:e.content,children:(0,s.jsx)(C.Badge,{as:"a",className:"d-inline-block text-decoration-none w-100 text-truncate",bg:H(e.content+"",["light"]),href:e.link,onClick:function(){return null==a?void 0:a(e)},children:e.content})},e.date+"")})]},e+"")},null===(a=j.makeObservable)||void 0===a||a.call(j,(0,b._)(n)),n}return(0,u._)(t,[{key:"weekFormatter",get:function(){var e,r=this.observedProps.locale,t=void 0===r?null===(e=globalThis.navigator)||void 0===e?void 0:e.language:r;return new Intl.DateTimeFormat(t,{weekday:"long"})}},{key:"dateGrid",get:function(){var e=new Date(this.currentDate);e.setDate(1),e=new Date(+e-e.getDay()*S.Day);var r=Array.from(Array(42),function(r,t){return new Date(+e+t*S.Day)});return(0,S.splitArray)(r,7)}},{key:"changeMonth",value:function(e){var r,t;this.currentDate=(0,S.changeMonth)(this.currentDate,e),null===(r=(t=this.props).onChange)||void 0===r||r.call(t,this.currentDate)}},{key:"render",value:function(){var e=this,r=this.weekFormatter,t=this.currentDate,n=this.dateGrid,a=this.observedProps,l=a.style,c=a.variant,u=void 0===c?"primary":c,d=(a.onChange,a.onSelect,(0,o._)(a,["style","variant","onChange","onSelect"]));return(0,s.jsxs)(C.Table,(0,v._)((0,i._)({},d),{style:(0,i._)({tableLayout:"fixed"},l),children:[(0,s.jsx)("caption",{children:(0,s.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,s.jsx)(C.Button,{variant:u,onClick:function(){return e.changeMonth(-1)},children:"<"}),(0,S.formatDate)(t,"YYYY-MM"),(0,s.jsx)(C.Button,{variant:u,onClick:function(){return e.changeMonth(1)},children:">"})]})}),(0,s.jsx)("thead",{children:(0,s.jsx)("tr",{children:n[0].map(function(e,t,n){var a=n.length;return(0,s.jsx)("td",{className:"bg-".concat(u," text-white"),style:{width:"calc(100% / ".concat(a,")")},children:r.format(e)},t)})})}),(0,s.jsx)("tbody",{children:n.map(function(r){return(0,s.jsx)("tr",{children:r.map(e.renderDate)},r[0]+"")})})]}))}}]),t}(h.Component)).displayName="MonthCalendar",r);(0,y._)([j.computed],eo.prototype,"weekFormatter",null),(0,y._)([j.observable],eo.prototype,"currentDate",void 0),(0,y._)([j.computed],eo.prototype,"dateGrid",null),eo=(0,y._)([g.observer,q.observePropsState],eo);var es={};T(es,"Nameplate",function(){return el});var el=function(e){var r=e.avatar,t=e.name;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(E,{size:2,style:{marginRight:"0.5rem"},src:r}),(0,s.jsx)("span",{className:"align-middle",children:t})]})};el.displayName="Nameplate";var ec={};T(ec,"PageNav",function(){return ed});var eu=Array.from(Array(6),function(e,r){return"h".concat(++r)})+"",ed=((t=function(e){(0,d._)(t,e);var r=(0,p._)(t);function t(e){var n,a;return(0,c._)(this,t),(n=r.call(this,e)).list=[],n.scrollY=0,n.updateScrollY=function(){return n.scrollY=window.scrollY},n.scrollTo=function(e){return function(){var r,t;setTimeout(function(){return(0,S.scrollTo)('[id="'.concat(e.id,'"]'))}),null===(r=(t=n.props).onItemClick)||void 0===r||r.call(t,e)}},n.renderLink=function(e){var r=e.id,t=e.level,a=e.text,i=e.top,o=(0,b._)(n).currentActiveId,l=n.props.depth;return t<=(void 0===l?1/0:l)&&(0,s.jsx)(C.Nav.Item,{style:{textIndent:"".concat(t-1,"rem")},children:(0,s.jsx)(C.Nav.Link,{href:"#".concat(r),active:o===r,onClick:n.scrollTo({id:r,level:t,text:a,top:i}),children:a})},r)},null===(a=j.makeObservable)||void 0===a||a.call(j,(0,b._)(n)),n}return(0,u._)(t,[{key:"currentActiveId",get:function(){var e,r=this.list,t=this.scrollY,n=r.findIndex(function(e){return e.top>t});return null===(e=r[n-1])||void 0===e?void 0:e.id}},{key:"componentDidMount",value:function(){globalThis.document&&(window.addEventListener("scroll",this.updateScrollY),this.list=Array.from(document.querySelectorAll(eu),function(e){e.id||(e.id=(0,S.uniqueID)());var r=e.id,t=e.tagName,n=e.textContent,a=e.offsetTop;return{id:r,level:+t[1],text:n.trim(),top:a}}))}},{key:"componentWillUnmount",value:function(){var e,r;null===(e=(r=globalThis).removeEventListener)||void 0===e||e.call(r,"scroll",this.updateScrollY)}},{key:"render",value:function(){var e=this.list,r=this.props,t=r.style,n=r.variant,a=(0,o._)(r,["style","variant"]);return(0,s.jsx)(C.Nav,(0,v._)((0,i._)({},a),{variant:void 0===n?"underline":n,style:(0,i._)({flexDirection:"column"},t),children:e.map(this.renderLink)}))}}]),t}(h.PureComponent)).displayName="PageNav",t);(0,y._)([j.observable],ed.prototype,"list",void 0),(0,y._)([j.observable],ed.prototype,"scrollY",void 0),(0,y._)([j.computed],ed.prototype,"currentActiveId",null),ed=(0,y._)([g.observer],ed);var ev={};T(ev,"Option",function(){return ep}),T(ev,"Select",function(){return eh});var ep=function(e){var r=e.value,t=e.children,n=(0,o._)(e,["value","children"]);return(0,s.jsx)(C.Dropdown.Item,(0,v._)((0,i._)({},n),{"data-value":r,children:t}))};ep.displayName="Option";var eh=function(e){var r=e.className,t=e.style,n=e.variant,a=e.menuVariant,i=e.children,o=e.value,c=e.onChange,u=e.valueRender,d=(0,S.makeArray)(i).flat(1/0).find(function(e){return(0,h.isValidElement)(e)&&e.type===ep&&e.props.value===o});return(0,s.jsxs)(C.Dropdown,{onClick:function(e){var r=e.target.closest(".dropdown-item");if(r){var t=r.dataset.value;null==c||c(t)}},children:[(0,s.jsx)(C.Dropdown.Toggle,{className:Y(l)("w-100","d-flex","justify-content-between","align-items-center",!n&&"bg-white text-dark",r),style:t,variant:n,children:(null==u?void 0:u(o))||(0,s.jsx)("div",{className:null==d?void 0:d.props.className,children:null==d?void 0:d.props.children})}),(0,s.jsx)(C.Dropdown.Menu,{variant:a,children:i})]})};eh.displayName="Select";var em={};T(em,"SpinnerButton",function(){return ef});var ef=function(e){var r=e.animation,t=e.loading,n=e.disabled,a=e.children,l=(0,o._)(e,["animation","loading","disabled","children"]);return(0,s.jsxs)(C.Button,(0,v._)((0,i._)({},l),{disabled:t||n,children:[t&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C.Spinner,{as:"span",className:a?"me-2":"",size:"sm",animation:r,role:"status","aria-hidden":"true"}),!a&&(0,s.jsx)("span",{className:"visually-hidden",children:"Loading..."})]}),a]}))};ef.displayName="SpinnerButton";var e_={};T(e_,"TableSpinner",function(){return ey});var ey=function(e){var r=e.colSpan;return(0,s.jsx)("tr",{children:(0,s.jsx)("td",{className:"text-center p-4",colSpan:r,children:(0,s.jsx)(C.Spinner,{animation:"border",variant:"primary"})})})};ey.displayName="TableSpinner";var ex={};T(ex,"TimeDistance",function(){return eg});var ej={ms:"millisecond(s)",s:"second(s)",m:"minute(s)",H:"hour(s)",D:"day(s)",W:"week(s)",M:"month(s)",Y:"year(s)"},eg=function(e){var r=e.className,t=e.date,n=e.unitWords,a=void 0===n?ej:n,i=e.beforeWord,o=e.afterWord;t=new Date(t);var l=(0,S.diffTime)(t),c=l.distance,u=l.unit;return(0,s.jsxs)("time",{className:r,dateTime:t.toJSON(),title:t.toLocaleString(),children:[Math.abs(c)," ",a[u],c<0?void 0===i?" before":i:void 0===o?" after":o]})};eg.displayName="TimeDistance";var eb={};T(eb,"TypeEcho",function(){return ew});var ew=function(e){(0,d._)(t,e);var r=(0,p._)(t);function t(){(0,c._)(this,t),e=r.apply(this,arguments),e.state={echoed:""};var e,a=(0,b._)(e);return e.init=function(e){var r;return e&&new IntersectionObserver((r=(0,w._)(function(e,r){var t,i,o,s,l,c,u,d,v,p,h;return(0,k._)(this,function(m){switch(m.label){case 0:if(!(0,n._)(e,1)[0].isIntersecting)return[2];r.disconnect(),i=(t=a.props).text,s=void 0===(o=t.intervals)?150:o,l=!0,c=!1,u=void 0,m.label=1;case 1:m.trys.push([1,6,7,8]),d=i[Symbol.iterator](),m.label=2;case 2:if(l=(v=d.next()).done)return[3,5];return p=v.value,[4,(0,S.sleep)(s/1e3)];case 3:m.sent(),a.setState({echoed:a.state.echoed+p}),m.label=4;case 4:return l=!0,[3,2];case 5:return[3,8];case 6:return h=m.sent(),c=!0,u=h,[3,8];case 7:try{l||null==d.return||d.return()}finally{if(c)throw u}return[7];case 8:return[2]}})}),function(e,t){return r.apply(this,arguments)})).observe(e)},e}return(0,u._)(t,[{key:"render",value:function(){var e=this.props,r=e.className,t=e.text,n=this.state.echoed;return(0,s.jsx)("pre",{className:Y(l)("text-wrap",r),ref:this.init,children:n+(n===t?"":"_")})}}]),t}(h.PureComponent);ew.displayName="TypeEcho",M(module.exports,I),M(module.exports,L),M(module.exports,P),M(module.exports,B),M(module.exports,V),M(module.exports,W),M(module.exports,G),M(module.exports,Q),M(module.exports,$),M(module.exports,er),M(module.exports,en),M(module.exports,es),M(module.exports,ea),M(module.exports,ec),M(module.exports,ev),M(module.exports,em),M(module.exports,e_),M(module.exports,ex),M(module.exports,eb);
1
+ var e,t,r,n,a,i,o,c,l,s,u,d,f,p,v,h,m,y,b,g,w,j,O,x,_,P,k,T,E,S,I,N,C,D,M,q,Y,L,z,A,R,U,F,B,W,V,H,G,J,K,Q,X,Z,$,ee,et,er,en,ea,ei,eo,ec,el,es,eu,ed,ef,ep,ev,eh,em,ey,eb,eg,ew,ej,eO,ex,e_,eP,ek,eT,eE=require("@swc/helpers/cjs/_sliced_to_array.cjs"),eS=require("@swc/helpers/cjs/_to_consumable_array.cjs"),eI=require("react/jsx-runtime"),eN=require("classnames"),eC=require("@swc/helpers/cjs/_assert_this_initialized.cjs"),eD=require("@swc/helpers/cjs/_class_call_check.cjs"),eM=require("@swc/helpers/cjs/_create_class.cjs"),eq=require("@swc/helpers/cjs/_inherits.cjs"),eY=require("@swc/helpers/cjs/_create_super.cjs"),eL=require("react"),ez=require("prismjs"),eA=require("react-element-to-jsx-string"),eR=require("@swc/helpers/cjs/_wrap_native_super.cjs"),eU=require("iterable-observer"),eF=require("mobx"),eB=require("mobx-react"),eW=require("@swc/helpers/cjs/_type_of.cjs"),eV=require("@swc/helpers/cjs/_ts_generator.cjs"),eH=require("react-editor-js"),eG=require("editorjs-html"),eJ=require("react-bootstrap"),eK=require("mobx-react-helper"),eQ=require("web-utility"),eX=require("html2canvas");function eZ(e,t){return Object.keys(t).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})}),e}function e$(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function e0(e){return e&&e.__esModule?e.default:e}var e1={};function e2(e){return function(t){return t&&new IntersectionObserver(function(t,r){var n,a,i=(0,eE._)(t,1)[0],o=i.isIntersecting,c=i.target;if(o){var l=["animate__animated","animate__".concat(e)];(n=c.classList).add.apply(n,(0,eS._)(l)),c.addEventListener("animationend",function(){return(a=c.classList).remove.apply(a,(0,eS._)(l))},{once:!0}),r.disconnect()}}).observe(t)}}e$(e1,"animate",function(){return e2});var e4={};e$(e4,"Avatar",function(){return e5});var e3=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},e5=function(e){var t=e.className,r=e.style,n=e.size,a=void 0===n?3:n,i=e3(e,["className","style","size"]);return(0,eI.jsx)("img",Object.assign({className:e0(eN)("object-fit-cover rounded-circle",t),style:Object.assign({width:"".concat(a,"rem"),height:"".concat(a,"rem")},r)},i))};e5.displayName="Avatar";var e7={};e$(e7,"ClickBoundary",function(){return e6});var e8=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},e6=function(e){(0,eq._)(r,e);var t=(0,eY._)(r);function r(){var e;return(0,eD._)(this,r),e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments))),Object.defineProperty((0,eC._)(e),"root",{enumerable:!0,configurable:!0,writable:!0,value:(0,eL.createRef)()}),Object.defineProperty((0,eC._)(e),"switchClick",{enumerable:!0,configurable:!0,writable:!0,value:function(t){var r,n=e.props,a=n.onInnerClick,i=n.onOuterClick;(null===(r=e.root.current)||void 0===r?void 0:r.contains(t.target))?null==a||a(t):null==i||i(t)}}),e}return(0,eM._)(r,[{key:"componentDidMount",value:function(){window.addEventListener("click",this.switchClick,!0)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("click",this.switchClick,!0)}},{key:"render",value:function(){var e=this.props,t=e.children,r=(e.onInnerClick,e.onOuterClick,e8(e,["children","onInnerClick","onOuterClick"]));return(0,eI.jsx)("div",Object.assign({ref:this.root},r,{children:t}))}}]),r}(eL.PureComponent),e9={};function te(e){var t=e.language,r=e.children,n=(0,ez.highlight)(e0(eA)((0,eL.isValidElement)(r)?r:(0,eI.jsx)(eI.Fragment,{children:r})),ez.languages[t],t);return(0,eI.jsx)("pre",{children:(0,eI.jsx)("code",{className:"language-".concat(t),dangerouslySetInnerHTML:{__html:n}})})}e$(e9,"CodeBlock",function(){return te});var tt={};e$(tt,"VariantColors",function(){return tr}),e$(tt,"text2color",function(){return tn});var tr=["primary","secondary","success","danger","warning","info","dark","light"];function tn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=t[0]?tr.filter(function(e){return!t.find(function(t){return t===e})}):tr;return r[(0,eS._)(e).reduce(function(e,t){return e+t.charCodeAt(0)},0)%r.length]}var ta={};e$(ta,"DialogClose",function(){return tl}),e$(ta,"Dialog",function(){return ts});var ti=function(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0},to=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},tc=function(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r},tl=function(e){(0,eq._)(r,e);var t=(0,eY._)(r);function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Dialog closed";return(0,eD._)(this,r),t.call(this,e)}return r}((0,eR._)(Error)),ts=(r=[],n=[],e=function(){function e(a){var i=this;(0,eD._)(this,e),t.set(this,(ti(this,r),ti(this,n,void 0))),Object.defineProperty(this,"Component",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.Component=(0,eB.observer)(function(){return(0,eI.jsx)(a,{defer:i.defer})}),this.Component.displayName="DialogComponent"}return(0,eM._)(e,[{key:"defer",get:function(){return to(this,t,"f")},set:function(e){tc(this,t,e,"f")}},{key:"open",value:function(){var e=this;return this.defer=new eU.Defer,this.defer.promise.finally(function(){return e.defer=void 0}),this.defer.promise}}]),e}(),t=new WeakMap,a="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,function(e,t,r,n,a,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]="access"===h?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var m=(0,r[p])("accessor"===l?{get:d.get,set:d.set}:d[s],v);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=o(m.get))&&(d.get=c),(c=o(m.set))&&(d.set=c),(c=o(m.init))&&a.unshift(c)}else(c=o(m))&&("field"===l?a.unshift(c):d[s]=c)}u&&Object.defineProperty(u,n.name,d),f=!0}(e,null,[eF.observable],{kind:"accessor",name:"defer",static:!1,private:!1,access:{has:function(e){return"defer"in e},get:function(e){return e.defer},set:function(e,t){e.defer=t}},metadata:a},n,r),a&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),e),tu={};e$(tu,"Editor",function(){return ty});var td=function(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0},tf=function(e,t,r,n,a,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]="access"===h?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var m=(0,r[p])("accessor"===l?{get:d.get,set:d.set}:d[s],v);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=o(m.get))&&(d.get=c),(c=o(m.set))&&(d.set=c),(c=o(m.init))&&a.unshift(c)}else(c=o(m))&&("field"===l?a.unshift(c):d[s]=c)}u&&Object.defineProperty(u,n.name,d),f=!0},tp=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},tv=function(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r},th=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},tm=(0,eH.createReactEditorJS)(),ty=(l=[eB.observer],s=[],u=eL.PureComponent,d=[],f=[],c=function(e){(0,eq._)(r,e);var t=(0,eY._)(r);function r(){var e;return(0,eD._)(this,r),e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments))),Object.defineProperty((0,eC._)(e),"core",{enumerable:!0,configurable:!0,writable:!0,value:void td((0,eC._)(e),d)}),i.set((0,eC._)(e),td((0,eC._)(e),f,e.props.defaultValue)),Object.defineProperty((0,eC._)(e),"save",{enumerable:!0,configurable:!0,writable:!0,value:function(){var t,r,n,a;return t=(0,eC._)(e),r=void 0,n=void 0,a=function(){var e,t;return(0,eV._)(this,function(r){switch(r.label){case 0:if(!(e=this.core))return[3,2];return t=this,[4,this.core.save()];case 1:e=t.innerValue=r.sent(),r.label=2;case 2:return[2,e]}})},new(n||(n=Promise))(function(e,i){function o(e){try{l(a.next(e))}catch(e){i(e)}}function c(e){try{l(a.throw(e))}catch(e){i(e)}}function l(t){var r;t.done?e(t.value):((r=t.value)instanceof n?r:new n(function(e){e(r)})).then(o,c)}l((a=a.apply(t,r||[])).next())})}}),e}return(0,eM._)(r,[{key:"innerValue",get:function(){return tp(this,i,"f")},set:function(e){tv(this,i,e,"f")}},{key:"render",value:function(){var e=this,t=this.props,r=t.name,n=t.required,a=(t.children,th(t,["name","required","children"])),i=this.innerValue;return(0,eI.jsxs)("div",{className:"form-control",tabIndex:-1,onBlur:this.save,children:[(0,eI.jsx)("input",{hidden:!0,name:r,required:n,value:JSON.stringify(i)}),(0,eI.jsx)(tm,Object.assign({},a,{onInitialize:function(t){var r;e.core=t,null===(r=a.onInitialize)||void 0===r||r.call(a,t)}}))]})}}]),r}(u),i=new WeakMap,p=c,v="Editor","symbol"===(0,eW._)(v)&&(v=v.description?"[".concat(v.description,"]"):""),Object.defineProperty(p,"name",{configurable:!0,value:h?"".concat(h," ",v):v}),y="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(m=u[Symbol.metadata])&&void 0!==m?m:null):void 0,tf(c,null,[eF.observable],{kind:"accessor",name:"innerValue",static:!1,private:!1,access:{has:function(e){return"innerValue"in e},get:function(e){return e.innerValue},set:function(e,t){e.innerValue=t}},metadata:y},f,d),tf(null,o={value:c},l,{kind:"class",name:c.name,metadata:y},null,s),c=o.value,y&&Object.defineProperty(c,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:y}),Object.defineProperty(c,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"Editor"}),td(c,s),c),tb={};e$(tb,"parser",function(){return tg}),e$(tb,"EditorHTML",function(){return tw});var tg=e0(eG)({link:function(e){var t=e.data.link;return'<a href="'.concat(t,'">').concat(t,"</a>")}}),tw=function(e){var t=e.className,r=e.data,n=tg.parse(r).join("");return(0,eI.jsx)("article",{className:t,dangerouslySetInnerHTML:{__html:n}})};tw.displayName="EditorHTML";var tj={};e$(tj,"Icon",function(){return tx});var tO=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},tx=function(e){var t=e.className,r=e.style,n=e.name,a=e.size,i=tO(e,["className","style","name","size"]);return(0,eI.jsx)("i",Object.assign({className:e0(eN)("bi-".concat(n),t),style:Object.assign({fontSize:a&&"".concat(a,"rem")},r)},i))};tx.displayName="Icon";var t_={};e$(t_,"Loading",function(){return tP});var tP=function(e){var t=e.children;return(0,eI.jsxs)("div",{className:"fixed-top h-100 w-100 d-flex justify-content-center align-items-center opacity-25 bg-black",children:[(0,eI.jsx)(eJ.Spinner,{animation:"border",variant:"success"}),(0,eI.jsx)("span",{className:"ml-3 text-white",children:void 0===t?"Loading...":t})]})};tP.displayName="Loading";var tk={};e$(tk,"MonthCalendar",function(){return tq});var tT={};e$(tT,"OverlayBox",function(){return tS});var tE=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},tS=function(e){var t=e.title,r=e.detail,n=e.children,a=tE(e,["title","detail","children"]);return(0,eI.jsx)(eJ.OverlayTrigger,Object.assign({},a,{overlay:r?(0,eI.jsxs)(eJ.Popover,{children:[(0,eI.jsx)(eJ.Popover.Header,{children:t}),(0,eI.jsx)(eJ.Popover.Body,{children:r})]}):(0,eI.jsx)(eJ.Tooltip,{children:t}),children:n}))};tS.displayName="OverlayBox";var tI=function(e,t,r,n,a,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]="access"===h?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var m=(0,r[p])("accessor"===l?{get:d.get,set:d.set}:d[s],v);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=o(m.get))&&(d.get=c),(c=o(m.set))&&(d.set=c),(c=o(m.init))&&a.unshift(c)}else(c=o(m))&&("field"===l?a.unshift(c):d[s]=c)}u&&Object.defineProperty(u,n.name,d),f=!0},tN=function(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0},tC=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},tD=function(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r},tM=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},tq=(_=[eB.observer,eK.observePropsState],P=[],k=eL.Component,T=[],E=[],w=function(e){(0,eq._)(r,e);var t=(0,eY._)(r);function r(){var e;return(0,eD._)(this,r),e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments))),b.set((0,eC._)(e),(tN((0,eC._)(e),T),tN((0,eC._)(e),E,new Date))),Object.defineProperty((0,eC._)(e),"renderDate",{enumerable:!0,configurable:!0,writable:!0,value:function(t){var r=e.observedProps,n=(r.variant,r.value),a=r.onSelect,i=(0,eQ.formatDate)(t,"YYYY-MM-DD"),o=null==n?void 0:n.filter(function(e){var t=e.date;return(0,eQ.formatDate)(t,"YYYY-MM-DD")===i});return(0,eI.jsxs)("td",{className:e0(eN)({"opacity-50":t.getMonth()!==e.currentDate.getMonth(),"fw-bold":i===(0,eQ.formatDate)(new Date,"YYYY-MM-DD")}),children:[(0,eI.jsx)("time",{className:"d-block",dateTime:t.toJSON(),children:t.getDate()}),null==o?void 0:o.map(function(e){return"object"==typeof e.content?e.content:(0,eI.jsx)(tS,{title:e.content,children:(0,eI.jsx)(eJ.Badge,{as:"a",className:"d-inline-block text-decoration-none w-100 text-truncate",bg:tn(e.content+"",["light"]),href:e.link,onClick:function(){return null==a?void 0:a(e)},children:e.content})},e.date+"")})]},t+"")}}),e}return(0,eM._)(r,[{key:"weekFormatter",get:function(){var e,t=this.observedProps.locale,r=void 0===t?null===(e=globalThis.navigator)||void 0===e?void 0:e.language:t;return new Intl.DateTimeFormat(r,{weekday:"long"})}},{key:"currentDate",get:function(){return tC(this,b,"f")},set:function(e){tD(this,b,e,"f")}},{key:"dateGrid",get:function(){var e=new Date(this.currentDate);e.setDate(1),e=new Date(+e-e.getDay()*eQ.Day);var t=Array.from(Array(42),function(t,r){return new Date(+e+r*eQ.Day)});return(0,eQ.splitArray)(t,7)}},{key:"changeMonth",value:function(e){var t,r;this.currentDate=(0,eQ.changeMonth)(this.currentDate,e),null===(r=(t=this.props).onChange)||void 0===r||r.call(t,this.currentDate)}},{key:"render",value:function(){var e=this,t=this.weekFormatter,r=this.currentDate,n=this.dateGrid,a=this.observedProps,i=a.style,o=a.variant,c=void 0===o?"primary":o,l=(a.onChange,a.onSelect,tM(a,["style","variant","onChange","onSelect"]));return(0,eI.jsxs)(eJ.Table,Object.assign({},l,{style:Object.assign({tableLayout:"fixed"},i),children:[(0,eI.jsx)("caption",{children:(0,eI.jsxs)("div",{className:"d-flex justify-content-between align-items-center",children:[(0,eI.jsx)(eJ.Button,{variant:c,onClick:function(){return e.changeMonth(-1)},children:"<"}),(0,eQ.formatDate)(r,"YYYY-MM"),(0,eI.jsx)(eJ.Button,{variant:c,onClick:function(){return e.changeMonth(1)},children:">"})]})}),(0,eI.jsx)("thead",{children:(0,eI.jsx)("tr",{children:n[0].map(function(e,r,n){var a=n.length;return(0,eI.jsx)("td",{className:"bg-".concat(c," text-white"),style:{width:"calc(100% / ".concat(a,")")},children:t.format(e)},r)})})}),(0,eI.jsx)("tbody",{children:n.map(function(t){return(0,eI.jsx)("tr",{children:t.map(e.renderDate)},t[0]+"")})})]}))}}]),r}(k),b=new WeakMap,S=w,I="MonthCalendar","symbol"===(0,eW._)(I)&&(I=I.description?"[".concat(I.description,"]"):""),Object.defineProperty(S,"name",{configurable:!0,value:N?"".concat(N," ",I):I}),D="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(C=k[Symbol.metadata])&&void 0!==C?C:null):void 0,j=[eF.computed],O=[eF.observable],x=[eF.computed],tI(w,null,j,{kind:"getter",name:"weekFormatter",static:!1,private:!1,access:{has:function(e){return"weekFormatter"in e},get:function(e){return e.weekFormatter}},metadata:D},null,T),tI(w,null,O,{kind:"accessor",name:"currentDate",static:!1,private:!1,access:{has:function(e){return"currentDate"in e},get:function(e){return e.currentDate},set:function(e,t){e.currentDate=t}},metadata:D},E,T),tI(w,null,x,{kind:"getter",name:"dateGrid",static:!1,private:!1,access:{has:function(e){return"dateGrid"in e},get:function(e){return e.dateGrid}},metadata:D},null,T),tI(null,g={value:w},_,{kind:"class",name:w.name,metadata:D},null,P),w=g.value,D&&Object.defineProperty(w,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:D}),Object.defineProperty(w,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"MonthCalendar"}),tN(w,P),w),tY={};e$(tY,"Nameplate",function(){return tL});var tL=function(e){var t=e.avatar,r=e.name;return(0,eI.jsxs)(eI.Fragment,{children:[(0,eI.jsx)(e5,{size:2,style:{marginRight:"0.5rem"},src:t}),(0,eI.jsx)("span",{className:"align-middle",children:r})]})};tL.displayName="Nameplate";var tz={};e$(tz,"PageNav",function(){return tV});var tA=function(e,t,r,n,a,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]="access"===h?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var m=(0,r[p])("accessor"===l?{get:d.get,set:d.set}:d[s],v);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=o(m.get))&&(d.get=c),(c=o(m.set))&&(d.set=c),(c=o(m.init))&&a.unshift(c)}else(c=o(m))&&("field"===l?a.unshift(c):d[s]=c)}u&&Object.defineProperty(u,n.name,d),f=!0},tR=function(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0},tU=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},tF=function(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r},tB=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},tW=Array.from(Array(6),function(e,t){return"h".concat(++t)})+"",tV=(U=[eB.observer],F=[],B=eL.PureComponent,W=[],V=[],H=[],L=function(e){(0,eq._)(r,e);var t=(0,eY._)(r);function r(){var e;return(0,eD._)(this,r),e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments))),M.set((0,eC._)(e),(tR((0,eC._)(e),W),tR((0,eC._)(e),V,[]))),q.set((0,eC._)(e),tR((0,eC._)(e),H,0)),Object.defineProperty((0,eC._)(e),"updateScrollY",{enumerable:!0,configurable:!0,writable:!0,value:function(){return e.scrollY=window.scrollY}}),Object.defineProperty((0,eC._)(e),"scrollTo",{enumerable:!0,configurable:!0,writable:!0,value:function(t){return function(){var r,n;setTimeout(function(){return(0,eQ.scrollTo)('[id="'.concat(t.id,'"]'))}),null===(n=(r=e.props).onItemClick)||void 0===n||n.call(r,t)}}}),Object.defineProperty((0,eC._)(e),"renderLink",{enumerable:!0,configurable:!0,writable:!0,value:function(t){var r=t.id,n=t.level,a=t.text,i=t.top,o=(0,eC._)(e).currentActiveId,c=e.props.depth;return n<=(void 0===c?1/0:c)&&(0,eI.jsx)(eJ.Nav.Item,{style:{textIndent:"".concat(n-1,"rem")},children:(0,eI.jsx)(eJ.Nav.Link,{href:"#".concat(r),active:o===r,onClick:e.scrollTo({id:r,level:n,text:a,top:i}),children:a})},r)}}),e}return(0,eM._)(r,[{key:"list",get:function(){return tU(this,M,"f")},set:function(e){tF(this,M,e,"f")}},{key:"scrollY",get:function(){return tU(this,q,"f")},set:function(e){tF(this,q,e,"f")}},{key:"currentActiveId",get:function(){var e,t=this.list,r=this.scrollY,n=t.findIndex(function(e){return e.top>r});return null===(e=t[n-1])||void 0===e?void 0:e.id}},{key:"componentDidMount",value:function(){globalThis.document&&(window.addEventListener("scroll",this.updateScrollY),this.list=Array.from(document.querySelectorAll(tW),function(e){e.id||(e.id=(0,eQ.uniqueID)());var t=e.id,r=e.tagName,n=e.textContent,a=e.offsetTop;return{id:t,level:+r[1],text:n.trim(),top:a}}))}},{key:"componentWillUnmount",value:function(){var e;null===(e=globalThis.removeEventListener)||void 0===e||e.call(globalThis,"scroll",this.updateScrollY)}},{key:"render",value:function(){var e=this.list,t=this.props,r=t.style,n=t.variant,a=tB(t,["style","variant"]);return(0,eI.jsx)(eJ.Nav,Object.assign({},a,{variant:void 0===n?"underline":n,style:Object.assign({flexDirection:"column"},r),children:e.map(this.renderLink)}))}}]),r}(B),M=new WeakMap,q=new WeakMap,G=L,J="PageNav","symbol"===(0,eW._)(J)&&(J=J.description?"[".concat(J.description,"]"):""),Object.defineProperty(G,"name",{configurable:!0,value:K?"".concat(K," ",J):J}),X="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(Q=B[Symbol.metadata])&&void 0!==Q?Q:null):void 0,z=[eF.observable],A=[eF.observable],R=[eF.computed],tA(L,null,z,{kind:"accessor",name:"list",static:!1,private:!1,access:{has:function(e){return"list"in e},get:function(e){return e.list},set:function(e,t){e.list=t}},metadata:X},V,W),tA(L,null,A,{kind:"accessor",name:"scrollY",static:!1,private:!1,access:{has:function(e){return"scrollY"in e},get:function(e){return e.scrollY},set:function(e,t){e.scrollY=t}},metadata:X},H,W),tA(L,null,R,{kind:"getter",name:"currentActiveId",static:!1,private:!1,access:{has:function(e){return"currentActiveId"in e},get:function(e){return e.currentActiveId}},metadata:X},null,W),tA(null,Y={value:L},U,{kind:"class",name:L.name,metadata:X},null,F),L=Y.value,X&&Object.defineProperty(L,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:X}),Object.defineProperty(L,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"PageNav"}),tR(L,F),L),tH={};e$(tH,"Option",function(){return tJ}),e$(tH,"Select",function(){return tK});var tG=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},tJ=function(e){var t=e.value,r=e.children,n=tG(e,["value","children"]);return(0,eI.jsx)(eJ.Dropdown.Item,Object.assign({},n,{"data-value":t,children:r}))};tJ.displayName="Option";var tK=function(e){var t=e.className,r=e.style,n=e.variant,a=e.menuVariant,i=e.children,o=e.value,c=e.onChange,l=e.valueRender,s=(0,eQ.makeArray)(i).flat(1/0).find(function(e){return(0,eL.isValidElement)(e)&&e.type===tJ&&e.props.value===o});return(0,eI.jsxs)(eJ.Dropdown,{onClick:function(e){var t=e.target.closest(".dropdown-item");if(t){var r=t.dataset.value;null==c||c(r)}},children:[(0,eI.jsx)(eJ.Dropdown.Toggle,{className:e0(eN)("w-100","d-flex","justify-content-between","align-items-center",!n&&"bg-white text-dark",t),style:r,variant:n,children:(null==l?void 0:l(o))||(0,eI.jsx)("div",{className:null==s?void 0:s.props.className,children:null==s?void 0:s.props.children})}),(0,eI.jsx)(eJ.Dropdown.Menu,{variant:a,children:i})]})};tK.displayName="Select";var tQ={};e$(tQ,"elementToImage",function(){return t2}),e$(tQ,"ShareBox",function(){return t4});var tX=function(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0},tZ=function(e,t,r,n,a,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]="access"===h?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var m=(0,r[p])("accessor"===l?{get:d.get,set:d.set}:d[s],v);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=o(m.get))&&(d.get=c),(c=o(m.set))&&(d.set=c),(c=o(m.init))&&a.unshift(c)}else(c=o(m))&&("field"===l?a.unshift(c):d[s]=c)}u&&Object.defineProperty(u,n.name,d),f=!0},t$=function(e,t,r,n){return new(r||(r=Promise))(function(a,i){function o(e){try{l(n.next(e))}catch(e){i(e)}}function c(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,c)}l((n=n.apply(e,t||[])).next())})},t0=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},t1=function(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r};function t2(e,t,r){return t$(this,void 0,void 0,function(){var n;return(0,eV._)(this,function(a){switch(a.label){case 0:return[4,e0(eX)(e,{useCORS:!0})];case 1:return n=a.sent(),[2,new Promise(function(e,a){return n.toBlob(function(t){return t?e(URL.createObjectURL(t)):a()},t,r)})]}})})}var t4=(ea=[eB.observer],ei=[],eo=eL.PureComponent,ec=[],el=[],es=[],et=function(e){(0,eq._)(r,e);var t=(0,eY._)(r);function r(){var e;return(0,eD._)(this,r),e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments))),Object.defineProperty((0,eC._)(e),"root",{enumerable:!0,configurable:!0,writable:!0,value:(tX((0,eC._)(e),ec),(0,eL.createRef)())}),Z.set((0,eC._)(e),tX((0,eC._)(e),el,!1)),$.set((0,eC._)(e),tX((0,eC._)(e),es,"")),Object.defineProperty((0,eC._)(e),"generateImage",{enumerable:!0,configurable:!0,writable:!0,value:function(){return t$((0,eC._)(e),void 0,void 0,function(){var e;return(0,eV._)(this,function(t){switch(t.label){case 0:return this.imageURI&&(URL.revokeObjectURL(this.imageURI),this.imageURI=""),this.loading=!0,e=this,[4,t2(this.root.current)];case 1:return e.imageURI=t.sent(),this.loading=!1,[2]}})})}}),Object.defineProperty((0,eC._)(e),"share",{enumerable:!0,configurable:!0,writable:!0,value:function(t){return t$((0,eC._)(e),void 0,void 0,function(){var e,r,n;return(0,eV._)(this,function(a){switch(a.label){case 0:return t.stopPropagation(),[4,(0,eQ.blobOf)(this.imageURI)];case 1:return r=a.sent(),n=new File([r],"".concat(this.props.title,".png"),{type:r.type}),[4,null===(e=navigator.share)||void 0===e?void 0:e.call(navigator,Object.assign({files:[n]},this.props))];case 2:return a.sent(),[2]}})})}}),e}return(0,eM._)(r,[{key:"loading",get:function(){return t0(this,Z,"f")},set:function(e){t1(this,Z,e,"f")}},{key:"imageURI",get:function(){return t0(this,$,"f")},set:function(e){t1(this,$,e,"f")}},{key:"componentDidMount",value:function(){var e;null===(e=globalThis.addEventListener)||void 0===e||e.call(globalThis,"resize",this.generateImage)}},{key:"componentWillUnmount",value:function(){var e;null===(e=globalThis.removeEventListener)||void 0===e||e.call(globalThis,"resize",this.generateImage)}},{key:"render",value:function(){var e=this.props.children,t=this.loading,r=this.imageURI;return(0,eI.jsxs)(eI.Fragment,{children:[t&&(0,eI.jsx)(tP,{}),(0,eI.jsxs)("div",{ref:this.root,className:"position-relative",onMouseEnter:r?void 0:this.generateImage,onTouchStart:r?void 0:this.generateImage,children:[e,r&&(0,eI.jsx)(eJ.Image,{className:"position-absolute start-0 top-0 w-100 h-100",fluid:!0,src:r,alt:"Share Image",onClick:this.share})]})]})}}]),r}(eo),Z=new WeakMap,$=new WeakMap,eu=et,ed="ShareBox","symbol"===(0,eW._)(ed)&&(ed=ed.description?"[".concat(ed.description,"]"):""),Object.defineProperty(eu,"name",{configurable:!0,value:ef?"".concat(ef," ",ed):ed}),ev="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(ep=eo[Symbol.metadata])&&void 0!==ep?ep:null):void 0,er=[eF.observable],en=[eF.observable],tZ(et,null,er,{kind:"accessor",name:"loading",static:!1,private:!1,access:{has:function(e){return"loading"in e},get:function(e){return e.loading},set:function(e,t){e.loading=t}},metadata:ev},el,ec),tZ(et,null,en,{kind:"accessor",name:"imageURI",static:!1,private:!1,access:{has:function(e){return"imageURI"in e},get:function(e){return e.imageURI},set:function(e,t){e.imageURI=t}},metadata:ev},es,ec),tZ(null,ee={value:et},ea,{kind:"class",name:et.name,metadata:ev},null,ei),et=ee.value,ev&&Object.defineProperty(et,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:ev}),Object.defineProperty(et,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"ShareBox"}),tX(et,ei),et),t3={};e$(t3,"SpinnerButton",function(){return t7});var t5=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},t7=function(e){var t=e.animation,r=e.loading,n=e.disabled,a=e.children,i=t5(e,["animation","loading","disabled","children"]);return(0,eI.jsxs)(eJ.Button,Object.assign({},i,{disabled:r||n,children:[r&&(0,eI.jsxs)(eI.Fragment,{children:[(0,eI.jsx)(eJ.Spinner,{as:"span",className:a?"me-2":"",size:"sm",animation:t,role:"status","aria-hidden":"true"}),!a&&(0,eI.jsx)("span",{className:"visually-hidden",children:"Loading..."})]}),a]}))};t7.displayName="SpinnerButton";var t8={};e$(t8,"TableSpinner",function(){return t6});var t6=function(e){var t=e.colSpan;return(0,eI.jsx)("tr",{children:(0,eI.jsx)("td",{className:"text-center p-4",colSpan:t,children:(0,eI.jsx)(eJ.Spinner,{animation:"border",variant:"primary"})})})};t6.displayName="TableSpinner";var t9={};e$(t9,"TimeDistance",function(){return rt});var re={ms:"millisecond(s)",s:"second(s)",m:"minute(s)",H:"hour(s)",D:"day(s)",W:"week(s)",M:"month(s)",Y:"year(s)"},rt=function(e){var t=e.className,r=e.date,n=e.unitWords,a=void 0===n?re:n,i=e.beforeWord,o=e.afterWord;r=new Date(r);var c=(0,eQ.diffTime)(r),l=c.distance,s=c.unit;return(0,eI.jsxs)("time",{className:t,dateTime:r.toJSON(),title:r.toLocaleString(),children:[Math.abs(l)," ",a[s],l<0?void 0===i?" before":i:void 0===o?" after":o]})};rt.displayName="TimeDistance";var rr={};e$(rr,"TypeEcho",function(){return rc});var rn=function(e,t,r,n,a,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,l=n.kind,s="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var v={};for(var h in n)v[h]="access"===h?{}:n[h];for(var h in n.access)v.access[h]=n.access[h];v.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var m=(0,r[p])("accessor"===l?{get:d.get,set:d.set}:d[s],v);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=o(m.get))&&(d.get=c),(c=o(m.set))&&(d.set=c),(c=o(m.init))&&a.unshift(c)}else(c=o(m))&&("field"===l?a.unshift(c):d[s]=c)}u&&Object.defineProperty(u,n.name,d),f=!0},ra=function(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0},ri=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},ro=function(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r},rc=(eb=[eB.observer],eg=[],ew=eL.PureComponent,ej=[],eO=[],ey=function(e){(0,eq._)(r,e);var t=(0,eY._)(r);function r(){var e;return(0,eD._)(this,r),e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments))),eh.set((0,eC._)(e),(ra((0,eC._)(e),ej),ra((0,eC._)(e),eO,""))),Object.defineProperty((0,eC._)(e),"init",{enumerable:!0,configurable:!0,writable:!0,value:function(t){return t&&new IntersectionObserver(function(t,r){var n,a,i,o=(0,eE._)(t,1)[0].isIntersecting;return n=void 0,a=void 0,i=function(){var e,t,n,a,i,c,l,s,u,d,f;return(0,eV._)(this,function(p){switch(p.label){case 0:if(!o)return[2];r.disconnect(),t=(e=this.props).text,a=void 0===(n=e.intervals)?150:n,i=!0,c=!1,l=void 0,p.label=1;case 1:p.trys.push([1,6,7,8]),s=t[Symbol.iterator](),p.label=2;case 2:if(i=(u=s.next()).done)return[3,5];return d=u.value,[4,(0,eQ.sleep)(a/1e3)];case 3:p.sent(),this.echoed+=d,p.label=4;case 4:return i=!0,[3,2];case 5:return[3,8];case 6:return f=p.sent(),c=!0,l=f,[3,8];case 7:try{i||null==s.return||s.return()}finally{if(c)throw l}return[7];case 8:return[2]}})},new(a||(a=Promise))(function(t,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function c(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var r;e.done?t(e.value):((r=e.value)instanceof a?r:new a(function(e){e(r)})).then(o,c)}l((i=i.apply(e,n||[])).next())})}).observe(t)}}),e}return(0,eM._)(r,[{key:"echoed",get:function(){return ri(this,eh,"f")},set:function(e){ro(this,eh,e,"f")}},{key:"render",value:function(){var e=this.props,t=e.className,r=e.text,n=this.echoed;return(0,eI.jsx)("pre",{className:e0(eN)("text-wrap",t),ref:this.init,children:n+(n===r?"":"_")})}}]),r}(ew),eh=new WeakMap,ex=ey,e_="TypeEcho","symbol"===(0,eW._)(e_)&&(e_=e_.description?"[".concat(e_.description,"]"):""),Object.defineProperty(ex,"name",{configurable:!0,value:eP?"".concat(eP," ",e_):e_}),eT="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(ek=ew[Symbol.metadata])&&void 0!==ek?ek:null):void 0,rn(ey,null,[eF.observable],{kind:"accessor",name:"echoed",static:!1,private:!1,access:{has:function(e){return"echoed"in e},get:function(e){return e.echoed},set:function(e,t){e.echoed=t}},metadata:eT},eO,ej),rn(null,em={value:ey},eb,{kind:"class",name:ey.name,metadata:eT},null,eg),ey=em.value,eT&&Object.defineProperty(ey,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:eT}),Object.defineProperty(ey,"displayName",{enumerable:!0,configurable:!0,writable:!0,value:"TypeEcho"}),ra(ey,eg),ey);eZ(module.exports,e1),eZ(module.exports,e4),eZ(module.exports,e7),eZ(module.exports,e9),eZ(module.exports,tt),eZ(module.exports,ta),eZ(module.exports,tu),eZ(module.exports,tb),eZ(module.exports,tj),eZ(module.exports,t_),eZ(module.exports,tk),eZ(module.exports,tY),eZ(module.exports,tT),eZ(module.exports,tz),eZ(module.exports,tH),eZ(module.exports,tQ),eZ(module.exports,t3),eZ(module.exports,t8),eZ(module.exports,t9),eZ(module.exports,rr);
2
2
  //# sourceMappingURL=index.js.map